@everymatrix/user-login 1.74.10 → 1.75.0
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/user-login.cjs.entry.js +249 -249
- package/dist/esm/user-login.entry.js +249 -249
- package/dist/user-login/user-login.entry.js +179 -179
- package/package.json +1 -1
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/user-login/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/stencil.config.dev.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/storybook/main.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/user-login/.stencil/packages/stencil/user-login/storybook/preview.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/user-login/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -420,7 +420,7 @@ const dispatchCustomEvent = (type, data = {}) => {
|
|
|
420
420
|
document.dispatchEvent(event);
|
|
421
421
|
};
|
|
422
422
|
|
|
423
|
-
var
|
|
423
|
+
var $r=Object.defineProperty,Hr=Object.defineProperties;var Ur=Object.getOwnPropertyDescriptors;var as=Object.getOwnPropertySymbols;var jr=Object.prototype.hasOwnProperty,Wr=Object.prototype.propertyIsEnumerable;var Mt=(o,t,e)=>t in o?$r(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,xe=(o,t)=>{for(var e in t||(t={}))jr.call(t,e)&&Mt(o,e,t[e]);if(as)for(var e of as(t))Wr.call(t,e)&&Mt(o,e,t[e]);return o},zt=(o,t)=>Hr(o,Ur(t));var I=(o,t,e)=>(Mt(o,typeof t!="symbol"?t+"":t,e),e);var Ce=(o,t,e)=>new Promise((i,s)=>{var r=l=>{try{a(e.next(l));}catch(d){s(d);}},n=l=>{try{a(e.throw(l));}catch(d){s(d);}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,n);a((e=e.apply(o,t)).next());});/**
|
|
424
424
|
* @license
|
|
425
425
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
426
426
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -428,25 +428,25 @@ var Rr=Object.defineProperty,$r=Object.defineProperties;var Hr=Object.getOwnProp
|
|
|
428
428
|
* @license
|
|
429
429
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
430
430
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
431
|
-
*/class
|
|
431
|
+
*/class qr extends HTMLElement{static get is(){return "vaadin-lumo-styles"}}g(qr);/**
|
|
432
432
|
* @license
|
|
433
433
|
* Copyright 2019 Google LLC
|
|
434
434
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
435
|
-
*/const at=globalThis,wi=at.ShadowRoot&&(at.ShadyCSS===void 0||at.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ei=Symbol(),
|
|
435
|
+
*/const at=globalThis,wi=at.ShadowRoot&&(at.ShadyCSS===void 0||at.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ei=Symbol(),ls=new WeakMap;let Ai=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==Ei)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(wi&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=ls.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&ls.set(e,t));}return t}toString(){return this.cssText}};const Yr=o=>new Ai(typeof o=="string"?o:o+"",void 0,Ei),p=(o,...t)=>{const e=o.length===1?o[0]:t.reduce((i,s,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.")})(s)+o[r+1],o[0]);return new Ai(e,o,Ei)},oo=(o,t)=>{if(wi)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),s=at.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,o.appendChild(i);}},ds=wi?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Yr(e)})(o):o;/**
|
|
436
436
|
* @license
|
|
437
437
|
* Copyright 2017 Google LLC
|
|
438
438
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
439
|
-
*/const{is:
|
|
439
|
+
*/const{is:Kr,defineProperty:Gr,getOwnPropertyDescriptor:Xr,getOwnPropertyNames:Jr,getOwnPropertySymbols:Qr,getPrototypeOf:Zr}=Object,W=globalThis,hs=W.trustedTypes,en=hs?hs.emptyScript:"",Nt=W.reactiveElementPolyfillSupport,De=(o,t)=>o,Zt={toAttribute(o,t){switch(t){case Boolean:o=o?en:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o);}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o);}catch(i){e=null;}}return e}},ro=(o,t)=>!Kr(o,t),cs={attribute:!0,type:String,converter:Zt,reflect:!1,hasChanged:ro};(Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(W.litPropertyMetadata)!=null||(W.litPropertyMetadata=new WeakMap);class le 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=cs){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Gr(this.prototype,t,s);}}static getPropertyDescriptor(t,e,i){var n;const{get:s,set:r}=(n=Xr(this.prototype,t))!=null?n:{get(){return this[e]},set(a){this[e]=a;}};return {get(){return s==null?void 0:s.call(this)},set(a){const l=s==null?void 0:s.call(this);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:cs}static _$Ei(){if(this.hasOwnProperty(De("elementProperties")))return;const t=Zr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(De("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(De("properties"))){const e=this.properties,i=[...Jr(e),...Qr(e)];for(const s of i)this.createProperty(s,e[s]);}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s);}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,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 s of i)e.unshift(ds(s));}else t!==void 0&&e.push(ds(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 oo(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 s;return (s=i.hostConnected)==null?void 0:s.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);}_$EC(t,e){var r;const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const n=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Zt).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null;}}_$AK(t,e){var r;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const n=i.getPropertyOptions(s),a=typeof n.converter=="function"?{fromAttribute:n.converter}:((r=n.converter)==null?void 0:r.fromAttribute)!==void 0?n.converter:Zt;this._$Em=s,this[s]=a.fromAttribute(e,n.type),this._$Em=null;}}requestUpdate(t,e,i){var s;if(t!==void 0){if(i!=null||(i=this.constructor.getPropertyOptions(t)),!((s=i.hasChanged)!=null?s:ro)(this[t],e))return;this.P(t,e,i);}this.isUpdatePending===!1&&(this._$ES=this._$ET());}P(t,e,i){var s;this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&((s=this._$Ej)!=null?s:this._$Ej=new Set).add(t);}_$ET(){return Ce(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 s;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)a.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],a);}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(r=>{var n;return (n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(e)):this._$EU();}catch(r){throw t=!1,this._$EU(),r}t&&this._$AE(e);}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var s;return (s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EU(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU();}updated(t){}firstUpdated(t){}}var eo;le.elementStyles=[],le.shadowRootOptions={mode:"open"},le[De("elementProperties")]=new Map,le[De("finalized")]=new Map,Nt==null||Nt({ReactiveElement:le}),((eo=W.reactiveElementVersions)!=null?eo:W.reactiveElementVersions=[]).push("2.0.4");/**
|
|
440
440
|
* @license
|
|
441
441
|
* Copyright 2017 Google LLC
|
|
442
442
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
443
|
-
*/const Oe=globalThis,ht=Oe.trustedTypes,
|
|
444
|
-
\f\r]`,we=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
445
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
443
|
+
*/const Oe=globalThis,ht=Oe.trustedTypes,us=ht?ht.createPolicy("lit-html",{createHTML:o=>o}):void 0,no="$lit$",j=`lit$${Math.random().toFixed(9).slice(2)}$`,ao="?"+j,tn=`<${ao}>`,ie=document,ze=()=>ie.createComment(""),Ne=o=>o===null||typeof o!="object"&&typeof o!="function",Ii=Array.isArray,sn=o=>Ii(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Lt=`[
|
|
444
|
+
\f\r]`,we=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ps=/-->/g,_s=/>/g,Q=RegExp(`>|${Lt}(?:([^\\s"'>=/]+)(${Lt}*=${Lt}*(?:[^
|
|
445
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ms=/'/g,fs=/"/g,lo=/^(?:script|style|textarea|title)$/i,_e=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),gs=new WeakMap,Z=ie.createTreeWalker(ie,129);function ho(o,t){if(!Ii(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return us!==void 0?us.createHTML(t):t}const on=(o,t)=>{const e=o.length-1,i=[];let s,r=t===2?"<svg>":t===3?"<math>":"",n=we;for(let a=0;a<e;a++){const l=o[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===we?h[1]==="!--"?n=ps:h[1]!==void 0?n=_s:h[2]!==void 0?(lo.test(h[2])&&(s=RegExp("</"+h[2],"g")),n=Q):h[3]!==void 0&&(n=Q):n===Q?h[0]===">"?(n=s!=null?s:we,c=-1):h[1]===void 0?c=-2:(c=n.lastIndex-h[2].length,d=h[1],n=h[3]===void 0?Q:h[3]==='"'?fs:ms):n===fs||n===ms?n=Q:n===ps||n===_s?n=we:(n=Q,s=void 0);const m=n===Q&&o[a+1].startsWith("/>")?" ":"";r+=n===we?l+tn:c>=0?(i.push(d),l.slice(0,c)+no+l.slice(c)+j+m):l+j+(c===-2?a:m);}return [ho(o,r+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class Le{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,n=0;const a=t.length-1,l=this.parts,[d,h]=on(t,e);if(this.el=Le.createElement(d,i),Z.currentNode=this.el.content,e===2||e===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes);}for(;(s=Z.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(const c of s.getAttributeNames())if(c.endsWith(no)){const u=h[n++],m=s.getAttribute(c).split(j),f=/([.?@])?(.*)/.exec(u);l.push({type:1,index:r,name:f[2],strings:m,ctor:f[1]==="."?nn:f[1]==="?"?an:f[1]==="@"?ln:yt}),s.removeAttribute(c);}else c.startsWith(j)&&(l.push({type:6,index:r}),s.removeAttribute(c));if(lo.test(s.tagName)){const c=s.textContent.split(j),u=c.length-1;if(u>0){s.textContent=ht?ht.emptyScript:"";for(let m=0;m<u;m++)s.append(c[m],ze()),Z.nextNode(),l.push({type:2,index:++r});s.append(c[u],ze());}}}else if(s.nodeType===8)if(s.data===ao)l.push({type:2,index:r});else {let c=-1;for(;(c=s.data.indexOf(j,c+1))!==-1;)l.push({type:7,index:r}),c+=j.length-1;}r++;}}static createElement(t,e){const i=ie.createElement("template");return i.innerHTML=t,i}}function me(o,t,e=o,i){var n,a,l;if(t===_e)return t;let s=i!==void 0?(n=e._$Co)==null?void 0:n[i]:e._$Cl;const r=Ne(t)?void 0:t._$litDirective$;return (s==null?void 0:s.constructor)!==r&&((a=s==null?void 0:s._$AO)==null||a.call(s,!1),r===void 0?s=void 0:(s=new r(o),s._$AT(o,e,i)),i!==void 0?((l=e._$Co)!=null?l:e._$Co=[])[i]=s:e._$Cl=s),s!==void 0&&(t=me(o,s._$AS(o,t.values),s,i)),t}class rn{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,s=((d=t==null?void 0:t.creationScope)!=null?d:ie).importNode(e,!0);Z.currentNode=s;let r=Z.nextNode(),n=0,a=0,l=i[0];for(;l!==void 0;){if(n===l.index){let h;l.type===2?h=new We(r,r.nextSibling,this,t):l.type===1?h=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(h=new dn(r,this,t)),this._$AV.push(h),l=i[++a];}n!==(l==null?void 0:l.index)&&(r=Z.nextNode(),n++);}return Z.currentNode=ie,s}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 We{get _$AU(){var t,e;return (e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,i,s){var r;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=(r=s==null?void 0:s.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=me(this,t,e),Ne(t)?t===A||t==null||t===""?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==_e&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):sn(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!==A&&Ne(this._$AH)?this._$AA.nextSibling.data=t:this.T(ie.createTextNode(t)),this._$AH=t;}$(t){var r;const{values:e,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Le.createElement(ho(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===s)this._$AH.p(e);else {const n=new rn(s,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n;}}_$AC(t){let e=gs.get(t.strings);return e===void 0&&gs.set(t.strings,e=new Le(t)),e}k(t){Ii(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const r of t)s===e.length?e.push(i=new We(this.O(ze()),this.O(ze()),this,this.options)):i=e[s],i._$AI(r),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s);}_$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 s=t.nextSibling;t.remove(),t=s;}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t));}}class yt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,r){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=A;}_$AI(t,e=this,i,s){const r=this.strings;let n=!1;if(r===void 0)t=me(this,t,e,0),n=!Ne(t)||t!==this._$AH&&t!==_e,n&&(this._$AH=t);else {const a=t;let l,d;for(t=r[0],l=0;l<r.length-1;l++)d=me(this,a[i+l],e,l),d===_e&&(d=this._$AH[l]),n||(n=!Ne(d)||d!==this._$AH[l]),d===A?t=A:t!==A&&(t+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d;}n&&!s&&this.j(t);}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"");}}class nn extends yt{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===A?void 0:t;}}class an extends yt{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A);}}class ln extends yt{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5;}_$AI(t,e=this){var n;if((t=(n=me(this,t,e,0))!=null?n:A)===_e)return;const i=this._$AH,s=t===A&&i!==A||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==A&&(i===A||s);s&&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 dn{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){me(this,t);}}const Bt=Oe.litHtmlPolyfillSupport;var to;Bt==null||Bt(Le,We),((to=Oe.litHtmlVersions)!=null?to:Oe.litHtmlVersions=[]).push("3.2.1");const co=(o,t,e)=>{var r,n;const i=(r=e==null?void 0:e.renderBefore)!=null?r:t;let s=i._$litPart$;if(s===void 0){const a=(n=e==null?void 0:e.renderBefore)!=null?n:null;i._$litPart$=s=new We(t.insertBefore(ze(),a),a,void 0,e!=null?e:{});}return s._$AI(o),s};/**
|
|
446
446
|
* @license
|
|
447
447
|
* Copyright 2017 Google LLC
|
|
448
448
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
449
|
-
*/class de extends le{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=
|
|
449
|
+
*/class de extends le{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=co(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 _e}}var io;de._$litElement$=!0,de.finalized=!0,(io=globalThis.litElementHydrateSupport)==null||io.call(globalThis,{LitElement:de});const Ft=globalThis.litElementPolyfillSupport;Ft==null||Ft({LitElement:de});var so;((so=globalThis.litElementVersions)!=null?so:globalThis.litElementVersions=[]).push("4.1.1");/**
|
|
450
450
|
* @license
|
|
451
451
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
452
452
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -454,17 +454,17 @@ var Rr=Object.defineProperty,$r=Object.defineProperties;var Hr=Object.getOwnProp
|
|
|
454
454
|
* @license
|
|
455
455
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
456
456
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
457
|
-
*/const
|
|
458
|
-
`)}const ct="vaadin-themable-mixin-style";function
|
|
457
|
+
*/const uo=[],ei=new Set,ki=new Set;function po(o){return o&&Object.prototype.hasOwnProperty.call(o,"__themes")}function hn(o){return po(customElements.get(o))}function cn(o=[]){return [o].flat(1/0).filter(t=>t instanceof Ai?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function _o(o,t){return (o||"").split(" ").some(e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t))}function mo(o){return o.map(t=>t.cssText).join(`
|
|
458
|
+
`)}const ct="vaadin-themable-mixin-style";function un(o,t){const e=document.createElement("style");e.id=ct,e.textContent=mo(o),t.content.appendChild(e);}function pn(o){if(!o.shadowRoot)return;const t=o.constructor;if(o instanceof de)[...o.shadowRoot.querySelectorAll("style")].forEach(e=>e.remove()),oo(o.shadowRoot,t.elementStyles);else {const e=o.shadowRoot.getElementById(ct),i=t.prototype._template;e.textContent=i.content.getElementById(ct).textContent;}}function _n(o){ei.forEach(t=>{const e=t.deref();e instanceof o?pn(e):e||ei.delete(t);});}function fo(o){if(o.prototype instanceof de)o.elementStyles=o.finalizeStyles(o.styles);else {const t=o.prototype._template;t.content.getElementById(ct).textContent=mo(o.getStylesForThis());}ki.forEach(t=>{const e=customElements.get(t);e!==o&&e.prototype instanceof o&&fo(e);});}function mn(o,t){const e=o.__themes;return !e||!t?!1:e.some(i=>i.styles.some(s=>t.some(r=>r.cssText===s.cssText)))}function _(o,t,e={}){t=cn(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(o,t,e):uo.push({themeFor:o,styles:t,include:e.include,moduleId:e.moduleId}),o&&ki.forEach(i=>{if(_o(o,i)&&hn(i)){const s=customElements.get(i);mn(s,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".`),fo(s),_n(s);}});}function ti(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():uo}function fn(o=""){let t=0;return o.startsWith("lumo-")||o.startsWith("material-")?t=1:o.startsWith("vaadin-")&&(t=2),t}function go(o){const t=[];return o.include&&[].concat(o.include).forEach(e=>{const i=ti().find(s=>s.moduleId===e);i?t.push(...go(i),...i.styles):console.warn(`Included moduleId ${e} not found in style registry`);},o.styles),t}function gn(o){const t=`${o}-default-theme`,e=ti().filter(i=>i.moduleId!==t&&_o(i.themeFor,o)).map(i=>zt(xe({},i),{styles:[...go(i),...i.styles],includePriority:fn(i.moduleId)})).sort((i,s)=>s.includePriority-i.includePriority);return e.length>0?e:ti().filter(i=>i.moduleId===t)}const x=o=>class extends xt(o){constructor(){super(),ei.add(new WeakRef(this));}static finalize(){if(super.finalize(),this.is&&ki.add(this.is),this.elementStyles)return;const e=this.prototype._template;!e||po(this)||un(this.getStylesForThis(),e);}static finalizeStyles(e){const i=this.getStylesForThis();return e?[...[e].flat(1/0),...i]:i}static getStylesForThis(){const e=o.__themes||[],i=Object.getPrototypeOf(this.prototype),s=(i?i.constructor.__themes:[])||[];this.__themes=[...e,...s,...gn(this.is)];const r=this.__themes.flatMap(n=>n.styles);return r.filter((n,a)=>a===r.lastIndexOf(n))}};/**
|
|
459
459
|
* @license
|
|
460
460
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
461
461
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
462
|
-
*/const
|
|
463
|
-
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},ge=(o,...t)=>{
|
|
462
|
+
*/const vn=(o,...t)=>{const e=document.createElement("style");e.id=o,e.textContent=t.map(i=>i.toString()).join(`
|
|
463
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},ge=(o,...t)=>{vn(`lumo-${o}`,t);};/**
|
|
464
464
|
* @license
|
|
465
465
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
466
466
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
467
|
-
*/const
|
|
467
|
+
*/const bn=p`
|
|
468
468
|
:host {
|
|
469
469
|
/* Base (background) */
|
|
470
470
|
--lumo-base-color: #fff;
|
|
@@ -549,7 +549,7 @@ var Rr=Object.defineProperty,$r=Object.defineProperties;var Hr=Object.getOwnProp
|
|
|
549
549
|
--lumo-disabled-text-color: GrayText;
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
|
-
`;ge("color-props",
|
|
552
|
+
`;ge("color-props",bn);const yn=p`
|
|
553
553
|
[theme~='dark'] {
|
|
554
554
|
/* Base (background) */
|
|
555
555
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -667,11 +667,11 @@ var Rr=Object.defineProperty,$r=Object.defineProperties;var Hr=Object.getOwnProp
|
|
|
667
667
|
pre code {
|
|
668
668
|
background: transparent;
|
|
669
669
|
}
|
|
670
|
-
`;_("",
|
|
670
|
+
`;_("",yn,{moduleId:"lumo-color"});/**
|
|
671
671
|
* @license
|
|
672
672
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
673
673
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
674
|
-
*/const
|
|
674
|
+
*/const xn=p`
|
|
675
675
|
@font-face {
|
|
676
676
|
font-family: 'lumo-icons';
|
|
677
677
|
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==)
|
|
@@ -724,11 +724,11 @@ var Rr=Object.defineProperty,$r=Object.defineProperties;var Hr=Object.getOwnProp
|
|
|
724
724
|
--lumo-icons-upload: '\\ea29';
|
|
725
725
|
--lumo-icons-user: '\\ea2a';
|
|
726
726
|
}
|
|
727
|
-
`;ge("font-icons",
|
|
727
|
+
`;ge("font-icons",xn);/**
|
|
728
728
|
* @license
|
|
729
729
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
730
730
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
731
|
-
*/const
|
|
731
|
+
*/const Cn=p`
|
|
732
732
|
:host {
|
|
733
733
|
--lumo-size-xs: 1.625rem;
|
|
734
734
|
--lumo-size-s: 1.875rem;
|
|
@@ -743,11 +743,11 @@ var Rr=Object.defineProperty,$r=Object.defineProperties;var Hr=Object.getOwnProp
|
|
|
743
743
|
/* For backwards compatibility */
|
|
744
744
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
745
745
|
}
|
|
746
|
-
`;ge("sizing-props",
|
|
746
|
+
`;ge("sizing-props",Cn);/**
|
|
747
747
|
* @license
|
|
748
748
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
749
749
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
750
|
-
*/const
|
|
750
|
+
*/const wn=p`
|
|
751
751
|
:host {
|
|
752
752
|
/* Square */
|
|
753
753
|
--lumo-space-xs: 0.25rem;
|
|
@@ -770,11 +770,11 @@ var Rr=Object.defineProperty,$r=Object.defineProperties;var Hr=Object.getOwnProp
|
|
|
770
770
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
771
771
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
772
772
|
}
|
|
773
|
-
`;ge("spacing-props",
|
|
773
|
+
`;ge("spacing-props",wn);/**
|
|
774
774
|
* @license
|
|
775
775
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
776
776
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
777
|
-
*/const
|
|
777
|
+
*/const En=p`
|
|
778
778
|
:host {
|
|
779
779
|
/* Border radius */
|
|
780
780
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -874,11 +874,11 @@ var Rr=Object.defineProperty,$r=Object.defineProperties;var Hr=Object.getOwnProp
|
|
|
874
874
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
875
875
|
--vaadin-input-field-value-font-weight: 500;
|
|
876
876
|
}
|
|
877
|
-
`;ge("style-props",
|
|
877
|
+
`;ge("style-props",En);/**
|
|
878
878
|
* @license
|
|
879
879
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
880
880
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
881
|
-
*/const
|
|
881
|
+
*/const An=p`
|
|
882
882
|
:host {
|
|
883
883
|
/* prettier-ignore */
|
|
884
884
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -898,7 +898,7 @@ var Rr=Object.defineProperty,$r=Object.defineProperties;var Hr=Object.getOwnProp
|
|
|
898
898
|
--lumo-line-height-s: 1.375;
|
|
899
899
|
--lumo-line-height-m: 1.625;
|
|
900
900
|
}
|
|
901
|
-
`,
|
|
901
|
+
`,In=p`
|
|
902
902
|
body,
|
|
903
903
|
:host {
|
|
904
904
|
font-family: var(--lumo-font-family);
|
|
@@ -990,7 +990,7 @@ var Rr=Object.defineProperty,$r=Object.defineProperties;var Hr=Object.getOwnProp
|
|
|
990
990
|
border-left: none;
|
|
991
991
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
992
992
|
}
|
|
993
|
-
`;_("",
|
|
993
|
+
`;_("",In,{moduleId:"lumo-typography"});ge("typography-props",An);_("vaadin-checkbox",p`
|
|
994
994
|
:host {
|
|
995
995
|
color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
|
|
996
996
|
font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
|
|
@@ -1310,7 +1310,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1310
1310
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1311
1311
|
Code distributed by Google as part of the polymer project is also
|
|
1312
1312
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1313
|
-
*/let
|
|
1313
|
+
*/let kn=/(url\()([^)]*)(\))/g,Sn=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,Ze,O;function Me(o,t){if(o&&Sn.test(o)||o==="//")return o;if(Ze===void 0){Ze=!1;try{const e=new URL("b","http://a");e.pathname="c%20d",Ze=e.href==="http://a/c%20d";}catch(e){}}if(t||(t=document.baseURI||window.location.href),Ze)try{return new URL(o,t).href}catch(e){return o}return O||(O=document.implementation.createHTMLDocument("temp"),O.base=O.createElement("base"),O.head.appendChild(O.base),O.anchor=O.createElement("a"),O.body.appendChild(O.anchor)),O.base.href=t,O.anchor.href=o,O.anchor.href||o}function Si(o,t){return o.replace(kn,function(e,i,s,r){return i+"'"+Me(s.replace(/["']/g,""),t)+"'"+r})}function Pi(o){return o.substring(0,o.lastIndexOf("/")+1)}/**
|
|
1314
1314
|
@license
|
|
1315
1315
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1316
1316
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1318,7 +1318,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1318
1318
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1319
1319
|
Code distributed by Google as part of the polymer project is also
|
|
1320
1320
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1321
|
-
*/const
|
|
1321
|
+
*/const vo=!window.ShadyDOM||!window.ShadyDOM.inUse;const Pn=vo&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const o=new CSSStyleSheet;o.replaceSync("");const t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[o],t.shadowRoot.adoptedStyleSheets[0]===o}catch(o){return !1}})();let Tn=window.Polymer&&window.Polymer.rootPath||Pi(document.baseURI||window.location.href),ut=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;let pt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Dn=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,bo=window.Polymer&&window.Polymer.legacyOptimizations||!1,yo=window.Polymer&&window.Polymer.legacyWarnings||!1,On=window.Polymer&&window.Polymer.syncInitialRender||!1,ii=window.Polymer&&window.Polymer.legacyUndefined||!1,Mn=window.Polymer&&window.Polymer.orderedComputed||!1,vs=window.Polymer&&window.Polymer.removeNestedTemplates||!1,zn=window.Polymer&&window.Polymer.fastDomIf||!1,bs=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;let Nn=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;/**
|
|
1322
1322
|
@license
|
|
1323
1323
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1324
1324
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1326,7 +1326,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1326
1326
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1327
1327
|
Code distributed by Google as part of the polymer project is also
|
|
1328
1328
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1329
|
-
*/let
|
|
1329
|
+
*/let Ln=0;const C=function(o){let t=o.__mixinApplications;t||(t=new WeakMap,o.__mixinApplications=t);let e=Ln++;function i(s){let r=s.__mixinSet;if(r&&r[e])return s;let n=t,a=n.get(s);if(!a){a=o(s),n.set(s,a);let l=Object.create(a.__mixinSet||r||null);l[e]=!0,a.__mixinSet=l;}return a}return i};/**
|
|
1330
1330
|
@license
|
|
1331
1331
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1332
1332
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1334,7 +1334,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1334
1334
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1335
1335
|
Code distributed by Google as part of the polymer project is also
|
|
1336
1336
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1337
|
-
*/let Ti={},
|
|
1337
|
+
*/let Ti={},xo={};function ys(o,t){Ti[o]=xo[o.toLowerCase()]=t;}function xs(o){return Ti[o]||xo[o.toLowerCase()]}function Bn(o){o.querySelector("style")&&console.warn("dom-module %s has style outside template",o.id);}class Be extends HTMLElement{static get observedAttributes(){return ["id"]}static import(t,e){if(t){let i=xs(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register();}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Me(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Pi(e);}return this.__assetpath}register(t){if(t=t||this.id,t){if(pt&&xs(t)!==void 0)throw ys(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,ys(t,this),Bn(this);}}}Be.prototype.modules=Ti;customElements.define("dom-module",Be);/**
|
|
1338
1338
|
@license
|
|
1339
1339
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1340
1340
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1342,7 +1342,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1342
1342
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1343
1343
|
Code distributed by Google as part of the polymer project is also
|
|
1344
1344
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1345
|
-
*/const
|
|
1345
|
+
*/const Fn="link[rel=import][type~=css]",Vn="include",Cs="shady-unscoped";function Co(o){return Be.import(o)}function ws(o){let t=o.body?o.body:o;const e=Si(t.textContent,o.baseURI),i=document.createElement("style");return i.textContent=e,i}function Rn(o){const t=o.trim().split(/\s+/),e=[];for(let i=0;i<t.length;i++)e.push(...$n(t[i]));return e}function $n(o){const t=Co(o);if(!t)return console.warn("Could not find style data in module named",o),[];if(t._styles===void 0){const e=[];e.push(...Eo(t));const i=t.querySelector("template");i&&e.push(...wo(i,t.assetpath)),t._styles=e;}return t._styles}function wo(o,t){if(!o._styles){const e=[],i=o.content.querySelectorAll("style");for(let s=0;s<i.length;s++){let r=i[s],n=r.getAttribute(Vn);n&&e.push(...Rn(n).filter(function(a,l,d){return d.indexOf(a)===l})),t&&(r.textContent=Si(r.textContent,t)),e.push(r);}o._styles=e;}return o._styles}function Hn(o){let t=Co(o);return t?Eo(t):[]}function Eo(o){const t=[],e=o.querySelectorAll(Fn);for(let i=0;i<e.length;i++){let s=e[i];if(s.import){const r=s.import,n=s.hasAttribute(Cs);if(n&&!r._unscopedStyle){const a=ws(r);a.setAttribute(Cs,""),r._unscopedStyle=a;}else r._style||(r._style=ws(r));t.push(n?r._unscopedStyle:r._style);}}return t}/**
|
|
1346
1346
|
@license
|
|
1347
1347
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1348
1348
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1358,7 +1358,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1358
1358
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1359
1359
|
Code distributed by Google as part of the polymer project is also
|
|
1360
1360
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1361
|
-
*/function si(o){return o.indexOf(".")>=0}function se(o){let t=o.indexOf(".");return t===-1?o:o.slice(0,t)}function
|
|
1361
|
+
*/function si(o){return o.indexOf(".")>=0}function se(o){let t=o.indexOf(".");return t===-1?o:o.slice(0,t)}function Ao(o,t){return o.indexOf(t+".")===0}function Fe(o,t){return t.indexOf(o+".")===0}function Ve(o,t,e){return t+e.slice(o.length)}function Un(o,t){return o===t||Ao(o,t)||Fe(o,t)}function Se(o){if(Array.isArray(o)){let t=[];for(let e=0;e<o.length;e++){let i=o[e].toString().split(".");for(let s=0;s<i.length;s++)t.push(i[s]);}return t.join(".")}else return o}function Io(o){return Array.isArray(o)?Se(o).split("."):o.toString().split(".")}function D(o,t,e){let i=o,s=Io(t);for(let r=0;r<s.length;r++){if(!i)return;let n=s[r];i=i[n];}return e&&(e.path=s.join(".")),i}function Es(o,t,e){let i=o,s=Io(t),r=s[s.length-1];if(s.length>1){for(let n=0;n<s.length-1;n++){let a=s[n];if(i=i[a],!i)return}i[r]=e;}else i[t]=e;return s.join(".")}/**
|
|
1362
1362
|
@license
|
|
1363
1363
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1364
1364
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1366,7 +1366,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1366
1366
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1367
1367
|
Code distributed by Google as part of the polymer project is also
|
|
1368
1368
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1369
|
-
*/const _t={},
|
|
1369
|
+
*/const _t={},jn=/-[a-z]/g,Wn=/([A-Z])/g;function ko(o){return _t[o]||(_t[o]=o.indexOf("-")<0?o:o.replace(jn,t=>t[1].toUpperCase()))}function Ct(o){return _t[o]||(_t[o]=o.replace(Wn,"-$1").toLowerCase())}/**
|
|
1370
1370
|
@license
|
|
1371
1371
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1372
1372
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1374,7 +1374,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1374
1374
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1375
1375
|
Code distributed by Google as part of the polymer project is also
|
|
1376
1376
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1377
|
-
*/let
|
|
1377
|
+
*/let qn=0,So=0,he=[],Yn=0,oi=!1,Po=document.createTextNode("");new window.MutationObserver(Kn).observe(Po,{characterData:!0});function Kn(){oi=!1;const o=he.length;for(let t=0;t<o;t++){let e=he[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}he.splice(0,o),So+=o;}const Gn={after(o){return {run(t){return window.setTimeout(t,o)},cancel(t){window.clearTimeout(t);}}},run(o,t){return window.setTimeout(o,t)},cancel(o){window.clearTimeout(o);}},To={run(o){return oi||(oi=!0,Po.textContent=Yn++),he.push(o),qn++},cancel(o){const t=o-So;if(t>=0){if(!he[t])throw new Error("invalid async handle: "+o);he[t]=null;}}};/**
|
|
1378
1378
|
@license
|
|
1379
1379
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1380
1380
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1382,7 +1382,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1382
1382
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1383
1383
|
Code distributed by Google as part of the polymer project is also
|
|
1384
1384
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1385
|
-
*/const
|
|
1385
|
+
*/const Xn=To,Do=C(o=>{class t extends o{static createProperties(i){const s=this.prototype;for(let r in i)r in s||s._createPropertyAccessor(r);}static attributeNameForProperty(i){return i.toLowerCase()}static typeForProperty(i){}_createPropertyAccessor(i,s){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,s));}_addPropertyToAttributeMap(i){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let s=this.__dataAttributes[i];return s||(s=this.constructor.attributeNameForProperty(i),this.__dataAttributes[s]=i),s}_definePropertyAccessor(i,s){Object.defineProperty(this,i,{get(){return this.__data[i]},set:s?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,s){this._setPendingProperty(i,s)&&this._invalidateProperties();}_getProperty(i){return this.__data[i]}_setPendingProperty(i,s,r){let n=this.__data[i],a=this._shouldPropertyChange(i,s,n);return a&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(i in this.__dataOld)&&(this.__dataOld[i]=n),this.__data[i]=s,this.__dataPending[i]=s),a}_isPropertyPending(i){return !!(this.__dataPending&&this.__dataPending.hasOwnProperty(i))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Xn.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,s=this.__dataPending,r=this.__dataOld;this._shouldPropertiesChange(i,s,r)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(i,s,r)),this.__dataCounter--;}_shouldPropertiesChange(i,s,r){return !!s}_propertiesChanged(i,s,r){}_shouldPropertyChange(i,s,r){return r!==s&&(r===r||s===s)}attributeChangedCallback(i,s,r,n){s!==r&&this._attributeToProperty(i,r),super.attributeChangedCallback&&super.attributeChangedCallback(i,s,r,n);}_attributeToProperty(i,s,r){if(!this.__serializing){const n=this.__dataAttributes,a=n&&n[i]||i;this[a]=this._deserializeValue(s,r||this.constructor.typeForProperty(a));}}_propertyToAttribute(i,s,r){this.__serializing=!0,r=arguments.length<3?this[i]:r,this._valueToNodeAttribute(this,r,s||this.constructor.attributeNameForProperty(i)),this.__serializing=!1;}_valueToNodeAttribute(i,s,r){const n=this._serializeValue(s);(r==="class"||r==="name"||r==="slot")&&(i=k(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,s){switch(s){case Boolean:return i!==null;case Number:return Number(i);default:return i}}}return t});/**
|
|
1386
1386
|
@license
|
|
1387
1387
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1388
1388
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1390,7 +1390,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1390
1390
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1391
1391
|
Code distributed by Google as part of the polymer project is also
|
|
1392
1392
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1393
|
-
*/const
|
|
1393
|
+
*/const Oo={};let et=HTMLElement.prototype;for(;et;){let o=Object.getOwnPropertyNames(et);for(let t=0;t<o.length;t++)Oo[o[t]]=!0;et=Object.getPrototypeOf(et);}const Jn=window.trustedTypes?o=>trustedTypes.isHTML(o)||trustedTypes.isScript(o)||trustedTypes.isScriptURL(o):()=>!1;function Qn(o,t){if(!Oo[t]){let e=o[t];e!==void 0&&(o.__data?o._setPendingProperty(t,e):(o.__dataProto?o.hasOwnProperty(JSCompiler_renameProperty("__dataProto",o))||(o.__dataProto=Object.create(o.__dataProto)):o.__dataProto={},o.__dataProto[t]=e));}}const Zn=C(o=>{const t=Do(o);class e extends t{static createPropertiesForAttributes(){let s=this.observedAttributes;for(let r=0;r<s.length;r++)this.prototype._createPropertyAccessor(ko(s[r]));}static attributeNameForProperty(s){return Ct(s)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties();}_initializeProtoProperties(s){for(let r in s)this._setProperty(r,s[r]);}_ensureAttribute(s,r){const n=this;n.hasAttribute(s)||this._valueToNodeAttribute(n,r,s);}_serializeValue(s){switch(typeof s){case"object":if(s instanceof Date)return s.toString();if(s){if(Jn(s))return s;try{return JSON.stringify(s)}catch(r){return ""}}default:return super._serializeValue(s)}}_deserializeValue(s,r){let n;switch(r){case Object:try{n=JSON.parse(s);}catch(a){n=s;}break;case Array:try{n=JSON.parse(s);}catch(a){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${s}`);}break;case Date:n=isNaN(s)?String(s):Number(s),n=new Date(n);break;default:n=super._deserializeValue(s,r);break}return n}_definePropertyAccessor(s,r){Qn(this,s),super._definePropertyAccessor(s,r);}_hasAccessor(s){return this.__dataHasAccessor&&this.__dataHasAccessor[s]}_isPropertyPending(s){return !!(this.__dataPending&&s in this.__dataPending)}}return e});/**
|
|
1394
1394
|
@license
|
|
1395
1395
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1396
1396
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1398,7 +1398,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1398
1398
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1399
1399
|
Code distributed by Google as part of the polymer project is also
|
|
1400
1400
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1401
|
-
*/const
|
|
1401
|
+
*/const ea={"dom-if":!0,"dom-repeat":!0};let As=!1,Is=!1;function ta(){if(!As){As=!0;const o=document.createElement("textarea");o.placeholder="a",Is=o.placeholder===o.textContent;}return Is}function ia(o){ta()&&o.localName==="textarea"&&o.placeholder&&o.placeholder===o.textContent&&(o.textContent=null);}const sa=(()=>{const o=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return (t,e,i)=>{const s=e.getAttribute(i);if(o&&i.startsWith("on-")){t.setAttribute(i,o.createScript(s,i));return}t.setAttribute(i,s);}})();function oa(o){let t=o.getAttribute("is");if(t&&ea[t]){let e=o;for(e.removeAttribute("is"),o=e.ownerDocument.createElement(t),e.parentNode.replaceChild(o,e),o.appendChild(e);e.attributes.length;){const{name:i}=e.attributes[0];sa(o,e,i),e.removeAttribute(i);}}return o}function Mo(o,t){let e=t.parentInfo&&Mo(o,t.parentInfo);if(e){for(let i=e.firstChild,s=0;i;i=i.nextSibling)if(t.parentIndex===s++)return i}else return o}function ra(o,t,e,i){i.id&&(t[i.id]=e);}function na(o,t,e){if(e.events&&e.events.length)for(let i=0,s=e.events,r;i<s.length&&(r=s[i]);i++)o._addMethodEventListenerToNode(t,r.name,r.value,o);}function aa(o,t,e,i){e.templateInfo&&(t._templateInfo=e.templateInfo,t._parentTemplateInfo=i);}function la(o,t,e){return o=o._methodHost||o,function(s){o[e]?o[e](s,s.detail):console.warn("listener method `"+e+"` not defined");}}const da=C(o=>{class t extends o{static _parseTemplate(i,s){if(!i._templateInfo){let r=i._templateInfo={};r.nodeInfoList=[],r.nestedTemplate=!!s,r.stripWhiteSpace=s&&s.stripWhiteSpace||i.hasAttribute&&i.hasAttribute("strip-whitespace"),this._parseTemplateContent(i,r,{parent:null});}return i._templateInfo}static _parseTemplateContent(i,s,r){return this._parseTemplateNode(i.content,s,r)}static _parseTemplateNode(i,s,r){let n=!1,a=i;return a.localName=="template"&&!a.hasAttribute("preserve-content")?n=this._parseTemplateNestedTemplate(a,s,r)||n:a.localName==="slot"&&(s.hasInsertionPoint=!0),ia(a),a.firstChild&&this._parseTemplateChildNodes(a,s,r),a.hasAttributes&&a.hasAttributes()&&(n=this._parseTemplateNodeAttributes(a,s,r)||n),n||r.noted}static _parseTemplateChildNodes(i,s,r){if(!(i.localName==="script"||i.localName==="style"))for(let n=i.firstChild,a=0,l;n;n=l){if(n.localName=="template"&&(n=oa(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(s.stripWhiteSpace&&!n.textContent.trim()){i.removeChild(n);continue}}let d={parentIndex:a,parentInfo:r};this._parseTemplateNode(n,s,d)&&(d.infoIndex=s.nodeInfoList.push(d)-1),n.parentNode&&a++;}}static _parseTemplateNestedTemplate(i,s,r){let n=i,a=this._parseTemplate(n,s);return (a.content=n.content.ownerDocument.createDocumentFragment()).appendChild(n.content),r.templateInfo=a,!0}static _parseTemplateNodeAttributes(i,s,r){let n=!1,a=Array.from(i.attributes);for(let l=a.length-1,d;d=a[l];l--)n=this._parseTemplateNodeAttribute(i,s,r,d.name,d.value)||n;return n}static _parseTemplateNodeAttribute(i,s,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 s=i._templateInfo;return s&&s.content||i.content}_stampTemplate(i,s){i&&!i.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(i),s=s||this.constructor._parseTemplate(i);let r=s.nodeInfoList,n=s.content||i.content,a=document.importNode(n,!0);a.__noInsertionPoint=!s.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]=Mo(a,c);ra(this,a.$,u,c),aa(this,u,c,s),na(this,u,c);}return a=a,a}_addMethodEventListenerToNode(i,s,r,n){n=n||i;let a=la(n,s,r);return this._addEventListenerToNode(i,s,a),a}_addEventListenerToNode(i,s,r){i.addEventListener(s,r);}_removeEventListenerFromNode(i,s,r){i.removeEventListener(s,r);}}return t});/**
|
|
1402
1402
|
* @fileoverview
|
|
1403
1403
|
* @suppress {checkPrototypalTypes}
|
|
1404
1404
|
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1408,7 +1408,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1408
1408
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
1409
1409
|
* Google as part of the polymer project is also subject to an additional IP
|
|
1410
1410
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1411
|
-
*/let Re=0;const $e=[],y={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Mo="__computeInfo",da=/[A-Z]/;function Vt(o,t,e){let i=o[t];if(!i)i=o[t]={};else if(!o.hasOwnProperty(t)&&(i=o[t]=Object.create(o[t]),e))for(let s in i){let r=i[s],n=i[s]=Array(r.length);for(let a=0;a<r.length;a++)n[a]=r[a];}return i}function Pe(o,t,e,i,s,r){if(t){let n=!1;const a=Re++;for(let l in e){let d=s?se(l):l,h=t[d];if(h)for(let c=0,u=h.length,f;c<u&&(f=h[c]);c++)(!f.info||f.info.lastRun!==a)&&(!s||Di(l,f.trigger))&&(f.info&&(f.info.lastRun=a),f.fn(o,l,e,i,f.info,s,r),n=!0);}return n}return !1}function ha(o,t,e,i,s,r,n,a){let l=!1,d=n?se(i):i,h=t[d];if(h)for(let c=0,u=h.length,f;c<u&&(f=h[c]);c++)(!f.info||f.info.lastRun!==e)&&(!n||Di(i,f.trigger))&&(f.info&&(f.info.lastRun=e),f.fn(o,i,s,r,f.info,n,a),l=!0);return l}function Di(o,t){if(t){let e=t.name;return e==o||!!(t.structured&&Eo(e,o))||!!(t.wildcard&&Fe(e,o))}else return !0}function Is(o,t,e,i,s){let r=typeof s.method=="string"?o[s.method]:s.method,n=s.property;r?r.call(o,o.__data[n],i[n]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined");}function ca(o,t,e,i,s){let r=o[y.NOTIFY],n,a=Re++;for(let d in t)t[d]&&(r&&ha(o,r,a,d,e,i,s)||s&&ua(o,d,e))&&(n=!0);let l;n&&(l=o.__dataHost)&&l._invalidateProperties&&l._invalidateProperties();}function ua(o,t,e){let i=se(t);if(i!==t){let s=Ct(i)+"-changed";return zo(o,s,e[t],t),!0}return !1}function zo(o,t,e,i){let s={value:e,queueProperty:!0};i&&(s.path=i),k(o).dispatchEvent(new CustomEvent(t,{detail:s}));}function pa(o,t,e,i,s,r){let a=(r?se(t):t)!=t?t:null,l=a?D(o,a):o.__data[t];a&&l===void 0&&(l=e[t]),zo(o,s.eventName,l,a);}function _a(o,t,e,i,s){let r,n=o.detail,a=n&&n.path;a?(i=Ve(e,i,a),r=n&&n.value):r=o.currentTarget[e],r=s?!r:r,(!t[y.READ_ONLY]||!t[y.READ_ONLY][i])&&t._setPendingPropertyOrPath(i,r,!0,!!a)&&(!n||!n.queueProperty)&&t._invalidateProperties();}function fa(o,t,e,i,s){let r=o.__data[t];ut&&(r=ut(r,s.attrName,"attribute",o)),o._propertyToAttribute(t,s.attrName,r);}function ma(o,t,e,i){let s=o[y.COMPUTE];if(s)if(On){Re++;const r=va(o),n=[];for(let l in t)ks(l,s,n,r,i);let a;for(;a=n.shift();)No(o,"",t,e,a)&&ks(a.methodInfo,s,n,r,i);Object.assign(e,o.__dataOld),Object.assign(t,o.__dataPending),o.__dataPending=null;}else {let r=t;for(;Pe(o,s,r,e,i);)Object.assign(e,o.__dataOld),Object.assign(t,o.__dataPending),r=o.__dataPending,o.__dataPending=null;}}const ga=(o,t,e)=>{let i=0,s=t.length-1,r=-1;for(;i<=s;){const n=i+s>>1,a=e.get(t[n].methodInfo)-e.get(o.methodInfo);if(a<0)i=n+1;else if(a>0)s=n-1;else {r=n;break}}r<0&&(r=s+1),t.splice(r,0,o);},ks=(o,t,e,i,s)=>{const r=s?se(o):o,n=t[r];if(n)for(let a=0;a<n.length;a++){const l=n[a];l.info.lastRun!==Re&&(!s||Di(o,l.trigger))&&(l.info.lastRun=Re,ga(l.info,e,i));}};function va(o){let t=o.constructor.__orderedComputedDeps;if(!t){t=new Map;const e=o[y.COMPUTE];let{counts:i,ready:s,total:r}=ba(o),n;for(;n=s.shift();){t.set(n,t.size);const a=e[n];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--i[d]===0&&s.push(d);});}r!==0&&console.warn(`Computed graph for ${o.localName} incomplete; circular?`),o.constructor.__orderedComputedDeps=t;}return t}function ba(o){const t=o[Mo],e={},i=o[y.COMPUTE],s=[];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]||s.push(n);return {counts:e,ready:s,total:r}}function No(o,t,e,i,s){let r=ri(o,t,e,i,s);if(r===$e)return !1;let n=s.methodInfo;return o.__dataHasAccessor&&o.__dataHasAccessor[n]?o._setPendingProperty(n,r,!0):(o[n]=r,!1)}function ya(o,t,e){let i=o.__dataLinkedPaths;if(i){let s;for(let r in i){let n=i[r];Fe(r,t)?(s=Ve(r,n,t),o._setPendingPropertyOrPath(s,e,!0,!0)):Fe(n,t)&&(s=Ve(n,r,t),o._setPendingPropertyOrPath(s,e,!0,!0));}}}function Rt(o,t,e,i,s,r,n){e.bindings=e.bindings||[];let a={kind:i,target:s,parts:r,literal:n,isCompound:r.length!==1};if(e.bindings.push(a),Aa(a)){let{event:d,negate:h}=a.parts[0];a.listenerEvent=d||Ct(s)+"-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,xa(o,t,a,h,l);}}function xa(o,t,e,i,s){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:s,binding:e,part:i,evaluator:o};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=Bo(l),l.wildcard=!0),o._addTemplatePropertyEffect(t,l.rootProperty,{fn:Ca,info:n,trigger:l});}}}function Ca(o,t,e,i,s,r,n){let a=n[s.index],l=s.binding,d=s.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=Ve(d.source,l.target,t),a._setPendingPropertyOrPath(t,h,!1,!0)&&o._enqueueClient(a);}else {let h=s.evaluator._evaluateBinding(o,d,t,e,i,r);h!==$e&&wa(o,a,l,d,h);}}function wa(o,t,e,i,s){if(s=Ea(t,s,e,i),ut&&(s=ut(s,e.target,e.kind,t)),e.kind=="attribute")o._valueToNodeAttribute(t,s,e.target);else {let r=e.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?(!t[y.READ_ONLY]||!t[y.READ_ONLY][r])&&t._setPendingProperty(r,s)&&o._enqueueClient(t):o._setUnmanagedPropertyToNode(t,r,s);}}function Ea(o,t,e,i){if(e.isCompound){let s=o.__dataCompoundStorage[e.target];s[i.compoundIndex]=t,t=s.join("");}return e.kind!=="attribute"&&(e.target==="textContent"||e.target==="value"&&(o.localName==="input"||o.localName==="textarea"))&&(t=t==null?"":t),t}function Aa(o){return !!o.target&&o.kind!="attribute"&&o.kind!="text"&&!o.isCompound&&o.parts[0].mode==="{"}function Ia(o,t){let{nodeList:e,nodeInfoList:i}=t;if(i.length)for(let s=0;s<i.length;s++){let r=i[s],n=e[s],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];ka(n,d),Sa(n,o,d);}n.__dataHost=o;}}function ka(o,t){if(t.isCompound){let e=o.__dataCompoundStorage||(o.__dataCompoundStorage={}),i=t.parts,s=new Array(i.length);for(let n=0;n<i.length;n++)s[n]=i[n].literal;let r=t.target;e[r]=s,t.literal&&t.kind=="property"&&(r==="className"&&(o=k(o)),o[r]=t.literal);}}function Sa(o,t,e){if(e.listenerEvent){let i=e.parts[0];o.addEventListener(e.listenerEvent,function(s){_a(s,t,e.target,i.source,i.negate);});}}function Ss(o,t,e,i,s,r){r=t.static||r&&(typeof r!="object"||r[t.methodName]);let n={methodName:t.methodName,args:t.args,methodInfo:s,dynamicFn:r};for(let a=0,l;a<t.args.length&&(l=t.args[a]);a++)l.literal||o._addPropertyEffect(l.rootProperty,e,{fn:i,info:n,trigger:l});return r&&o._addPropertyEffect(t.methodName,e,{fn:i,info:n}),n}function ri(o,t,e,i,s){let r=o._methodHost||o,n=r[s.methodName];if(n){let a=o._marshalArgs(s.args,t,e);return a===$e?$e:n.apply(r,a)}else s.dynamicFn||console.warn("method `"+s.methodName+"` not defined");}const Pa=[],Lo="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Ta="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",Da="(?:'(?:[^'\\\\]|\\\\.)*')",Oa='(?:"(?:[^"\\\\]|\\\\.)*")',Ma="(?:"+Da+"|"+Oa+")",Ps="(?:("+Lo+"|"+Ta+"|"+Ma+")\\s*)",za="(?:"+Ps+"(?:,\\s*"+Ps+")*)",Na="(?:\\(\\s*(?:"+za+"?)\\)\\s*)",La="("+Lo+"\\s*"+Na+"?)",Ba="(\\[\\[|{{)\\s*",Fa="(?:]]|}})",Va="(?:(!)\\s*)?",Ra=Ba+Va+La+Fa,Ts=new RegExp(Ra,"g");function Ds(o){let t="";for(let e=0;e<o.length;e++){let i=o[e].literal;t+=i||"";}return t}function $t(o){let t=o.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let i={methodName:t[1],static:!0,args:Pa};if(t[2].trim()){let s=t[2].replace(/\\,/g,",").split(",");return $a(s,i)}else return i}return null}function $a(o,t){return t.args=o.map(function(e){let i=Bo(e);return i.literal||(t.static=!1),i},this),t}function Bo(o){let t=o.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=se(t),e.structured=si(t),e.structured&&(e.wildcard=t.slice(-2)==".*",e.wildcard&&(e.name=t.slice(0,-2)))),e}function Os(o,t,e){let i=D(o,e);return i===void 0&&(i=t[e]),i}function Fo(o,t,e,i){const s={indexSplices:i};ii&&!o._overrideLegacyUndefined&&(t.splices=s),o.notifyPath(e+".splices",s),o.notifyPath(e+".length",t.length),ii&&!o._overrideLegacyUndefined&&(s.indexSplices=[]);}function Ee(o,t,e,i,s,r){Fo(o,t,e,[{index:i,addedCount:s,removed:r,object:t,type:"splice"}]);}function Ha(o){return o[0].toUpperCase()+o.substring(1)}const Oi=C(o=>{const t=la(Qn(o));class e extends t{constructor(){super(),this.__isPropertyEffectsClient=!0;}get PROPERTY_EFFECT_TYPES(){return y}_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(Ae.length){let s=Ae[Ae.length-1];s._enqueueClient(this),this.__dataHost=s;}}_initializeProtoProperties(s){this.__data=Object.create(s),this.__dataPending=Object.create(s),this.__dataOld={};}_initializeInstanceProperties(s){let r=this[y.READ_ONLY];for(let n in s)(!r||!r[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=s[n]);}_addPropertyEffect(s,r,n){this._createPropertyAccessor(s,r==y.READ_ONLY);let a=Vt(this,r,!0)[s];a||(a=this[r][s]=[]),a.push(n);}_removePropertyEffect(s,r,n){let a=Vt(this,r,!0)[s],l=a.indexOf(n);l>=0&&a.splice(l,1);}_hasPropertyEffect(s,r){let n=this[r];return !!(n&&n[s])}_hasReadOnlyEffect(s){return this._hasPropertyEffect(s,y.READ_ONLY)}_hasNotifyEffect(s){return this._hasPropertyEffect(s,y.NOTIFY)}_hasReflectEffect(s){return this._hasPropertyEffect(s,y.REFLECT)}_hasComputedEffect(s){return this._hasPropertyEffect(s,y.COMPUTE)}_setPendingPropertyOrPath(s,r,n,a){if(a||se(Array.isArray(s)?s[0]:s)!==s){if(!a){let l=D(this,s);if(s=ws(this,s,r),!s||!super._shouldPropertyChange(s,r,l))return !1}if(this.__dataHasPaths=!0,this._setPendingProperty(s,r,n))return ya(this,s,r),!0}else {if(this.__dataHasAccessor&&this.__dataHasAccessor[s])return this._setPendingProperty(s,r,n);this[s]=r;}return !1}_setUnmanagedPropertyToNode(s,r,n){(n!==s[r]||typeof n=="object")&&(r==="className"&&(s=k(s)),s[r]=n);}_setPendingProperty(s,r,n){let a=this.__dataHasPaths&&si(s),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(s,r,l[s])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),s in this.__dataOld||(this.__dataOld[s]=this.__data[s]),a?this.__dataTemp[s]=r:this.__data[s]=r,this.__dataPending[s]=r,(a||this[y.NOTIFY]&&this[y.NOTIFY][s])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[s]=n),!0):!1}_setProperty(s,r){this._setPendingProperty(s,r,!0)&&this._invalidateProperties();}_invalidateProperties(){this.__dataReady&&this._flushProperties();}_enqueueClient(s){this.__dataPendingClients=this.__dataPendingClients||[],s!==this&&this.__dataPendingClients.push(s);}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0);}__enableOrFlushClients(){let s=this.__dataPendingClients;if(s){this.__dataPendingClients=null;for(let r=0;r<s.length;r++){let n=s[r];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties();}}}_readyClients(){this.__enableOrFlushClients();}setProperties(s,r){for(let n in s)(r||!this[y.READ_ONLY]||!this[y.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,s[n],!0);this._invalidateProperties();}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties();}_propertiesChanged(s,r,n){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;ma(this,r,n,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,n,a),this._flushClients(),Pe(this,this[y.REFLECT],r,n,a),Pe(this,this[y.OBSERVE],r,n,a),l&&ca(this,l,r,n,a),this.__dataCounter==1&&(this.__dataTemp={});}_propagatePropertyChanges(s,r,n){this[y.PROPAGATE]&&Pe(this,this[y.PROPAGATE],s,r,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,s,r,n);}_runEffectsForTemplate(s,r,n,a){const l=(d,h)=>{Pe(this,s.propertyEffects,d,n,h,s.nodeList);for(let c=s.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,n,h);};s.runEffects?s.runEffects(l,r,a):l(r,a);}linkPaths(s,r){s=Se(s),r=Se(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[s]=r;}unlinkPaths(s){s=Se(s),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[s];}notifySplices(s,r){let n={path:""},a=D(this,s,n);Fo(this,a,n.path,r);}get(s,r){return D(r||this,s)}set(s,r,n){n?ws(n,s,r):(!this[y.READ_ONLY]||!this[y.READ_ONLY][s])&&this._setPendingPropertyOrPath(s,r,!0)&&this._invalidateProperties();}push(s,...r){let n={path:""},a=D(this,s,n),l=a.length,d=a.push(...r);return r.length&&Ee(this,a,n.path,l,r.length,[]),d}pop(s){let r={path:""},n=D(this,s,r),a=!!n.length,l=n.pop();return a&&Ee(this,n,r.path,n.length,0,[l]),l}splice(s,r,n,...a){let l={path:""},d=D(this,s,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)&&Ee(this,d,l.path,r,a.length,h),h}shift(s){let r={path:""},n=D(this,s,r),a=!!n.length,l=n.shift();return a&&Ee(this,n,r.path,0,0,[l]),l}unshift(s,...r){let n={path:""},a=D(this,s,n),l=a.unshift(...r);return r.length&&Ee(this,a,n.path,0,r.length,[]),l}notifyPath(s,r){let n;if(arguments.length==1){let a={path:""};r=D(this,s,a),n=a.path;}else Array.isArray(s)?n=Se(s):n=s;this._setPendingPropertyOrPath(n,r,!0,!0)&&this._invalidateProperties();}_createReadOnlyProperty(s,r){this._addPropertyEffect(s,y.READ_ONLY),r&&(this["_set"+Ha(s)]=function(n){this._setProperty(s,n);});}_createPropertyObserver(s,r,n){let a={property:s,method:r,dynamicFn:!!n};this._addPropertyEffect(s,y.OBSERVE,{fn:Is,info:a,trigger:{name:s}}),n&&this._addPropertyEffect(r,y.OBSERVE,{fn:Is,info:a,trigger:{name:r}});}_createMethodObserver(s,r){let n=$t(s);if(!n)throw new Error("Malformed observer expression '"+s+"'");Ss(this,n,y.OBSERVE,ri,null,r);}_createNotifyingProperty(s){this._addPropertyEffect(s,y.NOTIFY,{fn:pa,info:{eventName:Ct(s)+"-changed",property:s}});}_createReflectedProperty(s){let r=this.constructor.attributeNameForProperty(s);r[0]==="-"?console.warn("Property "+s+" cannot be reflected to attribute "+r+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(s,y.REFLECT,{fn:fa,info:{attrName:r}});}_createComputedProperty(s,r,n){let a=$t(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=Ss(this,a,y.COMPUTE,No,s,n);Vt(this,Mo)[s]=l;}_marshalArgs(s,r,n){const a=this.__data,l=[];for(let d=0,h=s.length;d<h;d++){let{name:c,structured:u,wildcard:f,value:m,literal:S}=s[d];if(!S)if(f){const P=Fe(c,r),E=Os(a,n,P?r:c);m={path:P?r:c,value:E,base:P?D(a,c):E};}else m=u?Os(a,n,c):a[c];if(ii&&!this._overrideLegacyUndefined&&m===void 0&&s.length>1)return $e;l[d]=m;}return l}static addPropertyEffect(s,r,n){this.prototype._addPropertyEffect(s,r,n);}static createPropertyObserver(s,r,n){this.prototype._createPropertyObserver(s,r,n);}static createMethodObserver(s,r){this.prototype._createMethodObserver(s,r);}static createNotifyingProperty(s){this.prototype._createNotifyingProperty(s);}static createReadOnlyProperty(s,r){this.prototype._createReadOnlyProperty(s,r);}static createReflectedProperty(s){this.prototype._createReflectedProperty(s);}static createComputedProperty(s,r,n){this.prototype._createComputedProperty(s,r,n);}static bindTemplate(s){return this.prototype._bindTemplate(s)}_bindTemplate(s,r){let n=this.constructor._parseTemplate(s),a=this.__preBoundTemplateInfo==n;if(!a)for(let l in n.propertyEffects)this._createPropertyAccessor(l);if(r)if(n=Object.create(n),n.wasPreBound=a,!this.__templateInfo)this.__templateInfo=n;else {const l=s._parentTemplateInfo||this.__templateInfo,d=l.lastChild;n.parent=l,l.lastChild=n,n.previousSibling=d,d?d.nextSibling=n:l.firstChild=n;}else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(s,r,n){let a=s.hostProps=s.hostProps||{};a[r]=!0;let l=s.propertyEffects=s.propertyEffects||{};(l[r]=l[r]||[]).push(n);}_stampTemplate(s,r){r=r||this._bindTemplate(s,!0),Ae.push(this);let n=super._stampTemplate(s,r);if(Ae.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,Ia(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(s){const r=s.templateInfo,{previousSibling:n,nextSibling:a,parent:l}=r;n?n.nextSibling=a:l&&(l.firstChild=a),a?a.previousSibling=n:l&&(l.lastChild=n),r.nextSibling=r.previousSibling=null;let d=r.childNodes;for(let h=0;h<d.length;h++){let c=d[h];k(k(c).parentNode).removeChild(c);}}static _parseTemplateNode(s,r,n){let a=t._parseTemplateNode.call(this,s,r,n);if(s.nodeType===Node.TEXT_NODE){let l=this._parseBindings(s.textContent,r);l&&(s.textContent=Ds(l)||" ",Rt(this,r,n,"text","textContent",l),a=!0);}return a}static _parseTemplateNodeAttribute(s,r,n,a,l){let d=this._parseBindings(l,r);if(d){let h=a,c="property";da.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let u=Ds(d);return u&&c=="attribute"&&(a=="class"&&s.hasAttribute("class")&&(u+=" "+s.getAttribute(a)),s.setAttribute(a,u)),c=="attribute"&&h=="disable-upgrade$"&&s.setAttribute(a,""),s.localName==="input"&&h==="value"&&s.setAttribute(h,""),s.removeAttribute(h),c==="property"&&(a=Io(a)),Rt(this,r,n,c,a,d,u),!0}else return t._parseTemplateNodeAttribute.call(this,s,r,n,a,l)}static _parseTemplateNestedTemplate(s,r,n){let a=t._parseTemplateNestedTemplate.call(this,s,r,n);const l=s.parentNode,d=n.templateInfo,h=l.localName==="dom-if",c=l.localName==="dom-repeat";gs&&(h||c)&&(l.removeChild(s),n=n.parentInfo,n.templateInfo=d,n.noted=!0,a=!1);let u=d.hostProps;if(Mn&&h)u&&(r.hostProps=Object.assign(r.hostProps||{},u),gs||(n.parentInfo.noted=!0));else {let f="{";for(let m in u){let S=[{mode:f,source:m,dependencies:[m],hostProp:!0}];Rt(this,r,n,"property","_host_"+m,S);}}return a}static _parseBindings(s,r){let n=[],a=0,l;for(;(l=Ts.exec(s))!==null;){l.index>a&&n.push({literal:s.slice(a,l.index)});let d=l[1][0],h=!!l[2],c=l[3].trim(),u=!1,f="",m=-1;d=="{"&&(m=c.indexOf("::"))>0&&(f=c.substring(m+2),c=c.substring(0,m),u=!0);let S=$t(c),P=[];if(S){let{args:E,methodName:w}=S;for(let ye=0;ye<E.length;ye++){let J=E[ye];J.literal||P.push(J);}let U=r.dynamicFns;(U&&U[w]||S.static)&&(P.push(w),S.dynamicFn=!0);}else P.push(c);n.push({source:c,mode:d,negate:h,customEvent:u,signature:S,dependencies:P,event:f}),a=Ts.lastIndex;}if(a&&a<s.length){let d=s.substring(a);d&&n.push({literal:d});}return n.length?n:null}static _evaluateBinding(s,r,n,a,l,d){let h;return r.signature?h=ri(s,n,a,l,r.signature):n!=r.source?h=D(s,r.source):d&&si(n)?h=D(s,n):h=s.__data[n],r.negate&&(h=!h),h}}return e}),Ae=[];/**
|
|
1411
|
+
*/let Re=0;const $e=[],y={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},zo="__computeInfo",ha=/[A-Z]/;function Vt(o,t,e){let i=o[t];if(!i)i=o[t]={};else if(!o.hasOwnProperty(t)&&(i=o[t]=Object.create(o[t]),e))for(let s in i){let r=i[s],n=i[s]=Array(r.length);for(let a=0;a<r.length;a++)n[a]=r[a];}return i}function Pe(o,t,e,i,s,r){if(t){let n=!1;const a=Re++;for(let l in e){let d=s?se(l):l,h=t[d];if(h)for(let c=0,u=h.length,m;c<u&&(m=h[c]);c++)(!m.info||m.info.lastRun!==a)&&(!s||Di(l,m.trigger))&&(m.info&&(m.info.lastRun=a),m.fn(o,l,e,i,m.info,s,r),n=!0);}return n}return !1}function ca(o,t,e,i,s,r,n,a){let l=!1,d=n?se(i):i,h=t[d];if(h)for(let c=0,u=h.length,m;c<u&&(m=h[c]);c++)(!m.info||m.info.lastRun!==e)&&(!n||Di(i,m.trigger))&&(m.info&&(m.info.lastRun=e),m.fn(o,i,s,r,m.info,n,a),l=!0);return l}function Di(o,t){if(t){let e=t.name;return e==o||!!(t.structured&&Ao(e,o))||!!(t.wildcard&&Fe(e,o))}else return !0}function ks(o,t,e,i,s){let r=typeof s.method=="string"?o[s.method]:s.method,n=s.property;r?r.call(o,o.__data[n],i[n]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined");}function ua(o,t,e,i,s){let r=o[y.NOTIFY],n,a=Re++;for(let d in t)t[d]&&(r&&ca(o,r,a,d,e,i,s)||s&&pa(o,d,e))&&(n=!0);let l;n&&(l=o.__dataHost)&&l._invalidateProperties&&l._invalidateProperties();}function pa(o,t,e){let i=se(t);if(i!==t){let s=Ct(i)+"-changed";return No(o,s,e[t],t),!0}return !1}function No(o,t,e,i){let s={value:e,queueProperty:!0};i&&(s.path=i),k(o).dispatchEvent(new CustomEvent(t,{detail:s}));}function _a(o,t,e,i,s,r){let a=(r?se(t):t)!=t?t:null,l=a?D(o,a):o.__data[t];a&&l===void 0&&(l=e[t]),No(o,s.eventName,l,a);}function ma(o,t,e,i,s){let r,n=o.detail,a=n&&n.path;a?(i=Ve(e,i,a),r=n&&n.value):r=o.currentTarget[e],r=s?!r:r,(!t[y.READ_ONLY]||!t[y.READ_ONLY][i])&&t._setPendingPropertyOrPath(i,r,!0,!!a)&&(!n||!n.queueProperty)&&t._invalidateProperties();}function fa(o,t,e,i,s){let r=o.__data[t];ut&&(r=ut(r,s.attrName,"attribute",o)),o._propertyToAttribute(t,s.attrName,r);}function ga(o,t,e,i){let s=o[y.COMPUTE];if(s)if(Mn){Re++;const r=ba(o),n=[];for(let l in t)Ss(l,s,n,r,i);let a;for(;a=n.shift();)Lo(o,"",t,e,a)&&Ss(a.methodInfo,s,n,r,i);Object.assign(e,o.__dataOld),Object.assign(t,o.__dataPending),o.__dataPending=null;}else {let r=t;for(;Pe(o,s,r,e,i);)Object.assign(e,o.__dataOld),Object.assign(t,o.__dataPending),r=o.__dataPending,o.__dataPending=null;}}const va=(o,t,e)=>{let i=0,s=t.length-1,r=-1;for(;i<=s;){const n=i+s>>1,a=e.get(t[n].methodInfo)-e.get(o.methodInfo);if(a<0)i=n+1;else if(a>0)s=n-1;else {r=n;break}}r<0&&(r=s+1),t.splice(r,0,o);},Ss=(o,t,e,i,s)=>{const r=s?se(o):o,n=t[r];if(n)for(let a=0;a<n.length;a++){const l=n[a];l.info.lastRun!==Re&&(!s||Di(o,l.trigger))&&(l.info.lastRun=Re,va(l.info,e,i));}};function ba(o){let t=o.constructor.__orderedComputedDeps;if(!t){t=new Map;const e=o[y.COMPUTE];let{counts:i,ready:s,total:r}=ya(o),n;for(;n=s.shift();){t.set(n,t.size);const a=e[n];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--i[d]===0&&s.push(d);});}r!==0&&console.warn(`Computed graph for ${o.localName} incomplete; circular?`),o.constructor.__orderedComputedDeps=t;}return t}function ya(o){const t=o[zo],e={},i=o[y.COMPUTE],s=[];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]||s.push(n);return {counts:e,ready:s,total:r}}function Lo(o,t,e,i,s){let r=ri(o,t,e,i,s);if(r===$e)return !1;let n=s.methodInfo;return o.__dataHasAccessor&&o.__dataHasAccessor[n]?o._setPendingProperty(n,r,!0):(o[n]=r,!1)}function xa(o,t,e){let i=o.__dataLinkedPaths;if(i){let s;for(let r in i){let n=i[r];Fe(r,t)?(s=Ve(r,n,t),o._setPendingPropertyOrPath(s,e,!0,!0)):Fe(n,t)&&(s=Ve(n,r,t),o._setPendingPropertyOrPath(s,e,!0,!0));}}}function Rt(o,t,e,i,s,r,n){e.bindings=e.bindings||[];let a={kind:i,target:s,parts:r,literal:n,isCompound:r.length!==1};if(e.bindings.push(a),Ia(a)){let{event:d,negate:h}=a.parts[0];a.listenerEvent=d||Ct(s)+"-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,Ca(o,t,a,h,l);}}function Ca(o,t,e,i,s){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:s,binding:e,part:i,evaluator:o};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=Fo(l),l.wildcard=!0),o._addTemplatePropertyEffect(t,l.rootProperty,{fn:wa,info:n,trigger:l});}}}function wa(o,t,e,i,s,r,n){let a=n[s.index],l=s.binding,d=s.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=Ve(d.source,l.target,t),a._setPendingPropertyOrPath(t,h,!1,!0)&&o._enqueueClient(a);}else {let h=s.evaluator._evaluateBinding(o,d,t,e,i,r);h!==$e&&Ea(o,a,l,d,h);}}function Ea(o,t,e,i,s){if(s=Aa(t,s,e,i),ut&&(s=ut(s,e.target,e.kind,t)),e.kind=="attribute")o._valueToNodeAttribute(t,s,e.target);else {let r=e.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?(!t[y.READ_ONLY]||!t[y.READ_ONLY][r])&&t._setPendingProperty(r,s)&&o._enqueueClient(t):o._setUnmanagedPropertyToNode(t,r,s);}}function Aa(o,t,e,i){if(e.isCompound){let s=o.__dataCompoundStorage[e.target];s[i.compoundIndex]=t,t=s.join("");}return e.kind!=="attribute"&&(e.target==="textContent"||e.target==="value"&&(o.localName==="input"||o.localName==="textarea"))&&(t=t==null?"":t),t}function Ia(o){return !!o.target&&o.kind!="attribute"&&o.kind!="text"&&!o.isCompound&&o.parts[0].mode==="{"}function ka(o,t){let{nodeList:e,nodeInfoList:i}=t;if(i.length)for(let s=0;s<i.length;s++){let r=i[s],n=e[s],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];Sa(n,d),Pa(n,o,d);}n.__dataHost=o;}}function Sa(o,t){if(t.isCompound){let e=o.__dataCompoundStorage||(o.__dataCompoundStorage={}),i=t.parts,s=new Array(i.length);for(let n=0;n<i.length;n++)s[n]=i[n].literal;let r=t.target;e[r]=s,t.literal&&t.kind=="property"&&(r==="className"&&(o=k(o)),o[r]=t.literal);}}function Pa(o,t,e){if(e.listenerEvent){let i=e.parts[0];o.addEventListener(e.listenerEvent,function(s){ma(s,t,e.target,i.source,i.negate);});}}function Ps(o,t,e,i,s,r){r=t.static||r&&(typeof r!="object"||r[t.methodName]);let n={methodName:t.methodName,args:t.args,methodInfo:s,dynamicFn:r};for(let a=0,l;a<t.args.length&&(l=t.args[a]);a++)l.literal||o._addPropertyEffect(l.rootProperty,e,{fn:i,info:n,trigger:l});return r&&o._addPropertyEffect(t.methodName,e,{fn:i,info:n}),n}function ri(o,t,e,i,s){let r=o._methodHost||o,n=r[s.methodName];if(n){let a=o._marshalArgs(s.args,t,e);return a===$e?$e:n.apply(r,a)}else s.dynamicFn||console.warn("method `"+s.methodName+"` not defined");}const Ta=[],Bo="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Da="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",Oa="(?:'(?:[^'\\\\]|\\\\.)*')",Ma='(?:"(?:[^"\\\\]|\\\\.)*")',za="(?:"+Oa+"|"+Ma+")",Ts="(?:("+Bo+"|"+Da+"|"+za+")\\s*)",Na="(?:"+Ts+"(?:,\\s*"+Ts+")*)",La="(?:\\(\\s*(?:"+Na+"?)\\)\\s*)",Ba="("+Bo+"\\s*"+La+"?)",Fa="(\\[\\[|{{)\\s*",Va="(?:]]|}})",Ra="(?:(!)\\s*)?",$a=Fa+Ra+Ba+Va,Ds=new RegExp($a,"g");function Os(o){let t="";for(let e=0;e<o.length;e++){let i=o[e].literal;t+=i||"";}return t}function $t(o){let t=o.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let i={methodName:t[1],static:!0,args:Ta};if(t[2].trim()){let s=t[2].replace(/\\,/g,",").split(",");return Ha(s,i)}else return i}return null}function Ha(o,t){return t.args=o.map(function(e){let i=Fo(e);return i.literal||(t.static=!1),i},this),t}function Fo(o){let t=o.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=se(t),e.structured=si(t),e.structured&&(e.wildcard=t.slice(-2)==".*",e.wildcard&&(e.name=t.slice(0,-2)))),e}function Ms(o,t,e){let i=D(o,e);return i===void 0&&(i=t[e]),i}function Vo(o,t,e,i){const s={indexSplices:i};ii&&!o._overrideLegacyUndefined&&(t.splices=s),o.notifyPath(e+".splices",s),o.notifyPath(e+".length",t.length),ii&&!o._overrideLegacyUndefined&&(s.indexSplices=[]);}function Ee(o,t,e,i,s,r){Vo(o,t,e,[{index:i,addedCount:s,removed:r,object:t,type:"splice"}]);}function Ua(o){return o[0].toUpperCase()+o.substring(1)}const Oi=C(o=>{const t=da(Zn(o));class e extends t{constructor(){super(),this.__isPropertyEffectsClient=!0;}get PROPERTY_EFFECT_TYPES(){return y}_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(Ae.length){let s=Ae[Ae.length-1];s._enqueueClient(this),this.__dataHost=s;}}_initializeProtoProperties(s){this.__data=Object.create(s),this.__dataPending=Object.create(s),this.__dataOld={};}_initializeInstanceProperties(s){let r=this[y.READ_ONLY];for(let n in s)(!r||!r[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=s[n]);}_addPropertyEffect(s,r,n){this._createPropertyAccessor(s,r==y.READ_ONLY);let a=Vt(this,r,!0)[s];a||(a=this[r][s]=[]),a.push(n);}_removePropertyEffect(s,r,n){let a=Vt(this,r,!0)[s],l=a.indexOf(n);l>=0&&a.splice(l,1);}_hasPropertyEffect(s,r){let n=this[r];return !!(n&&n[s])}_hasReadOnlyEffect(s){return this._hasPropertyEffect(s,y.READ_ONLY)}_hasNotifyEffect(s){return this._hasPropertyEffect(s,y.NOTIFY)}_hasReflectEffect(s){return this._hasPropertyEffect(s,y.REFLECT)}_hasComputedEffect(s){return this._hasPropertyEffect(s,y.COMPUTE)}_setPendingPropertyOrPath(s,r,n,a){if(a||se(Array.isArray(s)?s[0]:s)!==s){if(!a){let l=D(this,s);if(s=Es(this,s,r),!s||!super._shouldPropertyChange(s,r,l))return !1}if(this.__dataHasPaths=!0,this._setPendingProperty(s,r,n))return xa(this,s,r),!0}else {if(this.__dataHasAccessor&&this.__dataHasAccessor[s])return this._setPendingProperty(s,r,n);this[s]=r;}return !1}_setUnmanagedPropertyToNode(s,r,n){(n!==s[r]||typeof n=="object")&&(r==="className"&&(s=k(s)),s[r]=n);}_setPendingProperty(s,r,n){let a=this.__dataHasPaths&&si(s),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(s,r,l[s])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),s in this.__dataOld||(this.__dataOld[s]=this.__data[s]),a?this.__dataTemp[s]=r:this.__data[s]=r,this.__dataPending[s]=r,(a||this[y.NOTIFY]&&this[y.NOTIFY][s])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[s]=n),!0):!1}_setProperty(s,r){this._setPendingProperty(s,r,!0)&&this._invalidateProperties();}_invalidateProperties(){this.__dataReady&&this._flushProperties();}_enqueueClient(s){this.__dataPendingClients=this.__dataPendingClients||[],s!==this&&this.__dataPendingClients.push(s);}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0);}__enableOrFlushClients(){let s=this.__dataPendingClients;if(s){this.__dataPendingClients=null;for(let r=0;r<s.length;r++){let n=s[r];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties();}}}_readyClients(){this.__enableOrFlushClients();}setProperties(s,r){for(let n in s)(r||!this[y.READ_ONLY]||!this[y.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,s[n],!0);this._invalidateProperties();}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties();}_propertiesChanged(s,r,n){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;ga(this,r,n,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,n,a),this._flushClients(),Pe(this,this[y.REFLECT],r,n,a),Pe(this,this[y.OBSERVE],r,n,a),l&&ua(this,l,r,n,a),this.__dataCounter==1&&(this.__dataTemp={});}_propagatePropertyChanges(s,r,n){this[y.PROPAGATE]&&Pe(this,this[y.PROPAGATE],s,r,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,s,r,n);}_runEffectsForTemplate(s,r,n,a){const l=(d,h)=>{Pe(this,s.propertyEffects,d,n,h,s.nodeList);for(let c=s.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,n,h);};s.runEffects?s.runEffects(l,r,a):l(r,a);}linkPaths(s,r){s=Se(s),r=Se(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[s]=r;}unlinkPaths(s){s=Se(s),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[s];}notifySplices(s,r){let n={path:""},a=D(this,s,n);Vo(this,a,n.path,r);}get(s,r){return D(r||this,s)}set(s,r,n){n?Es(n,s,r):(!this[y.READ_ONLY]||!this[y.READ_ONLY][s])&&this._setPendingPropertyOrPath(s,r,!0)&&this._invalidateProperties();}push(s,...r){let n={path:""},a=D(this,s,n),l=a.length,d=a.push(...r);return r.length&&Ee(this,a,n.path,l,r.length,[]),d}pop(s){let r={path:""},n=D(this,s,r),a=!!n.length,l=n.pop();return a&&Ee(this,n,r.path,n.length,0,[l]),l}splice(s,r,n,...a){let l={path:""},d=D(this,s,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)&&Ee(this,d,l.path,r,a.length,h),h}shift(s){let r={path:""},n=D(this,s,r),a=!!n.length,l=n.shift();return a&&Ee(this,n,r.path,0,0,[l]),l}unshift(s,...r){let n={path:""},a=D(this,s,n),l=a.unshift(...r);return r.length&&Ee(this,a,n.path,0,r.length,[]),l}notifyPath(s,r){let n;if(arguments.length==1){let a={path:""};r=D(this,s,a),n=a.path;}else Array.isArray(s)?n=Se(s):n=s;this._setPendingPropertyOrPath(n,r,!0,!0)&&this._invalidateProperties();}_createReadOnlyProperty(s,r){this._addPropertyEffect(s,y.READ_ONLY),r&&(this["_set"+Ua(s)]=function(n){this._setProperty(s,n);});}_createPropertyObserver(s,r,n){let a={property:s,method:r,dynamicFn:!!n};this._addPropertyEffect(s,y.OBSERVE,{fn:ks,info:a,trigger:{name:s}}),n&&this._addPropertyEffect(r,y.OBSERVE,{fn:ks,info:a,trigger:{name:r}});}_createMethodObserver(s,r){let n=$t(s);if(!n)throw new Error("Malformed observer expression '"+s+"'");Ps(this,n,y.OBSERVE,ri,null,r);}_createNotifyingProperty(s){this._addPropertyEffect(s,y.NOTIFY,{fn:_a,info:{eventName:Ct(s)+"-changed",property:s}});}_createReflectedProperty(s){let r=this.constructor.attributeNameForProperty(s);r[0]==="-"?console.warn("Property "+s+" cannot be reflected to attribute "+r+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(s,y.REFLECT,{fn:fa,info:{attrName:r}});}_createComputedProperty(s,r,n){let a=$t(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=Ps(this,a,y.COMPUTE,Lo,s,n);Vt(this,zo)[s]=l;}_marshalArgs(s,r,n){const a=this.__data,l=[];for(let d=0,h=s.length;d<h;d++){let{name:c,structured:u,wildcard:m,value:f,literal:S}=s[d];if(!S)if(m){const P=Fe(c,r),E=Ms(a,n,P?r:c);f={path:P?r:c,value:E,base:P?D(a,c):E};}else f=u?Ms(a,n,c):a[c];if(ii&&!this._overrideLegacyUndefined&&f===void 0&&s.length>1)return $e;l[d]=f;}return l}static addPropertyEffect(s,r,n){this.prototype._addPropertyEffect(s,r,n);}static createPropertyObserver(s,r,n){this.prototype._createPropertyObserver(s,r,n);}static createMethodObserver(s,r){this.prototype._createMethodObserver(s,r);}static createNotifyingProperty(s){this.prototype._createNotifyingProperty(s);}static createReadOnlyProperty(s,r){this.prototype._createReadOnlyProperty(s,r);}static createReflectedProperty(s){this.prototype._createReflectedProperty(s);}static createComputedProperty(s,r,n){this.prototype._createComputedProperty(s,r,n);}static bindTemplate(s){return this.prototype._bindTemplate(s)}_bindTemplate(s,r){let n=this.constructor._parseTemplate(s),a=this.__preBoundTemplateInfo==n;if(!a)for(let l in n.propertyEffects)this._createPropertyAccessor(l);if(r)if(n=Object.create(n),n.wasPreBound=a,!this.__templateInfo)this.__templateInfo=n;else {const l=s._parentTemplateInfo||this.__templateInfo,d=l.lastChild;n.parent=l,l.lastChild=n,n.previousSibling=d,d?d.nextSibling=n:l.firstChild=n;}else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(s,r,n){let a=s.hostProps=s.hostProps||{};a[r]=!0;let l=s.propertyEffects=s.propertyEffects||{};(l[r]=l[r]||[]).push(n);}_stampTemplate(s,r){r=r||this._bindTemplate(s,!0),Ae.push(this);let n=super._stampTemplate(s,r);if(Ae.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,ka(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(s){const r=s.templateInfo,{previousSibling:n,nextSibling:a,parent:l}=r;n?n.nextSibling=a:l&&(l.firstChild=a),a?a.previousSibling=n:l&&(l.lastChild=n),r.nextSibling=r.previousSibling=null;let d=r.childNodes;for(let h=0;h<d.length;h++){let c=d[h];k(k(c).parentNode).removeChild(c);}}static _parseTemplateNode(s,r,n){let a=t._parseTemplateNode.call(this,s,r,n);if(s.nodeType===Node.TEXT_NODE){let l=this._parseBindings(s.textContent,r);l&&(s.textContent=Os(l)||" ",Rt(this,r,n,"text","textContent",l),a=!0);}return a}static _parseTemplateNodeAttribute(s,r,n,a,l){let d=this._parseBindings(l,r);if(d){let h=a,c="property";ha.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let u=Os(d);return u&&c=="attribute"&&(a=="class"&&s.hasAttribute("class")&&(u+=" "+s.getAttribute(a)),s.setAttribute(a,u)),c=="attribute"&&h=="disable-upgrade$"&&s.setAttribute(a,""),s.localName==="input"&&h==="value"&&s.setAttribute(h,""),s.removeAttribute(h),c==="property"&&(a=ko(a)),Rt(this,r,n,c,a,d,u),!0}else return t._parseTemplateNodeAttribute.call(this,s,r,n,a,l)}static _parseTemplateNestedTemplate(s,r,n){let a=t._parseTemplateNestedTemplate.call(this,s,r,n);const l=s.parentNode,d=n.templateInfo,h=l.localName==="dom-if",c=l.localName==="dom-repeat";vs&&(h||c)&&(l.removeChild(s),n=n.parentInfo,n.templateInfo=d,n.noted=!0,a=!1);let u=d.hostProps;if(zn&&h)u&&(r.hostProps=Object.assign(r.hostProps||{},u),vs||(n.parentInfo.noted=!0));else {let m="{";for(let f in u){let S=[{mode:m,source:f,dependencies:[f],hostProp:!0}];Rt(this,r,n,"property","_host_"+f,S);}}return a}static _parseBindings(s,r){let n=[],a=0,l;for(;(l=Ds.exec(s))!==null;){l.index>a&&n.push({literal:s.slice(a,l.index)});let d=l[1][0],h=!!l[2],c=l[3].trim(),u=!1,m="",f=-1;d=="{"&&(f=c.indexOf("::"))>0&&(m=c.substring(f+2),c=c.substring(0,f),u=!0);let S=$t(c),P=[];if(S){let{args:E,methodName:w}=S;for(let ye=0;ye<E.length;ye++){let J=E[ye];J.literal||P.push(J);}let U=r.dynamicFns;(U&&U[w]||S.static)&&(P.push(w),S.dynamicFn=!0);}else P.push(c);n.push({source:c,mode:d,negate:h,customEvent:u,signature:S,dependencies:P,event:m}),a=Ds.lastIndex;}if(a&&a<s.length){let d=s.substring(a);d&&n.push({literal:d});}return n.length?n:null}static _evaluateBinding(s,r,n,a,l,d){let h;return r.signature?h=ri(s,n,a,l,r.signature):n!=r.source?h=D(s,r.source):d&&si(n)?h=D(s,n):h=s.__data[n],r.negate&&(h=!h),h}}return e}),Ae=[];/**
|
|
1412
1412
|
@license
|
|
1413
1413
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1414
1414
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1424,7 +1424,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1424
1424
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1425
1425
|
Code distributed by Google as part of the polymer project is also
|
|
1426
1426
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1427
|
-
*/function
|
|
1427
|
+
*/function ja(o){const t={};for(let e in o){const i=o[e];t[e]=typeof i=="function"?{type:i}:i;}return t}const Wa=C(o=>{const t=Do(o);function e(r){const n=Object.getPrototypeOf(r);return n.prototype instanceof s?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=ja(a));}r.__ownProperties=n;}return r.__ownProperties}class s 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 s});/**
|
|
1428
1428
|
* @fileoverview
|
|
1429
1429
|
* @suppress {checkPrototypalTypes}
|
|
1430
1430
|
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1434,7 +1434,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1434
1434
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
1435
1435
|
* Google as part of the polymer project is also subject to an additional IP
|
|
1436
1436
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1437
|
-
*/const
|
|
1437
|
+
*/const qa="3.5.2",zs=window.ShadyCSS&&window.ShadyCSS.cssBuild,Ya=C(o=>{const t=Wa(Oi(o));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 s(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(!zs){const u=d.content.querySelectorAll("style"),m=wo(d),f=Hn(h),S=d.content.firstElementChild;for(let E=0;E<f.length;E++){let w=f[E];w.textContent=l._processStyleText(w.textContent,c),d.content.insertBefore(w,S);}let P=0;for(let E=0;E<m.length;E++){let w=m[E],U=u[P];U!==w?(w=w.cloneNode(!0),U.parentNode.insertBefore(w,U)):P++,w.textContent=l._processStyleText(w.textContent,c);}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(d,h),Nn&&zs&&Pn){const u=d.content.querySelectorAll("style");if(u){let m="";Array.from(u).forEach(f=>{m+=f.textContent,f.parentNode.removeChild(f);}),l._styleSheet=new CSSStyleSheet,l._styleSheet.replaceSync(m);}}}function n(l){let d=null;if(l&&(!pt||Dn)&&(d=Be.import(l,"template"),pt&&!d))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${l}`);return d}class a extends t{static get polymerElementVersion(){return qa}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):bo||(d=d.cloneNode(!0))),this.prototype._template=d;}static createProperties(d){for(let h in d)s(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=Pi(d.url);else {const h=Be.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=Tn,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 Si(d,h)}static _finalizeTemplate(d){const h=this.prototype._template;if(h&&!h.__polymerFinalized){h.__polymerFinalized=!0;const c=this.importPath,u=c?Me(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=k(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])),On&&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=Me(this.importPath)),Me(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 yo&&!(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});/**
|
|
1438
1438
|
@license
|
|
1439
1439
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1440
1440
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1442,7 +1442,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1442
1442
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1443
1443
|
Code distributed by Google as part of the polymer project is also
|
|
1444
1444
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1445
|
-
*/const
|
|
1445
|
+
*/const Ns=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:o=>o});class Ro{constructor(t,e){Ho(t,e);const i=e.reduce((s,r,n)=>s+$o(r)+t[n+1],t[0]);this.value=i.toString();}toString(){return this.value}}function $o(o){if(o instanceof Ro)return o.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${o}`)}function Ka(o){if(o instanceof HTMLTemplateElement)return o.innerHTML;if(o instanceof Ro)return $o(o);throw new Error(`non-template value passed to Polymer's html function: ${o}`)}const v=function(t,...e){Ho(t,e);const i=document.createElement("template");let s=e.reduce((r,n,a)=>r+Ka(n)+t[a+1],t[0]);return Ns&&(s=Ns.createHTML(s)),i.innerHTML=s,i},Ho=(o,t)=>{if(!Array.isArray(o)||!Array.isArray(o.raw)||t.length!==o.length-1)throw new TypeError("Invalid call to the html template tag")};/**
|
|
1446
1446
|
@license
|
|
1447
1447
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1448
1448
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1450,7 +1450,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1450
1450
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1451
1451
|
Code distributed by Google as part of the polymer project is also
|
|
1452
1452
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1453
|
-
*/const b=
|
|
1453
|
+
*/const b=Ya(HTMLElement),Ga=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,lt=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Xa(){function o(){return !0}return Uo(o)}function Ja(){try{return Qa()?!0:Za()?lt?!el():!Xa():!1}catch(o){return !1}}function Qa(){return localStorage.getItem("vaadin.developmentmode.force")}function Za(){return ["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function el(){return !!(lt&&Object.keys(lt).map(t=>lt[t]).filter(t=>t.productionMode).length>0)}function Uo(o,t){if(typeof o!="function")return;const e=Ga.exec(o.toString());if(e)try{o=new Function(e[1]);}catch(i){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",i);}return o(t)}window.Vaadin=window.Vaadin||{};const Ls=function(o,t){if(window.Vaadin.developmentMode)return Uo(o,t)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=Ja());function tl(){/*! vaadin-dev-mode:start
|
|
1454
1454
|
(function () {
|
|
1455
1455
|
'use strict';
|
|
1456
1456
|
|
|
@@ -1928,7 +1928,7 @@ try {
|
|
|
1928
1928
|
|
|
1929
1929
|
}());
|
|
1930
1930
|
|
|
1931
|
-
vaadin-dev-mode:end **/}const
|
|
1931
|
+
vaadin-dev-mode:end **/}const il=function(){if(typeof Ls=="function")return Ls(tl)};/**
|
|
1932
1932
|
* @license
|
|
1933
1933
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1934
1934
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1936,7 +1936,7 @@ try {
|
|
|
1936
1936
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1937
1937
|
* Code distributed by Google as part of the polymer project is also
|
|
1938
1938
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1939
|
-
*/let
|
|
1939
|
+
*/let Bs=0,jo=0;const ce=[];let ni=!1;function sl(){ni=!1;const o=ce.length;for(let t=0;t<o;t++){const e=ce[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}ce.splice(0,o),jo+=o;}const q={after(o){return {run(t){return window.setTimeout(t,o)},cancel(t){window.clearTimeout(t);}}},run(o,t){return window.setTimeout(o,t)},cancel(o){window.clearTimeout(o);}},He={run(o){return window.requestAnimationFrame(o)},cancel(o){window.cancelAnimationFrame(o);}},Wo={run(o){return window.requestIdleCallback?window.requestIdleCallback(o):window.setTimeout(o,16)},cancel(o){window.cancelIdleCallback?window.cancelIdleCallback(o):window.clearTimeout(o);}},mt={run(o){ni||(ni=!0,queueMicrotask(()=>sl())),ce.push(o);const t=Bs;return Bs+=1,t},cancel(o){const t=o-jo;if(t>=0){if(!ce[t])throw new Error(`invalid async handle: ${o}`);ce[t]=null;}}};/**
|
|
1940
1940
|
@license
|
|
1941
1941
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1942
1942
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1944,19 +1944,19 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1944
1944
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1945
1945
|
Code distributed by Google as part of the polymer project is also
|
|
1946
1946
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1947
|
-
*/const Ue=new Set;let M=class ai{static debounce(t,e,i){return t instanceof ai?t._cancelAsync():t=new ai,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,Ue.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),Ue.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
|
|
1947
|
+
*/const Ue=new Set;let M=class ai{static debounce(t,e,i){return t instanceof ai?t._cancelAsync():t=new ai,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,Ue.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),Ue.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 qo(o){Ue.add(o);}function ol(){const o=!!Ue.size;return Ue.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),o}const Te=()=>{let o;do o=ol();while(o)};/**
|
|
1948
1948
|
* @license
|
|
1949
1949
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1950
1950
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1951
|
-
*/const F=[];function li(o,t,e=o.getAttribute("dir")){t?o.setAttribute("dir",t):e!=null&&o.removeAttribute("dir");}function di(){return document.documentElement.getAttribute("dir")}function
|
|
1951
|
+
*/const F=[];function li(o,t,e=o.getAttribute("dir")){t?o.setAttribute("dir",t):e!=null&&o.removeAttribute("dir");}function di(){return document.documentElement.getAttribute("dir")}function rl(){const o=di();F.forEach(t=>{li(t,o);});}const nl=new MutationObserver(rl);nl.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const z=o=>class extends o{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(),li(this,di(),null));}attributeChangedCallback(e,i,s){if(super.attributeChangedCallback(e,i,s),e!=="dir")return;const r=di(),n=s===r&&F.indexOf(this)===-1,a=!s&&i&&F.indexOf(this)===-1;n||a?(this.__subscribe(),li(this,r,s)):s!==r&&i===r&&this.__unsubscribe();}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=F.includes(this),this.__unsubscribe();}_valueToNodeAttribute(e,i,s){s==="dir"&&i===""&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,i,s);}_attributeToProperty(e,i,s){e==="dir"&&!i?this.dir="":super._attributeToProperty(e,i,s);}__subscribe(){F.includes(this)||F.push(this);}__unsubscribe(){F.includes(this)&&F.splice(F.indexOf(this),1);}};/**
|
|
1952
1952
|
* @license
|
|
1953
1953
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1954
1954
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1955
|
-
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){
|
|
1955
|
+
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){il();};let Ht;const Fs=new Set,L=o=>class extends z(o){static finalize(){super.finalize();const{is:e}=this;e&&!Fs.has(e)&&(window.Vaadin.registrations.push(this),Fs.add(e),window.Vaadin.developmentModeCallback&&(Ht=M.debounce(Ht,Wo,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]();}),qo(Ht)));}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.');}};/**
|
|
1956
1956
|
* @license
|
|
1957
1957
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1958
1958
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1959
|
-
*/function
|
|
1959
|
+
*/function al(o){const t=[];for(;o;){if(o.nodeType===Node.DOCUMENT_NODE){t.push(o);break}if(o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(o),o=o.host;continue}if(o.assignedSlot){o=o.assignedSlot;continue}o=o.parentNode;}return t}function Yo(o){const t=[];let e;return o.localName==="slot"?e=o.assignedElements():(t.push(o),e=[...o.children]),e.forEach(i=>t.push(...Yo(i))),t}function Mi(o){return o?new Set(o.split(" ")):new Set}function wt(o){return o?[...o].join(" "):""}function Ko(o,t,e){const i=Mi(o.getAttribute(t));i.add(e),o.setAttribute(t,wt(i));}function ll(o,t,e){const i=Mi(o.getAttribute(t));if(i.delete(e),i.size===0){o.removeAttribute(t);return}o.setAttribute(t,wt(i));}function dl(o){return o.nodeType===Node.TEXT_NODE&&o.textContent.trim()===""}/**
|
|
1960
1960
|
* @license
|
|
1961
1961
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
1962
1962
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1964,11 +1964,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1964
1964
|
* @license
|
|
1965
1965
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1966
1966
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1967
|
-
*/let
|
|
1967
|
+
*/let hl=0;function qe(){return hl++}/**
|
|
1968
1968
|
* @license
|
|
1969
1969
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1970
1970
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1971
|
-
*/class T extends EventTarget{static generateId(t,e="default"){return `${e}-${t.localName}-${qe()}`}constructor(t,e,i,s={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:l,uniqueIdPrefix:d}=s;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 s=this.defaultNode;return !s&&i&&(s=document.createElement(i),s instanceof Element&&(e!==""&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&t==="")}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host);}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t));}observeSlot(){const{slotName:t}=this,e=t===""?"slot:not([name])":`slot[name=${t}]`,i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new zi(i,({addedNodes:s,removedNodes:r})=>{const n=this.multiple?this.nodes:[this.node],a=s.filter(l=>!
|
|
1971
|
+
*/class T extends EventTarget{static generateId(t,e="default"){return `${e}-${t.localName}-${qe()}`}constructor(t,e,i,s={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:l,uniqueIdPrefix:d}=s;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 s=this.defaultNode;return !s&&i&&(s=document.createElement(i),s instanceof Element&&(e!==""&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&t==="")}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host);}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t));}observeSlot(){const{slotName:t}=this,e=t===""?"slot:not([name])":`slot[name=${t}]`,i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new zi(i,({addedNodes:s,removedNodes:r})=>{const n=this.multiple?this.nodes:[this.node],a=s.filter(l=>!dl(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)));});}}/**
|
|
1972
1972
|
* @license
|
|
1973
1973
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1974
1974
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1980,7 +1980,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1980
1980
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1981
1981
|
Code distributed by Google as part of the polymer project is also
|
|
1982
1982
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1983
|
-
*/const
|
|
1983
|
+
*/const cl=!1,ul=o=>o,Ni=typeof document.head.style.touchAction=="string",hi="__polymerGestures",Ut="__polymerGesturesHandled",ci="__polymerGesturesTouchAction",Vs=25,Rs=5,pl=2,_l=["mousedown","mousemove","mouseup","click"],ml=[0,1,4,2],fl=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(o){return !1}}();function Li(o){return _l.indexOf(o)>-1}let Go=!1;(function(){try{const o=Object.defineProperty({},"passive",{get(){Go=!0;}});window.addEventListener("test",null,o),window.removeEventListener("test",null,o);}catch(o){}})();function gl(o){if(!(Li(o)||o==="touchend")&&Ni&&Go&&cl)return {passive:!0}}const vl=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),bl={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function te(o){const t=o.type;if(!Li(t))return !1;if(t==="mousemove"){let i=o.buttons===void 0?1:o.buttons;return o instanceof window.MouseEvent&&!fl&&(i=ml[o.which]||0),!!(i&1)}return (o.button===void 0?0:o.button)===0}function yl(o){if(o.type==="click"){if(o.detail===0)return !0;const t=Y(o);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return !0;const e=t.getBoundingClientRect(),i=o.pageX,s=o.pageY;return !(i>=e.left&&i<=e.right&&s>=e.top&&s<=e.bottom)}return !1}const V={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function xl(o){let t="auto";const e=Jo(o);for(let i=0,s;i<e.length;i++)if(s=e[i],s[ci]){t=s[ci];break}return t}function Xo(o,t,e){o.movefn=t,o.upfn=e,document.addEventListener("mousemove",t),document.addEventListener("mouseup",e);}function ue(o){document.removeEventListener("mousemove",o.movefn),document.removeEventListener("mouseup",o.upfn),o.movefn=null,o.upfn=null;}const Jo=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:o=>o.composedPath&&o.composedPath()||[],Bi={},ee=[];function Cl(o,t){let e=document.elementFromPoint(o,t),i=e;for(;i&&i.shadowRoot&&!window.ShadyDOM;){const s=i;if(i=i.shadowRoot.elementFromPoint(o,t),s===i)break;i&&(e=i);}return e}function Y(o){const t=Jo(o);return t.length>0?t[0]:o.target}function wl(o){const t=o.type,i=o.currentTarget[hi];if(!i)return;const s=i[t];if(!s)return;if(!o[Ut]&&(o[Ut]={},t.startsWith("touch"))){const n=o.changedTouches[0];if(t==="touchstart"&&o.touches.length===1&&(V.touch.id=n.identifier),V.touch.id!==n.identifier)return;Ni||(t==="touchstart"||t==="touchmove")&&El(o);}const r=o[Ut];if(!r.skip){for(let n=0,a;n<ee.length;n++)a=ee[n],s[a.name]&&!r[a.name]&&a.flow&&a.flow.start.indexOf(o.type)>-1&&a.reset&&a.reset();for(let n=0,a;n<ee.length;n++)a=ee[n],s[a.name]&&!r[a.name]&&(r[a.name]=!0,a[t](o));}}function El(o){const t=o.changedTouches[0],e=o.type;if(e==="touchstart")V.touch.x=t.clientX,V.touch.y=t.clientY,V.touch.scrollDecided=!1;else if(e==="touchmove"){if(V.touch.scrollDecided)return;V.touch.scrollDecided=!0;const i=xl(o);let s=!1;const r=Math.abs(V.touch.x-t.clientX),n=Math.abs(V.touch.y-t.clientY);o.cancelable&&(i==="none"?s=!0:i==="pan-x"?s=n>r:i==="pan-y"&&(s=r>n)),s?o.preventDefault():ft("track");}}function B(o,t,e){return Bi[t]?(Al(o,t,e),!0):!1}function Al(o,t,e){const i=Bi[t],s=i.deps,r=i.name;let n=o[hi];n||(o[hi]=n={});for(let a=0,l,d;a<s.length;a++)l=s[a],!(vl&&Li(l)&&l!=="click")&&(d=n[l],d||(n[l]=d={_count:0}),d._count===0&&o.addEventListener(l,wl,gl(l)),d[r]=(d[r]||0)+1,d._count=(d._count||0)+1);o.addEventListener(t,e),i.touchAction&&Qo(o,i.touchAction);}function Fi(o){ee.push(o),o.emits.forEach(t=>{Bi[t]=o;});}function Il(o){for(let t=0,e;t<ee.length;t++){e=ee[t];for(let i=0,s;i<e.emits.length;i++)if(s=e.emits[i],s===o)return e}return null}function Qo(o,t){Ni&&o instanceof HTMLElement&&mt.run(()=>{o.style.touchAction=t;}),o[ci]=t;}function Vi(o,t,e){const i=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(i.detail=e,ul(o).dispatchEvent(i),i.defaultPrevented){const s=e.preventer||e.sourceEvent;s&&s.preventDefault&&s.preventDefault();}}function ft(o){const t=Il(o);t.info&&(t.info.prevent=!0);}Fi({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){ue(this.info);},mousedown(o){if(!te(o))return;const t=Y(o),e=this,i=r=>{te(r)||(Ie("up",t,r),ue(e.info));},s=r=>{te(r)&&Ie("up",t,r),ue(e.info);};Xo(this.info,i,s),Ie("down",t,o);},touchstart(o){Ie("down",Y(o),o.changedTouches[0],o);},touchend(o){Ie("up",Y(o),o.changedTouches[0],o);}});function Ie(o,t,e,i){t&&Vi(t,o,{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i,prevent(s){return ft(s)}});}Fi({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(o){this.moves.length>pl&&this.moves.shift(),this.moves.push(o);},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,ue(this.info);},mousedown(o){if(!te(o))return;const t=Y(o),e=this,i=r=>{const n=r.clientX,a=r.clientY;$s(e.info,n,a)&&(e.info.state=e.info.started?r.type==="mouseup"?"end":"track":"start",e.info.state==="start"&&ft("tap"),e.info.addMove({x:n,y:a}),te(r)||(e.info.state="end",ue(e.info)),t&&jt(e.info,t,r),e.info.started=!0);},s=r=>{e.info.started&&i(r),ue(e.info);};Xo(this.info,i,s),this.info.x=o.clientX,this.info.y=o.clientY;},touchstart(o){const t=o.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY;},touchmove(o){const t=Y(o),e=o.changedTouches[0],i=e.clientX,s=e.clientY;$s(this.info,i,s)&&(this.info.state==="start"&&ft("tap"),this.info.addMove({x:i,y:s}),jt(this.info,t,e),this.info.state="track",this.info.started=!0);},touchend(o){const t=Y(o),e=o.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:e.clientX,y:e.clientY}),jt(this.info,t,e));}});function $s(o,t,e){if(o.prevent)return !1;if(o.started)return !0;const i=Math.abs(o.x-t),s=Math.abs(o.y-e);return i>=Rs||s>=Rs}function jt(o,t,e){if(!t)return;const i=o.moves[o.moves.length-2],s=o.moves[o.moves.length-1],r=s.x-o.x,n=s.y-o.y;let a,l=0;i&&(a=s.x-i.x,l=s.y-i.y),Vi(t,"track",{state:o.state,x:e.clientX,y:e.clientY,dx:r,dy:n,ddx:a,ddy:l,sourceEvent:e,hover(){return Cl(e.clientX,e.clientY)}});}Fi({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(o){te(o)&&(this.info.x=o.clientX,this.info.y=o.clientY);},click(o){te(o)&&Hs(this.info,o);},touchstart(o){const t=o.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY;},touchend(o){Hs(this.info,o.changedTouches[0],o);}});function Hs(o,t,e){const i=Math.abs(t.clientX-o.x),s=Math.abs(t.clientY-o.y),r=Y(e||t);!r||bl[r.localName]&&r.hasAttribute("disabled")||(isNaN(i)||isNaN(s)||i<=Vs&&s<=Vs||yl(t))&&(o.prevent||Vi(r,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:e}));}/**
|
|
1984
1984
|
* @license
|
|
1985
1985
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1986
1986
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1992,11 +1992,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1992
1992
|
* @license
|
|
1993
1993
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1994
1994
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1995
|
-
*/const
|
|
1995
|
+
*/const Ri=o=>class extends ve(oe(o)){get _activeKeys(){return [" "]}ready(){super.ready(),B(this,"down",e=>{this._shouldSetActive(e)&&this._setActive(!0);}),B(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);}};/**
|
|
1996
1996
|
* @license
|
|
1997
1997
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1998
1998
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1999
|
-
*/let
|
|
1999
|
+
*/let $i=!1;window.addEventListener("keydown",()=>{$i=!0;},{capture:!0});window.addEventListener("mousedown",()=>{$i=!1;},{capture:!0});function ui(){let o=document.activeElement||document.body;for(;o.shadowRoot&&o.shadowRoot.activeElement;)o=o.shadowRoot.activeElement;return o}function Et(){return $i}function Zo(o){const t=o.style;if(t.visibility==="hidden"||t.display==="none")return !0;const e=window.getComputedStyle(o);return e.visibility==="hidden"||e.display==="none"}function kl(o,t){const e=Math.max(o.tabIndex,0),i=Math.max(t.tabIndex,0);return e===0||i===0?i>e:e>i}function Sl(o,t){const e=[];for(;o.length>0&&t.length>0;)kl(o[0],t[0])?e.push(t.shift()):e.push(o.shift());return e.concat(o,t)}function pi(o){const t=o.length;if(t<2)return o;const e=Math.ceil(t/2),i=pi(o.slice(0,e)),s=pi(o.slice(e));return Sl(i,s)}function _i(o){return o.offsetParent===null&&o.clientWidth===0&&o.clientHeight===0?!0:Zo(o)}function Hi(o){return o.matches('[tabindex="-1"]')?!1:o.matches("input, select, textarea, button, object")?o.matches(":not([disabled])"):o.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function Ui(o){return o.getRootNode().activeElement===o}function Pl(o){if(!Hi(o))return -1;const t=o.getAttribute("tabindex")||0;return Number(t)}function er(o,t){if(o.nodeType!==Node.ELEMENT_NODE||Zo(o))return !1;const e=o,i=Pl(e);let s=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=>{s=er(n,t)||s;}),s}function Tl(o){const t=[];return er(o,t)?pi(t):t}/**
|
|
2000
2000
|
* @license
|
|
2001
2001
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2002
2002
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -2004,15 +2004,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2004
2004
|
* @license
|
|
2005
2005
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2006
2006
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2007
|
-
*/const
|
|
2007
|
+
*/const tr=o=>class extends ve(o){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);}};/**
|
|
2008
2008
|
* @license
|
|
2009
2009
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2010
2010
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2011
|
-
*/const At=C(o=>class extends re(
|
|
2011
|
+
*/const At=C(o=>class extends re(tr(o)){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);}});/**
|
|
2012
2012
|
* @license
|
|
2013
2013
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2014
2014
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2015
|
-
*/const
|
|
2015
|
+
*/const ji=C(o=>class extends o{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,s)=>{this._delegateAttribute(i,e[s]);});}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((i,s)=>{this._delegateProperty(i,e[s]);});}_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);}});/**
|
|
2016
2016
|
* @license
|
|
2017
2017
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2018
2018
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -2020,15 +2020,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2020
2020
|
* @license
|
|
2021
2021
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2022
2022
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2023
|
-
*/const
|
|
2023
|
+
*/const Dl=C(o=>class extends ji(ve(Ye(o))){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;}});/**
|
|
2024
2024
|
* @license
|
|
2025
2025
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2026
2026
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2027
|
-
*/const Wt=new Map;function
|
|
2027
|
+
*/const Wt=new Map;function Wi(o){return Wt.has(o)||Wt.set(o,new WeakMap),Wt.get(o)}function ir(o,t){o&&o.removeAttribute(t);}function sr(o,t){if(!o||!t)return;const e=Wi(t);if(e.has(o))return;const i=Mi(o.getAttribute(t));e.set(o,new Set(i));}function Ol(o,t){if(!o||!t)return;const e=Wi(t),i=e.get(o);!i||i.size===0?o.removeAttribute(t):Ko(o,t,wt(i)),e.delete(o);}function pe(o,t,e={newId:null,oldId:null,fromUser:!1}){if(!o||!t)return;const{newId:i,oldId:s,fromUser:r}=e,n=Wi(t),a=n.get(o);if(!r&&a){s&&a.delete(s),i&&a.add(i);return}r&&(a?i||n.delete(o):sr(o,t),ir(o,t)),ll(o,t,s);const l=i||wt(a);l&&Ko(o,t,l);}function Ml(o,t){sr(o,t),ir(o,t);}/**
|
|
2028
2028
|
* @license
|
|
2029
2029
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2030
2030
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2031
|
-
*/class
|
|
2031
|
+
*/class zl{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?(Ml(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(Ol(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")));}__setLabelIdToAriaAttribute(t,e,i){pe(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i});}__setErrorIdToAriaAttribute(t,e){pe(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setHelperIdToAriaAttribute(t,e){pe(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")));}}/**
|
|
2032
2032
|
* @license
|
|
2033
2033
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2034
2034
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -2040,31 +2040,31 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2040
2040
|
* @license
|
|
2041
2041
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
2042
2042
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2043
|
-
*/class
|
|
2043
|
+
*/class qi extends T{constructor(t,e,i,s={}){super(t,e,i,zt(xe({},s),{useUniqueId:!0}));}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t);}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node));}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t);}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(e=>{e.forEach(i=>{const s=i.target,r=s===this.node;i.type==="attributes"?r&&this.__updateNodeId(s):(r||s.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);}}/**
|
|
2044
2044
|
* @license
|
|
2045
2045
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2046
2046
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2047
|
-
*/class
|
|
2047
|
+
*/class Nl extends qi{constructor(t){super(t,"error-message","div");}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node);}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node);}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t);}initNode(t){this.updateDefaultNode(t);}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t);}restoreDefaultNode(){this.attachDefaultNode();}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,s=!!(i&&e&&e.trim()!=="");t&&(t.textContent=s?e:"",t.hidden=!s,s&&dt(e,{mode:"assertive"})),super.updateDefaultNode(t);}}/**
|
|
2048
2048
|
* @license
|
|
2049
2049
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2050
2050
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2051
|
-
*/class
|
|
2051
|
+
*/class Ll extends qi{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);}}/**
|
|
2052
2052
|
* @license
|
|
2053
2053
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2054
2054
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2055
|
-
*/class
|
|
2055
|
+
*/class or extends qi{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);}}/**
|
|
2056
2056
|
* @license
|
|
2057
2057
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2058
2058
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2059
|
-
*/const
|
|
2059
|
+
*/const Bl=C(o=>class extends H(o){static get properties(){return {label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new or(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);}});/**
|
|
2060
2060
|
* @license
|
|
2061
2061
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2062
2062
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2063
|
-
*/const
|
|
2063
|
+
*/const Yi=C(o=>class extends o{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}});/**
|
|
2064
2064
|
* @license
|
|
2065
2065
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2066
2066
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2067
|
-
*/const It=o=>class extends
|
|
2067
|
+
*/const It=o=>class extends Yi(Bl(H(o))){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 zl(this),this._helperController=new Ll(this),this._errorController=new Nl(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:s}=e.detail;this.__labelChanged(i,s);}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:s}=e.detail;this.toggleAttribute("has-helper",i),this.__helperChanged(i,s);});}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);});}};/**
|
|
2068
2068
|
* @license
|
|
2069
2069
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2070
2070
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -2076,11 +2076,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2076
2076
|
* @license
|
|
2077
2077
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2078
2078
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2079
|
-
*/const
|
|
2079
|
+
*/const Fl=o=>class extends It(Dl(At(Ri(o)))){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 Ke(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new Ge(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();}};/**
|
|
2080
2080
|
* @license
|
|
2081
2081
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2082
2082
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2083
|
-
*/const
|
|
2083
|
+
*/const Vl=p`
|
|
2084
2084
|
:host {
|
|
2085
2085
|
display: inline-block;
|
|
2086
2086
|
}
|
|
@@ -2172,7 +2172,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2172
2172
|
* @license
|
|
2173
2173
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2174
2174
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2175
|
-
*/_("vaadin-checkbox",
|
|
2175
|
+
*/_("vaadin-checkbox",Vl,{moduleId:"vaadin-checkbox-styles"});class Rl extends Fl(L(x(b))){static get is(){return "vaadin-checkbox"}static get template(){return v`
|
|
2176
2176
|
<div class="vaadin-checkbox-container">
|
|
2177
2177
|
<div part="checkbox" aria-hidden="true"></div>
|
|
2178
2178
|
<slot name="input"></slot>
|
|
@@ -2188,11 +2188,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2188
2188
|
</div>
|
|
2189
2189
|
</div>
|
|
2190
2190
|
<slot name="tooltip"></slot>
|
|
2191
|
-
`}ready(){super.ready(),this._tooltipController=new G(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}g(
|
|
2191
|
+
`}ready(){super.ready(),this._tooltipController=new G(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}g(Rl);/**
|
|
2192
2192
|
* @license
|
|
2193
2193
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2194
2194
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2195
|
-
*/const
|
|
2195
|
+
*/const rr=p`
|
|
2196
2196
|
:host {
|
|
2197
2197
|
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
2198
2198
|
}
|
|
@@ -2252,7 +2252,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2252
2252
|
* @license
|
|
2253
2253
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2254
2254
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2255
|
-
*/const
|
|
2255
|
+
*/const Ki=p`
|
|
2256
2256
|
[part='label'] {
|
|
2257
2257
|
align-self: flex-start;
|
|
2258
2258
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
@@ -2364,7 +2364,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2364
2364
|
margin-left: 0;
|
|
2365
2365
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
2366
2366
|
}
|
|
2367
|
-
`;_("",
|
|
2367
|
+
`;_("",Ki,{moduleId:"lumo-required-field"});const $l=p`
|
|
2368
2368
|
:host {
|
|
2369
2369
|
color: var(--lumo-body-text-color);
|
|
2370
2370
|
font-size: var(--lumo-font-size-m);
|
|
@@ -2407,15 +2407,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2407
2407
|
color: var(--lumo-secondary-text-color);
|
|
2408
2408
|
}
|
|
2409
2409
|
}
|
|
2410
|
-
`;_("vaadin-checkbox-group",[
|
|
2410
|
+
`;_("vaadin-checkbox-group",[Ki,rr,$l],{moduleId:"lumo-checkbox-group"});/**
|
|
2411
2411
|
* @license
|
|
2412
2412
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
2413
2413
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2414
|
-
*/const
|
|
2414
|
+
*/const Hl=o=>class extends It(re(ve(o))){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 G(this),this._tooltipController.addEventListener("tooltip-changed",e=>{const i=e.detail.node;if(i&&i.isConnected){const s=this.__checkboxes.map(r=>r.inputElement);this._tooltipController.setAriaTarget(s);}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 zi(e,({addedNodes:i,removedNodes:s})=>{const r=this.__filterCheckboxes(i),n=this.__filterCheckboxes(s);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(s=>{const{value:r}=s;return !s.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(s=>{s.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(s=>{s.checked=e&&e.includes(s.value);}),i!==void 0&&this.validate());}__readonlyChanged(e,i){(e||i)&&this.__checkboxes.forEach(s=>{s.readonly=e;});}_shouldRemoveFocus(e){return !this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}};/**
|
|
2415
2415
|
* @license
|
|
2416
2416
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
2417
2417
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2418
|
-
*/const
|
|
2418
|
+
*/const Ul=p`
|
|
2419
2419
|
:host {
|
|
2420
2420
|
display: inline-flex;
|
|
2421
2421
|
}
|
|
@@ -2448,7 +2448,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2448
2448
|
* @license
|
|
2449
2449
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
2450
2450
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2451
|
-
*/_("vaadin-checkbox-group",
|
|
2451
|
+
*/_("vaadin-checkbox-group",Ul,{moduleId:"vaadin-checkbox-group-styles"});class jl extends Hl(L(x(b))){static get is(){return "vaadin-checkbox-group"}static get template(){return v`
|
|
2452
2452
|
<div class="vaadin-group-field-container">
|
|
2453
2453
|
<div part="label">
|
|
2454
2454
|
<slot name="label"></slot>
|
|
@@ -2469,7 +2469,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2469
2469
|
</div>
|
|
2470
2470
|
|
|
2471
2471
|
<slot name="tooltip"></slot>
|
|
2472
|
-
`}}g(
|
|
2472
|
+
`}}g(jl);/**
|
|
2473
2473
|
* @license
|
|
2474
2474
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2475
2475
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -2572,7 +2572,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2572
2572
|
opacity: 0;
|
|
2573
2573
|
}
|
|
2574
2574
|
}
|
|
2575
|
-
`;_("",kt,{moduleId:"lumo-menu-overlay-core"});const
|
|
2575
|
+
`;_("",kt,{moduleId:"lumo-menu-overlay-core"});const Wl=p`
|
|
2576
2576
|
/* Small viewport (bottom sheet) styles */
|
|
2577
2577
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
2578
2578
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -2634,7 +2634,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2634
2634
|
transform: translateY(150%);
|
|
2635
2635
|
}
|
|
2636
2636
|
}
|
|
2637
|
-
`,
|
|
2637
|
+
`,Gi=[be,kt,Wl];_("",Gi,{moduleId:"lumo-menu-overlay"});const ql=p`
|
|
2638
2638
|
[part='overlay'] {
|
|
2639
2639
|
/*
|
|
2640
2640
|
Width:
|
|
@@ -2679,7 +2679,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2679
2679
|
max-height: 70vh;
|
|
2680
2680
|
}
|
|
2681
2681
|
}
|
|
2682
|
-
`;_("vaadin-date-picker-overlay",[
|
|
2682
|
+
`;_("vaadin-date-picker-overlay",[Gi,ql],{moduleId:"lumo-date-picker-overlay"});const nr=p`
|
|
2683
2683
|
:host {
|
|
2684
2684
|
/* Sizing */
|
|
2685
2685
|
--lumo-button-size: var(--lumo-size-m);
|
|
@@ -2955,7 +2955,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
2955
2955
|
margin-left: 0;
|
|
2956
2956
|
margin-right: 0;
|
|
2957
2957
|
}
|
|
2958
|
-
`;_("vaadin-button",
|
|
2958
|
+
`;_("vaadin-button",nr,{moduleId:"lumo-button"});_("vaadin-date-picker-year",p`
|
|
2959
2959
|
:host([current]) [part='year-number'] {
|
|
2960
2960
|
color: var(--lumo-primary-text-color);
|
|
2961
2961
|
}
|
|
@@ -3458,7 +3458,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3458
3458
|
* @license
|
|
3459
3459
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3460
3460
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3461
|
-
*/const
|
|
3461
|
+
*/const Xi=p`
|
|
3462
3462
|
[part$='button'] {
|
|
3463
3463
|
flex: none;
|
|
3464
3464
|
width: 1em;
|
|
@@ -3485,11 +3485,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3485
3485
|
font-family: 'lumo-icons';
|
|
3486
3486
|
display: block;
|
|
3487
3487
|
}
|
|
3488
|
-
`;_("",
|
|
3488
|
+
`;_("",Xi,{moduleId:"lumo-field-button"});/**
|
|
3489
3489
|
* @license
|
|
3490
3490
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3491
3491
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3492
|
-
*/const
|
|
3492
|
+
*/const Yl=p`
|
|
3493
3493
|
:host {
|
|
3494
3494
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
3495
3495
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -3620,7 +3620,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3620
3620
|
[part='clear-button']::before {
|
|
3621
3621
|
content: var(--lumo-icons-cross);
|
|
3622
3622
|
}
|
|
3623
|
-
`,ne=[
|
|
3623
|
+
`,ne=[Ki,Xi,rr,Yl];_("",ne,{moduleId:"lumo-input-field-shared-styles"});const Kl=p`
|
|
3624
3624
|
[part='toggle-button']::before {
|
|
3625
3625
|
content: var(--lumo-icons-calendar);
|
|
3626
3626
|
}
|
|
@@ -3642,15 +3642,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3642
3642
|
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
|
3643
3643
|
--_lumo-text-field-overflow-mask-image: none;
|
|
3644
3644
|
}
|
|
3645
|
-
`;_("vaadin-date-picker",[ne,
|
|
3645
|
+
`;_("vaadin-date-picker",[ne,Kl],{moduleId:"lumo-date-picker"});/**
|
|
3646
3646
|
* @license
|
|
3647
3647
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3648
3648
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3649
|
-
*/const
|
|
3649
|
+
*/const Gl=o=>class extends o{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());});}};/**
|
|
3650
3650
|
* @license
|
|
3651
3651
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3652
3652
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3653
|
-
*/const
|
|
3653
|
+
*/const Xl=p`
|
|
3654
3654
|
:host {
|
|
3655
3655
|
display: flex;
|
|
3656
3656
|
align-items: center;
|
|
@@ -3719,11 +3719,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3719
3719
|
* @license
|
|
3720
3720
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3721
3721
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3722
|
-
*/_("vaadin-input-container",
|
|
3722
|
+
*/_("vaadin-input-container",Xl,{moduleId:"vaadin-input-container-styles"});class ar extends Gl(x(z(b))){static get is(){return "vaadin-input-container"}static get template(){return v`
|
|
3723
3723
|
<slot name="prefix"></slot>
|
|
3724
3724
|
<slot></slot>
|
|
3725
3725
|
<slot name="suffix"></slot>
|
|
3726
|
-
`}}g(
|
|
3726
|
+
`}}g(ar);/**
|
|
3727
3727
|
* @license
|
|
3728
3728
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3729
3729
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -3794,55 +3794,55 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3794
3794
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3795
3795
|
Code distributed by Google as part of the polymer project is also
|
|
3796
3796
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3797
|
-
*/let
|
|
3797
|
+
*/let mi=!1,Jl=[],lr=[];function Ql(){mi=!0,requestAnimationFrame(function(){mi=!1,Zl(Jl),setTimeout(function(){ed(lr);});});}function Zl(o){for(;o.length;)dr(o.shift());}function ed(o){for(let t=0,e=o.length;t<e;t++)dr(o.shift());}function dr(o){const t=o[0],e=o[1],i=o[2];try{e.apply(t,i);}catch(s){setTimeout(()=>{throw s});}}function hr(o,t,e){mi||Ql(),lr.push([o,t,e]);}/**
|
|
3798
3798
|
* @license
|
|
3799
3799
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3800
3800
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3801
|
-
*/const St=o=>o.test(navigator.userAgent),
|
|
3801
|
+
*/const St=o=>o.test(navigator.userAgent),fi=o=>o.test(navigator.platform),td=o=>o.test(navigator.vendor);St(/Android/u);St(/Chrome/u)&&td(/Google Inc/u);St(/Firefox/u);const id=fi(/^iPad/u)||fi(/^Mac/u)&&navigator.maxTouchPoints>1,sd=fi(/^iPhone/u),Ji=sd||id,od=St(/^((?!chrome|android).)*safari/iu),gi=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(o){return !1}})();/**
|
|
3802
3802
|
* @license
|
|
3803
3803
|
* Copyright (c) 2017 Anton Korzunov
|
|
3804
3804
|
* SPDX-License-Identifier: MIT
|
|
3805
|
-
*/let ae=new WeakMap,it=new WeakMap,st={},qt=0;const
|
|
3805
|
+
*/let ae=new WeakMap,it=new WeakMap,st={},qt=0;const Us=o=>o&&o.nodeType===Node.ELEMENT_NODE,Yt=(...o)=>{console.error(`Error: ${o.join(" ")}. Skip setting aria-hidden.`);},rd=(o,t)=>Us(o)?t.map(e=>{if(!Us(e))return Yt(e,"is not a valid element"),null;let i=e;for(;i&&i!==o;){if(o.contains(i))return e;i=i.getRootNode().host;}return Yt(e,"is not contained inside",o),null}).filter(e=>!!e):(Yt(o,"is not a valid element"),[]),nd=(o,t,e,i)=>{const s=rd(t,Array.isArray(o)?o:[o]);st[e]||(st[e]=new WeakMap);const r=st[e],n=[],a=new Set,l=new Set(s),d=c=>{if(!c||a.has(c))return;a.add(c);const u=c.assignedSlot;u&&d(u),d(c.parentNode||c.host);};s.forEach(d);const h=c=>{if(!c||l.has(c))return;const u=c.shadowRoot;(u?[...c.children,...u.children]:[...c.children]).forEach(f=>{if(!["template","script","style"].includes(f.localName))if(a.has(f))h(f);else {const S=f.getAttribute(i),P=S!==null&&S!=="false",E=(ae.get(f)||0)+1,w=(r.get(f)||0)+1;ae.set(f,E),r.set(f,w),n.push(f),E===1&&P&&it.set(f,!0),w===1&&f.setAttribute(e,"true"),P||f.setAttribute(i,"true");}});};return h(t),a.clear(),qt+=1,()=>{n.forEach(c=>{const u=ae.get(c)-1,m=r.get(c)-1;ae.set(c,u),r.set(c,m),u||(it.has(c)?it.delete(c):c.removeAttribute(i)),m||c.removeAttribute(e);}),qt-=1,qt||(ae=new WeakMap,ae=new WeakMap,it=new WeakMap,st={});}},cr=(o,t=document.body,e="data-aria-hidden")=>{const i=Array.from(Array.isArray(o)?o:[o]);return t&&i.push(...Array.from(t.querySelectorAll("[aria-live]"))),nd(i,t,e,"aria-hidden")};/**
|
|
3806
3806
|
* @license
|
|
3807
3807
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3808
3808
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3809
|
-
*/class
|
|
3809
|
+
*/class ad{constructor(t,e){this.host=t,this.callback=typeof e=="function"?e:()=>t;}showModal(){const t=this.callback();this.__showOthers=cr(t);}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null);}}/**
|
|
3810
3810
|
* @license
|
|
3811
3811
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3812
3812
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3813
|
-
*/class
|
|
3813
|
+
*/class ld{saveFocus(t){this.focusNode=t||ui();}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=t?t.preventScroll:!1;ui()===document.body?setTimeout(()=>e.focus({preventScroll:i})):e.focus({preventScroll:i}),this.focusNode=null;}}/**
|
|
3814
3814
|
* @license
|
|
3815
3815
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3816
3816
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3817
|
-
*/const Kt=[];class
|
|
3817
|
+
*/const Kt=[];class dd{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this);}get __focusableElements(){return Tl(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Ui).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.");Kt.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus();}releaseFocus(){this.__trapNode=null,Kt.pop();}__onKeyDown(t){if(this.__trapNode&&this===Array.from(Kt).pop()&&t.key==="Tab"){t.preventDefault();const e=t.shiftKey;this.__focusNextElement(e);}}__focusNextElement(t=!1){const e=this.__focusableElements,i=t?-1:1,s=this.__focusedElementIndex,r=(e.length+s+i)%e.length,n=e[r];n.focus(),n.localName==="input"&&n.select();}}/**
|
|
3818
3818
|
* @license
|
|
3819
3819
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3820
3820
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3821
|
-
*/const
|
|
3821
|
+
*/const hd=o=>class extends H(o){static get properties(){return {focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new ad(this),this.__focusTrapController=new dd(this),this.__focusRestorationController=new ld;}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=!Et();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=ui();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return !0;let i=e;const s=e.ownerDocument;for(;i&&i!==s&&i!==this;)i=i.parentNode||i.host;return i===this}};/**
|
|
3822
3822
|
* @license
|
|
3823
3823
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3824
3824
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3825
|
-
*/const
|
|
3825
|
+
*/const ur=()=>Array.from(document.body.children).filter(o=>o instanceof HTMLElement&&o._hasOverlayStackMixin&&!o.hasAttribute("closing")).sort((o,t)=>o.__zIndex-t.__zIndex||0),vi=()=>ur().filter(o=>o.$.overlay),cd=o=>o===vi().pop(),pr=o=>class extends o{constructor(){super(),this._hasOverlayStackMixin=!0;}get _last(){return cd(this)}bringToFront(){let e="";const i=ur().filter(s=>s!==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"),vi().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=vi();let i;for(;(i=e.pop())&&!(i!==this&&(i.$.overlay.style.removeProperty("pointer-events"),!i.modeless)););}};/**
|
|
3826
3826
|
* @license
|
|
3827
3827
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3828
3828
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3829
|
-
*/const Je=o=>class extends
|
|
3829
|
+
*/const Je=o=>class extends hd(pr(o)){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),Ji&&(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,s=window.innerWidth>e,r=document.documentElement.clientHeight;s&&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,s,r){const n=this._oldOwner!==i||this._oldModel!==s;this._oldModel=s,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(),hr(this,()=>{this._trapFocus();const s=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(s);}),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 s=`__${e}Handler`,r=n=>{n&&n.target!==this||(i(),this.removeEventListener("animationend",r),delete this[s]);};this[s]=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);}}};/**
|
|
3830
3830
|
* @license
|
|
3831
3831
|
* Copyright (c) 2024 Vaadin Ltd.
|
|
3832
3832
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3833
|
-
*/function
|
|
3833
|
+
*/function ud(o,t){let e=null;const i=document.documentElement;function s(){e&&e.disconnect(),e=null;}function r(n=!1,a=1){s();const{left:l,top:d,width:h,height:c}=o.getBoundingClientRect();if(n||t(),!h||!c)return;const u=Math.floor(d),m=Math.floor(i.clientWidth-(l+h)),f=Math.floor(i.clientHeight-(d+c)),S=Math.floor(l),E={rootMargin:`${-u}px ${-m}px ${-f}px ${-S}px`,threshold:Math.max(0,Math.min(1,a))||1};let w=!0;function U(ye){let J=ye[0].intersectionRatio;if(J!==a){if(!w)return r();J===0&&(J=1e-7),r(!1,J);}w=!1;}e=new IntersectionObserver(U,E),e.observe(o);}return r(!0),s}/**
|
|
3834
3834
|
* @license
|
|
3835
3835
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3836
3836
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3837
|
-
*/const Gt={start:"top",end:"bottom"},Xt={start:"left",end:"right"},
|
|
3837
|
+
*/const Gt={start:"top",end:"bottom"},Xt={start:"left",end:"right"},js=new ResizeObserver(o=>{setTimeout(()=>{o.forEach(t=>{t.target.__overlay&&t.target.__overlay._updatePosition();});});}),Qi=o=>class extends o{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=al(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0);}),this.positionTarget&&(this.__observePositionTargetMove=ud(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,js.unobserve(i),e&&(this.__addUpdatePositionEventListeners(),i.__overlay=this,js.observe(i))),e){const s=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(r=>{this.__margins[r]=parseInt(s[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 s=this.__isRTL,r=this.__shouldAlignStartHorizontally(e,s),n=!s&&r||s&&!r;this.style.alignItems=n?"flex-start":"flex-end";const a=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(e,a,this.noVerticalOverlap,Gt,this,i),d=this.__calculatePositionInOneDimension(e,a,this.noHorizontalOverlap,Xt,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 s=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,s,r,this.__margins,n,this.noHorizontalOverlap,Xt)}__shouldAlignStartVertically(e){const i=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const s=Math.min(window.innerHeight,document.documentElement.clientHeight),r=this.verticalAlign==="top";return this.__shouldAlignStart(e,i,s,this.__margins,r,this.noVerticalOverlap,Gt)}__shouldAlignStart(e,i,s,r,n,a,l){const d=s-e[a?l.end:l.start]-r[l.end],h=e[a?l.start:l.end]-r[l.start],c=n?d:h,m=c>(n?h:d)||c>i;return n===m}__adjustBottomProperty(e,i,s){let r;if(e===i.end){if(i.end===Gt.end){const n=Math.min(window.innerHeight,document.documentElement.clientHeight);if(s>n&&this.__oldViewportHeight){const a=this.__oldViewportHeight-n;r=s-a;}this.__oldViewportHeight=n;}if(i.end===Xt.end){const n=Math.min(window.innerWidth,document.documentElement.clientWidth);if(s>n&&this.__oldViewportWidth){const a=this.__oldViewportWidth-n;r=s-a;}this.__oldViewportWidth=n;}}return r}__calculatePositionInOneDimension(e,i,s,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[s===a?r.end:r.start],m=c?`${c}px`:`${h+u*(a?-1:1)}px`;return {[l]:m,[d]:""}}};/**
|
|
3838
3838
|
* @license
|
|
3839
3839
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
3840
3840
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3841
|
-
*/const
|
|
3841
|
+
*/const pd=o=>class extends Qi(Je(o)){_shouldCloseOnOutsideClick(e){return !e.composedPath().includes(this.positionTarget)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!Hi(e.composedPath()[0])&&e.preventDefault();}};/**
|
|
3842
3842
|
* @license
|
|
3843
3843
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3844
3844
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3845
|
-
*/const
|
|
3845
|
+
*/const _d=p`
|
|
3846
3846
|
[part='overlay'] {
|
|
3847
3847
|
display: flex;
|
|
3848
3848
|
flex: auto;
|
|
@@ -3861,18 +3861,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3861
3861
|
* @license
|
|
3862
3862
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3863
3863
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3864
|
-
*/_("vaadin-date-picker-overlay",[Xe,
|
|
3864
|
+
*/_("vaadin-date-picker-overlay",[Xe,_d],{moduleId:"vaadin-date-picker-overlay-styles"});class md extends pd(z(x(b))){static get is(){return "vaadin-date-picker-overlay"}static get template(){return v`
|
|
3865
3865
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
3866
3866
|
<div part="overlay" id="overlay">
|
|
3867
3867
|
<div part="content" id="content">
|
|
3868
3868
|
<slot></slot>
|
|
3869
3869
|
</div>
|
|
3870
3870
|
</div>
|
|
3871
|
-
`}}g(
|
|
3871
|
+
`}}g(md);/**
|
|
3872
3872
|
* @license
|
|
3873
3873
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3874
3874
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3875
|
-
*/const
|
|
3875
|
+
*/const _r=p`
|
|
3876
3876
|
:host {
|
|
3877
3877
|
display: inline-block;
|
|
3878
3878
|
position: relative;
|
|
@@ -3949,15 +3949,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3949
3949
|
* @license
|
|
3950
3950
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3951
3951
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3952
|
-
*/const
|
|
3952
|
+
*/const Zi=o=>class extends Ri(tr(re(o))){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());}};/**
|
|
3953
3953
|
* @license
|
|
3954
3954
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3955
3955
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3956
|
-
*/_("vaadin-button",
|
|
3956
|
+
*/_("vaadin-button",_r,{moduleId:"vaadin-button-styles"});class gd extends Zi(L(x(H(b)))){static get is(){return "vaadin-button"}static get template(){return fd(v)}ready(){super.ready(),this._tooltipController=new G(this),this.addController(this._tooltipController);}}g(gd);/**
|
|
3957
3957
|
* @license
|
|
3958
3958
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3959
3959
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3960
|
-
*/function
|
|
3960
|
+
*/function vd(o){let t=o.getDay();t===0&&(t=7);const e=4-t,i=new Date(o.getTime()+e*24*3600*1e3),s=new Date(0,0);s.setFullYear(i.getFullYear());const r=i.getTime()-s.getTime(),n=Math.round(r/(24*3600*1e3));return Math.floor(n/7+1)}function bi(o){const t=new Date(o);return t.setHours(0,0,0,0),t}function $(o,t,e=bi){return o instanceof Date&&t instanceof Date&&e(o).getTime()===e(t).getTime()}function es(o){return {day:o.getDate(),month:o.getMonth(),year:o.getFullYear()}}function fe(o,t,e,i){let s=!1;if(typeof i=="function"&&o){const r=es(o);s=i(r);}return (!t||o>=t)&&(!e||o<=e)&&!s}function mr(o,t){return t.filter(e=>e!==void 0).reduce((e,i)=>{if(!i)return e;if(!e)return i;const s=Math.abs(o.getTime()-i.getTime()),r=Math.abs(e.getTime()-o.getTime());return s<r?i:e})}function fr(o){const t=new Date,e=new Date(t);return e.setDate(1),e.setMonth(parseInt(o)+t.getMonth()),e}function bd(o,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 s=t+Math.floor(o.getFullYear()/100)*100;return o<new Date(s-50,e,i)?s-=100:o>new Date(s+50,e,i)&&(s+=100),s}function ke(o){const t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(o);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 yd(o){const t=(l,d="00")=>(d+l).substr((d+l).length-d.length);let e="",i="0000",s=o.year;s<0?(s=-s,e="-",i="000000"):o.year>=1e4&&(e="+",i="000000");const r=e+t(s,i),n=t(o.month+1),a=t(o.day);return [r,n,a].join("-")}function xd(o){return o instanceof Date?yd({year:o.getFullYear(),month:o.getMonth(),day:o.getDate()}):""}/**
|
|
3961
3961
|
@license
|
|
3962
3962
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3963
3963
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3965,7 +3965,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3965
3965
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3966
3966
|
Code distributed by Google as part of the polymer project is also
|
|
3967
3967
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3968
|
-
*/class gt{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,je.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),je.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 gt?t._cancelAsync():t=new gt,t.setConfig(e,i),t}}let je=new Set;const
|
|
3968
|
+
*/class gt{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,je.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),je.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 gt?t._cancelAsync():t=new gt,t.setConfig(e,i),t}}let je=new Set;const Cd=function(o){je.add(o);},wd=function(){const o=!!je.size;return je.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),o};/**
|
|
3969
3969
|
@license
|
|
3970
3970
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3971
3971
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3973,11 +3973,11 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3973
3973
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3974
3974
|
Code distributed by Google as part of the polymer project is also
|
|
3975
3975
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3976
|
-
*/const
|
|
3976
|
+
*/const ts=function(){let o,t;do o=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=wd();while(o||t)};/**
|
|
3977
3977
|
* @license
|
|
3978
3978
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3979
3979
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3980
|
-
*/const
|
|
3980
|
+
*/const gr=document.createElement("template");gr.innerHTML=`
|
|
3981
3981
|
<style>
|
|
3982
3982
|
:host {
|
|
3983
3983
|
display: block;
|
|
@@ -4027,11 +4027,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4027
4027
|
<div class="buffer"></div>
|
|
4028
4028
|
<div id="fullHeight"></div>
|
|
4029
4029
|
</div>
|
|
4030
|
-
`;class
|
|
4030
|
+
`;class vr extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(gr.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()),ts();}_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,s=t<this._buffers[0].translateY+e;(i||s)&&(this._translateBuffer(s),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=M.debounce(this._debouncerScrollFinish,q.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=M.debounce(this._debouncerUpdateClones,q.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 s=document.createElement("div");s.style.height=`${this.itemHeight}px`,s.instance={};const r=`vaadin-infinite-scroller-item-content-${qe()}`,n=document.createElement("slot");n.setAttribute("name",r),n._itemWrapper=s,e.appendChild(n),s.setAttribute("slot",r),this.appendChild(s),this._isVisible(s,t)&&this._ensureStampedInstance(s);}}),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,s)=>{if(!i.updated){const r=this._firstIndex+this.bufferSize*s;[...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}}/**
|
|
4031
4031
|
* @license
|
|
4032
4032
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4033
4033
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4034
|
-
*/const
|
|
4034
|
+
*/const br=document.createElement("template");br.innerHTML=`
|
|
4035
4035
|
<style>
|
|
4036
4036
|
:host {
|
|
4037
4037
|
--vaadin-infinite-scroller-item-height: 270px;
|
|
@@ -4043,11 +4043,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4043
4043
|
height: 100%;
|
|
4044
4044
|
}
|
|
4045
4045
|
</style>
|
|
4046
|
-
`;class
|
|
4046
|
+
`;class Ed extends vr{static get is(){return "vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(br.content.cloneNode(!0));}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=fr(e);}}g(Ed);/**
|
|
4047
4047
|
* @license
|
|
4048
4048
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4049
4049
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4050
|
-
*/const
|
|
4050
|
+
*/const yr=document.createElement("template");yr.innerHTML=`
|
|
4051
4051
|
<style>
|
|
4052
4052
|
:host {
|
|
4053
4053
|
--vaadin-infinite-scroller-item-height: 80px;
|
|
@@ -4081,15 +4081,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4081
4081
|
border-left-color: #000;
|
|
4082
4082
|
}
|
|
4083
4083
|
</style>
|
|
4084
|
-
`;class
|
|
4084
|
+
`;class Ad extends vr{static get is(){return "vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(yr.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()}}g(Ad);/**
|
|
4085
4085
|
* @license
|
|
4086
4086
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4087
4087
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4088
|
-
*/const
|
|
4088
|
+
*/const Id=o=>class extends o{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());}};/**
|
|
4089
4089
|
* @license
|
|
4090
4090
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4091
4091
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4092
|
-
*/class
|
|
4092
|
+
*/class kd extends x(Id(b)){static get is(){return "vaadin-date-picker-year"}static get template(){return v`
|
|
4093
4093
|
<style>
|
|
4094
4094
|
:host {
|
|
4095
4095
|
display: block;
|
|
@@ -4098,7 +4098,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4098
4098
|
</style>
|
|
4099
4099
|
<div part="year-number">[[year]]</div>
|
|
4100
4100
|
<div part="year-separator" aria-hidden="true"></div>
|
|
4101
|
-
`}}g(
|
|
4101
|
+
`}}g(kd);/**
|
|
4102
4102
|
@license
|
|
4103
4103
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4104
4104
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4106,7 +4106,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
4106
4106
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4107
4107
|
Code distributed by Google as part of the polymer project is also
|
|
4108
4108
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4109
|
-
*/function
|
|
4109
|
+
*/function is(o,t,e,i,s){let r;s&&(r=typeof e=="object"&&e!==null,r&&(i=o.__dataTemp[t]));let n=i!==e&&(i===i||e===e);return r&&n&&(o.__dataTemp[t]=e),n}const ss=C(o=>{class t extends o{_shouldPropertyChange(i,s,r){return is(this,i,s,r,!0)}}return t}),Sd=C(o=>{class t extends o{static get properties(){return {mutableData:Boolean}}_shouldPropertyChange(i,s,r){return is(this,i,s,r,this.mutableData)}}return t});ss._mutablePropertyChange=is;/**
|
|
4110
4110
|
@license
|
|
4111
4111
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4112
4112
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4114,7 +4114,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
4114
4114
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4115
4115
|
Code distributed by Google as part of the polymer project is also
|
|
4116
4116
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4117
|
-
*/let yi=null;function xi(){return yi}xi.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:xi,writable:!0}});const
|
|
4117
|
+
*/let yi=null;function xi(){return yi}xi.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:xi,writable:!0}});const xr=Oi(xi),Pd=ss(xr);function Td(o,t){yi=o,Object.setPrototypeOf(o,t.prototype),new t,yi=null;}const Dd=Oi(class{});function Od(o,t){for(let e=0;e<t.length;e++){let i=t[e];if(!!o!=!!i.__hideTemplateChildren__)if(i.nodeType===Node.TEXT_NODE)o?(i.__polymerTextContent__=i.textContent,i.textContent=""):i.textContent=i.__polymerTextContent__;else if(i.localName==="slot")if(o)i.__polymerReplaced__=document.createComment("hidden-slot"),k(k(i).parentNode).replaceChild(i.__polymerReplaced__,i);else {const s=i.__polymerReplaced__;s&&k(k(s).parentNode).replaceChild(i,s);}else i.style&&(o?(i.__polymerDisplay__=i.style.display,i.style.display="none"):i.style.display=i.__polymerDisplay__);i.__hideTemplateChildren__=o,i._showHideChildren&&i._showHideChildren(o);}}class X extends Dd{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let s=this.root.firstChild;s;s=s.nextSibling)e.push(s),s.__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,s=>{s.model=this,i(s);});else {let s=this.__dataHost.__dataHost;s&&s._addEventListenerToNode(t,e,i);}}_showHideChildren(t){Od(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 Md=ss(X);function Ws(o){let t=o.__dataHost;return t&&t._methodHost||t}function zd(o,t,e){let i=e.mutableData?Md:X;Ci.mixin&&(i=Ci.mixin(i));let s=class extends i{};return s.prototype.__templatizeOptions=e,s.prototype._bindTemplate(o),Bd(s,o,t,e),s}function Nd(o,t,e,i){let s=e.forwardHostProp;if(s&&t.hasHostProps){const r=o.localName=="template";let n=t.templatizeTemplateClass;if(!n){if(r){let l=e.mutableData?Pd:xr;class d extends l{}n=t.templatizeTemplateClass=d;}else {const l=o.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:Ld(l,s)}),n.prototype._createNotifyingProperty("_host_"+l);yo&&i&&Rd(t,e,i);}if(o.__dataProto&&Object.assign(o.__data,o.__dataProto),r)Td(o,n),o.__dataTemp={},o.__dataPending=null,o.__dataOld=null,o._enableProperties();else {Object.setPrototypeOf(o,n.prototype);const a=t.hostProps;for(let l in a)if(l="_host_"+l,l in o){const d=o[l];delete o[l],o.__data[l]=d;}}}}function Ld(o,t){return function(i,s,r){t.call(i.__templatizeOwner,s.substring(6),r[s]);}}function Bd(o,t,e,i){let s=e.hostProps||{};for(let r in i.instanceProps){delete s[r];let n=i.notifyInstanceProp;n&&o.prototype._addPropertyEffect(r,o.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Fd(r,n)});}if(i.forwardHostProp&&t.__dataHost)for(let r in s)e.hasHostProps||(e.hasHostProps=!0),o.prototype._addPropertyEffect(r,o.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Vd()});}function Fd(o,t){return function(i,s,r){t.call(i.__templatizeOwner,i,s,r[s]);}}function Vd(){return function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0);}}function Ci(o,t,e){if(pt&&!Ws(o))throw new Error("strictTemplatePolicy: template owner not trusted");if(e=e||{},o.__templatizeOwner)throw new Error("A <template> can only be templatized once");o.__templatizeOwner=t;let s=(t?t.constructor:X)._parseTemplate(o),r=s.templatizeInstanceClass;r||(r=zd(o,s,e),s.templatizeInstanceClass=r);const n=Ws(o);Nd(o,s,e,n);let a=class extends r{};return a.prototype._methodHost=n,a.prototype.__dataHost=o,a.prototype.__templatizeOwner=t,a.prototype.__hostProps=s.hostProps,a=a,a}function Rd(o,t,e){const i=e.constructor._properties,{propertyEffects:s}=o,{instanceProps:r}=t;for(let n in s)if(!i[n]&&!(r&&r[n])){const a=s[n];for(let l=0;l<a.length;l++){const{part:d}=a[l].info;if(!(d.signature&&d.signature.static)){console.warn(`Property '${n}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}function $d(o,t){let e;for(;t;)if(e=t.__dataHost?t:t.__templatizeInstance)if(e.__dataHost!=o)t=e.__dataHost;else return e;else t=k(t).parentNode;return null}/**
|
|
4118
4118
|
@license
|
|
4119
4119
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4120
4120
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4122,7 +4122,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
4122
4122
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4123
4123
|
Code distributed by Google as part of the polymer project is also
|
|
4124
4124
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4125
|
-
*/let
|
|
4125
|
+
*/let qs=!1;function Hd(){if(bo&&!vo){if(!qs){qs=!0;const o=document.createElement("style");o.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(o);}return !0}return !1}/**
|
|
4126
4126
|
@license
|
|
4127
4127
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4128
4128
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -4130,15 +4130,15 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
4130
4130
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4131
4131
|
Code distributed by Google as part of the polymer project is also
|
|
4132
4132
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4133
|
-
*/const
|
|
4133
|
+
*/const Ud=Sd(b);class Ys extends Ud{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:!bs,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(),Hd()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=k(k(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 s=new MutationObserver(()=>{if(this.querySelector("template"))s.disconnect(),this.__render();else throw new Error("dom-repeat requires a <template> child")});return s.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=Ci(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(s,r){let n=this.__instances;for(let a=0,l;a<n.length&&(l=n[a]);a++)l.forwardHostProp(s,r);},notifyInstanceProp:function(s,r,n){if(Un(this.as,r)){let a=s[this.itemsIndexAs];r==this.as&&(this.items[a]=n);let l=Ve(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=gt.debounce(this.__renderDebouncer,e>0?Gn.after(e):To,t.bind(this)),Cd(this.__renderDebouncer);}render(){this.__debounceRender(this.__render),ts();}__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),(!bs||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,s,r)=>this.__filterFn(t[i],s,r))),this.__sortFn&&e.sort((i,s)=>this.__sortFn(t[i],t[s])),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===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 s=this.__itemsIdxToInstIdx={};let r;for(r=0;r<e;r++){let n=this.__instances[r],a=i[r],l=t[a];s[a]=r,n?(n._setPendingProperty(this.as,l),n._setPendingProperty(this.indexAs,r),n._setPendingProperty(this.itemsIndexAs,a),n._flushProperties()):this.__insertInstance(l,r,a);}for(let n=this.__instances.length-1;n>=r;n--)this.__detachAndRemoveInstance(n);}__detachInstance(t){let e=this.__instances[t];const i=k(e.root);for(let s=0;s<e.children.length;s++){let r=e.children[s];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 s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let r=this.__instances[e+1],n=r?r.children[0]:this;return k(k(this).parentNode).insertBefore(s.root,n),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t);}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),r=s<0?i:i.substring(0,s);if(r==parseInt(r,10)){let n=s<0?"":i.substring(s+1);this.__handleObservedPaths(n);let a=this.__itemsIdxToInstIdx[r],l=this.__instances[a];if(l){let d=this.as+(n?"."+n:"");l._setPendingPropertyOrPath(d,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 $d(this.template,t)}}customElements.define(Ys.is,Ys);/**
|
|
4134
4134
|
* @license
|
|
4135
4135
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4136
4136
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4137
|
-
*/const
|
|
4137
|
+
*/const jd=o=>class extends re(o){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=>$(e.date,this.focusedDate))}ready(){super.ready(),B(this.$.monthGrid,"tap",this._handleTap.bind(this));}_isDisabled(e,i,s){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&&s&&i.getMonth()===s.getMonth()&&i.getMonth()===e.getMonth()&&s.getDate()-i.getDate()>=0?!1:!fe(r,i,s)&&!fe(n,i,s)}_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:s,weekdaysShort:r,firstDayOfWeek:n}=e,a=this._applyFirstDayOfWeek(r,n);return this._applyFirstDayOfWeek(s,n).map((d,h)=>({weekDay:d,weekDayShort:a[h]})).slice(0,7)}__focusedDateChanged(e,i){Array.isArray(i)&&i.some(s=>$(s,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 $(new Date,e)}_getDays(e,i){if(e===void 0||i===void 0)return [];const s=new Date(0,0);for(s.setFullYear(e.getFullYear()),s.setMonth(e.getMonth()),s.setDate(1);s.getDay()!==i.firstDayOfWeek;)this._dateAdd(s,-1);const r=[],n=s.getMonth(),a=e.getMonth();for(;s.getMonth()===a||s.getMonth()===n;)r.push(s.getMonth()===a?new Date(s.getTime()):null),this._dateAdd(s,1);return r}_getWeeks(e){return e.reduce((i,s,r)=>(r%7===0&&i.push([]),i[i.length-1].push(s),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((s,r)=>!s&&r?r:s);return vd(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}};/**
|
|
4138
4138
|
* @license
|
|
4139
4139
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4140
4140
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4141
|
-
*/const
|
|
4141
|
+
*/const Wd=p`
|
|
4142
4142
|
:host {
|
|
4143
4143
|
display: block;
|
|
4144
4144
|
}
|
|
@@ -4198,7 +4198,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4198
4198
|
* @license
|
|
4199
4199
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4200
4200
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4201
|
-
*/_("vaadin-month-calendar",
|
|
4201
|
+
*/_("vaadin-month-calendar",Wd,{moduleId:"vaadin-month-calendar-styles"});class qd extends jd(x(b)){static get template(){return v`
|
|
4202
4202
|
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
|
|
4203
4203
|
<table
|
|
4204
4204
|
id="monthGrid"
|
|
@@ -4240,19 +4240,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4240
4240
|
</template>
|
|
4241
4241
|
</tbody>
|
|
4242
4242
|
</table>
|
|
4243
|
-
`}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,s,r,n){const a=["date"],l=t>bi(new Date),d=t<bi(new Date);return this.__isDayDisabled(t,s,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 $(t,e)}__isDaySelected(t,e){return $(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return "true"}__isDayDisabled(t,e,i,s){return !
|
|
4243
|
+
`}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,s,r,n){const a=["date"],l=t>bi(new Date),d=t<bi(new Date);return this.__isDayDisabled(t,s,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 $(t,e)}__isDaySelected(t,e){return $(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return "true"}__isDayDisabled(t,e,i,s){return !fe(t,e,i,s)}__getDayAriaDisabled(t,e,i,s){if(!(t===void 0||e===void 0&&i===void 0&&s===void 0)&&this.__isDayDisabled(t,e,i,s))return "true"}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}g(qd);/**
|
|
4244
4244
|
* @license
|
|
4245
4245
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4246
4246
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4247
|
-
*/class
|
|
4247
|
+
*/class os{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=this._queryHandler.bind(this);}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery);}hostDisconnected(){this._removeListener();}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler);}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null;}_queryHandler(t){typeof this.callback=="function"&&this.callback(t.matches);}}/**
|
|
4248
4248
|
* @license
|
|
4249
4249
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4250
4250
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4251
|
-
*/const qd=o=>class extends o{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(){Jo(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 ss(this._desktopMediaQuery,e=>{this._desktopMode=e;})),this.addController(new T(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 T(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 s=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+s,i),this._monthScroller.forceUpdate();}__initMonthScroller(){this.addController(new T(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(s=>{s.addEventListener("selected-date-changed",r=>{this.selectedDate=r.detail.value;});}),this.calendars=i;}),this._monthScroller=e;}}));}__initYearScroller(){this.addController(new T(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,s,r,n){e&&(e.textContent=i&&i.today,e.disabled=!this._isTodayAllowed(s,r,n));}__updateCalendars(e,i,s,r,n,a,l,d,h,c){e&&e.length&&e.forEach(u=>{u.i18n=i,u.minDate=s,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,s){e&&e.length&&e.forEach(r=>{r.selectedDate=i,s?r.setAttribute("theme",s):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 s=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const d=this._calculateWeekScrollOffset(e);this._scrollToPosition(s+d,i);return}const r=this._monthScroller.position>s,a=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,l=this._monthScroller.position+a-1<s;r?this._scrollToPosition(s,i):l&&this._scrollToPosition(s-a+1,i);}_calculateWeekScrollOffset(e){const i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(1);let s=0;for(;i.getDate()<e.getDate();)i.setDate(i.getDate()+1),i.getDay()===this.i18n.firstDayOfWeek&&(s+=1);return s/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=M.debounce(this._debouncer,q.after(300),()=>{this._ignoreTaps=!1;});}_formatDisplayed(e,i,s){return e&&i&&typeof i.formatDate=="function"?i.formatDate(Zi(e)):s}_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 s=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+s*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 s;this._revealPromise=new Promise(d=>{s=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,s(),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 fr(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){$(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&&$(i.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,i.focus());}}focusDate(e,i){return Ce(this,null,function*(){const s=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=s,i||(this._focusedMonthDate=s.getDate()),yield this.focusDateElement(!1);})}focusDateElement(e=!0){return Ce(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(i=>{dr(this,()=>{es(),i();});})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate();})}_focusClosestDate(e){this.focusDate(_r(e,[this.minDate,this.maxDate]));}_focusAllowedDate(e,i,s){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,s):this._dateAllowed(this.focusedDate)?i>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate);}_getDateDiff(e,i){const s=new Date(0,0);return s.setFullYear(this.focusedDate.getFullYear()),s.setMonth(this.focusedDate.getMonth()+e),i&&s.setDate(this.focusedDate.getDate()+i),s}_moveFocusByDays(e){const i=this._getDateDiff(0,e);this._focusAllowedDate(i,e,!1);}_moveFocusByMonths(e){const i=this._getDateDiff(e),s=i.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),i.setDate(this._focusedMonthDate),i.getMonth()!==s&&i.setDate(0),this._focusAllowedDate(i,e,!0);}_moveFocusInsideMonth(e,i){const s=new Date(0,0);s.setFullYear(e.getFullYear()),i==="minDate"?(s.setMonth(e.getMonth()),s.setDate(1)):(s.setMonth(e.getMonth()+1),s.setDate(0)),this._dateAllowed(s)?this.focusDate(s):this._dateAllowed(e)?this.focusDate(this[i]):this._focusClosestDate(e);}_dateAllowed(e,i=this.minDate,s=this.maxDate,r=this.isDateDisabled){return me(e,i,s,r)}_isTodayAllowed(e,i,s){return this._dateAllowed(this._getTodayMidnight(),e,i,s)}_getTodayMidnight(){const e=new Date,i=new Date(0,0);return i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()),i}};/**
|
|
4251
|
+
*/const Yd=o=>class extends o{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(){Qo(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 os(this._desktopMediaQuery,e=>{this._desktopMode=e;})),this.addController(new T(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 T(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 s=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+s,i),this._monthScroller.forceUpdate();}__initMonthScroller(){this.addController(new T(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(s=>{s.addEventListener("selected-date-changed",r=>{this.selectedDate=r.detail.value;});}),this.calendars=i;}),this._monthScroller=e;}}));}__initYearScroller(){this.addController(new T(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,s,r,n){e&&(e.textContent=i&&i.today,e.disabled=!this._isTodayAllowed(s,r,n));}__updateCalendars(e,i,s,r,n,a,l,d,h,c){e&&e.length&&e.forEach(u=>{u.i18n=i,u.minDate=s,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,s){e&&e.length&&e.forEach(r=>{r.selectedDate=i,s?r.setAttribute("theme",s):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 s=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const d=this._calculateWeekScrollOffset(e);this._scrollToPosition(s+d,i);return}const r=this._monthScroller.position>s,a=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,l=this._monthScroller.position+a-1<s;r?this._scrollToPosition(s,i):l&&this._scrollToPosition(s-a+1,i);}_calculateWeekScrollOffset(e){const i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(1);let s=0;for(;i.getDate()<e.getDate();)i.setDate(i.getDate()+1),i.getDay()===this.i18n.firstDayOfWeek&&(s+=1);return s/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=M.debounce(this._debouncer,q.after(300),()=>{this._ignoreTaps=!1;});}_formatDisplayed(e,i,s){return e&&i&&typeof i.formatDate=="function"?i.formatDate(es(e)):s}_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 s=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+s*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 s;this._revealPromise=new Promise(d=>{s=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,s(),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 fr(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){$(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&&$(i.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,i.focus());}}focusDate(e,i){return Ce(this,null,function*(){const s=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=s,i||(this._focusedMonthDate=s.getDate()),yield this.focusDateElement(!1);})}focusDateElement(e=!0){return Ce(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(i=>{hr(this,()=>{ts(),i();});})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate();})}_focusClosestDate(e){this.focusDate(mr(e,[this.minDate,this.maxDate]));}_focusAllowedDate(e,i,s){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,s):this._dateAllowed(this.focusedDate)?i>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate);}_getDateDiff(e,i){const s=new Date(0,0);return s.setFullYear(this.focusedDate.getFullYear()),s.setMonth(this.focusedDate.getMonth()+e),i&&s.setDate(this.focusedDate.getDate()+i),s}_moveFocusByDays(e){const i=this._getDateDiff(0,e);this._focusAllowedDate(i,e,!1);}_moveFocusByMonths(e){const i=this._getDateDiff(e),s=i.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),i.setDate(this._focusedMonthDate),i.getMonth()!==s&&i.setDate(0),this._focusAllowedDate(i,e,!0);}_moveFocusInsideMonth(e,i){const s=new Date(0,0);s.setFullYear(e.getFullYear()),i==="minDate"?(s.setMonth(e.getMonth()),s.setDate(1)):(s.setMonth(e.getMonth()+1),s.setDate(0)),this._dateAllowed(s)?this.focusDate(s):this._dateAllowed(e)?this.focusDate(this[i]):this._focusClosestDate(e);}_dateAllowed(e,i=this.minDate,s=this.maxDate,r=this.isDateDisabled){return fe(e,i,s,r)}_isTodayAllowed(e,i,s){return this._dateAllowed(this._getTodayMidnight(),e,i,s)}_getTodayMidnight(){const e=new Date,i=new Date(0,0);return i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()),i}};/**
|
|
4252
4252
|
* @license
|
|
4253
4253
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4254
4254
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4255
|
-
*/const
|
|
4255
|
+
*/const Kd=p`
|
|
4256
4256
|
:host {
|
|
4257
4257
|
display: flex;
|
|
4258
4258
|
flex-direction: column;
|
|
@@ -4316,7 +4316,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4316
4316
|
* @license
|
|
4317
4317
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4318
4318
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4319
|
-
*/_("vaadin-date-picker-overlay-content",
|
|
4319
|
+
*/_("vaadin-date-picker-overlay-content",Kd,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Gd extends Yd(H(x(z(b)))){static get template(){return v`
|
|
4320
4320
|
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
|
4321
4321
|
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
|
4322
4322
|
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
@@ -4336,23 +4336,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4336
4336
|
<slot name="today-button"></slot>
|
|
4337
4337
|
<slot name="cancel-button"></slot>
|
|
4338
4338
|
</div>
|
|
4339
|
-
`}static get is(){return "vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers();}}g(
|
|
4339
|
+
`}static get is(){return "vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers();}}g(Gd);/**
|
|
4340
4340
|
* @license
|
|
4341
4341
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4342
4342
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4343
|
-
*/const Jt=new WeakMap;function
|
|
4343
|
+
*/const Jt=new WeakMap;function Xd(o){return Jt.has(o)||Jt.set(o,new Set),Jt.get(o)}function Jd(o,t){const e=document.createElement("style");e.textContent=o,t===document?document.head.appendChild(e):t.insertBefore(e,t.firstChild);}const Cr=C(o=>class extends o{get slotStyles(){return {}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles();}__applySlotStyles(){const e=this.getRootNode(),i=Xd(e);this.slotStyles.forEach(s=>{i.has(s)||(Jd(s,e),i.add(s));});}});/**
|
|
4344
4344
|
* @license
|
|
4345
4345
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4346
4346
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4347
|
-
*/const
|
|
4347
|
+
*/const Qd=o=>class extends Ye(oe(o)){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}));}};/**
|
|
4348
4348
|
* @license
|
|
4349
4349
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4350
4350
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4351
|
-
*/const
|
|
4351
|
+
*/const rs=C(o=>class extends ji(Yi(Ye(o))){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 s=this._hasValidConstraints(i),r=this.__previousHasConstraints&&!s;(this._hasValue||this.invalid)&&s?this.validate():r&&this._setInvalid(!1),this.__previousHasConstraints=s;}_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}});/**
|
|
4352
4352
|
* @license
|
|
4353
4353
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4354
4354
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4355
|
-
*/const Pt=o=>class extends
|
|
4355
|
+
*/const Pt=o=>class extends Cr(At(rs(It(Qd(oe(o)))))){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 [`
|
|
4356
4356
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
4357
4357
|
font: inherit;
|
|
4358
4358
|
color: inherit;
|
|
@@ -4361,7 +4361,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4361
4361
|
* @license
|
|
4362
4362
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4363
4363
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4364
|
-
*/const
|
|
4364
|
+
*/const Zd=p`
|
|
4365
4365
|
[part='clear-button'] {
|
|
4366
4366
|
display: none;
|
|
4367
4367
|
cursor: default;
|
|
@@ -4378,7 +4378,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4378
4378
|
* @license
|
|
4379
4379
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4380
4380
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4381
|
-
*/const
|
|
4381
|
+
*/const wr=p`
|
|
4382
4382
|
:host {
|
|
4383
4383
|
display: inline-flex;
|
|
4384
4384
|
outline: none;
|
|
@@ -4416,7 +4416,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4416
4416
|
* @license
|
|
4417
4417
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4418
4418
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4419
|
-
*/const
|
|
4419
|
+
*/const Er=p`
|
|
4420
4420
|
[class$='container'] {
|
|
4421
4421
|
display: flex;
|
|
4422
4422
|
flex-direction: column;
|
|
@@ -4428,7 +4428,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4428
4428
|
* @license
|
|
4429
4429
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
4430
4430
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4431
|
-
*/const Tt=[
|
|
4431
|
+
*/const Tt=[wr,Er,Zd];/**
|
|
4432
4432
|
* @license
|
|
4433
4433
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
4434
4434
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4436,15 +4436,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4436
4436
|
* @license
|
|
4437
4437
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4438
4438
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4439
|
-
*/class
|
|
4439
|
+
*/class Ar{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");}}/**
|
|
4440
4440
|
* @license
|
|
4441
4441
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4442
4442
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4443
|
-
*/const Zd=o=>class extends Qe(H(At(os(oe(o))))){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,s=>"0000".substr(s.length)+s);return [e.month+1,e.day,i].join("/")},parseDate(e){const i=e.split("/"),s=new Date;let r,n=s.getMonth(),a=s.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?ke(this.referenceDate):new Date;a=vd(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:Xi},_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&&!Et()&&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 ss(this._fullscreenMediaQuery,i=>{this._fullscreen=i;})),this.addController(new Er(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",s=>{this.__commitDate(s.detail.date),this._close();}),i.addEventListener("date-selected",s=>{this.__commitDate(s.detail.date);}),i.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0);}),i.addEventListener("focusout",s=>{this._shouldRemoveFocus(s)&&this._setFocused(!1);}),i.addEventListener("focused-date-changed",s=>{this._focusedDate=s.detail.value;}),i.addEventListener("click",s=>s.stopPropagation());}__parseDate(e){if(!this.i18n.parseDate)return;let i=this.i18n.parseDate(e);if(i&&(i=ke(`${i.year}-${i.month+1}-${i.day}`)),i&&!isNaN(i.getTime()))return i}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(Zi(e))}checkValidity(){const e=this._inputElementValue,i=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),s=!this._selectedDate||me(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&&s&&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,s,r,n,a){return !e||i&&(!a||n)||s&&n||!r.parseDate}_formatISO(e){return yd(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 s=ke(e);if(e&&!s){this.value=i;return}e?$(this._selectedDate,s)||(this._selectedDate=s,i!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue);}__updateOverlayContent(e,i,s,r,n,a,l,d,h){e&&(e.i18n=i,e.label=s,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 s=e.focusedDate||i;e.scrollToDate(s),this._ignoreFocusedDateChange=!0,e.focusedDate=s,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=hr(n);}_getInitialPosition(){const e=ke(this.initialPosition),i=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||me(i,this._minDate,this._maxDate,this.isDateDisabled)?i:this._minDate||this._maxDate?_r(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,$(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1);}}__computeMinOrMaxDate(e){return ke(e)}};/**
|
|
4443
|
+
*/const eh=o=>class extends Qe(H(At(rs(oe(o))))){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,s=>"0000".substr(s.length)+s);return [e.month+1,e.day,i].join("/")},parseDate(e){const i=e.split("/"),s=new Date;let r,n=s.getMonth(),a=s.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?ke(this.referenceDate):new Date;a=bd(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:Ji},_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&&!Et()&&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 os(this._fullscreenMediaQuery,i=>{this._fullscreen=i;})),this.addController(new Ar(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",s=>{this.__commitDate(s.detail.date),this._close();}),i.addEventListener("date-selected",s=>{this.__commitDate(s.detail.date);}),i.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0);}),i.addEventListener("focusout",s=>{this._shouldRemoveFocus(s)&&this._setFocused(!1);}),i.addEventListener("focused-date-changed",s=>{this._focusedDate=s.detail.value;}),i.addEventListener("click",s=>s.stopPropagation());}__parseDate(e){if(!this.i18n.parseDate)return;let i=this.i18n.parseDate(e);if(i&&(i=ke(`${i.year}-${i.month+1}-${i.day}`)),i&&!isNaN(i.getTime()))return i}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(es(e))}checkValidity(){const e=this._inputElementValue,i=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),s=!this._selectedDate||fe(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&&s&&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,s,r,n,a){return !e||i&&(!a||n)||s&&n||!r.parseDate}_formatISO(e){return xd(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 s=ke(e);if(e&&!s){this.value=i;return}e?$(this._selectedDate,s)||(this._selectedDate=s,i!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue);}__updateOverlayContent(e,i,s,r,n,a,l,d,h){e&&(e.i18n=i,e.label=s,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 s=e.focusedDate||i;e.scrollToDate(s),this._ignoreFocusedDateChange=!0,e.focusedDate=s,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=cr(n);}_getInitialPosition(){const e=ke(this.initialPosition),i=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||fe(i,this._minDate,this._maxDate,this.isDateDisabled)?i:this._minDate||this._maxDate?mr(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,$(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1);}}__computeMinOrMaxDate(e){return ke(e)}};/**
|
|
4444
4444
|
* @license
|
|
4445
4445
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4446
4446
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4447
|
-
*/const
|
|
4447
|
+
*/const th=p`
|
|
4448
4448
|
:host([opened]) {
|
|
4449
4449
|
pointer-events: auto;
|
|
4450
4450
|
}
|
|
@@ -4461,7 +4461,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4461
4461
|
* @license
|
|
4462
4462
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4463
4463
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4464
|
-
*/_("vaadin-date-picker",[Tt,
|
|
4464
|
+
*/_("vaadin-date-picker",[Tt,th],{moduleId:"vaadin-date-picker-styles"});class ih extends eh(Pt(x(L(b)))){static get is(){return "vaadin-date-picker"}static get template(){return v`
|
|
4465
4465
|
<div class="vaadin-date-picker-container">
|
|
4466
4466
|
<div part="label">
|
|
4467
4467
|
<slot name="label"></slot>
|
|
@@ -4503,7 +4503,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4503
4503
|
></vaadin-date-picker-overlay>
|
|
4504
4504
|
|
|
4505
4505
|
<slot name="tooltip"></slot>
|
|
4506
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ke(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;},{uniqueIdPrefix:"search-input"})),this.addController(new Ge(this.inputElement,this._labelController)),this._tooltipController=new G(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;}}g(
|
|
4506
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ke(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;},{uniqueIdPrefix:"search-input"})),this.addController(new Ge(this.inputElement,this._labelController)),this._tooltipController=new G(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;}}g(ih);/**
|
|
4507
4507
|
* @license
|
|
4508
4508
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4509
4509
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4511,15 +4511,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4511
4511
|
* @license
|
|
4512
4512
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4513
4513
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4514
|
-
*/const
|
|
4514
|
+
*/const sh=o=>class extends Pt(o){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();}};/**
|
|
4515
4515
|
* @license
|
|
4516
4516
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4517
4517
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4518
|
-
*/const
|
|
4518
|
+
*/const oh=o=>class extends sh(o){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 Ke(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new Ge(this.inputElement,this._labelController));}};/**
|
|
4519
4519
|
* @license
|
|
4520
4520
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4521
4521
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4522
|
-
*/_("vaadin-text-field",Tt,{moduleId:"vaadin-text-field-styles"});class
|
|
4522
|
+
*/_("vaadin-text-field",Tt,{moduleId:"vaadin-text-field-styles"});class Ir extends oh(x(L(b))){static get is(){return "vaadin-text-field"}static get template(){return v`
|
|
4523
4523
|
<div class="vaadin-field-container">
|
|
4524
4524
|
<div part="label">
|
|
4525
4525
|
<slot name="label"></slot>
|
|
@@ -4548,11 +4548,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4548
4548
|
</div>
|
|
4549
4549
|
</div>
|
|
4550
4550
|
<slot name="tooltip"></slot>
|
|
4551
|
-
`}static get properties(){return {maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new G(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}g(
|
|
4551
|
+
`}static get properties(){return {maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new G(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}g(Ir);/**
|
|
4552
4552
|
* @license
|
|
4553
4553
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4554
4554
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4555
|
-
*/const
|
|
4555
|
+
*/const rh=p`
|
|
4556
4556
|
:host {
|
|
4557
4557
|
position: absolute;
|
|
4558
4558
|
right: 0;
|
|
@@ -4565,11 +4565,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4565
4565
|
background: transparent;
|
|
4566
4566
|
outline: none;
|
|
4567
4567
|
}
|
|
4568
|
-
`;_("vaadin-password-field-button",[
|
|
4568
|
+
`;_("vaadin-password-field-button",[nr,rh],{moduleId:"lumo-password-field-button"});/**
|
|
4569
4569
|
* @license
|
|
4570
4570
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4571
4571
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4572
|
-
*/const
|
|
4572
|
+
*/const nh=p`
|
|
4573
4573
|
[part='reveal-button']::before {
|
|
4574
4574
|
content: var(--lumo-icons-eye);
|
|
4575
4575
|
}
|
|
@@ -4587,15 +4587,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4587
4587
|
[part='reveal-button'][hidden] {
|
|
4588
4588
|
display: none !important;
|
|
4589
4589
|
}
|
|
4590
|
-
`;_("vaadin-password-field",[ne,
|
|
4590
|
+
`;_("vaadin-password-field",[ne,nh],{moduleId:"lumo-password-field"});/**
|
|
4591
4591
|
* @license
|
|
4592
4592
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4593
4593
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4594
|
-
*/_("vaadin-password-field-button",
|
|
4594
|
+
*/_("vaadin-password-field-button",_r,{moduleId:"vaadin-password-field-button-styles"});class ah extends Zi(z(x(b))){static get is(){return "vaadin-password-field-button"}static get template(){return v``}}g(ah);/**
|
|
4595
4595
|
* @license
|
|
4596
4596
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4597
4597
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4598
|
-
*/const
|
|
4598
|
+
*/const lh=o=>class extends Cr(ve(re(Ye(o)))){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,`
|
|
4599
4599
|
${e} [slot="input"]::-ms-reveal {
|
|
4600
4600
|
display: none;
|
|
4601
4601
|
}
|
|
@@ -4603,11 +4603,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4603
4603
|
* @license
|
|
4604
4604
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4605
4605
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4606
|
-
*/const
|
|
4606
|
+
*/const dh=v`
|
|
4607
4607
|
<div part="reveal-button" slot="suffix">
|
|
4608
4608
|
<slot name="reveal"></slot>
|
|
4609
4609
|
</div>
|
|
4610
|
-
`;let ot;class
|
|
4610
|
+
`;let ot;class hh extends lh(Ir){static get is(){return "vaadin-password-field"}static get template(){if(!ot){ot=super.template.cloneNode(!0);const t=dh.content.querySelector('[part="reveal-button"]');ot.content.querySelector('[part="input-field"]').appendChild(t);}return ot}}g(hh);const Dt=p`
|
|
4611
4611
|
:host {
|
|
4612
4612
|
display: flex;
|
|
4613
4613
|
align-items: center;
|
|
@@ -4691,7 +4691,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4691
4691
|
width: var(--lumo-icon-size-m);
|
|
4692
4692
|
height: var(--lumo-icon-size-m);
|
|
4693
4693
|
}
|
|
4694
|
-
`;_("vaadin-item",Dt,{moduleId:"lumo-item"});const
|
|
4694
|
+
`;_("vaadin-item",Dt,{moduleId:"lumo-item"});const kr=p`
|
|
4695
4695
|
:host {
|
|
4696
4696
|
transition: background-color 100ms;
|
|
4697
4697
|
overflow: hidden;
|
|
@@ -4703,11 +4703,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4703
4703
|
:host([focused]:not([disabled])) {
|
|
4704
4704
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
4705
4705
|
}
|
|
4706
|
-
`;_("vaadin-combo-box-item",[Dt,
|
|
4706
|
+
`;_("vaadin-combo-box-item",[Dt,kr],{moduleId:"lumo-combo-box-item"});/**
|
|
4707
4707
|
* @license
|
|
4708
4708
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
4709
4709
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4710
|
-
*/const
|
|
4710
|
+
*/const Sr=p`
|
|
4711
4711
|
[part~='loader'] {
|
|
4712
4712
|
box-sizing: border-box;
|
|
4713
4713
|
width: var(--lumo-icon-size-s);
|
|
@@ -4749,7 +4749,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4749
4749
|
transform: rotate(360deg);
|
|
4750
4750
|
}
|
|
4751
4751
|
}
|
|
4752
|
-
`,
|
|
4752
|
+
`,Pr=p`
|
|
4753
4753
|
[part='content'] {
|
|
4754
4754
|
padding: 0;
|
|
4755
4755
|
}
|
|
@@ -4770,7 +4770,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4770
4770
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
4771
4771
|
margin-bottom: var(--lumo-space-xs);
|
|
4772
4772
|
}
|
|
4773
|
-
`,
|
|
4773
|
+
`,Tr=p`
|
|
4774
4774
|
[part~='loader'] {
|
|
4775
4775
|
position: absolute;
|
|
4776
4776
|
z-index: 1;
|
|
@@ -4778,24 +4778,24 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4778
4778
|
top: var(--lumo-space-s);
|
|
4779
4779
|
margin-inline: auto 0;
|
|
4780
4780
|
}
|
|
4781
|
-
`;_("vaadin-combo-box-overlay",[be,kt,Sr,
|
|
4781
|
+
`;_("vaadin-combo-box-overlay",[be,kt,Pr,Sr,Tr,p`
|
|
4782
4782
|
:host {
|
|
4783
4783
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
4784
4784
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
4785
4785
|
}
|
|
4786
|
-
`],{moduleId:"lumo-combo-box-overlay"});const
|
|
4786
|
+
`],{moduleId:"lumo-combo-box-overlay"});const ch=p`
|
|
4787
4787
|
[part='toggle-button']::before {
|
|
4788
4788
|
content: var(--lumo-icons-dropdown);
|
|
4789
4789
|
}
|
|
4790
|
-
`;_("vaadin-combo-box",[ne,
|
|
4790
|
+
`;_("vaadin-combo-box",[ne,ch],{moduleId:"lumo-combo-box"});/**
|
|
4791
4791
|
* @license
|
|
4792
4792
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4793
4793
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4794
|
-
*/const
|
|
4794
|
+
*/const Dr=o=>class extends o{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,s){e==="hidden"&&s!==null?this.index=void 0:super.attributeChangedCallback(e,i,s);}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,s){s===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);}};/**
|
|
4795
4795
|
* @license
|
|
4796
4796
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4797
4797
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4798
|
-
*/class
|
|
4798
|
+
*/class uh extends Dr(x(z(b))){static get template(){return v`
|
|
4799
4799
|
<style>
|
|
4800
4800
|
:host {
|
|
4801
4801
|
display: block;
|
|
@@ -4809,15 +4809,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4809
4809
|
<div part="content">
|
|
4810
4810
|
<slot></slot>
|
|
4811
4811
|
</div>
|
|
4812
|
-
`}static get is(){return "vaadin-combo-box-item"}}g(
|
|
4812
|
+
`}static get is(){return "vaadin-combo-box-item"}}g(uh);/**
|
|
4813
4813
|
* @license
|
|
4814
4814
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4815
4815
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4816
|
-
*/const
|
|
4816
|
+
*/const Or=o=>class extends Qi(o){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)&&!Hi(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());}};/**
|
|
4817
4817
|
* @license
|
|
4818
4818
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4819
4819
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4820
|
-
*/const
|
|
4820
|
+
*/const ph=p`
|
|
4821
4821
|
#overlay {
|
|
4822
4822
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
4823
4823
|
}
|
|
@@ -4827,13 +4827,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4827
4827
|
flex-direction: column;
|
|
4828
4828
|
height: 100%;
|
|
4829
4829
|
}
|
|
4830
|
-
`;_("vaadin-combo-box-overlay",[Xe,
|
|
4830
|
+
`;_("vaadin-combo-box-overlay",[Xe,ph],{moduleId:"vaadin-combo-box-overlay-styles"});class _h extends Or(Je(z(x(b)))){static get is(){return "vaadin-combo-box-overlay"}static get template(){return v`
|
|
4831
4831
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
4832
4832
|
<div part="overlay" id="overlay">
|
|
4833
4833
|
<div part="loader"></div>
|
|
4834
4834
|
<div part="content" id="content"><slot></slot></div>
|
|
4835
4835
|
</div>
|
|
4836
|
-
`}}g(
|
|
4836
|
+
`}}g(_h);/**
|
|
4837
4837
|
* @license
|
|
4838
4838
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
4839
4839
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4845,11 +4845,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4845
4845
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4846
4846
|
* Code distributed by Google as part of the polymer project is also
|
|
4847
4847
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4848
|
-
*/const
|
|
4848
|
+
*/const Ks=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),mh=Ks&&Ks[1]>=8,Gs=3,fh={_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 o=this._virtualCount;return Math.max(0,o-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(o){o=this._clamp(o,0,this._maxVirtualStart),this._virtualStartVal=o;},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(o){o%=this._physicalCount,o<0&&(o=this._physicalCount+o),this._physicalStartVal=o;},get _physicalEnd(){return (this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(o){this._physicalCountVal=o;},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return !!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let o=this._firstVisibleIndexVal;if(o==null){let t=this._physicalTop+this._scrollOffset;o=this._iterateItems((e,i)=>{if(t+=this._getPhysicalSizeIncrement(e),t>this._scrollPosition)return i})||0,this._firstVisibleIndexVal=o;}return o},get lastVisibleIndex(){let o=this._lastVisibleIndexVal;if(o==null){let t=this._physicalTop+this._scrollOffset;this._iterateItems((e,i)=>{t<this._scrollBottom&&(o=i),t+=this._getPhysicalSizeIncrement(e);}),this._lastVisibleIndexVal=o;}return o},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const o=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let t=o-this._scrollPosition;const e=t>=0;if(this._scrollPosition=o,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),mt);}},_getReusables(o){let t,e,i;const s=[],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(o?(t=this._physicalStart,e=c-d):(t=this._physicalEnd,e=h-u);i=this._getPhysicalSizeIncrement(t),e-=i,!(s.length>=l||e<=r);)if(o){if(a+s.length+1>=this._virtualCount||d+i>=c-this._scrollOffset)break;s.push(t),d+=i,t=(t+1)%l;}else {if(n-s.length<=0||d+this._physicalSize-i<=u)break;s.push(t),d-=i,t=t===0?l-1:t-1;}return {indexes:s,physicalTop:d-this._scrollOffset}},_update(o,t){if(!(o&&o.length===0||this._physicalCount===0)){if(this._assignModels(o),this._updateMetrics(o),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(o){const e=this._clamp(this._physicalCount+o,Gs,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(this._physicalCount*.5);if(!(e<0)){if(e>0){const s=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()-s)/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)),Wo):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),mt));}},_render(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){const o=this._getReusables(!0);this._physicalTop=o.physicalTop,this._virtualStart+=o.indexes.length,this._physicalStart+=o.indexes.length,this._update(o.indexes),this._update(),this._increasePoolIfNeeded(0);}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(Gs));},_itemsChanged(o){o.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,He));},_iterateItems(o,t){let e,i,s,r;if(arguments.length===2&&t){for(r=0;r<t.length;r++)if(e=t[r],i=this._computeVidx(e),(s=o.call(this,e,i))!=null)return s}else {for(e=this._physicalStart,i=this._virtualStart;e<this._physicalCount;e++,i++)if((s=o.call(this,e,i))!=null)return s;for(e=0;e<this._physicalStart;e++,i++)if((s=o.call(this,e,i))!=null)return s}},_computeVidx(o){return o>=this._physicalStart?this._virtualStart+(o-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+o},_positionItems(){this._adjustScrollPosition();let o=this._physicalTop;this._iterateItems(t=>{this.translate3d(0,`${o}px`,0,this._physicalItems[t]),o+=this._physicalSizes[t];});},_getPhysicalSizeIncrement(o){return this._physicalSizes[o]},_adjustScrollPosition(){const o=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(o!==0){this._physicalTop-=o;const t=this._scrollPosition;!mh&&t>0&&this._resetScrollPosition(t-o);}},_resetScrollPosition(o){this.scrollTarget&&o>=0&&(this._scrollTop=o,this._scrollPosition=this._scrollTop);},_updateScrollerSize(o){const t=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=t,(o||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(o){if(typeof o!="number"||o<0||o>this.items.length-1||(Te(),this._physicalCount===0))return;o=this._clamp(o,0,this._virtualCount-1),(!this._isIndexRendered(o)||o>=this._maxVirtualStart)&&(this._virtualStart=o-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let t=this._physicalStart,e=this._virtualStart,i=0;const s=this._hiddenContentSize;for(;e<o&&i<=s;)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);},He);},_isIndexRendered(o){return o>=this._virtualStart&&o<=this._virtualEnd},_getPhysicalIndex(o){return (this._physicalStart+(o-this._virtualStart))%this._physicalCount},_clamp(o,t,e){return Math.min(e,Math.max(t,o))},_debounce(o,t,e){this._debouncers||(this._debouncers={}),this._debouncers[o]=M.debounce(this._debouncers[o],e,t.bind(this)),qo(this._debouncers[o]);}};/**
|
|
4849
4849
|
* @license
|
|
4850
4850
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4851
4851
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4852
|
-
*/const mh=1e5,Qt=1e3;class Or{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=r||s,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect: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<Qt?(i=t,this._vidxOffset=0):(i=Qt,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(),Te(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s));}),this.__afterElementsUpdated(i);}_updateMetrics(t){Te();let e=0,i=0;const s=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!==s&&(this._physicalAverage=Math.round((r*s+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const s=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+s+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=M.debounce(this.__placeholderClearDebouncer,He,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const s=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(s.reduce((r,n)=>r+n,0)/s.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(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"}),Te(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const s=this.__getIndexScrollOffset(e);i!==void 0&&s!==void 0&&(this._scrollTop+=i-s);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),Te(),this._debounce("_update",this._update,ft);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,mh)}}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(s=>{s.style.position="absolute",i.appendChild(s),this.__resizeObserver.observe(s);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,s)=>{const r=this._physicalItems[i];r.hidden=s>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=s+(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,s){s.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 s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,s)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush());}_scrollHandler(){if(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=M.debounce(this.__fixInvalidItemPositioningDebouncer,q.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=M.debounce(this.__scrollReorderDebouncer,q.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,s=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!s){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=M.debounce(this.__debouncerWheelAnimationFrame,He,()=>{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=M.debounce(this._debouncerIgnoreNewWheel,q.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 s=i.__virtualIndex-t,r=e.indexOf(i)-s;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(sd){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,s=Qt,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<s&&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-s&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}}Object.setPrototypeOf(Or.prototype,fh);class gh{constructor(t){this.__adapter=new Or(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();}}/**
|
|
4852
|
+
*/const gh=1e5,Qt=1e3;class Mr{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=r||s,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect: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<Qt?(i=t,this._vidxOffset=0):(i=Qt,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(),Te(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s));}),this.__afterElementsUpdated(i);}_updateMetrics(t){Te();let e=0,i=0;const s=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!==s&&(this._physicalAverage=Math.round((r*s+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const s=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+s+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=M.debounce(this.__placeholderClearDebouncer,He,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const s=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(s.reduce((r,n)=>r+n,0)/s.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(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"}),Te(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const s=this.__getIndexScrollOffset(e);i!==void 0&&s!==void 0&&(this._scrollTop+=i-s);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),Te(),this._debounce("_update",this._update,mt);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,gh)}}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(s=>{s.style.position="absolute",i.appendChild(s),this.__resizeObserver.observe(s);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,s)=>{const r=this._physicalItems[i];r.hidden=s>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=s+(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,s){s.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 s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,s)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush());}_scrollHandler(){if(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=M.debounce(this.__fixInvalidItemPositioningDebouncer,q.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=M.debounce(this.__scrollReorderDebouncer,q.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,s=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!s){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=M.debounce(this.__debouncerWheelAnimationFrame,He,()=>{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=M.debounce(this._debouncerIgnoreNewWheel,q.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 s=i.__virtualIndex-t,r=e.indexOf(i)-s;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(od){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,s=Qt,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<s&&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-s&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}}Object.setPrototypeOf(Mr.prototype,fh);class vh{constructor(t){this.__adapter=new Mr(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();}}/**
|
|
4853
4853
|
* @license
|
|
4854
4854
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4855
4855
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4857,11 +4857,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4857
4857
|
* @license
|
|
4858
4858
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4859
4859
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4860
|
-
*/const
|
|
4860
|
+
*/const zr=o=>class extends o{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,s)=>i+s);}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${qe()}`,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 s=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),s=e-i+1):e>this.__virtualizer.firstVisibleIndex&&(s=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,s));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,s){return e instanceof K?!1:s&&e!==void 0&&i!==void 0?vt(s,e)===vt(s,i):e===i}__initVirtualizer(){this.__virtualizer=new vh({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 s=this.items[i],r=this.focusedIndex,n=this._isItemSelected(s,this.selectedItem,this.itemIdPath);e.setProperties({item:s,index:i,label:this.getItemLabel(s),selected:n,renderer:this.renderer,focused:!this.loading&&r===i}),typeof this.itemClassNameGenerator=="function"?e.className=this.itemClassNameGenerator(s):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"),s instanceof K&&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,s=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(i&&e.deltaY<0||s&&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}};/**
|
|
4861
4861
|
* @license
|
|
4862
4862
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4863
4863
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4864
|
-
*/class
|
|
4864
|
+
*/class bh extends zr(b){static get is(){return "vaadin-combo-box-scroller"}static get template(){return v`
|
|
4865
4865
|
<style>
|
|
4866
4866
|
:host {
|
|
4867
4867
|
display: block;
|
|
@@ -4888,27 +4888,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4888
4888
|
<div id="selector">
|
|
4889
4889
|
<slot></slot>
|
|
4890
4890
|
</div>
|
|
4891
|
-
`}}g(
|
|
4891
|
+
`}}g(bh);/**
|
|
4892
4892
|
* @license
|
|
4893
4893
|
* Copyright (c) 2021 - 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 yh=o=>class extends rs(o){static get properties(){return {pattern:{type:String}}}static get delegateAttrs(){return [...super.delegateAttrs,"pattern"]}static get constraints(){return [...super.constraints,"pattern"]}};/**
|
|
4896
4896
|
* @license
|
|
4897
4897
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4898
4898
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4899
|
-
*/function bt(o,t,e=0){let i=t;for(const s of o.subCaches){const r=s.parentCacheIndex;if(i<=r)break;if(i<=r+s.flatSize)return bt(s,i-r-1,e+1);i-=s.flatSize;}return {cache:o,item:o.items[i],index:i,page:Math.floor(i/o.pageSize),level:e}}function
|
|
4899
|
+
*/function bt(o,t,e=0){let i=t;for(const s of o.subCaches){const r=s.parentCacheIndex;if(i<=r)break;if(i<=r+s.flatSize)return bt(s,i-r-1,e+1);i-=s.flatSize;}return {cache:o,item:o.items[i],index:i,page:Math.floor(i/o.pageSize),level:e}}function Nr({getItemId:o},t,e,i=0,s=0){for(let r=0;r<t.items.length;r++){const n=t.items[r];if(n&&o(n)===o(e))return {cache:t,level:i,item:n,index:r,page:Math.floor(r/t.pageSize),subCache:t.getSubCache(r),flatIndex:s+t.getFlatIndex(r)}}for(const r of t.subCaches){const n=s+t.getFlatIndex(r.parentCacheIndex),a=Nr({getItemId:o},r,e,i+1,n+1);if(a)return a}}function Lr(o,[t,...e],i=0){t===1/0&&(t=o.size-1);const s=o.getFlatIndex(t),r=o.getSubCache(t);return r&&r.flatSize>0&&e.length?Lr(r,e,i+s+1):i+s}/**
|
|
4900
4900
|
* @license
|
|
4901
4901
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4902
4902
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4903
|
-
*/class
|
|
4903
|
+
*/class ns{constructor(t,e,i,s,r){I(this,"context");I(this,"pageSize");I(this,"items",[]);I(this,"pendingRequests",{});I(this,"__subCacheByIndex",{});I(this,"__size",0);I(this,"__flatSize",0);this.context=t,this.pageSize=e,this.size=i,this.parentCache=s,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 s=0;s<t;s++)(i=this.items)[s]||(i[s]=this.context.placeholder);}Object.keys(this.pendingRequests).forEach(s=>{parseInt(s)*this.pageSize>=this.size&&delete this.pendingRequests[s];});}}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((s,r)=>{const n=i+r;(this.size===void 0||n<this.size)&&(this.items[n]=s);});}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t];}removeSubCaches(){this.__subCacheByIndex={};}createSubCache(t){const e=new ns(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,s)=>{const r=s.parentCacheIndex;return e>r?i+s.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}=bt(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}=bt(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}}/**
|
|
4904
4904
|
* @license
|
|
4905
4905
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4906
4906
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4907
|
-
*/class
|
|
4907
|
+
*/class xh extends EventTarget{constructor(e,{size:i,pageSize:s,isExpanded:r,getItemId:n,isPlaceholder:a,placeholder:l,dataProvider:d,dataProviderParams:h}){super();I(this,"host");I(this,"dataProvider");I(this,"dataProviderParams");I(this,"pageSize");I(this,"isExpanded");I(this,"getItemId");I(this,"rootCache");I(this,"placeholder");I(this,"isPlaceholder");this.host=e,this.pageSize=s,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 bt(this.rootCache,e)}getItemContext(e){return Nr({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return Lr(this.rootCache,e)}ensureFlatIndexLoaded(e){const{cache:i,page:s,item:r}=this.getFlatIndexContext(e);this.__isItemLoaded(r)||this.__loadCachePage(i,s);}ensureFlatIndexHierarchy(e){const{cache:i,item:s,index:r}=this.getFlatIndexContext(e);if(this.__isItemLoaded(s)&&this.isExpanded(s)&&!i.getSubCache(r)){const n=i.createSubCache(r);this.__loadCachePage(n,0);}}loadFirstPage(){this.__loadCachePage(this.rootCache,0);}__createRootCache(e){return new ns(this.__cacheContext,this.pageSize,e)}__loadCachePage(e,i){if(!this.dataProvider||e.pendingRequests[i])return;let s={page:i,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(s=xe(xe({},s),this.dataProviderParams()));const r=(n,a)=>{e.pendingRequests[i]===r&&(a!==void 0?e.size=a:s.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(s,r);}__isItemLoaded(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}}/**
|
|
4908
4908
|
* @license
|
|
4909
4909
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4910
4910
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4911
|
-
*/const
|
|
4911
|
+
*/const Br=o=>class extends o{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 xh(this,{placeholder:new K,isPlaceholder:e=>e instanceof K,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 s=this.__getItemIndexByValue(this.filteredItems,i);(s<0||!this._getItemLabel(this.filteredItems[s]))&&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`");}}};/**
|
|
4912
4912
|
* @license
|
|
4913
4913
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4914
4914
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4916,11 +4916,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4916
4916
|
* @license
|
|
4917
4917
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4918
4918
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4919
|
-
*/function Gs(o){return o!=null}function Xs(o,t){return o.findIndex(e=>e instanceof K?!1:t(e))}const Br=o=>class extends Qe(H(qi(re(oe(Ye(ve(o))))))){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),Ot(this),this.addController(new Er(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,s){super._propertiesChanged(e,i,s),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 s=this._overlayElement;s.renderer=r=>{r.innerHTML||r.appendChild(i);},s.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,s,r,n,a,l,d,h,c){if(e&&(s&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:s?i:[],opened:s,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,s,r){this._overlayOpened=e&&(r||s||!!(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&&Hi(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const s=this._getItemElements().find(r=>r.index===e);s?i.setAttribute("aria-activedescendant",s.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 s=this._nativeInput;s&&(s.setAttribute("aria-expanded",!!e),e?s.setAttribute("aria-controls",this._scroller.id):s.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?vt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?vt(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 s=this._inputElementValue;this._lastCustomValue=s;const r=new CustomEvent("custom-value-set",{detail:s,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=s);}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,s={};this.filter===i?this._filterChanged(this.filter):s.filter=i,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(s.opened=!0),this.setProperties(s);}_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||(Gs(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),s=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&&s===null&&this._selectedItemChanged(this.selectedItem);}_setDropdownItems(e){const i=this._dropdownItems;this._dropdownItems=e;const s=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(s));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||!Gs(i)?-1:Xs(e,s=>this._getItemValue(s)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:Xs(e,s=>this._getItemLabel(s).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof K)&&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(Et()){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());}};/**
|
|
4919
|
+
*/function Xs(o){return o!=null}function Js(o,t){return o.findIndex(e=>e instanceof K?!1:t(e))}const Fr=o=>class extends Qe(H(Yi(re(oe(Ye(ve(o))))))){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),Ot(this),this.addController(new Ar(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,s){super._propertiesChanged(e,i,s),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 s=this._overlayElement;s.renderer=r=>{r.innerHTML||r.appendChild(i);},s.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,s,r,n,a,l,d,h,c){if(e&&(s&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:s?i:[],opened:s,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,s,r){this._overlayOpened=e&&(r||s||!!(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&&Ui(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const s=this._getItemElements().find(r=>r.index===e);s?i.setAttribute("aria-activedescendant",s.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 s=this._nativeInput;s&&(s.setAttribute("aria-expanded",!!e),e?s.setAttribute("aria-controls",this._scroller.id):s.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?vt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?vt(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 s=this._inputElementValue;this._lastCustomValue=s;const r=new CustomEvent("custom-value-set",{detail:s,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=s);}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,s={};this.filter===i?this._filterChanged(this.filter):s.filter=i,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(s.opened=!0),this.setProperties(s);}_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||(Xs(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),s=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&&s===null&&this._selectedItemChanged(this.selectedItem);}_setDropdownItems(e){const i=this._dropdownItems;this._dropdownItems=e;const s=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(s));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||!Xs(i)?-1:Js(e,s=>this._getItemValue(s)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:Js(e,s=>this._getItemLabel(s).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof K)&&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(Et()){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());}};/**
|
|
4920
4920
|
* @license
|
|
4921
4921
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4922
4922
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4923
|
-
*/_("vaadin-combo-box",Tt,{moduleId:"vaadin-combo-box-styles"});class
|
|
4923
|
+
*/_("vaadin-combo-box",Tt,{moduleId:"vaadin-combo-box-styles"});class Ch extends Br(Fr(yh(Pt(x(L(b)))))){static get is(){return "vaadin-combo-box"}static get template(){return v`
|
|
4924
4924
|
<style>
|
|
4925
4925
|
:host([opened]) {
|
|
4926
4926
|
pointer-events: auto;
|
|
@@ -4965,11 +4965,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4965
4965
|
></vaadin-combo-box-overlay>
|
|
4966
4966
|
|
|
4967
4967
|
<slot name="tooltip"></slot>
|
|
4968
|
-
`}static get properties(){return {_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ke(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t;})),this.addController(new Ge(this.inputElement,this._labelController)),this._tooltipController=new G(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);}}g(
|
|
4968
|
+
`}static get properties(){return {_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ke(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t;})),this.addController(new Ge(this.inputElement,this._labelController)),this._tooltipController=new G(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);}}g(Ch);/**
|
|
4969
4969
|
* @license
|
|
4970
4970
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4971
4971
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4972
|
-
*/const
|
|
4972
|
+
*/const wh=p`
|
|
4973
4973
|
:host {
|
|
4974
4974
|
font-size: var(--lumo-font-size-xxs);
|
|
4975
4975
|
line-height: 1;
|
|
@@ -5058,18 +5058,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5058
5058
|
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
5059
5059
|
pointer-events: none;
|
|
5060
5060
|
}
|
|
5061
|
-
`;_("vaadin-multi-select-combo-box-chip",[
|
|
5061
|
+
`;_("vaadin-multi-select-combo-box-chip",[Xi,wh],{moduleId:"lumo-multi-select-combo-box-chip"});/**
|
|
5062
5062
|
* @license
|
|
5063
5063
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5064
5064
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5065
|
-
*/const
|
|
5065
|
+
*/const Eh=p`
|
|
5066
5066
|
@media (any-hover: hover) {
|
|
5067
5067
|
:host(:hover[readonly]) {
|
|
5068
5068
|
background-color: transparent;
|
|
5069
5069
|
cursor: default;
|
|
5070
5070
|
}
|
|
5071
5071
|
}
|
|
5072
|
-
`;_("vaadin-multi-select-combo-box-item",[Dt,
|
|
5072
|
+
`;_("vaadin-multi-select-combo-box-item",[Dt,kr,Eh],{moduleId:"lumo-multi-select-combo-box-item"});_("vaadin-multi-select-combo-box-overlay",[be,kt,Pr,Sr,Tr,p`
|
|
5073
5073
|
:host {
|
|
5074
5074
|
--_vaadin-multi-select-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
5075
5075
|
--_vaadin-multi-select-combo-box-items-container-border-style: solid;
|
|
@@ -5078,7 +5078,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5078
5078
|
:host([auto-expand-vertically]) {
|
|
5079
5079
|
padding-block: var(--lumo-space-xs);
|
|
5080
5080
|
}
|
|
5081
|
-
`,{moduleId:"lumo-multi-select-combo-box-container"});const
|
|
5081
|
+
`,{moduleId:"lumo-multi-select-combo-box-container"});const Ah=p`
|
|
5082
5082
|
:host([has-value]) {
|
|
5083
5083
|
padding-inline-start: 0;
|
|
5084
5084
|
}
|
|
@@ -5131,11 +5131,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5131
5131
|
color: var(--lumo-contrast-60pct);
|
|
5132
5132
|
cursor: var(--lumo-clickable-cursor);
|
|
5133
5133
|
}
|
|
5134
|
-
`;_("vaadin-multi-select-combo-box",[ne,
|
|
5134
|
+
`;_("vaadin-multi-select-combo-box",[ne,Ah],{moduleId:"lumo-multi-select-combo-box"});/**
|
|
5135
5135
|
* @license
|
|
5136
5136
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5137
5137
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5138
|
-
*/class
|
|
5138
|
+
*/class Ih extends x(b){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 v`
|
|
5139
5139
|
<style>
|
|
5140
5140
|
:host {
|
|
5141
5141
|
display: inline-flex;
|
|
@@ -5164,7 +5164,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5164
5164
|
</style>
|
|
5165
5165
|
<div part="label">[[label]]</div>
|
|
5166
5166
|
<div part="remove-button" on-click="_onRemoveClick"></div>
|
|
5167
|
-
`}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}));}}g(
|
|
5167
|
+
`}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}));}}g(Ih);/**
|
|
5168
5168
|
* @license
|
|
5169
5169
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5170
5170
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -5178,11 +5178,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5178
5178
|
:host([auto-expand-vertically]) #wrapper {
|
|
5179
5179
|
flex-wrap: wrap;
|
|
5180
5180
|
}
|
|
5181
|
-
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});let rt;class
|
|
5181
|
+
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});let rt;class kh extends ar{static get is(){return "vaadin-multi-select-combo-box-container"}static get template(){if(!rt){rt=super.template.cloneNode(!0);const t=rt.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 rt}static get properties(){return {autoExpandVertically:{type:Boolean,reflectToAttribute:!0}}}}g(kh);/**
|
|
5182
5182
|
* @license
|
|
5183
5183
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5184
5184
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5185
|
-
*/class
|
|
5185
|
+
*/class Sh extends Dr(x(z(b))){static get is(){return "vaadin-multi-select-combo-box-item"}static get template(){return v`
|
|
5186
5186
|
<style>
|
|
5187
5187
|
:host {
|
|
5188
5188
|
display: block;
|
|
@@ -5196,11 +5196,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5196
5196
|
<div part="content">
|
|
5197
5197
|
<slot></slot>
|
|
5198
5198
|
</div>
|
|
5199
|
-
`}}g(
|
|
5199
|
+
`}}g(Sh);/**
|
|
5200
5200
|
* @license
|
|
5201
5201
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5202
5202
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5203
|
-
*/const
|
|
5203
|
+
*/const Ph=p`
|
|
5204
5204
|
#overlay {
|
|
5205
5205
|
width: var(
|
|
5206
5206
|
--vaadin-multi-select-combo-box-overlay-width,
|
|
@@ -5213,17 +5213,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5213
5213
|
flex-direction: column;
|
|
5214
5214
|
height: 100%;
|
|
5215
5215
|
}
|
|
5216
|
-
`;_("vaadin-multi-select-combo-box-overlay",[Xe,
|
|
5216
|
+
`;_("vaadin-multi-select-combo-box-overlay",[Xe,Ph],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Th extends Or(Je(z(x(b)))){static get is(){return "vaadin-multi-select-combo-box-overlay"}static get template(){return v`
|
|
5217
5217
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
5218
5218
|
<div part="overlay" id="overlay">
|
|
5219
5219
|
<div part="loader"></div>
|
|
5220
5220
|
<div part="content" id="content"><slot></slot></div>
|
|
5221
5221
|
</div>
|
|
5222
|
-
`}}g(
|
|
5222
|
+
`}}g(Th);/**
|
|
5223
5223
|
* @license
|
|
5224
5224
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5225
5225
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5226
|
-
*/class
|
|
5226
|
+
*/class Dh extends zr(b){static get is(){return "vaadin-multi-select-combo-box-scroller"}static get template(){return v`
|
|
5227
5227
|
<style>
|
|
5228
5228
|
:host {
|
|
5229
5229
|
display: block;
|
|
@@ -5250,11 +5250,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5250
5250
|
<div id="selector">
|
|
5251
5251
|
<slot></slot>
|
|
5252
5252
|
</div>
|
|
5253
|
-
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true");}_isItemSelected(t,e,i){return t instanceof K||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);}}g(
|
|
5253
|
+
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true");}_isItemSelected(t,e,i){return t instanceof K||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);}}g(Dh);/**
|
|
5254
5254
|
* @license
|
|
5255
5255
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5256
5256
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5257
|
-
*/class
|
|
5257
|
+
*/class Oh extends Br(Fr(x(b))){static get is(){return "vaadin-multi-select-combo-box-internal"}static get template(){return v`
|
|
5258
5258
|
<style>
|
|
5259
5259
|
:host([opened]) {
|
|
5260
5260
|
pointer-events: auto;
|
|
@@ -5272,15 +5272,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5272
5272
|
no-vertical-overlap
|
|
5273
5273
|
restore-focus-node="[[inputElement]]"
|
|
5274
5274
|
></vaadin-multi-select-combo-box-overlay>
|
|
5275
|
-
`}static get properties(){return {filteredItems:{type:Array,notify:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_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");}_readonlyChanged(){this._setDropdownItems(this.filteredItems);}_setDropdownItems(t){if(this.readonly){super._setDropdownItems(this.selectedItems);return}if(this.filter||!this.selectedItemsOnTop){super._setDropdownItems(t);return}if(t&&t.length&&this.topGroup&&this.topGroup.length){const e=t.filter(i=>this._comboBox._findIndex(i,this.topGroup,this.itemIdPath)===-1);super._setDropdownItems(this.topGroup.concat(e));return}super._setDropdownItems(t);}_topGroupChanged(t){t&&this._setDropdownItems(this.filteredItems);}_initScroller(){const t=this.getRootNode().host;this._comboBox=t,super._initScroller(t);}_onEnter(t){if(this.opened){if(t.preventDefault(),t.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const e=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(e);}return}super._onEnter(t);}_onEscape(t){if(this.readonly){t.stopPropagation(),this.opened&&this.close();return}super._onEscape(t);}_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(t){t||(this._ignoreCommitValue=!0),super._setFocused(t),!t&&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(t){t.stopPropagation(),!this.readonly&&(t.detail.item instanceof K||this.opened&&(this.lastFilter=this.filter,this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:t.detail.item}}))));}_shouldFetchData(){return this.readonly?!1:super._shouldFetchData()}clearCache(){this.readonly||super.clearCache();}__onCustomValueSet(t){this._ignoreCommitValue&&t.stopImmediatePropagation();}}g(
|
|
5275
|
+
`}static get properties(){return {filteredItems:{type:Array,notify:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_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");}_readonlyChanged(){this._setDropdownItems(this.filteredItems);}_setDropdownItems(t){if(this.readonly){super._setDropdownItems(this.selectedItems);return}if(this.filter||!this.selectedItemsOnTop){super._setDropdownItems(t);return}if(t&&t.length&&this.topGroup&&this.topGroup.length){const e=t.filter(i=>this._comboBox._findIndex(i,this.topGroup,this.itemIdPath)===-1);super._setDropdownItems(this.topGroup.concat(e));return}super._setDropdownItems(t);}_topGroupChanged(t){t&&this._setDropdownItems(this.filteredItems);}_initScroller(){const t=this.getRootNode().host;this._comboBox=t,super._initScroller(t);}_onEnter(t){if(this.opened){if(t.preventDefault(),t.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const e=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(e);}return}super._onEnter(t);}_onEscape(t){if(this.readonly){t.stopPropagation(),this.opened&&this.close();return}super._onEscape(t);}_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(t){t||(this._ignoreCommitValue=!0),super._setFocused(t),!t&&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(t){t.stopPropagation(),!this.readonly&&(t.detail.item instanceof K||this.opened&&(this.lastFilter=this.filter,this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:t.detail.item}}))));}_shouldFetchData(){return this.readonly?!1:super._shouldFetchData()}clearCache(){this.readonly||super.clearCache();}__onCustomValueSet(t){this._ignoreCommitValue&&t.stopImmediatePropagation();}}g(Oh);/**
|
|
5276
5276
|
* @license
|
|
5277
5277
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5278
5278
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5279
|
-
*/const nt=new ResizeObserver(o=>{setTimeout(()=>{o.forEach(t=>{t.target.resizables?t.target.resizables.forEach(e=>{e._onResize(t.contentRect);}):t.target._onResize(t.contentRect);});});}),
|
|
5279
|
+
*/const nt=new ResizeObserver(o=>{setTimeout(()=>{o.forEach(t=>{t.target.resizables?t.target.resizables.forEach(e=>{e._onResize(t.contentRect);}):t.target._onResize(t.contentRect);});});}),Mh=C(o=>class extends o{get _observeParent(){return !1}connectedCallback(){if(super.connectedCallback(),nt.observe(this),this._observeParent){const e=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;e.resizables||(e.resizables=new Set,nt.observe(e)),e.resizables.add(this),this.__parent=e;}}disconnectedCallback(){super.disconnectedCallback(),nt.unobserve(this);const e=this.__parent;if(this._observeParent&&e){const i=e.resizables;i&&(i.delete(this),i.size===0&&nt.unobserve(e)),this.__parent=null;}}_onResize(e){}});/**
|
|
5280
5280
|
* @license
|
|
5281
5281
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5282
5282
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5283
|
-
*/const
|
|
5283
|
+
*/const zh=p`
|
|
5284
5284
|
:host {
|
|
5285
5285
|
--input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
|
|
5286
5286
|
--_chip-min-width: var(--vaadin-multi-select-combo-box-chip-min-width, 50px);
|
|
@@ -5318,7 +5318,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5318
5318
|
:host([auto-expand-horizontally]) [class$='container'] {
|
|
5319
5319
|
width: auto;
|
|
5320
5320
|
}
|
|
5321
|
-
`;_("vaadin-multi-select-combo-box",[Tt,
|
|
5321
|
+
`;_("vaadin-multi-select-combo-box",[Tt,zh],{moduleId:"vaadin-multi-select-combo-box-styles"});class Nh extends Mh(Pt(x(L(b)))){static get is(){return "vaadin-multi-select-combo-box"}static get template(){return v`
|
|
5322
5322
|
<div class="vaadin-multi-select-combo-box-container">
|
|
5323
5323
|
<div part="label">
|
|
5324
5324
|
<slot name="label"></slot>
|
|
@@ -5394,7 +5394,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5394
5394
|
color: transparent !important;
|
|
5395
5395
|
forced-color-adjust: none;
|
|
5396
5396
|
}
|
|
5397
|
-
`]}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 Ke(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t;})),this.addController(new Ge(this.inputElement,this._labelController)),this._tooltipController=new G(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(t=>!t.opened),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new T(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:t=>{t.addEventListener("mousedown",e=>this._preventBlur(e)),this._overflow=t;}}),this.addController(this._overflowController),this.__updateChips(),Ot(this);}checkValidity(){return this.required&&!this.readonly?this._hasValue:!0}clear(){this.__updateSelection([]),dt(this.i18n.cleared);}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache();}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate();}_disabledChanged(t,e){super._disabledChanged(t,e),(t||e)&&this.__updateChips();}_inputElementChanged(t){super._inputElementChanged(t),t&&this.$.comboBox._setInputElement(t);}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate());}_onResize(){this.__updateChips();}_delegateAttribute(t,e){if(this.stateTarget){if(t==="required"){this._delegateAttribute("aria-required",e?"true":!1);return}super._delegateAttribute(t,e);}}_autoExpandHorizontallyChanged(t,e){(t||e)&&this.__updateChips();}_autoExpandVerticallyChanged(t,e){(t||e)&&this.__updateChips();}_clearButtonVisibleChanged(t,e){(t||e)&&this.__updateChips();}_onFilteredItemsChanged(t){const{value:e}=t.detail;(Array.isArray(e)||e==null)&&(this.filteredItems=e);}_readonlyChanged(t,e){(t||e)&&this.__updateChips(),this.dataProvider&&this.clearCache();}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.__updateChips();}_pageSizeChanged(t,e){(Math.floor(t)!==t||t<=0)&&(this.pageSize=e,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize;}_placeholderChanged(t){const e=this.__tmpA11yPlaceholder;e!==t&&(this.__savedPlaceholder=t,e&&(this.placeholder=e));}_selectedItemsChanged(t){if(this._toggleHasValue(this._hasValue),this._hasValue){const e=this._mergeItemLabels(t);this.__tmpA11yPlaceholder===void 0&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=e,this.placeholder=e;}else this.__tmpA11yPlaceholder!==void 0&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth();}_getItemLabel(t){return this.$.comboBox._getItemLabel(t)}_mergeItemLabels(t){return t.map(e=>this._getItemLabel(e)).join(", ")}_findIndex(t,e,i){if(i&&t){for(let s=0;s<e.length;s++)if(e[s]&&e[s][i]===t[i])return s;return -1}return e.indexOf(t)}__clearInternalValue(t=!1){!this.keepFilter||t?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter);}__announceItem(t,e,i){const s=e?"selected":"deselected",r=this.i18n.total.replace("{count}",i||0);dt(`${t} ${this.i18n[s]} ${r}`);}__removeItem(t){const e=[...this.selectedItems];e.splice(e.indexOf(t),1),this.__updateSelection(e);const i=this._getItemLabel(t);this.__announceItem(i,!1,e.length);}__selectItem(t){const e=[...this.selectedItems],i=this._findIndex(t,e,this.itemIdPath),s=this._getItemLabel(t);let r=!1;if(i!==-1){const n=this._lastFilter;if(n&&n.toLowerCase()===s.toLowerCase()){this.__clearInternalValue();return}e.splice(i,1);}else e.push(t),r=!0;this.__updateSelection(e),this.__clearInternalValue(),this.__announceItem(s,r,e.length);}__updateSelection(t){this.selectedItems=t,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}));}__updateTopGroup(t,e,i){t?i||(this._topGroup=[...e]):this._topGroup=[];}__createChip(t){const e=document.createElement("vaadin-multi-select-combo-box-chip");e.setAttribute("slot","chip"),e.item=t,e.disabled=this.disabled,e.readonly=this.readonly;const i=this._getItemLabel(t);return e.label=i,e.setAttribute("title",i),typeof this.itemClassNameGenerator=="function"&&(e.className=this.itemClassNameGenerator(t)),e.addEventListener("item-removed",s=>this._onItemRemoved(s)),e.addEventListener("mousedown",s=>this._preventBlur(s)),e}__getOverflowWidth(){const t=this._overflow;t.style.visibility="hidden",t.removeAttribute("hidden");const e=t.getAttribute("count");t.setAttribute("count","99");const i=getComputedStyle(t),s=t.clientWidth+parseInt(i.marginInlineStart);return t.setAttribute("count",e),t.setAttribute("hidden",""),t.style.visibility="",s}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach(n=>{n.remove();});const t=[...this.selectedItems],e=this._inputField.$.wrapper.clientWidth,i=parseInt(getComputedStyle(this.inputElement).flexBasis);let s=e-i;t.length>1&&(s-=this.__getOverflowWidth());const r=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const n=[];for(let d=t.length-1,h=null;d>=0;d--){const c=this.__createChip(t[d]);this.insertBefore(c,h),h=c,n.unshift(c);}const a=[],l=this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth;if(!this.autoExpandVertically&&l<i){for(;n.length>1;){n.pop().remove(),a.unshift(t.pop());const h=a.length>0?i+this.__getOverflowWidth():i;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=h)break}n.length===1&&(n[0].style.maxWidth=`${Math.max(r,s)}px`);}this._overflowItems=a;return}for(let n=t.length-1,a=null;n>=0;n--){const l=this.__createChip(t[n]);if(this.insertBefore(l,a),!this.autoExpandVertically&&this.$.chips.clientWidth>s)if(a===null)l.style.maxWidth=`${Math.max(r,s)}px`;else {l.remove();break}t.pop(),a=l;}this._overflowItems=t;}__updateOverflowChip(t,e,i,s){if(t){const r=e.length;t.label=`${r}`,t.setAttribute("count",`${r}`),t.setAttribute("title",this._mergeItemLabels(e)),t.toggleAttribute("hidden",r===0),t.disabled=i,t.readonly=s;}}_onClearButtonTouchend(t){t.preventDefault(),t.stopPropagation(),this.clear();}_onClearButtonClick(t){t.stopPropagation(),this.clear();}_onChange(t){t.stopPropagation();}_onEscape(t){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(t.stopPropagation(),this.selectedItems=[]);}_onKeyDown(t){super._onKeyDown(t);const e=this._chips;if(!this.readonly&&e.length>0)switch(t.key){case"Backspace":this._onBackSpace(e);break;case"ArrowLeft":this._onArrowLeft(e,t);break;case"ArrowRight":this._onArrowRight(e,t);break;default:this._focusedChipIndex=-1;break}}_onArrowLeft(t,e){if(this.inputElement.selectionStart!==0)return;const i=this._focusedChipIndex;i!==-1&&e.preventDefault();let s;this.__isRTL?i===t.length-1?s=-1:i>-1&&(s=i+1):i===-1?s=t.length-1:i>0&&(s=i-1),s!==void 0&&(this._focusedChipIndex=s);}_onArrowRight(t,e){if(this.inputElement.selectionStart!==0)return;const i=this._focusedChipIndex;i!==-1&&e.preventDefault();let s;this.__isRTL?i===-1?s=t.length-1:i>0&&(s=i-1):i===t.length-1?s=-1:i>-1&&(s=i+1),s!==void 0&&(this._focusedChipIndex=s);}_onBackSpace(t){if(this.inputElement.selectionStart!==0)return;const e=this._focusedChipIndex;e===-1?this._focusedChipIndex=t.length-1:(this.__removeItem(t[e].item),this._focusedChipIndex=-1);}_focusedChipIndexChanged(t,e){if(t>-1||e>-1){const i=this._chips;if(i.forEach((s,r)=>{s.toggleAttribute("focused",r===t);}),t>-1){const s=i[t].item,r=this._getItemLabel(s);dt(`${r} ${this.i18n.focused}`);}}}_onComboBoxChange(){const t=this.$.comboBox.selectedItem;t&&this.__selectItem(t);}_onComboBoxItemSelected(t){this.__selectItem(t.detail.item);}_onCustomValueSet(t){t.preventDefault(),t.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:t.detail,composed:!0,bubbles:!0}));}_onItemRemoved(t){this.__removeItem(t.detail.item);}_preventBlur(t){t.preventDefault();}}g(
|
|
5397
|
+
`]}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 Ke(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t;})),this.addController(new Ge(this.inputElement,this._labelController)),this._tooltipController=new G(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(t=>!t.opened),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new T(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:t=>{t.addEventListener("mousedown",e=>this._preventBlur(e)),this._overflow=t;}}),this.addController(this._overflowController),this.__updateChips(),Ot(this);}checkValidity(){return this.required&&!this.readonly?this._hasValue:!0}clear(){this.__updateSelection([]),dt(this.i18n.cleared);}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache();}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate();}_disabledChanged(t,e){super._disabledChanged(t,e),(t||e)&&this.__updateChips();}_inputElementChanged(t){super._inputElementChanged(t),t&&this.$.comboBox._setInputElement(t);}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate());}_onResize(){this.__updateChips();}_delegateAttribute(t,e){if(this.stateTarget){if(t==="required"){this._delegateAttribute("aria-required",e?"true":!1);return}super._delegateAttribute(t,e);}}_autoExpandHorizontallyChanged(t,e){(t||e)&&this.__updateChips();}_autoExpandVerticallyChanged(t,e){(t||e)&&this.__updateChips();}_clearButtonVisibleChanged(t,e){(t||e)&&this.__updateChips();}_onFilteredItemsChanged(t){const{value:e}=t.detail;(Array.isArray(e)||e==null)&&(this.filteredItems=e);}_readonlyChanged(t,e){(t||e)&&this.__updateChips(),this.dataProvider&&this.clearCache();}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.__updateChips();}_pageSizeChanged(t,e){(Math.floor(t)!==t||t<=0)&&(this.pageSize=e,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize;}_placeholderChanged(t){const e=this.__tmpA11yPlaceholder;e!==t&&(this.__savedPlaceholder=t,e&&(this.placeholder=e));}_selectedItemsChanged(t){if(this._toggleHasValue(this._hasValue),this._hasValue){const e=this._mergeItemLabels(t);this.__tmpA11yPlaceholder===void 0&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=e,this.placeholder=e;}else this.__tmpA11yPlaceholder!==void 0&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth();}_getItemLabel(t){return this.$.comboBox._getItemLabel(t)}_mergeItemLabels(t){return t.map(e=>this._getItemLabel(e)).join(", ")}_findIndex(t,e,i){if(i&&t){for(let s=0;s<e.length;s++)if(e[s]&&e[s][i]===t[i])return s;return -1}return e.indexOf(t)}__clearInternalValue(t=!1){!this.keepFilter||t?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter);}__announceItem(t,e,i){const s=e?"selected":"deselected",r=this.i18n.total.replace("{count}",i||0);dt(`${t} ${this.i18n[s]} ${r}`);}__removeItem(t){const e=[...this.selectedItems];e.splice(e.indexOf(t),1),this.__updateSelection(e);const i=this._getItemLabel(t);this.__announceItem(i,!1,e.length);}__selectItem(t){const e=[...this.selectedItems],i=this._findIndex(t,e,this.itemIdPath),s=this._getItemLabel(t);let r=!1;if(i!==-1){const n=this._lastFilter;if(n&&n.toLowerCase()===s.toLowerCase()){this.__clearInternalValue();return}e.splice(i,1);}else e.push(t),r=!0;this.__updateSelection(e),this.__clearInternalValue(),this.__announceItem(s,r,e.length);}__updateSelection(t){this.selectedItems=t,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}));}__updateTopGroup(t,e,i){t?i||(this._topGroup=[...e]):this._topGroup=[];}__createChip(t){const e=document.createElement("vaadin-multi-select-combo-box-chip");e.setAttribute("slot","chip"),e.item=t,e.disabled=this.disabled,e.readonly=this.readonly;const i=this._getItemLabel(t);return e.label=i,e.setAttribute("title",i),typeof this.itemClassNameGenerator=="function"&&(e.className=this.itemClassNameGenerator(t)),e.addEventListener("item-removed",s=>this._onItemRemoved(s)),e.addEventListener("mousedown",s=>this._preventBlur(s)),e}__getOverflowWidth(){const t=this._overflow;t.style.visibility="hidden",t.removeAttribute("hidden");const e=t.getAttribute("count");t.setAttribute("count","99");const i=getComputedStyle(t),s=t.clientWidth+parseInt(i.marginInlineStart);return t.setAttribute("count",e),t.setAttribute("hidden",""),t.style.visibility="",s}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach(n=>{n.remove();});const t=[...this.selectedItems],e=this._inputField.$.wrapper.clientWidth,i=parseInt(getComputedStyle(this.inputElement).flexBasis);let s=e-i;t.length>1&&(s-=this.__getOverflowWidth());const r=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const n=[];for(let d=t.length-1,h=null;d>=0;d--){const c=this.__createChip(t[d]);this.insertBefore(c,h),h=c,n.unshift(c);}const a=[],l=this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth;if(!this.autoExpandVertically&&l<i){for(;n.length>1;){n.pop().remove(),a.unshift(t.pop());const h=a.length>0?i+this.__getOverflowWidth():i;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=h)break}n.length===1&&(n[0].style.maxWidth=`${Math.max(r,s)}px`);}this._overflowItems=a;return}for(let n=t.length-1,a=null;n>=0;n--){const l=this.__createChip(t[n]);if(this.insertBefore(l,a),!this.autoExpandVertically&&this.$.chips.clientWidth>s)if(a===null)l.style.maxWidth=`${Math.max(r,s)}px`;else {l.remove();break}t.pop(),a=l;}this._overflowItems=t;}__updateOverflowChip(t,e,i,s){if(t){const r=e.length;t.label=`${r}`,t.setAttribute("count",`${r}`),t.setAttribute("title",this._mergeItemLabels(e)),t.toggleAttribute("hidden",r===0),t.disabled=i,t.readonly=s;}}_onClearButtonTouchend(t){t.preventDefault(),t.stopPropagation(),this.clear();}_onClearButtonClick(t){t.stopPropagation(),this.clear();}_onChange(t){t.stopPropagation();}_onEscape(t){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(t.stopPropagation(),this.selectedItems=[]);}_onKeyDown(t){super._onKeyDown(t);const e=this._chips;if(!this.readonly&&e.length>0)switch(t.key){case"Backspace":this._onBackSpace(e);break;case"ArrowLeft":this._onArrowLeft(e,t);break;case"ArrowRight":this._onArrowRight(e,t);break;default:this._focusedChipIndex=-1;break}}_onArrowLeft(t,e){if(this.inputElement.selectionStart!==0)return;const i=this._focusedChipIndex;i!==-1&&e.preventDefault();let s;this.__isRTL?i===t.length-1?s=-1:i>-1&&(s=i+1):i===-1?s=t.length-1:i>0&&(s=i-1),s!==void 0&&(this._focusedChipIndex=s);}_onArrowRight(t,e){if(this.inputElement.selectionStart!==0)return;const i=this._focusedChipIndex;i!==-1&&e.preventDefault();let s;this.__isRTL?i===-1?s=t.length-1:i>0&&(s=i-1):i===t.length-1?s=-1:i>-1&&(s=i+1),s!==void 0&&(this._focusedChipIndex=s);}_onBackSpace(t){if(this.inputElement.selectionStart!==0)return;const e=this._focusedChipIndex;e===-1?this._focusedChipIndex=t.length-1:(this.__removeItem(t[e].item),this._focusedChipIndex=-1);}_focusedChipIndexChanged(t,e){if(t>-1||e>-1){const i=this._chips;if(i.forEach((s,r)=>{s.toggleAttribute("focused",r===t);}),t>-1){const s=i[t].item,r=this._getItemLabel(s);dt(`${r} ${this.i18n.focused}`);}}}_onComboBoxChange(){const t=this.$.comboBox.selectedItem;t&&this.__selectItem(t);}_onComboBoxItemSelected(t){this.__selectItem(t.detail.item);}_onCustomValueSet(t){t.preventDefault(),t.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:t.detail,composed:!0,bubbles:!0}));}_onItemRemoved(t){this.__removeItem(t.detail.item);}_preventBlur(t){t.preventDefault();}}g(Nh);_("vaadin-notification-card",p`
|
|
5398
5398
|
:host {
|
|
5399
5399
|
position: relative;
|
|
5400
5400
|
margin: var(--lumo-space-s);
|
|
@@ -5612,11 +5612,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5612
5612
|
* @license
|
|
5613
5613
|
* Copyright 2020 Google LLC
|
|
5614
5614
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5615
|
-
*/const
|
|
5615
|
+
*/const Lh=(o,t)=>(o==null?void 0:o._$litType$)!==void 0;/**
|
|
5616
5616
|
* @license
|
|
5617
5617
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5618
5618
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5619
|
-
*/class
|
|
5619
|
+
*/class Bh extends pr(x(L(b))){static get template(){return v`
|
|
5620
5620
|
<style>
|
|
5621
5621
|
:host {
|
|
5622
5622
|
position: fixed;
|
|
@@ -5683,7 +5683,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5683
5683
|
<div region="bottom-end"><slot name="bottom-end"></slot></div>
|
|
5684
5684
|
</div>
|
|
5685
5685
|
<div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
|
|
5686
|
-
`}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),
|
|
5686
|
+
`}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),Ji&&(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,s=document.documentElement.clientHeight;i&&s>t?this.style.bottom=`${s-t}px`:this.style.bottom="0";}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault();}}class Fh extends x(b){static get template(){return v`
|
|
5687
5687
|
<style>
|
|
5688
5688
|
:host {
|
|
5689
5689
|
display: block;
|
|
@@ -5712,7 +5712,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5712
5712
|
}
|
|
5713
5713
|
</style>
|
|
5714
5714
|
<vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
|
|
5715
|
-
`}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
|
|
5715
|
+
`}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 Lh(t)?R._createAndShowNotification(i=>{co(t,i);},e):R._createAndShowNotification(i=>{i.innerText=t;},e)}static _createAndShowNotification(t,e){const i=document.createElement(R.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",s=>{s.detail.value||i.remove();}),i}get _container(){return R._container||(R._container=document.createElement("vaadin-notification-container"),document.body.appendChild(R._container)),R._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),Ot(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 s=this._oldRenderer!==t;this._oldRenderer=t,s&&(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)));}}g(Bh);g(Fh);g(R);const Vr=p`
|
|
5716
5716
|
:host {
|
|
5717
5717
|
-webkit-tap-highlight-color: transparent;
|
|
5718
5718
|
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
@@ -5726,11 +5726,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5726
5726
|
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
5727
5727
|
background-color: var(--lumo-contrast-10pct);
|
|
5728
5728
|
}
|
|
5729
|
-
`;_("vaadin-list-box",
|
|
5729
|
+
`;_("vaadin-list-box",Vr,{moduleId:"lumo-list-box"});/**
|
|
5730
5730
|
* @license
|
|
5731
5731
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5732
5732
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5733
|
-
*/_("vaadin-select-item",Dt,{moduleId:"lumo-select-item"});_("vaadin-select-list-box",
|
|
5733
|
+
*/_("vaadin-select-item",Dt,{moduleId:"lumo-select-item"});_("vaadin-select-list-box",Vr,{moduleId:"lumo-select-list-box"});const Vh=p`
|
|
5734
5734
|
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
5735
5735
|
text-align: start;
|
|
5736
5736
|
}
|
|
@@ -5773,7 +5773,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5773
5773
|
--_lumo-selected-item-height: var(--lumo-size-s);
|
|
5774
5774
|
--_lumo-selected-item-padding: 0;
|
|
5775
5775
|
}
|
|
5776
|
-
`;_("vaadin-select",[ne,
|
|
5776
|
+
`;_("vaadin-select",[ne,Vh],{moduleId:"lumo-select"});_("vaadin-select-value-button",p`
|
|
5777
5777
|
:host {
|
|
5778
5778
|
font-family: var(--lumo-font-family);
|
|
5779
5779
|
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
@@ -5792,7 +5792,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5792
5792
|
::slotted(*:hover) {
|
|
5793
5793
|
background-color: transparent;
|
|
5794
5794
|
}
|
|
5795
|
-
`,{moduleId:"lumo-select-value-button"});const
|
|
5795
|
+
`,{moduleId:"lumo-select-value-button"});const Rh=p`
|
|
5796
5796
|
:host {
|
|
5797
5797
|
--_lumo-item-selected-icon-display: block;
|
|
5798
5798
|
}
|
|
@@ -5828,15 +5828,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5828
5828
|
:host([theme~='align-center']) {
|
|
5829
5829
|
text-align: center;
|
|
5830
5830
|
}
|
|
5831
|
-
`;_("vaadin-select-overlay",[
|
|
5831
|
+
`;_("vaadin-select-overlay",[Gi,Rh],{moduleId:"lumo-select-overlay"});/**
|
|
5832
5832
|
* @license
|
|
5833
5833
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5834
5834
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5835
|
-
*/const
|
|
5835
|
+
*/const $h=o=>class extends Ri(re(o)){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());}};/**
|
|
5836
5836
|
* @license
|
|
5837
5837
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5838
5838
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5839
|
-
*/class
|
|
5839
|
+
*/class Hh extends $h(x(z(b))){static get is(){return "vaadin-select-item"}static get template(){return v`
|
|
5840
5840
|
<style>
|
|
5841
5841
|
:host {
|
|
5842
5842
|
display: inline-block;
|
|
@@ -5850,23 +5850,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5850
5850
|
<div part="content">
|
|
5851
5851
|
<slot></slot>
|
|
5852
5852
|
</div>
|
|
5853
|
-
`}ready(){super.ready(),this.setAttribute("role","option");}}g(
|
|
5853
|
+
`}ready(){super.ready(),this.setAttribute("role","option");}}g(Hh);/**
|
|
5854
5854
|
* @license
|
|
5855
5855
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5856
5856
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5857
|
-
*/function
|
|
5857
|
+
*/function Uh(o,t){const{scrollLeft:e}=o;return t!=="rtl"?e:o.scrollWidth-o.clientWidth+e}function jh(o,t,e){t!=="rtl"?o.scrollLeft=e:o.scrollLeft=o.clientWidth-o.scrollWidth+e;}/**
|
|
5858
5858
|
* @license
|
|
5859
5859
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
5860
5860
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5861
|
-
*/const
|
|
5861
|
+
*/const Wh=o=>class extends oe(o){get focused(){return (this._getItems()||[]).find(Ui)}get _vertical(){return !0}focus(){const e=this._getItems();if(Array.isArray(e)){const i=this._getAvailableIndex(e,0,null,s=>!_i(s));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,s=this._getItems()||[],r=s.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=s.length-1),n=this._getAvailableIndex(s,n,a,h=>!_i(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 s=this._getItems();this._focusItem(s[e],i);}_focusItem(e){e&&(e.focus(),e.setAttribute("focus-ring",""));}_getAvailableIndex(e,i,s,r){const n=e.length;let a=i;for(let l=0;typeof a=="number"&&l<n;l+=1,a+=s||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}};/**
|
|
5862
5862
|
* @license
|
|
5863
5863
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5864
5864
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5865
|
-
*/const
|
|
5865
|
+
*/const qh=o=>class extends Wh(o){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,s=>s.tabIndex===0&&!_i(s));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 zi(e,()=>{this._setItems(this._filterItems(Yo(this)));});}_getItems(){return this.items}_enhanceItems(e,i,s,r){if(!r&&e){this.setAttribute("aria-orientation",i||"vertical"),e.forEach(a=>{i?a.setAttribute("orientation",i):a.removeAttribute("orientation");}),this._setFocusable(s<0||!s?0:s);const n=e[s];e.forEach(a=>{a.selected=a===n;}),n&&!n.disabled&&this._scrollToItem(s);}}_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 s;i&&!i.disabled&&(s=this.items.indexOf(i))>=0&&(this.selected=s);}_searchKey(e,i){this._searchReset=M.debounce(this._searchReset,q.after(500),()=>{this._searchBuf="";}),this._searchBuf+=i.toLowerCase(),this.items.some(r=>this.__isMatchingKey(r))||(this._searchBuf=i.toLowerCase());const s=this._searchBuf.length===1?e+1:e;return this._getAvailableIndex(this.items,s,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,s=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(i)&&i.length===1){const r=this._searchKey(s,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(s=>{s.tabIndex=s===i?0:-1;});}_focus(e){this.items.forEach((i,s)=>{i.focused=s===e;}),this._setFocusable(e),this._scrollToItem(e),super._focus(e);}_scrollToItem(e){const i=this.items[e];if(!i)return;const s=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[s[1]]>=r[s[1]]||this._isRTL&&n[s[1]]<=r[s[1]]?l=n[s[1]]-r[s[1]]:(!this._isRTL&&a[s[0]]<=r[s[0]]||this._isRTL&&a[s[0]]>=r[s[0]])&&(l=a[s[0]]-r[s[0]]),this._scroll(l);}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else {const i=this.getAttribute("dir")||"ltr",s=Uh(this._scrollerElement,i)+e;jh(this._scrollerElement,i,s);}}};/**
|
|
5866
5866
|
* @license
|
|
5867
5867
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5868
5868
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5869
|
-
*/class
|
|
5869
|
+
*/class Yh extends qh(x(z(H(b)))){static get is(){return "vaadin-select-list-box"}static get template(){return v`
|
|
5870
5870
|
<style>
|
|
5871
5871
|
:host {
|
|
5872
5872
|
display: flex;
|
|
@@ -5886,15 +5886,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5886
5886
|
<div part="items">
|
|
5887
5887
|
<slot></slot>
|
|
5888
5888
|
</div>
|
|
5889
|
-
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}g(
|
|
5889
|
+
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}g(Yh);/**
|
|
5890
5890
|
* @license
|
|
5891
5891
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5892
5892
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5893
|
-
*/const
|
|
5893
|
+
*/const Kh=o=>class extends Qi(Je(z(o))){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 s="--vaadin-select-overlay-width",r=getComputedStyle(i).getPropertyValue(s);r===""?this.style.removeProperty(s):this.style.setProperty(s,r);}}};/**
|
|
5894
5894
|
* @license
|
|
5895
5895
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5896
5896
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5897
|
-
*/const
|
|
5897
|
+
*/const Gh=p`
|
|
5898
5898
|
:host {
|
|
5899
5899
|
align-items: flex-start;
|
|
5900
5900
|
justify-content: flex-start;
|
|
@@ -5909,18 +5909,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5909
5909
|
outline: 3px solid;
|
|
5910
5910
|
}
|
|
5911
5911
|
}
|
|
5912
|
-
`;_("vaadin-select-overlay",[Xe,
|
|
5912
|
+
`;_("vaadin-select-overlay",[Xe,Gh],{moduleId:"vaadin-select-overlay-styles"});class Xh extends Kh(x(b)){static get is(){return "vaadin-select-overlay"}static get template(){return v`
|
|
5913
5913
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
5914
5914
|
<div part="overlay" id="overlay" tabindex="0">
|
|
5915
5915
|
<div part="content" id="content">
|
|
5916
5916
|
<slot></slot>
|
|
5917
5917
|
</div>
|
|
5918
5918
|
</div>
|
|
5919
|
-
`}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);}}}g(
|
|
5919
|
+
`}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);}}}g(Xh);/**
|
|
5920
5920
|
* @license
|
|
5921
5921
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5922
5922
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5923
|
-
*/const
|
|
5923
|
+
*/const Jh=p`
|
|
5924
5924
|
:host {
|
|
5925
5925
|
display: inline-block;
|
|
5926
5926
|
position: relative;
|
|
@@ -5966,17 +5966,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5966
5966
|
* @license
|
|
5967
5967
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5968
5968
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5969
|
-
*/_("vaadin-select-value-button",
|
|
5969
|
+
*/_("vaadin-select-value-button",Jh,{moduleId:"vaadin-select-value-button-styles"});class Qh extends Zi(x(b)){static get is(){return "vaadin-select-value-button"}static get template(){return v`
|
|
5970
5970
|
<div class="vaadin-button-container">
|
|
5971
5971
|
<span part="label">
|
|
5972
5972
|
<slot></slot>
|
|
5973
5973
|
</span>
|
|
5974
5974
|
</div>
|
|
5975
|
-
`}}g(
|
|
5975
|
+
`}}g(Qh);/**
|
|
5976
5976
|
* @license
|
|
5977
5977
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
5978
5978
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5979
|
-
*/const
|
|
5979
|
+
*/const Zh=p`
|
|
5980
5980
|
.sr-only {
|
|
5981
5981
|
border: 0 !important;
|
|
5982
5982
|
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
@@ -5994,15 +5994,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5994
5994
|
* @license
|
|
5995
5995
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
5996
5996
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5997
|
-
*/class
|
|
5997
|
+
*/class ec extends T{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");}});}}/**
|
|
5998
5998
|
* @license
|
|
5999
5999
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6000
6000
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6001
|
-
*/const
|
|
6001
|
+
*/const tc=o=>class extends Qe(At(ji(oe(It(o))))){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}-${qe()}`,this._srLabelController=new or(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 ec(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new os(this._phoneMediaQuery,e=>{this._phone=e;})),this._tooltipController=new G(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 s=i.composedPath().find(r=>r._hasVaadinItemMixin);this.__dispatchChangePending=!!(s&&s.value!==void 0&&s.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,s=i!==void 0?i:-1,r=this._menuElement._searchKey(s,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,s){if(!(!i||!s)){if(e){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1),i.style.setProperty("--vaadin-select-text-field-width",`${s.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 s=e.getAttribute("label");s?i=this.__createItemElement({label:s}):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 s=(this._items?this._items[this._menuElement.selected]:!1)||this.placeholder?this._itemId:"";return e?`${e} ${s}`.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 s=i||this.placeholder?{newId:this._itemId}:{oldId:this._itemId};pe(e,"aria-labelledby",s),(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()),s=e.childElementCount>0;return i||s}_updateSelectedItem(e,i){if(i){const s=e==null?e:e.toString();this._menuElement.selected=i.reduce((r,n,a)=>r===void 0&&n.value===s?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 s=e.firstElementChild;s||(s=document.createElement("vaadin-select-list-box"),e.appendChild(s)),s.textContent="",this.items.forEach(r=>{s.appendChild(this.__createItemElement(r));});}__dispatchChange(){return Ce(this,null,function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1;})}};/**
|
|
6002
6002
|
* @license
|
|
6003
6003
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6004
6004
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6005
|
-
*/_("vaadin-select",[
|
|
6005
|
+
*/_("vaadin-select",[wr,Er,Zh],{moduleId:"vaadin-select-styles"});class ic extends tc(L(x(b))){static get is(){return "vaadin-select"}static get template(){return v`
|
|
6006
6006
|
<style>
|
|
6007
6007
|
:host {
|
|
6008
6008
|
position: relative;
|
|
@@ -6055,7 +6055,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6055
6055
|
<div class="sr-only">
|
|
6056
6056
|
<slot name="sr-label"></slot>
|
|
6057
6057
|
</div>
|
|
6058
|
-
`}static get observers(){return ["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),Ot(this);}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate());}_onOverlayOpen(){this._menuElement&&this._menuElement.focus();}}g(
|
|
6058
|
+
`}static get observers(){return ["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),Ot(this);}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate());}_onOverlayOpen(){this._menuElement&&this._menuElement.focus();}}g(ic);const Rr=p`
|
|
6059
6059
|
/* Optical centering */
|
|
6060
6060
|
:host::before,
|
|
6061
6061
|
:host::after {
|
|
@@ -6155,7 +6155,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6155
6155
|
transform: scale(1.02);
|
|
6156
6156
|
}
|
|
6157
6157
|
}
|
|
6158
|
-
`;_("vaadin-dialog-overlay",[be,
|
|
6158
|
+
`;_("vaadin-dialog-overlay",[be,Rr],{moduleId:"lumo-dialog"});_("vaadin-confirm-dialog-overlay",[be,Rr,p`
|
|
6159
6159
|
[part='header'] ::slotted(h3) {
|
|
6160
6160
|
margin-top: 0 !important;
|
|
6161
6161
|
margin-bottom: 0 !important;
|
|
@@ -6194,11 +6194,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6194
6194
|
* @license
|
|
6195
6195
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6196
6196
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6197
|
-
*/const
|
|
6197
|
+
*/const sc=o=>class extends o{static get properties(){return {opened:{type:Boolean,value:!1,notify:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},modeless:{type:Boolean,value:!1},overlayRole:{type:String,value:"dialog"}}}ready(){super.ready();const e=this.$.overlay;e.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),e.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),e.addEventListener("vaadin-overlay-closed",this.__handleOverlayClosed.bind(this)),this._overlayElement=e;}__handleOverlayClosed(){this.dispatchEvent(new CustomEvent("closed"));}connectedCallback(){super.connectedCallback(),this.__restoreOpened&&(this.opened=!0);}disconnectedCallback(){super.disconnectedCallback(),setTimeout(()=>{this.isConnected||(this.__restoreOpened=this.opened,this.opened=!1);});}_onOverlayOpened(e){e.detail.value===!1&&(this.opened=!1);}_handleOutsideClick(e){this.noCloseOnOutsideClick&&e.preventDefault();}_handleEscPress(e){this.noCloseOnEsc&&e.preventDefault();}_bringOverlayToFront(){this.modeless&&this._overlayElement.bringToFront();}};/**
|
|
6198
6198
|
* @license
|
|
6199
6199
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6200
6200
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6201
|
-
*/const
|
|
6201
|
+
*/const oc=p`
|
|
6202
6202
|
[part='header'],
|
|
6203
6203
|
[part='header-content'],
|
|
6204
6204
|
[part='footer'] {
|
|
@@ -6373,11 +6373,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6373
6373
|
* @license
|
|
6374
6374
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
6375
6375
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6376
|
-
*/const
|
|
6376
|
+
*/const rc=o=>class extends o{static get properties(){return {ariaLabel:{type:String,value:""},contentHeight:{type:String},contentWidth:{type:String}}}static get observers(){return ["__updateContentHeight(contentHeight, _overlayElement)","__updateContentWidth(contentWidth, _overlayElement)"]}__updateDimension(e,i,s){const r=`--_vaadin-confirm-dialog-content-${i}`;s?e.style.setProperty(r,s):e.style.removeProperty(r);}__updateContentHeight(e,i){i&&this.__updateDimension(i,"height",e);}__updateContentWidth(e,i){i&&this.__updateDimension(i,"width",e);}};/**
|
|
6377
6377
|
* @license
|
|
6378
6378
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
6379
6379
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6380
|
-
*/const
|
|
6380
|
+
*/const nc=p`
|
|
6381
6381
|
:host {
|
|
6382
6382
|
--_vaadin-confirm-dialog-content-width: auto;
|
|
6383
6383
|
--_vaadin-confirm-dialog-content-height: auto;
|
|
@@ -6400,7 +6400,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6400
6400
|
* @license
|
|
6401
6401
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
6402
6402
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6403
|
-
*/_("vaadin-confirm-dialog-overlay",[Xe,
|
|
6403
|
+
*/_("vaadin-confirm-dialog-overlay",[Xe,oc,nc],{moduleId:"vaadin-confirm-dialog-overlay-styles"});class ac extends Je(z(x(b))){static get is(){return "vaadin-confirm-dialog-overlay"}static get template(){return v`
|
|
6404
6404
|
<div part="backdrop" id="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
6405
6405
|
<div part="overlay" id="overlay" tabindex="0">
|
|
6406
6406
|
<section id="resizerContainer" class="resizer-container">
|
|
@@ -6421,7 +6421,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6421
6421
|
</footer>
|
|
6422
6422
|
</section>
|
|
6423
6423
|
</div>
|
|
6424
|
-
`}ready(){super.ready(),this.setAttribute("has-header",""),this.setAttribute("has-footer","");}}g(
|
|
6424
|
+
`}ready(){super.ready(),this.setAttribute("has-header",""),this.setAttribute("has-footer","");}}g(ac);class lc extends rc(sc(Qe(xt(b)))){static get is(){return "vaadin-confirm-dialog-dialog"}static get template(){return v`
|
|
6425
6425
|
<style>
|
|
6426
6426
|
:host {
|
|
6427
6427
|
display: none;
|
|
@@ -6442,15 +6442,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6442
6442
|
restore-focus-on-close
|
|
6443
6443
|
focus-trap
|
|
6444
6444
|
></vaadin-confirm-dialog-overlay>
|
|
6445
|
-
`}}g(
|
|
6445
|
+
`}}g(lc);/**
|
|
6446
6446
|
* @license
|
|
6447
6447
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
6448
6448
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6449
|
-
*/const
|
|
6449
|
+
*/const dc=o=>class extends o{static get properties(){return {accessibleDescriptionRef:{type:String},opened:{type:Boolean,value:!1,notify:!0},header:{type:String,value:""},message:{type:String,value:""},confirmText:{type:String,value:"Confirm"},confirmTheme:{type:String,value:"primary"},noCloseOnEsc:{type:Boolean,value:!1},rejectButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},rejectText:{type:String,value:"Reject"},rejectTheme:{type:String,value:"error tertiary"},cancelButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},cancelText:{type:String,value:"Cancel"},cancelTheme:{type:String,value:"tertiary"},overlayClass:{type:String},_cancelButton:{type:Object},_confirmButton:{type:Object},_headerNode:{type:Object},_messageNodes:{type:Array,value:()=>[]},_overlayElement:{type:Object,sync:!0},_rejectButton:{type:Object},_contentHeight:{type:String},_contentWidth:{type:String}}}static get observers(){return ["__updateConfirmButton(_confirmButton, confirmText, confirmTheme)","__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)","__updateHeaderNode(_headerNode, header)","__updateMessageNodes(_messageNodes, message)","__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)","__accessibleDescriptionRefChanged(_overlayElement, _messageNodes, accessibleDescriptionRef)"]}constructor(){super(),this.__cancel=this.__cancel.bind(this),this.__confirm=this.__confirm.bind(this),this.__reject=this.__reject.bind(this);}get __slottedNodes(){return [this._headerNode,...this._messageNodes,this._cancelButton,this._confirmButton,this._rejectButton]}ready(){super.ready(),this._headerController=new T(this,"header","h3",{initializer:e=>{this._headerNode=e;}}),this.addController(this._headerController),this._messageController=new T(this,"","div",{multiple:!0,observe:!1,initializer:e=>{const i=document.createElement("div");i.style.display="contents";const s=`confirm-dialog-message-${qe()}`;i.id=s,this.appendChild(i),i.appendChild(e),this._messageNodes=[...this._messageNodes,i];}}),this.addController(this._messageController),this._cancelController=new T(this,"cancel-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("cancel",e);}}),this.addController(this._cancelController),this._rejectController=new T(this,"reject-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("reject",e);}}),this.addController(this._rejectController),this._confirmController=new T(this,"confirm-button","vaadin-button",{initializer:e=>{this.__setupSlottedButton("confirm",e);}}),this.addController(this._confirmController);}_initOverlay(e){e.addEventListener("vaadin-overlay-escape-press",this._escPressed.bind(this)),e.addEventListener("vaadin-overlay-open",()=>this.__onDialogOpened()),e.addEventListener("vaadin-overlay-closed",()=>this.__onDialogClosed()),e.setAttribute("role","alertdialog");}__onDialogOpened(){const e=this._overlayElement;this.__slottedNodes.forEach(s=>{e.appendChild(s);});const i=e.querySelector('[slot="confirm-button"]');i&&i.focus();}__onDialogClosed(){this.__slottedNodes.forEach(e=>{this.appendChild(e);}),this.dispatchEvent(new CustomEvent("closed"));}__accessibleDescriptionRefChanged(e,i,s){!e||!i||(s!==void 0?pe(e,"aria-describedby",{newId:s,oldId:this.__oldAccessibleDescriptionRef,fromUser:!0}):i.forEach(r=>{pe(e,"aria-describedby",{newId:r.id});}),this.__oldAccessibleDescriptionRef=s);}__setupSlottedButton(e,i){const s=`_${e}Button`,r=`__${e}`;this[s]&&this[s]!==i&&this[s].remove(),i.addEventListener("click",this[r]),this[s]=i;}__updateCancelButton(e,i,s,r){e&&(e===this._cancelController.defaultNode&&(e.textContent=i,e.setAttribute("theme",s)),e.toggleAttribute("hidden",!r));}__updateConfirmButton(e,i,s){e&&e===this._confirmController.defaultNode&&(e.textContent=i,e.setAttribute("theme",s));}__updateHeaderNode(e,i){e&&e===this._headerController.defaultNode&&(e.textContent=i);}__updateMessageNodes(e,i){if(e&&e.length>0){const s=e.find(r=>this._messageController.defaultNode&&r===this._messageController.defaultNode.parentElement);s&&(s.firstChild.textContent=i);}}__updateRejectButton(e,i,s,r){e&&(e===this._rejectController.defaultNode&&(e.textContent=i,e.setAttribute("theme",s)),e.toggleAttribute("hidden",!r));}_escPressed(e){e.defaultPrevented||this.__cancel();}__confirm(){this.dispatchEvent(new CustomEvent("confirm")),this.opened=!1;}__cancel(){this.dispatchEvent(new CustomEvent("cancel")),this.opened=!1;}__reject(){this.dispatchEvent(new CustomEvent("reject")),this.opened=!1;}_getAriaLabel(e){return e||"confirmation"}};/**
|
|
6450
6450
|
* @license
|
|
6451
6451
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
6452
6452
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6453
|
-
*/class
|
|
6453
|
+
*/class hc extends dc(L(xt(H(b)))){static get template(){return v`
|
|
6454
6454
|
<style>
|
|
6455
6455
|
:host,
|
|
6456
6456
|
[hidden] {
|
|
@@ -6477,7 +6477,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6477
6477
|
<slot name="reject-button"></slot>
|
|
6478
6478
|
<slot name="confirm-button"></slot>
|
|
6479
6479
|
</div>
|
|
6480
|
-
`}static get is(){return "vaadin-confirm-dialog"}ready(){super.ready(),this._overlayElement=this.$.dialog.$.overlay,this._initOverlay(this._overlayElement);}}g(
|
|
6480
|
+
`}static get is(){return "vaadin-confirm-dialog"}ready(){super.ready(),this._overlayElement=this.$.dialog.$.overlay,this._initOverlay(this._overlayElement);}}g(hc);
|
|
6481
6481
|
|
|
6482
6482
|
const userLoginCss = ":host{display:block;font-family:\"Roboto\", sans-serif}section{height:100%;width:100%;background-position:center;background-size:cover}.FormValue{width:100%}.FormBox{height:100%;display:flex;position:relative;background:none;border:none;justify-content:center;align-items:center}.InputBox{position:relative;margin:30px 0;width:100%;border-bottom:2px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.InputBox .PhoneInputBox{display:flex;flex-direction:row}.InputBox .PhoneInputBox .PhoneBox{position:relative;width:100%}.InputBox .PhoneInputBox .PrefixBox{position:relative;width:fit-content}.InputBox .PhoneInputBox .PrefixBox .UneditablePrefix{height:50px;width:100px;padding:0 0 0 5px;align-content:center;background:var(--emw--color-gray-100, #e6e6e6);border-radius:var(--emw--border-radius-medium, 10px)}.InputBox.InputInvalidBox .PasswordVisibilityIcon{fill:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}.InputBox.InputInvalidBox input{color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}.InputBox.InputInvalidBox::after{content:\"\";height:2px;width:100%;transition:width 0.6s linear;background:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}.InputBox::after{content:\"\";display:block;width:0;height:2px;position:relative;top:2px}.InputBox .PasswordVisibilityIcon{fill:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.InputBox .InputIcon .TogglePasswordVisibility{cursor:pointer;position:absolute;top:18px;right:0}.InputBox .InputIcon .TogglePasswordVisibility.PasswordVisible{top:19.5px}.InputBox label{position:absolute;top:50%;left:5px;transform:translateY(-50%);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));font-size:var(--emw--font-size-medium, 16px);pointer-events:none;transition:0.5s}.InputBox label.FieldInvalid{color:#C23135}.InputBox input{width:100%;height:50px;background:transparent;border:none;outline:none;font-size:var(--emw--font-size-medium, 16px);padding:0 35px 0 5px;color:var(--emw--registration-typography, var(--emw--color-typography, #000000));box-sizing:border-box}input:focus~label,label.FieldFilledIn{top:-10px;font-size:var(--emw--font-size-x-small, 16px)}vaadin-combo-box:focus-within~label,label.FieldFilledIn{top:-10px;font-size:var(--emw--font-size-x-small, 16px)}.ForgotPassword button{margin:-10px 0 17px;font-size:var(--emw--font-size-medium, 16px);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));display:flex;justify-content:space-between;background-color:transparent;padding:0;height:unset;border:0;cursor:pointer}.SubmitCredentials{display:block;margin:0 auto;outline:none;cursor:pointer;background:var(--emw--color-primary, #0E5924);border-radius:var(--emw--button-border-radius, 10px);padding:10px 20px;font-size:var(--emw--font-size-large, 20px);font-family:var(--emw--button-typography);color:var(--emw--button-text-color, #FFFFFF)}.SubmitCredentials:disabled{background:var(--emw--color-primary, #0E5924);opacity:0.4;cursor:default}.Register{font-size:var(--emw--font-size-medium, 16px);color:var(--emw--registration-typography, var(--emw--color-typography, #FFFFFF));text-align:center;margin:25px 0 10px}.Register p a{text-decoration:none;font-weight:600}.Register p a:hover{text-decoration:underline}.InvalidField{position:absolute;color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839));font-size:var(--emw--font-size-x-small, 12px)}.SubmitCredentials{margin-bottom:20px}.CredentialsError{color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839));font-size:var(--emw--font-size-x-small, 12px);padding:0 0 20px 0;margin:0}.CredentialsError input{color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}@media screen and (max-width: 480px){.FormBox{width:100%;border-radius:0px}}";
|
|
6483
6483
|
const UserLoginStyle0 = userLoginCss;
|