@everymatrix/general-input 1.56.0 → 1.56.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/checkbox-group-input_10.cjs.entry.js +419 -380
- package/dist/cjs/general-input.cjs.entry.js +18 -17
- package/dist/cjs/general-input.cjs.js +3 -3
- package/dist/cjs/{index-a91d7bcb.js → index-bce82d29.js} +76 -211
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/toggle-checkbox-input.cjs.entry.js +25 -14
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +26 -35
- package/dist/collection/components/checkbox-input/checkbox-input.js +23 -31
- package/dist/collection/components/date-input/date-input.js +26 -37
- package/dist/collection/components/email-input/email-input.js +25 -31
- package/dist/collection/components/general-input/general-input.js +18 -51
- package/dist/collection/components/number-input/number-input.js +24 -29
- package/dist/collection/components/password-input/password-input.js +28 -36
- package/dist/collection/components/radio-input/radio-input.js +23 -26
- package/dist/collection/components/select-input/select-input.js +26 -41
- package/dist/collection/components/tel-input/tel-input.js +26 -33
- package/dist/collection/components/text-input/text-input.js +26 -38
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +29 -35
- package/dist/esm/checkbox-group-input_10.entry.js +419 -380
- package/dist/esm/general-input.entry.js +18 -17
- package/dist/esm/general-input.js +4 -4
- package/dist/esm/{index-3bab966c.js → index-34f25346.js} +76 -211
- package/dist/esm/loader.js +3 -3
- package/dist/esm/toggle-checkbox-input.entry.js +25 -14
- package/dist/general-input/general-input.esm.js +1 -1
- package/dist/general-input/{p-a708ec0e.entry.js → p-063fdb7d.entry.js} +186 -188
- package/dist/general-input/p-261db8d1.entry.js +1 -0
- package/dist/general-input/p-8b2b0da7.js +2 -0
- package/dist/general-input/p-e2eb81ed.entry.js +1 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +1 -0
- package/dist/types/components/checkbox-input/checkbox-input.d.ts +1 -0
- package/dist/types/components/date-input/date-input.d.ts +1 -0
- package/dist/types/components/email-input/email-input.d.ts +1 -0
- package/dist/types/components/number-input/number-input.d.ts +1 -0
- package/dist/types/components/password-input/password-input.d.ts +1 -0
- package/dist/types/components/radio-input/radio-input.d.ts +1 -0
- package/dist/types/components/select-input/select-input.d.ts +1 -0
- package/dist/types/components/tel-input/tel-input.d.ts +1 -0
- package/dist/types/components/text-input/text-input.d.ts +1 -0
- package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/general-input/p-5ab8d194.js +0 -2
- package/dist/general-input/p-8ce07665.entry.js +0 -1
- package/dist/general-input/p-9ad71153.entry.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as r}from"./p-
|
|
1
|
+
import{r as t,c as e,h as i,g as r}from"./p-8b2b0da7.js";import{t as s}from"./p-6ca41a3b.js";import{t as o}from"./p-2dccd0bf.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5
5
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6
|
-
*/
|
|
6
|
+
*/function n(t,e="24.5.10"){Object.defineProperty(t,"version",{get:()=>e});const i=customElements.get(t.is);if(i){const e=i.version;e&&t.version&&e===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${i.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10
10
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11
|
-
*/class
|
|
11
|
+
*/class a extends HTMLElement{static get is(){return"vaadin-lumo-styles"}}n(a);
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2019 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
const
|
|
17
|
+
const l=globalThis,h=l.ShadowRoot&&(void 0===l.ShadyCSS||l.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),d=new WeakMap;class u{constructor(t,e,i){if(this._$cssResult$=!0,i!==c)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(h&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=d.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&d.set(e,t))}return t}toString(){return this.cssText}}const p=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return new u(i,t,c)},m=(t,e)=>{if(h)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),r=l.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}},f=h?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new u("string"==typeof t?t:t+"",void 0,c))(e)})(t):t
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/,{is:
|
|
22
|
+
*/,{is:v,defineProperty:b,getOwnPropertyDescriptor:g,getOwnPropertyNames:y,getOwnPropertySymbols:w,getPrototypeOf:_}=Object,x=globalThis,k=x.trustedTypes,C=k?k.emptyScript:"",A=x.reactiveElementPolyfillSupport,S={toAttribute(t,e){switch(e){case Boolean:t=t?C:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},D=(t,e)=>!v(t,e),T={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:D};Symbol.metadata??=Symbol("metadata"),x.litPropertyMetadata??=new WeakMap;class E extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=T){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);void 0!==r&&b(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:s}=g(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const o=r?.call(this);s.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??T}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=_(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...y(t),...w(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(f(t))}else void 0!==t&&e.push(f(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return m(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==i.converter?.toAttribute?i.converter:S).toAttribute(e,i.type);this._$Em=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(t,e){const i=this.constructor,r=i._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=i.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:S;this._$Em=r,this[r]=s.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??D)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}E.elementStyles=[],E.shadowRootOptions={mode:"open"},E.elementProperties=new Map,E.finalized=new Map,A?.({ReactiveElement:E}),(x.reactiveElementVersions??=[]).push("2.0.4");
|
|
23
23
|
/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
27
|
*/
|
|
28
|
-
const
|
|
28
|
+
const z=globalThis,I=z.trustedTypes,M=I?I.createPolicy("lit-html",{createHTML:t=>t}):void 0,P="$lit$",F=`lit$${Math.random().toFixed(9).slice(2)}$`,O="?"+F,N=`<${O}>`,B=document,q=()=>B.createComment(""),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,j="[ \t\n\f\r]",V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,R=/-->/g,H=/>/g,W=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,U=/"/g,G=/^(?:script|style|textarea|title)$/i,Q=Symbol.for("lit-noChange"),J=Symbol.for("lit-nothing"),K=new WeakMap,X=B.createTreeWalker(B,129);function Z(t,e){if(!$(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==M?M.createHTML(e):e}const tt=(t,e)=>{const i=t.length-1,r=[];let s,o=2===e?"<svg>":3===e?"<math>":"",n=V;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===V?"!--"===l[1]?n=R:void 0!==l[1]?n=H:void 0!==l[2]?(G.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=W):void 0!==l[3]&&(n=W):n===W?">"===l[0]?(n=s??V,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?W:'"'===l[3]?U:Y):n===U||n===Y?n=W:n===R||n===H?n=V:(n=W,s=void 0);const d=n===W&&t[e+1].startsWith("/>")?" ":"";o+=n===V?i+N:h>=0?(r.push(a),i.slice(0,h)+P+i.slice(h)+F+d):i+F+(-2===h?e:d)}return[Z(t,o+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class et{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let s=0,o=0;const n=t.length-1,a=this.parts,[l,h]=tt(t,e);if(this.el=et.createElement(l,i),X.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=X.nextNode())&&a.length<n;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(P)){const e=h[o++],i=r.getAttribute(t).split(F),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:n[2],strings:i,ctor:"."===n[1]?nt:"?"===n[1]?at:"@"===n[1]?lt:ot}),r.removeAttribute(t)}else t.startsWith(F)&&(a.push({type:6,index:s}),r.removeAttribute(t));if(G.test(r.tagName)){const t=r.textContent.split(F),e=t.length-1;if(e>0){r.textContent=I?I.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],q()),X.nextNode(),a.push({type:2,index:++s});r.append(t[e],q())}}}else if(8===r.nodeType)if(r.data===O)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=r.data.indexOf(F,t+1));)a.push({type:7,index:s}),t+=F.length-1}s++}}static createElement(t,e){const i=B.createElement("template");return i.innerHTML=t,i}}function it(t,e,i=t,r){if(e===Q)return e;let s=void 0!==r?i._$Co?.[r]:i._$Cl;const o=L(e)?void 0:e._$litDirective$;return s?.constructor!==o&&(s?._$AO?.(!1),void 0===o?s=void 0:(s=new o(t),s._$AT(t,i,r)),void 0!==r?(i._$Co??=[])[r]=s:i._$Cl=s),void 0!==s&&(e=it(t,s._$AS(t,e.values),s,r)),e}class rt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=(t?.creationScope??B).importNode(e,!0);X.currentNode=r;let s=X.nextNode(),o=0,n=0,a=i[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new st(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new ht(s,this,t)),this._$AV.push(e),a=i[++n]}o!==a?.index&&(s=X.nextNode(),o++)}return X.currentNode=B,r}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class st{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=J,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=it(this,t,e),L(t)?t===J||null==t||""===t?(this._$AH!==J&&this._$AR(),this._$AH=J):t!==this._$AH&&t!==Q&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>$(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==J&&L(this._$AH)?this._$AA.nextSibling.data=t:this.T(B.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=et.createElement(Z(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new rt(r,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new et(t)),e}k(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const s of t)r===e.length?e.push(i=new st(this.O(q()),this.O(q()),this,this.options)):i=e[r],i._$AI(s),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ot{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,s){this.type=1,this._$AH=J,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=J}_$AI(t,e=this,i,r){const s=this.strings;let o=!1;if(void 0===s)t=it(this,t,e,0),o=!L(t)||t!==this._$AH&&t!==Q,o&&(this._$AH=t);else{const r=t;let n,a;for(t=s[0],n=0;n<s.length-1;n++)a=it(this,r[i+n],e,n),a===Q&&(a=this._$AH[n]),o||=!L(a)||a!==this._$AH[n],a===J?t=J:t!==J&&(t+=(a??"")+s[n+1]),this._$AH[n]=a}o&&!r&&this.j(t)}j(t){t===J?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class nt extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===J?void 0:t}}class at extends ot{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==J)}}class lt extends ot{constructor(t,e,i,r,s){super(t,e,i,r,s),this.type=5}_$AI(t,e=this){if((t=it(this,t,e,0)??J)===Q)return;const i=this._$AH,r=t===J&&i!==J||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,s=t!==J&&(i===J||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ht{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){it(this,t)}}const ct=z.litHtmlPolyfillSupport;ct?.(et,st),(z.litHtmlVersions??=[]).push("3.2.1");
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
33
|
*/
|
|
34
|
-
class
|
|
34
|
+
class dt extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const r=i?.renderBefore??e;let s=r._$litPart$;if(void 0===s){const t=i?.renderBefore??null;r._$litPart$=s=new st(e.insertBefore(q(),t),t,void 0,i??{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Q}}dt._$litElement$=!0,dt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:dt});const ut=globalThis.litElementPolyfillSupport;ut?.({LitElement:dt}),(globalThis.litElementVersions??=[]).push("4.1.1");
|
|
35
35
|
/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
38
38
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
39
39
|
*/
|
|
40
|
-
const
|
|
40
|
+
const pt=t=>class extends t{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"theme"===t&&this._set_theme(i)}}
|
|
41
41
|
/**
|
|
42
42
|
* @license
|
|
43
43
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
44
44
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
45
|
-
*/,
|
|
45
|
+
*/,mt=[],ft=new Set,vt=new Set;function bt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function gt(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function yt(t){return t.map((t=>t.cssText)).join("\n")}const wt="vaadin-themable-mixin-style";function _t(t){t.prototype instanceof dt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(wt).textContent=yt(t.getStylesForThis()),vt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&_t(i)}))}function xt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof u||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):mt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&vt.forEach((i=>{if(gt(t,i)&&function(t){return bt(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),_t(t),function(t){ft.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof dt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),m(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(wt).textContent=e.prototype._template.content.getElementById(wt).textContent}(i):i||ft.delete(e)}))}(t)}}))}function kt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():mt}function Ct(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function At(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=kt().find((e=>e.moduleId===t));i?e.push(...At(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function St(t){const e=`${t}-default-theme`,i=kt().filter((i=>i.moduleId!==e&>(i.themeFor,t))).map((t=>({...t,styles:[...At(t),...t.styles],includePriority:Ct(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:kt().filter((t=>t.moduleId===e))}const Dt=t=>class extends(pt(t)){constructor(){super(),ft.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&vt.add(this.is),this.elementStyles)return;const t=this.prototype._template;t&&!bt(this)&&function(t,e){const i=document.createElement("style");i.id=wt,i.textContent=yt(t),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...[t].flat(1/0),...e]:e}static getStylesForThis(){const e=t.__themes||[],i=Object.getPrototypeOf(this.prototype);this.__themes=[...e,...(i?i.constructor.__themes:[])||[],...St(this.is)];const r=this.__themes.flatMap((t=>t.styles));return r.filter(((t,e)=>e===r.lastIndexOf(t)))}}
|
|
46
46
|
/**
|
|
47
47
|
* @license
|
|
48
48
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
49
49
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
50
|
-
*/,Tt=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};Tt("color-props",
|
|
50
|
+
*/,Tt=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};Tt("color-props",p`
|
|
51
51
|
:host {
|
|
52
52
|
/* Base (background) */
|
|
53
53
|
--lumo-base-color: #fff;
|
|
@@ -132,7 +132,7 @@ const mt=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
132
132
|
--lumo-disabled-text-color: GrayText;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
`),
|
|
135
|
+
`),xt("",p`
|
|
136
136
|
[theme~='dark'] {
|
|
137
137
|
/* Base (background) */
|
|
138
138
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -250,10 +250,10 @@ const mt=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
250
250
|
pre code {
|
|
251
251
|
background: transparent;
|
|
252
252
|
}
|
|
253
|
-
`,{moduleId:"lumo-color"}),Tt("font-icons",
|
|
253
|
+
`,{moduleId:"lumo-color"}),Tt("font-icons",p`
|
|
254
254
|
@font-face {
|
|
255
255
|
font-family: 'lumo-icons';
|
|
256
|
-
src: url(data:application/font-woff;charset=utf-8;base64,
|
|
256
|
+
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==)
|
|
257
257
|
format('woff');
|
|
258
258
|
font-weight: normal;
|
|
259
259
|
font-style: normal;
|
|
@@ -283,29 +283,27 @@ const mt=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
283
283
|
--lumo-icons-cog: '\\ea15';
|
|
284
284
|
--lumo-icons-cross: '\\ea16';
|
|
285
285
|
--lumo-icons-download: '\\ea17';
|
|
286
|
-
--lumo-icons-
|
|
287
|
-
--lumo-icons-
|
|
288
|
-
--lumo-icons-
|
|
289
|
-
--lumo-icons-
|
|
290
|
-
--lumo-icons-eye: '\\ea1c';
|
|
291
|
-
--lumo-icons-
|
|
292
|
-
--lumo-icons-
|
|
293
|
-
--lumo-icons-
|
|
294
|
-
--lumo-icons-
|
|
295
|
-
--lumo-icons-
|
|
296
|
-
--lumo-icons-
|
|
297
|
-
--lumo-icons-
|
|
298
|
-
--lumo-icons-
|
|
299
|
-
--lumo-icons-
|
|
300
|
-
--lumo-icons-
|
|
301
|
-
--lumo-icons-
|
|
302
|
-
--lumo-icons-
|
|
303
|
-
--lumo-icons-
|
|
304
|
-
--lumo-icons-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}
|
|
308
|
-
`),Tt("sizing-props",m`
|
|
286
|
+
--lumo-icons-dropdown: '\\ea18';
|
|
287
|
+
--lumo-icons-edit: '\\ea19';
|
|
288
|
+
--lumo-icons-error: '\\ea1a';
|
|
289
|
+
--lumo-icons-eye: '\\ea1b';
|
|
290
|
+
--lumo-icons-eye-disabled: '\\ea1c';
|
|
291
|
+
--lumo-icons-menu: '\\ea1d';
|
|
292
|
+
--lumo-icons-minus: '\\ea1e';
|
|
293
|
+
--lumo-icons-ordered-list: '\\ea1f';
|
|
294
|
+
--lumo-icons-phone: '\\ea20';
|
|
295
|
+
--lumo-icons-photo: '\\ea21';
|
|
296
|
+
--lumo-icons-play: '\\ea22';
|
|
297
|
+
--lumo-icons-plus: '\\ea23';
|
|
298
|
+
--lumo-icons-redo: '\\ea24';
|
|
299
|
+
--lumo-icons-reload: '\\ea25';
|
|
300
|
+
--lumo-icons-search: '\\ea26';
|
|
301
|
+
--lumo-icons-undo: '\\ea27';
|
|
302
|
+
--lumo-icons-unordered-list: '\\ea28';
|
|
303
|
+
--lumo-icons-upload: '\\ea29';
|
|
304
|
+
--lumo-icons-user: '\\ea2a';
|
|
305
|
+
}
|
|
306
|
+
`),Tt("sizing-props",p`
|
|
309
307
|
:host {
|
|
310
308
|
--lumo-size-xs: 1.625rem;
|
|
311
309
|
--lumo-size-s: 1.875rem;
|
|
@@ -320,7 +318,7 @@ const mt=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
320
318
|
/* For backwards compatibility */
|
|
321
319
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
322
320
|
}
|
|
323
|
-
`),Tt("spacing-props",
|
|
321
|
+
`),Tt("spacing-props",p`
|
|
324
322
|
:host {
|
|
325
323
|
/* Square */
|
|
326
324
|
--lumo-space-xs: 0.25rem;
|
|
@@ -343,7 +341,7 @@ const mt=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
343
341
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
344
342
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
345
343
|
}
|
|
346
|
-
`),
|
|
344
|
+
`),p`
|
|
347
345
|
html {
|
|
348
346
|
/* Button */
|
|
349
347
|
--vaadin-button-background: var(--lumo-contrast-5pct);
|
|
@@ -426,7 +424,7 @@ const mt=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
426
424
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
427
425
|
--vaadin-input-field-value-font-weight: 500;
|
|
428
426
|
}
|
|
429
|
-
`,Tt("style-props",
|
|
427
|
+
`,Tt("style-props",p`
|
|
430
428
|
:host {
|
|
431
429
|
/* Border radius */
|
|
432
430
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -449,7 +447,7 @@ const mt=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
449
447
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
450
448
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
451
449
|
*/
|
|
452
|
-
const
|
|
450
|
+
const Et=p`
|
|
453
451
|
:host {
|
|
454
452
|
/* prettier-ignore */
|
|
455
453
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -469,7 +467,7 @@ const zt=m`
|
|
|
469
467
|
--lumo-line-height-s: 1.375;
|
|
470
468
|
--lumo-line-height-m: 1.625;
|
|
471
469
|
}
|
|
472
|
-
`;
|
|
470
|
+
`;xt("",p`
|
|
473
471
|
body,
|
|
474
472
|
:host {
|
|
475
473
|
font-family: var(--lumo-font-family);
|
|
@@ -561,7 +559,7 @@ const zt=m`
|
|
|
561
559
|
border-left: none;
|
|
562
560
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
563
561
|
}
|
|
564
|
-
`,{moduleId:"lumo-typography"}),Tt("typography-props",
|
|
562
|
+
`,{moduleId:"lumo-typography"}),Tt("typography-props",Et),xt("vaadin-checkbox",p`
|
|
565
563
|
:host {
|
|
566
564
|
color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
|
|
567
565
|
font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
|
|
@@ -885,7 +883,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
885
883
|
Code distributed by Google as part of the polymer project is also
|
|
886
884
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
887
885
|
*/
|
|
888
|
-
let It,Mt
|
|
886
|
+
let zt,It,Mt=/(url\()([^)]*)(\))/g,Pt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Ft(t,e){if(t&&Pt.test(t))return t;if("//"===t)return t;if(void 0===zt){zt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",zt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),zt)try{return new URL(t,e).href}catch(e){return t}return It||(It=document.implementation.createHTMLDocument("temp"),It.base=It.createElement("base"),It.head.appendChild(It.base),It.anchor=It.createElement("a"),It.body.appendChild(It.anchor)),It.base.href=e,It.anchor.href=t,It.anchor.href||t}function Ot(t,e){return t.replace(Mt,(function(t,i,r,s){return i+"'"+Ft(r.replace(/["']/g,""),e)+"'"+s}))}function Nt(t){return t.substring(0,t.lastIndexOf("/")+1)}
|
|
889
887
|
/**
|
|
890
888
|
@license
|
|
891
889
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -894,7 +892,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
894
892
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
895
893
|
Code distributed by Google as part of the polymer project is also
|
|
896
894
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
897
|
-
*/const
|
|
895
|
+
*/const Bt=!window.ShadyDOM||!window.ShadyDOM.inUse,qt=Bt&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let Lt=window.Polymer&&window.Polymer.rootPath||Nt(document.baseURI||window.location.href),$t=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,jt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Vt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Rt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Ht=window.Polymer&&window.Polymer.legacyWarnings||!1,Wt=window.Polymer&&window.Polymer.syncInitialRender||!1,Yt=window.Polymer&&window.Polymer.legacyUndefined||!1,Ut=window.Polymer&&window.Polymer.orderedComputed||!1,Gt=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Qt=window.Polymer&&window.Polymer.fastDomIf||!1,Jt=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Kt=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,Xt=0;const Zt=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=Xt++;return function(r){let s=r.__mixinSet;if(s&&s[i])return r;let o=e,n=o.get(r);if(!n){n=t(r),o.set(r,n);let e=Object.create(n.__mixinSet||s||null);e[i]=!0,n.__mixinSet=e}return n}};
|
|
898
896
|
/**
|
|
899
897
|
@license
|
|
900
898
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -903,7 +901,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
903
901
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
904
902
|
Code distributed by Google as part of the polymer project is also
|
|
905
903
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
906
|
-
*/let
|
|
904
|
+
*/let te={},ee={};function ie(t,e){te[t]=ee[t.toLowerCase()]=e}function re(t){return te[t]||ee[t.toLowerCase()]}class se extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=re(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,r){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Ft(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Nt(e)}return this.__assetpath}register(t){if(t=t||this.id){if(jt&&void 0!==re(t))throw ie(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,ie(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}se.prototype.modules=te,customElements.define("dom-module",se);
|
|
907
905
|
/**
|
|
908
906
|
@license
|
|
909
907
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -913,7 +911,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
913
911
|
Code distributed by Google as part of the polymer project is also
|
|
914
912
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
915
913
|
*/
|
|
916
|
-
const
|
|
914
|
+
const oe="link[rel=import][type~=css]",ne="include",ae="shady-unscoped";function le(t){return se.import(t)}function he(t){const e=Ot((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function ce(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...de(e[t]));return i}function de(t){const e=le(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...pe(e));const i=e.querySelector("template");i&&t.push(...ue(i,e.assetpath)),e._styles=t}return e._styles}function ue(t,e){if(!t._styles){const i=[],r=t.content.querySelectorAll("style");for(let t=0;t<r.length;t++){let s=r[t],o=s.getAttribute(ne);o&&i.push(...ce(o).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(s.textContent=Ot(s.textContent,e)),i.push(s)}t._styles=i}return t._styles}function pe(t){const e=[],i=t.querySelectorAll(oe);for(let t=0;t<i.length;t++){let r=i[t];if(r.import){const t=r.import,i=r.hasAttribute(ae);if(i&&!t._unscopedStyle){const e=he(t);e.setAttribute(ae,""),t._unscopedStyle=e}else t._style||(t._style=he(t));e.push(i?t._unscopedStyle:t._style)}}return e}
|
|
917
915
|
/**
|
|
918
916
|
@license
|
|
919
917
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -922,7 +920,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
922
920
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
923
921
|
Code distributed by Google as part of the polymer project is also
|
|
924
922
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
925
|
-
*/const
|
|
923
|
+
*/const me=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
|
|
926
924
|
/**
|
|
927
925
|
@license
|
|
928
926
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -931,7 +929,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
931
929
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
932
930
|
Code distributed by Google as part of the polymer project is also
|
|
933
931
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
934
|
-
*/function
|
|
932
|
+
*/function fe(t){return t.indexOf(".")>=0}function ve(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function be(t,e){return 0===t.indexOf(e+".")}function ge(t,e){return 0===e.indexOf(t+".")}function ye(t,e,i){return e+i.slice(t.length)}function we(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let r=t[i].toString().split(".");for(let t=0;t<r.length;t++)e.push(r[t])}return e.join(".")}return t}function _e(t){return Array.isArray(t)?we(t).split("."):t.toString().split(".")}function xe(t,e,i){let r=t,s=_e(e);for(let t=0;t<s.length;t++){if(!r)return;r=r[s[t]]}return i&&(i.path=s.join(".")),r}function ke(t,e,i){let r=t,s=_e(e),o=s[s.length-1];if(s.length>1){for(let t=0;t<s.length-1;t++)if(r=r[s[t]],!r)return;r[o]=i}else r[e]=i;return s.join(".")}
|
|
935
933
|
/**
|
|
936
934
|
@license
|
|
937
935
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -940,7 +938,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
940
938
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
941
939
|
Code distributed by Google as part of the polymer project is also
|
|
942
940
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
943
|
-
*/const
|
|
941
|
+
*/const Ce={},Ae=/-[a-z]/g,Se=/([A-Z])/g;function De(t){return Ce[t]||(Ce[t]=t.indexOf("-")<0?t:t.replace(Ae,(t=>t[1].toUpperCase())))}function Te(t){return Ce[t]||(Ce[t]=t.replace(Se,"-$1").toLowerCase())}
|
|
944
942
|
/**
|
|
945
943
|
@license
|
|
946
944
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -949,7 +947,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
949
947
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
950
948
|
Code distributed by Google as part of the polymer project is also
|
|
951
949
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
952
|
-
*/let
|
|
950
|
+
*/let Ee=0,ze=0,Ie=[],Me=0,Pe=!1,Fe=document.createTextNode("");new window.MutationObserver((function(){Pe=!1;const t=Ie.length;for(let e=0;e<t;e++){let t=Ie[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Ie.splice(0,t),ze+=t})).observe(Fe,{characterData:!0});const Oe={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Ne={run:t=>(Pe||(Pe=!0,Fe.textContent=Me++),Ie.push(t),Ee++),cancel(t){const e=t-ze;if(e>=0){if(!Ie[e])throw new Error("invalid async handle: "+t);Ie[e]=null}}},Be=Ne,qe=Zt((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let r=this.__data[t],s=this._shouldPropertyChange(t,e,r);return s&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=r),this.__data[t]=e,this.__dataPending[t]=e),s}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Be.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,r){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,r)}_attributeToProperty(t,e,i){if(!this.__serializing){const r=this.__dataAttributes,s=r&&r[t]||t;this[s]=this._deserializeValue(e,i||this.constructor.typeForProperty(s))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const r=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=me(t)),void 0===r?t.removeAttribute(i):t.setAttribute(i,""===r&&window.trustedTypes?window.trustedTypes.emptyScript:r)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Le={};let $e=HTMLElement.prototype;for(;$e;){let t=Object.getOwnPropertyNames($e);for(let e=0;e<t.length;e++)Le[t[e]]=!0;$e=Object.getPrototypeOf($e)}const je=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,Ve=Zt((t=>{const e=qe(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(De(t[e]))}static attributeNameForProperty(t){return Te(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(je(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!Le[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),Re={"dom-if":!0,"dom-repeat":!0};let He=!1,We=!1;const Ye=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,r)=>{const s=i.getAttribute(r);t&&r.startsWith("on-")?e.setAttribute(r,t.createScript(s,r)):e.setAttribute(r,s)}})();function Ue(t){let e=t.getAttribute("is");if(e&&Re[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];Ye(t,i,e),i.removeAttribute(e)}}return t}function Ge(t,e){let i=e.parentInfo&&Ge(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,r=0;t;t=t.nextSibling)if(e.parentIndex===r++)return t}function Qe(t,e,i,r){r.id&&(e[r.id]=i)}function Je(t,e,i){if(i.events&&i.events.length)for(let r,s=0,o=i.events;s<o.length&&(r=o[s]);s++)t._addMethodEventListenerToNode(e,r.name,r.value,t)}function Ke(t,e,i,r){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=r)}const Xe=Zt((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let r=!1,s=t;return"template"!=s.localName||s.hasAttribute("preserve-content")?"slot"===s.localName&&(e.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(s,e,i)||r,function(t){(function(){if(!He){He=!0;const t=document.createElement("textarea");t.placeholder="a",We=t.placeholder===t.textContent}return We})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(s),s.firstChild&&this._parseTemplateChildNodes(s,e,i),s.hasAttributes&&s.hasAttributes()&&(r=this._parseTemplateNodeAttributes(s,e,i)||r),r||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let r,s=t.firstChild,o=0;s;s=r){if("template"==s.localName&&(s=Ue(s)),r=s.nextSibling,s.nodeType===Node.TEXT_NODE){let i=r;for(;i&&i.nodeType===Node.TEXT_NODE;)s.textContent+=i.textContent,r=i.nextSibling,t.removeChild(i),i=r;if(e.stripWhiteSpace&&!s.textContent.trim()){t.removeChild(s);continue}}let n={parentIndex:o,parentInfo:i};this._parseTemplateNode(s,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),s.parentNode&&o++}}static _parseTemplateNestedTemplate(t,e,i){let r=t,s=this._parseTemplate(r,e);return(s.content=r.content.ownerDocument.createDocumentFragment()).appendChild(r.content),i.templateInfo=s,!0}static _parseTemplateNodeAttributes(t,e,i){let r=!1,s=Array.from(t.attributes);for(let o,n=s.length-1;o=s[n];n--)r=this._parseTemplateNodeAttribute(t,e,i,o.name,o.value)||r;return r}static _parseTemplateNodeAttribute(t,e,i,r,s){return"on-"===r.slice(0,3)?(t.removeAttribute(r),i.events=i.events||[],i.events.push({name:r.slice(3),value:s}),!0):"id"===r&&(i.id=s,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,r=document.importNode(e.content||t.content,!0);r.__noInsertionPoint=!e.hasInsertionPoint;let s=r.nodeList=new Array(i.length);r.$={};for(let t,o=0,n=i.length;o<n&&(t=i[o]);o++){let i=s[o]=Ge(r,t);Qe(0,r.$,i,t),Ke(0,i,t,e),Je(this,i,t)}return r}_addMethodEventListenerToNode(t,e,i,r){let s=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(r=r||t,0,i);return this._addEventListenerToNode(t,e,s),s}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
|
|
953
951
|
/**
|
|
954
952
|
* @fileoverview
|
|
955
953
|
* @suppress {checkPrototypalTypes}
|
|
@@ -960,7 +958,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
960
958
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
961
959
|
* Google as part of the polymer project is also subject to an additional IP
|
|
962
960
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
963
|
-
*/let ti=0;const ei=[],ii={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ri="__computeInfo",si=/[A-Z]/;function oi(t,e,i){let r=t[e];if(r){if(!t.hasOwnProperty(e)&&(r=t[e]=Object.create(t[e]),i))for(let t in r){let e=r[t],i=r[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else r=t[e]={};return r}function ni(t,e,i,r,s,o){if(e){let n=!1;const a=ti++;for(let l in i){let h=e[s?be(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===a||s&&!li(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,r,e.info,s,o),n=!0)}return n}return!1}function ai(t,e,i,r,s,o,n,a){let l=!1,h=e[n?be(r):r];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===i||n&&!li(r,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,r,s,o,e.info,n,a),l=!0);return l}function li(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!ge(i,t))||!(!e.wildcard||!ye(i,t))}return!0}function hi(t,e,i,r,s){let o="string"==typeof s.method?t[s.method]:s.method,n=s.property;o?o.call(t,t.__data[n],r[n]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function ci(t,e,i){let r=be(e);return r!==e&&(di(t,Te(r)+"-changed",i[e],e),!0)}function di(t,e,i,r){let s={value:i,queueProperty:!0};r&&(s.path=r),fe(t).dispatchEvent(new CustomEvent(e,{detail:s}))}function ui(t,e,i,r,s,o){let n=(o?be(e):e)!=e?e:null,a=n?ke(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),di(t,s.eventName,a,n)}function pi(t,e,i,r,s){let o=t.__data[e];qt&&(o=qt(o,s.attrName,"attribute",t)),t._propertyToAttribute(e,s.attrName,o)}const mi=(t,e,i)=>{let r=0,s=e.length-1,o=-1;for(;r<=s;){const n=r+s>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)r=n+1;else{if(!(a>0)){o=n;break}s=n-1}}o<0&&(o=s+1),e.splice(o,0,t)},fi=(t,e,i,r,s)=>{const o=e[s?be(t):t];if(o)for(let e=0;e<o.length;e++){const n=o[e];n.info.lastRun===ti||s&&!li(t,n.trigger)||(n.info.lastRun=ti,mi(n.info,i,r))}};function vi(t,e,i,r,s){let o=ki(t,e,i,0,s);if(o===ei)return!1;let n=s.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,o,!0):(t[n]=o,!1)}function bi(t,e,i,r,s,o,n){i.bindings=i.bindings||[];let a={kind:r,target:s,parts:o,literal:n,isCompound:1!==o.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Te(s)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let r=a.parts[i];r.compoundIndex=i,gi(t,e,a,r,l)}}function gi(t,e,i,r,s){if(!r.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let o=r.dependencies,n={index:s,binding:i,part:r,evaluator:t};for(let i=0;i<o.length;i++){let r=o[i];"string"==typeof r&&(r=zi(r),r.wildcard=!0),t._addTemplatePropertyEffect(e,r.rootProperty,{fn:yi,info:n,trigger:r})}}}function yi(t,e,i,r,s,o,n){let a=n[s.index],l=s.binding,h=s.part;if(o&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let r=i[e];e=we(h.source,l.target,e),a._setPendingPropertyOrPath(e,r,!1,!0)&&t._enqueueClient(a)}else{let n=s.evaluator._evaluateBinding(t,h,e,i,r,o);n!==ei&&function(t,e,i,r,s){if(s=function(t,e,i,r){if(i.isCompound){let s=t.__dataCompoundStorage[i.target];s[r.compoundIndex]=e,e=s.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,s,i,r),qt&&(s=qt(s,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,s,i.target);else{let r=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?e[ii.READ_ONLY]&&e[ii.READ_ONLY][r]||e._setPendingProperty(r,s)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,r,s)}}(t,a,l,h,n)}}function wi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),r=e.parts,s=new Array(r.length);for(let t=0;t<r.length;t++)s[t]=r[t].literal;let o=e.target;i[o]=s,e.literal&&"property"==e.kind&&("className"===o&&(t=fe(t)),t[o]=e.literal)}}function _i(t,e,i){if(i.listenerEvent){let r=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,r,s){let o,n=t.detail,a=n&&n.path;a?(r=we(i,r,a),o=n&&n.value):o=t.currentTarget[i],o=s?!o:o,e[ii.READ_ONLY]&&e[ii.READ_ONLY][r]||!e._setPendingPropertyOrPath(r,o,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,r.source,r.negate)}))}}function xi(t,e,i,r,s,o){let n={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:o=e.static||o&&("object"!=typeof o||o[e.methodName])};for(let s,o=0;o<e.args.length&&(s=e.args[o]);o++)s.literal||t._addPropertyEffect(s.rootProperty,i,{fn:r,info:n,trigger:s});return o&&t._addPropertyEffect(e.methodName,i,{fn:r,info:n}),n}function ki(t,e,i,r,s){let o=t._methodHost||t,n=o[s.methodName];if(n){let r=t._marshalArgs(s.args,e,i);return r===ei?ei:n.apply(o,r)}s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const Ci=[],Ai="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Si="(?:("+Ai+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Di=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Ai+"\\s*(?:\\(\\s*(?:(?:"+Si+"(?:,\\s*"+Si+")*)?)\\)\\s*)?)(?:]]|}})","g");function Ei(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Ti(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Ci};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=zi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function zi(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},r=e[0];switch("-"===r&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=be(e),i.structured=ve(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Ii(t,e,i){let r=ke(t,i);return void 0===r&&(r=e[i]),r}function Mi(t,e,i,r){const s={indexSplices:r};Gt&&!t._overrideLegacyUndefined&&(e.splices=s),t.notifyPath(i+".splices",s),t.notifyPath(i+".length",e.length),Gt&&!t._overrideLegacyUndefined&&(s.indexSplices=[])}function Fi(t,e,i,r,s,o){Mi(t,e,i,[{index:r,addedCount:s,removed:o,object:e,type:"splice"}])}const Oi=te((t=>{const e=Ze(Re(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return ii}_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(Pi.length){let t=Pi[Pi.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[ii.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==ii.READ_ONLY);let r=oi(this,e,!0)[t];r||(r=this[e][t]=[]),r.push(i)}_removePropertyEffect(t,e,i){let r=oi(this,e,!0)[t],s=r.indexOf(i);s>=0&&r.splice(s,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,ii.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,ii.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,ii.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,ii.COMPUTE)}_setPendingPropertyOrPath(t,e,i,r){if(r||be(Array.isArray(t)?t[0]:t)!==t){if(!r){let i=ke(this,t);if(!(t=Ce(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let r=t.__dataLinkedPaths;if(r){let s;for(let o in r){let n=r[o];ye(o,e)?(s=we(o,n,e),t._setPendingPropertyOrPath(s,i,!0,!0)):ye(n,e)&&(s=we(n,o,e),t._setPendingPropertyOrPath(s,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=fe(t)),t[e]=i)}_setPendingProperty(t,e,i){let r=this.__dataHasPaths&&ve(t);return!!this._shouldPropertyChange(t,e,(r?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[ii.NOTIFY]&&this[ii.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[ii.READ_ONLY]&&this[ii.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let r,s=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,r){let s=t[ii.COMPUTE];if(s)if(Ut){ti++;const o=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[ii.COMPUTE];let r,{counts:s,ready:o,total:n}=function(t){const e=t[ri],i={},r=t[ii.COMPUTE],s=[];let o=0;for(let t in e){const r=e[t];o+=i[t]=r.args.filter((t=>!t.literal)).length+(r.dynamicFn?1:0)}for(let t in r)e[t]||s.push(t);return{counts:i,ready:s,total:o}}(t);for(;r=o.shift();){e.set(r,e.size);const t=i[r];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--s[e]&&o.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)fi(t,s,n,o,r);let a;for(;a=n.shift();)vi(t,"",e,0,a)&&fi(a.methodInfo,s,n,o,r);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;ni(t,s,o,i,r);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}(this,e,i,s),r=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,s),this._flushClients(),ni(this,this[ii.REFLECT],e,i,s),ni(this,this[ii.OBSERVE],e,i,s),r&&function(t,e,i,r,s){let o,n,a=t[ii.NOTIFY],l=ti++;for(let n in e)e[n]&&(a&&ai(t,a,l,n,i,r,s)||s&&ci(t,n,i))&&(o=!0);o&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,r,e,i,s),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[ii.PROPAGATE]&&ni(this,this[ii.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,r){const s=(e,r)=>{ni(this,t.propertyEffects,e,i,r,t.nodeList);for(let s=t.firstChild;s;s=s.nextSibling)this._runEffectsForTemplate(s,e,i,r)};t.runEffects?t.runEffects(s,e,r):s(e,r)}linkPaths(t,e){t=_e(t),e=_e(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=_e(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Mi(this,ke(this,t,i),i.path,e)}get(t,e){return ke(e||this,t)}set(t,e,i){i?Ce(i,t,e):this[ii.READ_ONLY]&&this[ii.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},r=ke(this,t,i),s=r.length,o=r.push(...e);return e.length&&Fi(this,r,i.path,s,e.length,[]),o}pop(t){let e={path:""},i=ke(this,t,e),r=Boolean(i.length),s=i.pop();return r&&Fi(this,i,e.path,i.length,0,[s]),s}splice(t,e,i,...r){let s,o={path:""},n=ke(this,t,o);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),s=2===arguments.length?n.splice(e):n.splice(e,i,...r),(r.length||s.length)&&Fi(this,n,o.path,e,r.length,s),s}shift(t){let e={path:""},i=ke(this,t,e),r=Boolean(i.length),s=i.shift();return r&&Fi(this,i,e.path,0,0,[s]),s}unshift(t,...e){let i={path:""},r=ke(this,t,i),s=r.unshift(...e);return e.length&&Fi(this,r,i.path,0,e.length,[]),s}notifyPath(t,e){let i;if(1==arguments.length){let r={path:""};e=ke(this,t,r),i=r.path}else i=Array.isArray(t)?_e(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,ii.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let r={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,ii.OBSERVE,{fn:hi,info:r,trigger:{name:t}}),i&&this._addPropertyEffect(e,ii.OBSERVE,{fn:hi,info:r,trigger:{name:e}})}_createMethodObserver(t,e){let i=Ti(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");xi(this,i,ii.OBSERVE,ki,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,ii.NOTIFY,{fn:ui,info:{eventName:Te(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,ii.REFLECT,{fn:pi,info:{attrName:e}})}_createComputedProperty(t,e,i){let r=Ti(e);if(!r)throw new Error("Malformed computed expression '"+e+"'");const s=xi(this,r,ii.COMPUTE,vi,t,i);oi(this,ri)[t]=s}_marshalArgs(t,e,i){const r=this.__data,s=[];for(let o=0,n=t.length;o<n;o++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[o];if(!c)if(l){const t=ye(n,e),s=Ii(r,i,t?e:n);h={path:t?e:n,value:s,base:t?ke(r,n):s}}else h=a?Ii(r,i,n):r[n];if(Gt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return ei;s[o]=h}return s}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),r=this.__preBoundTemplateInfo==i;if(!r)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=r,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,r=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=r,r?r.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let r=t.propertyEffects=t.propertyEffects||{};(r[e]=r[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Pi.push(this);let i=super._stampTemplate(t,e);if(Pi.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:r}=e;if(r.length)for(let e=0;e<r.length;e++){let s=i[e],o=r[e].bindings;if(o)for(let e=0;e<o.length;e++){let i=o[e];wi(s,i),_i(s,t,i)}s.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:r,parent:s}=e;i?i.nextSibling=r:s&&(s.firstChild=r),r?r.previousSibling=i:s&&(s.lastChild=i),e.nextSibling=e.previousSibling=null;let o=e.childNodes;for(let t=0;t<o.length;t++){let e=o[t];fe(fe(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,r){let s=e._parseTemplateNode.call(this,t,i,r);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Ei(e)||" ",bi(this,i,r,"text","textContent",e),s=!0)}return s}static _parseTemplateNodeAttribute(t,i,r,s,o){let n=this._parseBindings(o,i);if(n){let e=s,o="property";si.test(s)?o="attribute":"$"==s[s.length-1]&&(s=s.slice(0,-1),o="attribute");let a=Ei(n);return a&&"attribute"==o&&("class"==s&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(s)),t.setAttribute(s,a)),"attribute"==o&&"disable-upgrade$"==e&&t.setAttribute(s,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===o&&(s=Ee(s)),bi(this,i,r,o,s,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,r,s,o)}static _parseTemplateNestedTemplate(t,i,r){let s=e._parseTemplateNestedTemplate.call(this,t,i,r);const o=t.parentNode,n=r.templateInfo,a="dom-if"===o.localName;Xt&&(a||"dom-repeat"===o.localName)&&(o.removeChild(t),(r=r.parentInfo).templateInfo=n,r.noted=!0,s=!1);let l=n.hostProps;if(Qt&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),Xt||(r.parentInfo.noted=!0));else{let t="{";for(let e in l)bi(this,i,r,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return s}static _parseBindings(t,e){let i,r=[],s=0;for(;null!==(i=Di.exec(t));){i.index>s&&r.push({literal:t.slice(s,i.index)});let o=i[1][0],n=Boolean(i[2]),a=i[3].trim(),l=!1,h="",c=-1;"{"==o&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=Ti(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let r=e.dynamicFns;(r&&r[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);r.push({source:a,mode:o,negate:n,customEvent:l,signature:d,dependencies:u,event:h}),s=Di.lastIndex}if(s&&s<t.length){let e=t.substring(s);e&&r.push({literal:e})}return r.length?r:null}static _evaluateBinding(t,e,i,r,s,o){let n;return n=e.signature?ki(t,i,r,0,e.signature):i!=e.source?ke(t,e.source):o&&ve(i)?ke(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Pi=[],Ni=te((t=>{const e=Ve(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof s?e:null}function r(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
961
|
+
*/let Ze=0;const ti=[],ei={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ii="__computeInfo",ri=/[A-Z]/;function si(t,e,i){let r=t[e];if(r){if(!t.hasOwnProperty(e)&&(r=t[e]=Object.create(t[e]),i))for(let t in r){let e=r[t],i=r[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else r=t[e]={};return r}function oi(t,e,i,r,s,o){if(e){let n=!1;const a=Ze++;for(let l in i){let h=e[s?ve(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===a||s&&!ai(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,r,e.info,s,o),n=!0)}return n}return!1}function ni(t,e,i,r,s,o,n,a){let l=!1,h=e[n?ve(r):r];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===i||n&&!ai(r,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,r,s,o,e.info,n,a),l=!0);return l}function ai(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!be(i,t))||!(!e.wildcard||!ge(i,t))}return!0}function li(t,e,i,r,s){let o="string"==typeof s.method?t[s.method]:s.method,n=s.property;o?o.call(t,t.__data[n],r[n]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function hi(t,e,i){let r=ve(e);return r!==e&&(ci(t,Te(r)+"-changed",i[e],e),!0)}function ci(t,e,i,r){let s={value:i,queueProperty:!0};r&&(s.path=r),me(t).dispatchEvent(new CustomEvent(e,{detail:s}))}function di(t,e,i,r,s,o){let n=(o?ve(e):e)!=e?e:null,a=n?xe(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),ci(t,s.eventName,a,n)}function ui(t,e,i,r,s){let o=t.__data[e];$t&&(o=$t(o,s.attrName,"attribute",t)),t._propertyToAttribute(e,s.attrName,o)}const pi=(t,e,i)=>{let r=0,s=e.length-1,o=-1;for(;r<=s;){const n=r+s>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)r=n+1;else{if(!(a>0)){o=n;break}s=n-1}}o<0&&(o=s+1),e.splice(o,0,t)},mi=(t,e,i,r,s)=>{const o=e[s?ve(t):t];if(o)for(let e=0;e<o.length;e++){const n=o[e];n.info.lastRun===Ze||s&&!ai(t,n.trigger)||(n.info.lastRun=Ze,pi(n.info,i,r))}};function fi(t,e,i,r,s){let o=xi(t,e,i,0,s);if(o===ti)return!1;let n=s.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,o,!0):(t[n]=o,!1)}function vi(t,e,i,r,s,o,n){i.bindings=i.bindings||[];let a={kind:r,target:s,parts:o,literal:n,isCompound:1!==o.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Te(s)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let r=a.parts[i];r.compoundIndex=i,bi(t,e,a,r,l)}}function bi(t,e,i,r,s){if(!r.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let o=r.dependencies,n={index:s,binding:i,part:r,evaluator:t};for(let i=0;i<o.length;i++){let r=o[i];"string"==typeof r&&(r=Ei(r),r.wildcard=!0),t._addTemplatePropertyEffect(e,r.rootProperty,{fn:gi,info:n,trigger:r})}}}function gi(t,e,i,r,s,o,n){let a=n[s.index],l=s.binding,h=s.part;if(o&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let r=i[e];e=ye(h.source,l.target,e),a._setPendingPropertyOrPath(e,r,!1,!0)&&t._enqueueClient(a)}else{let n=s.evaluator._evaluateBinding(t,h,e,i,r,o);n!==ti&&function(t,e,i,r,s){if(s=function(t,e,i,r){if(i.isCompound){let s=t.__dataCompoundStorage[i.target];s[r.compoundIndex]=e,e=s.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,s,i,r),$t&&(s=$t(s,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,s,i.target);else{let r=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?e[ei.READ_ONLY]&&e[ei.READ_ONLY][r]||e._setPendingProperty(r,s)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,r,s)}}(t,a,l,h,n)}}function yi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),r=e.parts,s=new Array(r.length);for(let t=0;t<r.length;t++)s[t]=r[t].literal;let o=e.target;i[o]=s,e.literal&&"property"==e.kind&&("className"===o&&(t=me(t)),t[o]=e.literal)}}function wi(t,e,i){if(i.listenerEvent){let r=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,r,s){let o,n=t.detail,a=n&&n.path;a?(r=ye(i,r,a),o=n&&n.value):o=t.currentTarget[i],o=s?!o:o,e[ei.READ_ONLY]&&e[ei.READ_ONLY][r]||!e._setPendingPropertyOrPath(r,o,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,r.source,r.negate)}))}}function _i(t,e,i,r,s,o){let n={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:o=e.static||o&&("object"!=typeof o||o[e.methodName])};for(let s,o=0;o<e.args.length&&(s=e.args[o]);o++)s.literal||t._addPropertyEffect(s.rootProperty,i,{fn:r,info:n,trigger:s});return o&&t._addPropertyEffect(e.methodName,i,{fn:r,info:n}),n}function xi(t,e,i,r,s){let o=t._methodHost||t,n=o[s.methodName];if(n){let r=t._marshalArgs(s.args,e,i);return r===ti?ti:n.apply(o,r)}s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const ki=[],Ci="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Ai="(?:("+Ci+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Si=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Ci+"\\s*(?:\\(\\s*(?:(?:"+Ai+"(?:,\\s*"+Ai+")*)?)\\)\\s*)?)(?:]]|}})","g");function Di(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Ti(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:ki};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Ei(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Ei(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},r=e[0];switch("-"===r&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=ve(e),i.structured=fe(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function zi(t,e,i){let r=xe(t,i);return void 0===r&&(r=e[i]),r}function Ii(t,e,i,r){const s={indexSplices:r};Yt&&!t._overrideLegacyUndefined&&(e.splices=s),t.notifyPath(i+".splices",s),t.notifyPath(i+".length",e.length),Yt&&!t._overrideLegacyUndefined&&(s.indexSplices=[])}function Mi(t,e,i,r,s,o){Ii(t,e,i,[{index:r,addedCount:s,removed:o,object:e,type:"splice"}])}const Pi=Zt((t=>{const e=Xe(Ve(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return ei}_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(Fi.length){let t=Fi[Fi.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[ei.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==ei.READ_ONLY);let r=si(this,e,!0)[t];r||(r=this[e][t]=[]),r.push(i)}_removePropertyEffect(t,e,i){let r=si(this,e,!0)[t],s=r.indexOf(i);s>=0&&r.splice(s,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,ei.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,ei.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,ei.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,ei.COMPUTE)}_setPendingPropertyOrPath(t,e,i,r){if(r||ve(Array.isArray(t)?t[0]:t)!==t){if(!r){let i=xe(this,t);if(!(t=ke(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let r=t.__dataLinkedPaths;if(r){let s;for(let o in r){let n=r[o];ge(o,e)?(s=ye(o,n,e),t._setPendingPropertyOrPath(s,i,!0,!0)):ge(n,e)&&(s=ye(n,o,e),t._setPendingPropertyOrPath(s,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=me(t)),t[e]=i)}_setPendingProperty(t,e,i){let r=this.__dataHasPaths&&fe(t);return!!this._shouldPropertyChange(t,e,(r?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[ei.NOTIFY]&&this[ei.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[ei.READ_ONLY]&&this[ei.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let r,s=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,r){let s=t[ei.COMPUTE];if(s)if(Ut){Ze++;const o=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[ei.COMPUTE];let r,{counts:s,ready:o,total:n}=function(t){const e=t[ii],i={},r=t[ei.COMPUTE],s=[];let o=0;for(let t in e){const r=e[t];o+=i[t]=r.args.filter((t=>!t.literal)).length+(r.dynamicFn?1:0)}for(let t in r)e[t]||s.push(t);return{counts:i,ready:s,total:o}}(t);for(;r=o.shift();){e.set(r,e.size);const t=i[r];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--s[e]&&o.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)mi(t,s,n,o,r);let a;for(;a=n.shift();)fi(t,"",e,0,a)&&mi(a.methodInfo,s,n,o,r);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;oi(t,s,o,i,r);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}(this,e,i,s),r=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,s),this._flushClients(),oi(this,this[ei.REFLECT],e,i,s),oi(this,this[ei.OBSERVE],e,i,s),r&&function(t,e,i,r,s){let o,n,a=t[ei.NOTIFY],l=Ze++;for(let n in e)e[n]&&(a&&ni(t,a,l,n,i,r,s)||s&&hi(t,n,i))&&(o=!0);o&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,r,e,i,s),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[ei.PROPAGATE]&&oi(this,this[ei.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,r){const s=(e,r)=>{oi(this,t.propertyEffects,e,i,r,t.nodeList);for(let s=t.firstChild;s;s=s.nextSibling)this._runEffectsForTemplate(s,e,i,r)};t.runEffects?t.runEffects(s,e,r):s(e,r)}linkPaths(t,e){t=we(t),e=we(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=we(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Ii(this,xe(this,t,i),i.path,e)}get(t,e){return xe(e||this,t)}set(t,e,i){i?ke(i,t,e):this[ei.READ_ONLY]&&this[ei.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},r=xe(this,t,i),s=r.length,o=r.push(...e);return e.length&&Mi(this,r,i.path,s,e.length,[]),o}pop(t){let e={path:""},i=xe(this,t,e),r=Boolean(i.length),s=i.pop();return r&&Mi(this,i,e.path,i.length,0,[s]),s}splice(t,e,i,...r){let s,o={path:""},n=xe(this,t,o);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),s=2===arguments.length?n.splice(e):n.splice(e,i,...r),(r.length||s.length)&&Mi(this,n,o.path,e,r.length,s),s}shift(t){let e={path:""},i=xe(this,t,e),r=Boolean(i.length),s=i.shift();return r&&Mi(this,i,e.path,0,0,[s]),s}unshift(t,...e){let i={path:""},r=xe(this,t,i),s=r.unshift(...e);return e.length&&Mi(this,r,i.path,0,e.length,[]),s}notifyPath(t,e){let i;if(1==arguments.length){let r={path:""};e=xe(this,t,r),i=r.path}else i=Array.isArray(t)?we(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,ei.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let r={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,ei.OBSERVE,{fn:li,info:r,trigger:{name:t}}),i&&this._addPropertyEffect(e,ei.OBSERVE,{fn:li,info:r,trigger:{name:e}})}_createMethodObserver(t,e){let i=Ti(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");_i(this,i,ei.OBSERVE,xi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,ei.NOTIFY,{fn:di,info:{eventName:Te(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,ei.REFLECT,{fn:ui,info:{attrName:e}})}_createComputedProperty(t,e,i){let r=Ti(e);if(!r)throw new Error("Malformed computed expression '"+e+"'");const s=_i(this,r,ei.COMPUTE,fi,t,i);si(this,ii)[t]=s}_marshalArgs(t,e,i){const r=this.__data,s=[];for(let o=0,n=t.length;o<n;o++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[o];if(!c)if(l){const t=ge(n,e),s=zi(r,i,t?e:n);h={path:t?e:n,value:s,base:t?xe(r,n):s}}else h=a?zi(r,i,n):r[n];if(Yt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return ti;s[o]=h}return s}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),r=this.__preBoundTemplateInfo==i;if(!r)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=r,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,r=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=r,r?r.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let r=t.propertyEffects=t.propertyEffects||{};(r[e]=r[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Fi.push(this);let i=super._stampTemplate(t,e);if(Fi.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:r}=e;if(r.length)for(let e=0;e<r.length;e++){let s=i[e],o=r[e].bindings;if(o)for(let e=0;e<o.length;e++){let i=o[e];yi(s,i),wi(s,t,i)}s.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:r,parent:s}=e;i?i.nextSibling=r:s&&(s.firstChild=r),r?r.previousSibling=i:s&&(s.lastChild=i),e.nextSibling=e.previousSibling=null;let o=e.childNodes;for(let t=0;t<o.length;t++){let e=o[t];me(me(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,r){let s=e._parseTemplateNode.call(this,t,i,r);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Di(e)||" ",vi(this,i,r,"text","textContent",e),s=!0)}return s}static _parseTemplateNodeAttribute(t,i,r,s,o){let n=this._parseBindings(o,i);if(n){let e=s,o="property";ri.test(s)?o="attribute":"$"==s[s.length-1]&&(s=s.slice(0,-1),o="attribute");let a=Di(n);return a&&"attribute"==o&&("class"==s&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(s)),t.setAttribute(s,a)),"attribute"==o&&"disable-upgrade$"==e&&t.setAttribute(s,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===o&&(s=De(s)),vi(this,i,r,o,s,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,r,s,o)}static _parseTemplateNestedTemplate(t,i,r){let s=e._parseTemplateNestedTemplate.call(this,t,i,r);const o=t.parentNode,n=r.templateInfo,a="dom-if"===o.localName;Gt&&(a||"dom-repeat"===o.localName)&&(o.removeChild(t),(r=r.parentInfo).templateInfo=n,r.noted=!0,s=!1);let l=n.hostProps;if(Qt&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),Gt||(r.parentInfo.noted=!0));else{let t="{";for(let e in l)vi(this,i,r,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return s}static _parseBindings(t,e){let i,r=[],s=0;for(;null!==(i=Si.exec(t));){i.index>s&&r.push({literal:t.slice(s,i.index)});let o=i[1][0],n=Boolean(i[2]),a=i[3].trim(),l=!1,h="",c=-1;"{"==o&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=Ti(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let r=e.dynamicFns;(r&&r[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);r.push({source:a,mode:o,negate:n,customEvent:l,signature:d,dependencies:u,event:h}),s=Si.lastIndex}if(s&&s<t.length){let e=t.substring(s);e&&r.push({literal:e})}return r.length?r:null}static _evaluateBinding(t,e,i,r,s,o){let n;return n=e.signature?xi(t,i,r,0,e.signature):i!=e.source?xe(t,e.source):o&&fe(i)?xe(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Fi=[],Oi=Zt((t=>{const e=qe(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof s?e:null}function r(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
964
962
|
/**
|
|
965
963
|
@license
|
|
966
964
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -970,7 +968,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
970
968
|
Code distributed by Google as part of the polymer project is also
|
|
971
969
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
972
970
|
*/
|
|
973
|
-
function(t){const e={};for(let i in t){const r=t[i];e[i]="function"==typeof r?{type:r}:r}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class s extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=r(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,r(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s})),
|
|
971
|
+
function(t){const e={};for(let i in t){const r=t[i];e[i]="function"==typeof r?{type:r}:r}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class s extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=r(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,r(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s})),Ni=window.ShadyCSS&&window.ShadyCSS.cssBuild,Bi=Zt((t=>{const e=Oi(Pi(t));function i(t,e,i,r){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,r)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,r[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Rt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let r=0;r<t.length;r++)i._createMethodObserver(t[r],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!jt||Vt)&&(e=se.import(t,"template"),jt&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Nt(t.url);else{const t=se.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Lt,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let r=e[i];"value"in r&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=r)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return Ot(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,r){if(!Ni){const s=e.content.querySelectorAll("style"),o=ue(e),n=function(t){let e=le(t);return e?pe(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let s=n[i];s.textContent=t._processStyleText(s.textContent,r),e.content.insertBefore(s,a)}let l=0;for(let e=0;e<o.length;e++){let i=o[e],n=s[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,r)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),Kt&&Ni&&qt){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?Ft(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=me(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Wt&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=Ft(this.importPath)),Ft(t,e)}static _parseTemplateContent(t,i,r){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,r)}static _addTemplatePropertyEffect(t,i,r){return!Ht||i in this._properties||r.info.part.signature&&r.info.part.signature.static||r.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,r)}}})),qi=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Li{constructor(t,e){Vi(t,e);const i=e.reduce(((e,i,r)=>e+$i(i)+t[r+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function $i(t){if(t instanceof Li)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const ji=function(t,...e){Vi(t,e);const i=document.createElement("template");let r=e.reduce(((e,i,r)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Li)return $i(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[r+1]),t[0]);return qi&&(r=qi.createHTML(r)),i.innerHTML=r,i},Vi=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Ri=Bi(HTMLElement),Hi=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Wi=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Yi(t,e){if("function"!=typeof t)return;const i=Hi.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function Ui(){
|
|
974
972
|
/*! vaadin-dev-mode:start
|
|
975
973
|
(function () {
|
|
976
974
|
'use strict';
|
|
@@ -1449,7 +1447,7 @@ try {
|
|
|
1449
1447
|
|
|
1450
1448
|
}());
|
|
1451
1449
|
|
|
1452
|
-
vaadin-dev-mode:end **/}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(
|
|
1450
|
+
vaadin-dev-mode:end **/}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(Wi?!(Wi&&Object.keys(Wi).map((t=>Wi[t])).filter((t=>t.productionMode)).length>0):!Yi((function(){return!0})))}catch(t){return!1}}());
|
|
1453
1451
|
/**
|
|
1454
1452
|
* @license
|
|
1455
1453
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1459,43 +1457,43 @@ try {
|
|
|
1459
1457
|
* Code distributed by Google as part of the polymer project is also
|
|
1460
1458
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1461
1459
|
*/
|
|
1462
|
-
let
|
|
1460
|
+
let Gi=0,Qi=0;const Ji=[];let Ki=!1;const Xi={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Zi={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},tr={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},er={run(t){Ki||(Ki=!0,queueMicrotask((()=>function(){Ki=!1;const t=Ji.length;for(let e=0;e<t;e++){const t=Ji[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Ji.splice(0,t),Qi+=t}()))),Ji.push(t);const e=Gi;return Gi+=1,e},cancel(t){const e=t-Qi;if(e>=0){if(!Ji[e])throw new Error(`invalid async handle: ${t}`);Ji[e]=null}}},ir=new Set;class rr{static debounce(t,e,i){return t instanceof rr?t._cancelAsync():t=new rr,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,ir.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),ir.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}function sr(t){ir.add(t)}function or(){const t=Boolean(ir.size);return ir.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const nr=()=>{let t;do{t=or()}while(t)},ar=[];
|
|
1463
1461
|
/**
|
|
1464
1462
|
* @license
|
|
1465
1463
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1466
1464
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1467
|
-
*/function
|
|
1465
|
+
*/function lr(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function hr(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=hr();ar.forEach((e=>{lr(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const cr=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),lr(this,hr(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const r=hr(),s=i===r&&-1===ar.indexOf(this),o=!i&&e&&-1===ar.indexOf(this),n=i!==r&&e===r;s||o?(this.__subscribe(),lr(this,r,i)):n&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=ar.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(){ar.includes(this)||ar.push(this)}__unsubscribe(){ar.includes(this)&&ar.splice(ar.indexOf(this),1)}}
|
|
1468
1466
|
/**
|
|
1469
1467
|
* @license
|
|
1470
1468
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1471
1469
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1472
|
-
*/;let
|
|
1470
|
+
*/;let dr;window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)Yi(t,e)}(Ui)};const ur=new Set,pr=t=>class extends(cr(t)){static finalize(){super.finalize();const{is:t}=this;t&&!ur.has(t)&&(window.Vaadin.registrations.push(this),ur.add(t),window.Vaadin.developmentModeCallback&&(dr=rr.debounce(dr,tr,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),sr(dr)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
|
|
1473
1471
|
/**
|
|
1474
1472
|
* @license
|
|
1475
1473
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1476
1474
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1477
|
-
*/;function
|
|
1475
|
+
*/;function mr(t){return t?new Set(t.split(" ")):new Set}function fr(t){return t?[...t].join(" "):""}function vr(t,e,i){const r=mr(t.getAttribute(e));r.add(i),t.setAttribute(e,fr(r))}
|
|
1478
1476
|
/**
|
|
1479
1477
|
* @license
|
|
1480
1478
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
1481
1479
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1482
1480
|
*/
|
|
1483
|
-
class
|
|
1481
|
+
class br{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],r=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,s)=>{const o=t.indexOf(e);-1===o?i.push(e):o!==s&&r.push(e)})),(e.length||i.length||r.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:r,removedNodes:i}),this._storedNodes=t}}
|
|
1484
1482
|
/**
|
|
1485
1483
|
* @license
|
|
1486
1484
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1487
1485
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1488
|
-
*/let
|
|
1486
|
+
*/let gr=0;function yr(){return gr++}
|
|
1489
1487
|
/**
|
|
1490
1488
|
* @license
|
|
1491
1489
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1492
1490
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1493
|
-
*/class
|
|
1491
|
+
*/class wr extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${yr()}`}constructor(t,e,i,r={}){super();const{initializer:s,multiple:o,observe:n,useUniqueId:a,uniqueIdPrefix:l}=r;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof o&&o,this.slotInitializer=s,o&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,l||e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let r=this.defaultNode;return!r&&i&&(r=document.createElement(i),r instanceof Element&&(""!==e&&r.setAttribute("slot",e),this.defaultNode=r)),r&&(this.node=r,t.appendChild(r)),r}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new br(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],r=t.filter((t=>!function(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}(t)&&!i.includes(t)));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),r&&r.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...r].filter((t=>t!==this.defaultNode)),r.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=r[0],this.initAddedNode(this.node)))}))}}
|
|
1494
1492
|
/**
|
|
1495
1493
|
* @license
|
|
1496
1494
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1497
1495
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1498
|
-
*/class
|
|
1496
|
+
*/class _r extends wr{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
|
|
1499
1497
|
/**
|
|
1500
1498
|
@license
|
|
1501
1499
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1504,12 +1502,12 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1504
1502
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1505
1503
|
Code distributed by Google as part of the polymer project is also
|
|
1506
1504
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1507
|
-
*/const
|
|
1505
|
+
*/const xr=!1,kr=t=>t,Cr="string"==typeof document.head.style.touchAction,Ar="__polymerGestures",Sr="__polymerGesturesHandled",Dr="__polymerGesturesTouchAction",Tr=["mousedown","mousemove","mouseup","click"],Er=[0,1,4,2],zr=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Ir(t){return Tr.indexOf(t)>-1}let Mr=!1;function Pr(t){if(!Ir(t)&&"touchend"!==t)return Cr&&Mr&&xr?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){Mr=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const Fr=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Or={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Nr(t){const e=t.type;if(!Ir(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!zr&&(e=Er[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const Br={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function qr(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Lr(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const $r=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],jr={},Vr=[];function Rr(t){const e=$r(t);return e.length>0?e[0]:t.target}function Hr(t){const e=t.type,i=t.currentTarget[Ar];if(!i)return;const r=i[e];if(!r)return;if(!t[Sr]&&(t[Sr]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Br.touch.id=i.identifier),Br.touch.id!==i.identifier)return;Cr||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Br.touch.x=e.clientX,Br.touch.y=e.clientY,Br.touch.scrollDecided=!1;else if("touchmove"===i){if(Br.touch.scrollDecided)return;Br.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=$r(t);for(let t,r=0;r<i.length;r++)if(t=i[r],t[Dr]){e=t[Dr];break}return e}(t);let r=!1;const s=Math.abs(Br.touch.x-e.clientX),o=Math.abs(Br.touch.y-e.clientY);t.cancelable&&("none"===i?r=!0:"pan-x"===i?r=o>s:"pan-y"===i&&(r=s>o)),r?t.preventDefault():Qr("track")}}(t)}const s=t[Sr];if(!s.skip){for(let e,i=0;i<Vr.length;i++)e=Vr[i],r[e.name]&&!s[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,o=0;o<Vr.length;o++)i=Vr[o],r[i.name]&&!s[i.name]&&(s[i.name]=!0,i[e](t))}}function Wr(t,e,i){return!!jr[e]&&(function(t,e,i){const r=jr[e],s=r.deps,o=r.name;let n=t[Ar];n||(t[Ar]=n={});for(let e,i,r=0;r<s.length;r++)e=s[r],Fr&&Ir(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Hr,Pr(e)),i[o]=(i[o]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),r.touchAction&&Ur(t,r.touchAction)}(t,e,i),!0)}function Yr(t){Vr.push(t),t.emits.forEach((e=>{jr[e]=t}))}function Ur(t,e){Cr&&t instanceof HTMLElement&&er.run((()=>{t.style.touchAction=e})),t[Dr]=e}function Gr(t,e,i){const r=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(r.detail=i,kr(t).dispatchEvent(r),r.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Qr(t){const e=function(t){for(let e,i=0;i<Vr.length;i++){e=Vr[i];for(let i,r=0;r<e.emits.length;r++)if(i=e.emits[r],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Jr(t,e,i,r){e&&Gr(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:r,prevent:t=>Qr(t)})}function Kr(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const r=Math.abs(t.x-e),s=Math.abs(t.y-i);return r>=5||s>=5}function Xr(t,e,i){if(!e)return;const r=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1];let o,n=0;r&&(o=s.x-r.x,n=s.y-r.y),Gr(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:s.x-t.x,dy:s.y-t.y,ddx:o,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),r=i;for(;r&&r.shadowRoot&&!window.ShadyDOM;){const s=r;if(r=r.shadowRoot.elementFromPoint(t,e),s===r)break;r&&(i=r)}return i}(i.clientX,i.clientY)})}function Zr(t,e,i){const r=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),o=Rr(i||e);!o||Or[o.localName]&&o.hasAttribute("disabled")||(isNaN(r)||isNaN(s)||r<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Rr(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),r=t.pageX,s=t.pageY;return!(r>=i.left&&r<=i.right&&s>=i.top&&s<=i.bottom)}return!1}(e))&&(t.prevent||Gr(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
|
|
1508
1506
|
/**
|
|
1509
1507
|
* @license
|
|
1510
1508
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1511
1509
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1512
|
-
*/
|
|
1510
|
+
*/Yr({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Lr(this.info)},mousedown(t){if(!Nr(t))return;const e=Rr(t),i=this;qr(this.info,(t=>{Nr(t)||(Jr("up",e,t),Lr(i.info))}),(t=>{Nr(t)&&Jr("up",e,t),Lr(i.info)})),Jr("down",e,t)},touchstart(t){Jr("down",Rr(t),t.changedTouches[0],t)},touchend(t){Jr("up",Rr(t),t.changedTouches[0],t)}}),Yr({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(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},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,Lr(this.info)},mousedown(t){if(!Nr(t))return;const e=Rr(t),i=this,r=t=>{const r=t.clientX,s=t.clientY;Kr(i.info,r,s)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&Qr("tap"),i.info.addMove({x:r,y:s}),Nr(t)||(i.info.state="end",Lr(i.info)),e&&Xr(i.info,e,t),i.info.started=!0)};qr(this.info,r,(t=>{i.info.started&&r(t),Lr(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=Rr(t),i=t.changedTouches[0],r=i.clientX,s=i.clientY;Kr(this.info,r,s)&&("start"===this.info.state&&Qr("tap"),this.info.addMove({x:r,y:s}),Xr(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=Rr(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Xr(this.info,e,i))}}),Yr({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(t){Nr(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){Nr(t)&&Zr(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Zr(this.info,t.changedTouches[0],t)}});const ts=Zt((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),es=Zt((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),is=t=>class extends(ts(es(t))){get _activeKeys(){return[" "]}ready(){super.ready(),Wr(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),Wr(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
|
|
1513
1511
|
/**
|
|
1514
1512
|
* @license
|
|
1515
1513
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1519,65 +1517,65 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1519
1517
|
* @license
|
|
1520
1518
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1521
1519
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1522
|
-
*/let
|
|
1520
|
+
*/let rs=!1;function ss(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function os(){return rs}function ns(t,e){const i=Math.max(t.tabIndex,0),r=Math.max(e.tabIndex,0);return 0===i||0===r?r>i:i>r}function as(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)ns(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(as(t.slice(0,i)),as(t.slice(i)))}function ls(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function hs(t){return t.getRootNode().activeElement===t}function cs(t,e){if(t.nodeType!==Node.ELEMENT_NODE||function(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}(t))return!1;const i=t,r=function(t){if(!ls(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let s=r>0;r>=0&&e.push(i);let o=[];return o="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...o].forEach((t=>{s=cs(t,e)||s})),s}window.addEventListener("keydown",(()=>{rs=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{rs=!1}),{capture:!0});
|
|
1523
1521
|
/**
|
|
1524
1522
|
* @license
|
|
1525
1523
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1526
1524
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1527
1525
|
*/
|
|
1528
|
-
const
|
|
1526
|
+
const ds=Zt((t=>class extends t{get _keyboardActive(){return os()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),us=t=>class extends(ts(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}
|
|
1529
1527
|
/**
|
|
1530
1528
|
* @license
|
|
1531
1529
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1532
1530
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1533
|
-
*/,
|
|
1531
|
+
*/,ps=Zt((t=>class extends(ds(us(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),ms=Zt((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),fs=Zt((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),""===t&&void 0===e||this.__userInput||this._forwardInputValue(t)}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),vs=Zt((t=>class extends(ms(ts(fs(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){this._toggleChecked(t.target.checked)}_toggleChecked(t){this.checked=t}})),bs=new Map;
|
|
1534
1532
|
/**
|
|
1535
1533
|
* @license
|
|
1536
1534
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1537
1535
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1538
|
-
*/function
|
|
1536
|
+
*/function gs(t){return bs.has(t)||bs.set(t,new WeakMap),bs.get(t)}function ys(t,e){t&&t.removeAttribute(e)}function ws(t,e){if(!t||!e)return;const i=gs(e);if(i.has(t))return;const r=mr(t.getAttribute(e));i.set(t,new Set(r))}function _s(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:r,oldId:s,fromUser:o}=i,n=gs(e),a=n.get(t);if(!o&&a)return s&&a.delete(s),void(r&&a.add(r));o&&(a?r||n.delete(t):ws(t,e),ys(t,e)),function(t,e,i){const r=mr(t.getAttribute(e));r.delete(i),0!==r.size?t.setAttribute(e,fr(r)):t.removeAttribute(e)}(t,e,s);const l=r||fr(a);l&&vr(t,e,l)}
|
|
1539
1537
|
/**
|
|
1540
1538
|
* @license
|
|
1541
1539
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1542
1540
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1543
1541
|
*/
|
|
1544
|
-
class
|
|
1542
|
+
class xs{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){var e;this.__target&&(t?(ws(e=this.__target,"aria-labelledby"),ys(e,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=gs(e),r=i.get(t);r&&0!==r.size?vr(t,e,fr(r)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){_s(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){_s(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){_s(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")))}}
|
|
1545
1543
|
/**
|
|
1546
1544
|
* @license
|
|
1547
1545
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1548
1546
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1549
|
-
*/const
|
|
1547
|
+
*/const ks=Zt((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})),Cs=document.createElement("div");
|
|
1550
1548
|
/**
|
|
1551
1549
|
* @license
|
|
1552
1550
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1553
1551
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1554
|
-
*/let
|
|
1552
|
+
*/let As;Cs.style.position="fixed",Cs.style.clip="rect(0px, 0px, 0px, 0px)",Cs.setAttribute("aria-live","polite"),document.body.appendChild(Cs);
|
|
1555
1553
|
/**
|
|
1556
1554
|
* @license
|
|
1557
1555
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1558
1556
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1559
1557
|
*/
|
|
1560
|
-
class
|
|
1558
|
+
class Ss extends wr{constructor(t,e,i,r={}){super(t,e,i,{...r,useUniqueId:!0})}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType!==Node.ELEMENT_NODE||this.multiple&&this.nodes&&t!==this.nodes[0]||t.id||(t.id=this.defaultId)}}
|
|
1561
1559
|
/**
|
|
1562
1560
|
* @license
|
|
1563
1561
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1564
1562
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1565
|
-
*/class
|
|
1563
|
+
*/class Ds extends Ss{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,r=Boolean(i&&e&&""!==e.trim());t&&(t.textContent=r?e:"",t.hidden=!r,r&&function(t,e={}){const i=e.mode||"polite",r=void 0===e.timeout?150:e.timeout;"alert"===i?(Cs.removeAttribute("aria-live"),Cs.removeAttribute("role"),As=rr.debounce(As,Zi,(()=>{Cs.setAttribute("role","alert")}))):(As&&As.cancel(),Cs.removeAttribute("role"),Cs.setAttribute("aria-live",i)),Cs.textContent="",setTimeout((()=>{Cs.textContent=t}),r)}(e,{mode:"assertive"})),super.updateDefaultNode(t)}}
|
|
1566
1564
|
/**
|
|
1567
1565
|
* @license
|
|
1568
1566
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1569
1567
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1570
|
-
*/class Ts extends
|
|
1568
|
+
*/class Ts extends Ss{constructor(t){super(t,"helper",null)}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:t}=this;if(t&&""!==t.trim()){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
|
|
1571
1569
|
/**
|
|
1572
1570
|
* @license
|
|
1573
1571
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1574
1572
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1575
|
-
*/class
|
|
1573
|
+
*/class Es extends Ss{constructor(t){super(t,"label","label")}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:t}=this;if(t&&""!==t.trim()){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
|
|
1576
1574
|
/**
|
|
1577
1575
|
* @license
|
|
1578
1576
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1579
1577
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1580
|
-
*/const
|
|
1578
|
+
*/const zs=Zt((t=>class extends(ks(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Es(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),Is=Zt((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}})),Ms=t=>class extends(Is(zs(ks(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new xs(this),this._helperController=new Ts(this),this._errorController=new Ds(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
|
|
1581
1579
|
/**
|
|
1582
1580
|
* @license
|
|
1583
1581
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1587,17 +1585,17 @@ class Ds extends _r{constructor(t,e,i,r={}){super(t,e,i,{...r,useUniqueId:!0})}i
|
|
|
1587
1585
|
* @license
|
|
1588
1586
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1589
1587
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1590
|
-
*/class
|
|
1588
|
+
*/class Ps extends wr{constructor(t,e,i={}){const{uniqueIdPrefix:r}=i;super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0,uniqueIdPrefix:r})}}
|
|
1591
1589
|
/**
|
|
1592
1590
|
* @license
|
|
1593
1591
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1594
1592
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1595
|
-
*/class
|
|
1593
|
+
*/class Fs{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}}
|
|
1596
1594
|
/**
|
|
1597
1595
|
* @license
|
|
1598
1596
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1599
1597
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1600
|
-
*/const
|
|
1598
|
+
*/const Os=t=>class extends(Ms(vs(ps(is(t))))){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 Ps(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Fs(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)")}_shouldSetActive(t){return!this.readonly&&"a"!==t.target.localName&&t.target!==this._helperNode&&t.target!==this._errorNode&&super._shouldSetActive(t)}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("click",this._boundOnInputClick)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("click",this._boundOnInputClick)}_onInputClick(t){this.readonly&&t.preventDefault()}__readonlyChanged(t,e){e&&(t?e.setAttribute("aria-readonly","true"):e.removeAttribute("aria-readonly"))}_toggleChecked(t){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(t)}checkValidity(){return!this.required||!!this.checked}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_checkedChanged(t){(t||this.__oldChecked)&&this.validate(),this.__oldChecked=t}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}_onRequiredIndicatorClick(){this._labelNode.click()}}
|
|
1601
1599
|
/**
|
|
1602
1600
|
* @license
|
|
1603
1601
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -1608,7 +1606,7 @@ class Ds extends _r{constructor(t,e,i,r={}){super(t,e,i,{...r,useUniqueId:!0})}i
|
|
|
1608
1606
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1609
1607
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1610
1608
|
*/
|
|
1611
|
-
|
|
1609
|
+
xt("vaadin-checkbox",p`
|
|
1612
1610
|
:host {
|
|
1613
1611
|
display: inline-block;
|
|
1614
1612
|
}
|
|
@@ -1696,7 +1694,7 @@ kt("vaadin-checkbox",m`
|
|
|
1696
1694
|
outline-width: 2px;
|
|
1697
1695
|
}
|
|
1698
1696
|
}
|
|
1699
|
-
`,{moduleId:"vaadin-checkbox-styles"});class
|
|
1697
|
+
`,{moduleId:"vaadin-checkbox-styles"});class Ns extends(Os(pr(Dt(Ri)))){static get is(){return"vaadin-checkbox"}static get template(){return ji`
|
|
1700
1698
|
<div class="vaadin-checkbox-container">
|
|
1701
1699
|
<div part="checkbox" aria-hidden="true"></div>
|
|
1702
1700
|
<slot name="input"></slot>
|
|
@@ -1712,13 +1710,13 @@ kt("vaadin-checkbox",m`
|
|
|
1712
1710
|
</div>
|
|
1713
1711
|
</div>
|
|
1714
1712
|
<slot name="tooltip"></slot>
|
|
1715
|
-
`}ready(){super.ready(),this._tooltipController=new
|
|
1713
|
+
`}ready(){super.ready(),this._tooltipController=new _r(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}n(Ns);
|
|
1716
1714
|
/**
|
|
1717
1715
|
* @license
|
|
1718
1716
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1719
1717
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1720
1718
|
*/
|
|
1721
|
-
const
|
|
1719
|
+
const Bs=p`
|
|
1722
1720
|
:host {
|
|
1723
1721
|
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
1724
1722
|
}
|
|
@@ -1779,7 +1777,7 @@ const Ls=m`
|
|
|
1779
1777
|
* @license
|
|
1780
1778
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1781
1779
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1782
|
-
*/,
|
|
1780
|
+
*/,qs=p`
|
|
1783
1781
|
[part='label'] {
|
|
1784
1782
|
align-self: flex-start;
|
|
1785
1783
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
@@ -1891,7 +1889,7 @@ const Ls=m`
|
|
|
1891
1889
|
margin-left: 0;
|
|
1892
1890
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1893
1891
|
}
|
|
1894
|
-
`;
|
|
1892
|
+
`;xt("",qs,{moduleId:"lumo-required-field"}),xt("vaadin-checkbox-group",[qs,Bs,p`
|
|
1895
1893
|
:host {
|
|
1896
1894
|
color: var(--lumo-body-text-color);
|
|
1897
1895
|
font-size: var(--lumo-font-size-m);
|
|
@@ -1940,7 +1938,7 @@ const Ls=m`
|
|
|
1940
1938
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
1941
1939
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1942
1940
|
*/
|
|
1943
|
-
const
|
|
1941
|
+
const Ls=t=>class extends(Ms(ds(ts(t)))){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 _r(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new br(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),r=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),r.forEach(this.__unregisterCheckbox);const s=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(s),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||Boolean(this.value&&this.value.length>0)}__filterCheckboxes(t){return t.filter((t=>t.nodeType===Node.ELEMENT_NODE&&"vaadin-checkbox"===t.localName))}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),this.readonly&&(t.readonly=!0),t.checked?this.__addCheckboxToValue(t.value):this.value&&this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value?this.value.includes(t)||(this.value=[...this.value,t]):this.value=[t]}__removeCheckboxFromValue(t){this.value&&this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){t&&0===t.length&&void 0===e||(this.toggleAttribute("has-value",t&&t.length>0),this.__checkboxes.forEach((e=>{e.checked=t&&t.includes(e.value)})),void 0!==e&&this.validate())}__readonlyChanged(t,e){(t||e)&&this.__checkboxes.forEach((e=>{e.readonly=t}))}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}
|
|
1944
1942
|
/**
|
|
1945
1943
|
* @license
|
|
1946
1944
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
@@ -1951,7 +1949,7 @@ const js=t=>class extends(Fs(us(es(t)))){static get properties(){return{value:{t
|
|
|
1951
1949
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
1952
1950
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1953
1951
|
*/
|
|
1954
|
-
|
|
1952
|
+
xt("vaadin-checkbox-group",p`
|
|
1955
1953
|
:host {
|
|
1956
1954
|
display: inline-flex;
|
|
1957
1955
|
}
|
|
@@ -1980,7 +1978,7 @@ kt("vaadin-checkbox-group",m`
|
|
|
1980
1978
|
:host(:not([has-label])) [part='label'] {
|
|
1981
1979
|
display: none;
|
|
1982
1980
|
}
|
|
1983
|
-
`,{moduleId:"vaadin-checkbox-group-styles"});class
|
|
1981
|
+
`,{moduleId:"vaadin-checkbox-group-styles"});class $s extends(Ls(pr(Dt(Ri)))){static get is(){return"vaadin-checkbox-group"}static get template(){return ji`
|
|
1984
1982
|
<div class="vaadin-group-field-container">
|
|
1985
1983
|
<div part="label">
|
|
1986
1984
|
<slot name="label"></slot>
|
|
@@ -2001,13 +1999,13 @@ kt("vaadin-checkbox-group",m`
|
|
|
2001
1999
|
</div>
|
|
2002
2000
|
|
|
2003
2001
|
<slot name="tooltip"></slot>
|
|
2004
|
-
`}}a(qs);const $s=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedValues=[],this.value=null,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){this.selectedValues=t.target.checked?this.options.map((t=>t.name)):[]}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return i("div",{key:"fa45026502fd8d46aa537aee03210ad68d30e577",class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"15ded4fd896920c6244806e49f300c124c27186d",class:"checkboxgroup__wrapper--flex"},i("vaadin-checkbox",{key:"d7eaa205877f8f12c9ef7d4f77018665806f5c7c",class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&i("img",{key:"aca39ed398415a6e2cef861be40dad33e0398759",class:"checkboxgroup__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("small",{key:"a1a6e1c3c02edcca572b8826ffba06835ca451c3",class:"checkboxgroup__error-message"},this.errorMessage),i("vaadin-checkbox-group",{key:"9f5f8a945e4ba13d7d0da6d362c15d00a7796b71",theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>i("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return r(this)}static get watchers(){return{isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};$s.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF)}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}';const Rs=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleClick(){this.value=this.inputReference.checked.toString(),this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"0aae00d291d1da02adae1bc91e79ccd579aa5c7f",class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("input",{key:"4b8c61d322b5065d8abe4e2687e270511fadc97f",class:"checkbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.inputReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel(),i("small",{key:"934263cb58a0d379e8b7dc1f5004ad7e61c63ce0",class:"checkbox__error-message"},this.errorMessage),i("div",{key:"88cc71329d88b6325d792226e64ff7f93e940178",class:"checkbox__wrapper--relative"},this.tooltip&&i("img",{key:"3708dc613dc920bac6557f2a8020bbafd97d9127",class:"checkbox__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Rs.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.checkbox__label-text{font-size:16px}.checkbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}';
|
|
2002
|
+
`}}n($s);const js=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value=null,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedValues=[]}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){this.selectedValues=t.target.checked?this.options.map((t=>t.name)):[]}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return i("div",{key:"c25b0a1ac187ea0abf1fe8c69d584eee00568177",class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"daf512e7f98d20bae65e43ab869e45babc008e90",class:"checkboxgroup__wrapper--flex"},i("vaadin-checkbox",{key:"08e31269cf2ace61c4c929a6a597486555667197",class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&i("img",{key:"ed4c3efd6b7e30ae0b68de11093b8faf2cb0a845",class:"checkboxgroup__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("small",{key:"5b95c4059a2de898c04bf147e89c5a2ad035dddf",class:"checkboxgroup__error-message"},this.errorMessage),i("vaadin-checkbox-group",{key:"2b73ac73d52c6185358e50eda4c9706643f55384",theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>i("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return r(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};js.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF)}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}';const Vs=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleClick(){this.value=this.inputReference.checked.toString(),this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"8c80c955bb052558165a4c5b1020d0582ed0af36",class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("input",{key:"89401d543cb30b72ec614b0cd4e95b2e82b2522d",class:"checkbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.inputReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel(),i("small",{key:"d007d8c02dd014a363e2fcc1a0e8df6ffda34bcb",class:"checkbox__error-message"},this.errorMessage),i("div",{key:"c511c07684173359663d4907371efb82289f0433",class:"checkbox__wrapper--relative"},this.tooltip&&i("img",{key:"dd263ce86efd89f34078f3cc24729f43f40e89a6",class:"checkbox__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Vs.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.checkbox__label-text{font-size:16px}.checkbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}';
|
|
2005
2003
|
/**
|
|
2006
2004
|
* @license
|
|
2007
2005
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2008
2006
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2009
2007
|
*/
|
|
2010
|
-
const
|
|
2008
|
+
const Rs=p`
|
|
2011
2009
|
:host {
|
|
2012
2010
|
top: var(--lumo-space-m);
|
|
2013
2011
|
right: var(--lumo-space-m);
|
|
@@ -2072,13 +2070,13 @@ const Hs=m`
|
|
|
2072
2070
|
opacity: 1;
|
|
2073
2071
|
}
|
|
2074
2072
|
}
|
|
2075
|
-
`;
|
|
2073
|
+
`;xt("",Rs,{moduleId:"lumo-overlay"});
|
|
2076
2074
|
/**
|
|
2077
2075
|
* @license
|
|
2078
2076
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2079
2077
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2080
2078
|
*/
|
|
2081
|
-
const
|
|
2079
|
+
const Hs=p`
|
|
2082
2080
|
:host([opening]),
|
|
2083
2081
|
:host([closing]) {
|
|
2084
2082
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -2108,7 +2106,7 @@ const Ws=m`
|
|
|
2108
2106
|
opacity: 0;
|
|
2109
2107
|
}
|
|
2110
2108
|
}
|
|
2111
|
-
`;
|
|
2109
|
+
`;xt("",Hs,{moduleId:"lumo-menu-overlay-core"});const Ws=[Rs,Hs,p`
|
|
2112
2110
|
/* Small viewport (bottom sheet) styles */
|
|
2113
2111
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
2114
2112
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -2170,7 +2168,7 @@ const Ws=m`
|
|
|
2170
2168
|
transform: translateY(150%);
|
|
2171
2169
|
}
|
|
2172
2170
|
}
|
|
2173
|
-
`];
|
|
2171
|
+
`];xt("",Ws,{moduleId:"lumo-menu-overlay"}),xt("vaadin-date-picker-overlay",[Ws,p`
|
|
2174
2172
|
[part='overlay'] {
|
|
2175
2173
|
/*
|
|
2176
2174
|
Width:
|
|
@@ -2215,7 +2213,7 @@ const Ws=m`
|
|
|
2215
2213
|
max-height: 70vh;
|
|
2216
2214
|
}
|
|
2217
2215
|
}
|
|
2218
|
-
`],{moduleId:"lumo-date-picker-overlay"});const
|
|
2216
|
+
`],{moduleId:"lumo-date-picker-overlay"});const Ys=p`
|
|
2219
2217
|
:host {
|
|
2220
2218
|
/* Sizing */
|
|
2221
2219
|
--lumo-button-size: var(--lumo-size-m);
|
|
@@ -2491,7 +2489,7 @@ const Ws=m`
|
|
|
2491
2489
|
margin-left: 0;
|
|
2492
2490
|
margin-right: 0;
|
|
2493
2491
|
}
|
|
2494
|
-
`;
|
|
2492
|
+
`;xt("vaadin-button",Ys,{moduleId:"lumo-button"}),xt("vaadin-date-picker-year",p`
|
|
2495
2493
|
:host([current]) [part='year-number'] {
|
|
2496
2494
|
color: var(--lumo-primary-text-color);
|
|
2497
2495
|
}
|
|
@@ -2515,7 +2513,7 @@ const Ws=m`
|
|
|
2515
2513
|
color: var(--lumo-disabled-text-color);
|
|
2516
2514
|
content: '\\2022';
|
|
2517
2515
|
}
|
|
2518
|
-
`,{moduleId:"lumo-date-picker-year"}),
|
|
2516
|
+
`,{moduleId:"lumo-date-picker-year"}),xt("vaadin-date-picker-overlay-content",p`
|
|
2519
2517
|
:host {
|
|
2520
2518
|
position: relative;
|
|
2521
2519
|
/* Background for the year scroller, placed here as we are using a mask image on the actual years part */
|
|
@@ -2665,7 +2663,7 @@ const Ws=m`
|
|
|
2665
2663
|
padding-left: 50px;
|
|
2666
2664
|
}
|
|
2667
2665
|
}
|
|
2668
|
-
`,{moduleId:"lumo-date-picker-overlay-content"}),
|
|
2666
|
+
`,{moduleId:"lumo-date-picker-overlay-content"}),xt("vaadin-month-calendar",p`
|
|
2669
2667
|
:host {
|
|
2670
2668
|
-moz-user-select: none;
|
|
2671
2669
|
-webkit-user-select: none;
|
|
@@ -2812,7 +2810,7 @@ const Ws=m`
|
|
|
2812
2810
|
:host([disabled]) * {
|
|
2813
2811
|
color: var(--lumo-disabled-text-color) !important;
|
|
2814
2812
|
}
|
|
2815
|
-
`,{moduleId:"lumo-month-calendar"}),
|
|
2813
|
+
`,{moduleId:"lumo-month-calendar"}),xt("vaadin-input-container",p`
|
|
2816
2814
|
:host {
|
|
2817
2815
|
background: var(--_background);
|
|
2818
2816
|
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
@@ -2996,7 +2994,7 @@ const Ws=m`
|
|
|
2996
2994
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
2997
2995
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2998
2996
|
*/
|
|
2999
|
-
const Us=
|
|
2997
|
+
const Us=p`
|
|
3000
2998
|
[part$='button'] {
|
|
3001
2999
|
flex: none;
|
|
3002
3000
|
width: 1em;
|
|
@@ -3023,13 +3021,13 @@ const Us=m`
|
|
|
3023
3021
|
font-family: 'lumo-icons';
|
|
3024
3022
|
display: block;
|
|
3025
3023
|
}
|
|
3026
|
-
`;
|
|
3024
|
+
`;xt("",Us,{moduleId:"lumo-field-button"});
|
|
3027
3025
|
/**
|
|
3028
3026
|
* @license
|
|
3029
3027
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3030
3028
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3031
3029
|
*/
|
|
3032
|
-
const
|
|
3030
|
+
const Gs=[qs,Us,Bs,p`
|
|
3033
3031
|
:host {
|
|
3034
3032
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
3035
3033
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -3160,7 +3158,7 @@ const Xs=[Vs,Us,Ls,m`
|
|
|
3160
3158
|
[part='clear-button']::before {
|
|
3161
3159
|
content: var(--lumo-icons-cross);
|
|
3162
3160
|
}
|
|
3163
|
-
`];
|
|
3161
|
+
`];xt("",Gs,{moduleId:"lumo-input-field-shared-styles"}),xt("vaadin-date-picker",[Gs,p`
|
|
3164
3162
|
[part='toggle-button']::before {
|
|
3165
3163
|
content: var(--lumo-icons-calendar);
|
|
3166
3164
|
}
|
|
@@ -3199,7 +3197,7 @@ const Qs=t=>class extends t{static get properties(){return{disabled:{type:Boolea
|
|
|
3199
3197
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3200
3198
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3201
3199
|
*/
|
|
3202
|
-
|
|
3200
|
+
xt("vaadin-input-container",p`
|
|
3203
3201
|
:host {
|
|
3204
3202
|
display: flex;
|
|
3205
3203
|
align-items: center;
|
|
@@ -3264,17 +3262,17 @@ kt("vaadin-input-container",m`
|
|
|
3264
3262
|
/* Override default opacity in Firefox */
|
|
3265
3263
|
opacity: 1;
|
|
3266
3264
|
}
|
|
3267
|
-
`,{moduleId:"vaadin-input-container-styles"});class Js extends(Qs(
|
|
3265
|
+
`,{moduleId:"vaadin-input-container-styles"});class Js extends(Qs(Dt(cr(Ri)))){static get is(){return"vaadin-input-container"}static get template(){return ji`
|
|
3268
3266
|
<slot name="prefix"></slot>
|
|
3269
3267
|
<slot></slot>
|
|
3270
3268
|
<slot name="suffix"></slot>
|
|
3271
|
-
`}}
|
|
3269
|
+
`}}n(Js);
|
|
3272
3270
|
/**
|
|
3273
3271
|
* @license
|
|
3274
3272
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3275
3273
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3276
3274
|
*/
|
|
3277
|
-
const Ks=
|
|
3275
|
+
const Ks=p`
|
|
3278
3276
|
:host {
|
|
3279
3277
|
z-index: 200;
|
|
3280
3278
|
position: fixed;
|
|
@@ -3342,64 +3340,64 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
3342
3340
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3343
3341
|
Code distributed by Google as part of the polymer project is also
|
|
3344
3342
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3345
|
-
*/;let
|
|
3343
|
+
*/;let Xs=!1,Zs=[],to=[];function eo(t){const e=t[0],i=t[1],r=t[2];try{i.apply(e,r)}catch(t){setTimeout((()=>{throw t}))}}function io(t,e,i){Xs||(Xs=!0,requestAnimationFrame((function(){Xs=!1,function(t){for(;t.length;)eo(t.shift())}(Zs),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)eo(t.shift())}(to)}))}))),to.push([t,e,i])}
|
|
3346
3344
|
/**
|
|
3347
3345
|
* @license
|
|
3348
3346
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3349
3347
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3350
|
-
*/const
|
|
3348
|
+
*/const ro=t=>t.test(navigator.userAgent),so=t=>t.test(navigator.platform);ro(/Android/u),ro(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),ro(/Firefox/u);const oo=so(/^iPad/u)||so(/^Mac/u)&&navigator.maxTouchPoints>1,no=so(/^iPhone/u)||oo,ao=ro(/^((?!chrome|android).)*safari/iu),lo=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
|
|
3351
3349
|
/**
|
|
3352
3350
|
* @license
|
|
3353
3351
|
* Copyright (c) 2017 Anton Korzunov
|
|
3354
3352
|
* SPDX-License-Identifier: MIT
|
|
3355
3353
|
*/
|
|
3356
|
-
let
|
|
3354
|
+
let ho=new WeakMap,co=new WeakMap,uo={},po=0;const mo=t=>t&&t.nodeType===Node.ELEMENT_NODE,fo=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},vo=(t,e=document.body,i="data-aria-hidden")=>{const r=Array.from(Array.isArray(t)?t:[t]);return e&&r.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,r)=>{const s=((t,e)=>mo(t)?e.map((e=>{if(!mo(e))return fo(e,"is not a valid element"),null;let i=e;for(;i&&i!==t;){if(t.contains(i))return e;i=i.getRootNode().host}return fo(e,"is not contained inside",t),null})).filter((t=>Boolean(t))):(fo(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);uo[i]||(uo[i]=new WeakMap);const o=uo[i],n=[],a=new Set,l=new Set(s),h=t=>{if(!t||a.has(t))return;a.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};s.forEach(h);const c=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(a.has(t))c(t);else{const e=t.getAttribute(r),s=null!==e&&"false"!==e,a=(ho.get(t)||0)+1,l=(o.get(t)||0)+1;ho.set(t,a),o.set(t,l),n.push(t),1===a&&s&&co.set(t,!0),1===l&&t.setAttribute(i,"true"),s||t.setAttribute(r,"true")}}))};return c(e),a.clear(),po+=1,()=>{n.forEach((t=>{const e=ho.get(t)-1,s=o.get(t)-1;ho.set(t,e),o.set(t,s),e||(co.has(t)?co.delete(t):t.removeAttribute(r)),s||t.removeAttribute(i)})),po-=1,po||(ho=new WeakMap,ho=new WeakMap,co=new WeakMap,uo={})}})(r,e,i,"aria-hidden")};
|
|
3357
3355
|
/**
|
|
3358
3356
|
* @license
|
|
3359
3357
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3360
3358
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3361
3359
|
*/
|
|
3362
|
-
class
|
|
3360
|
+
class bo{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=vo(t)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}
|
|
3363
3361
|
/**
|
|
3364
3362
|
* @license
|
|
3365
3363
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3366
3364
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3367
|
-
*/class
|
|
3365
|
+
*/class go{saveFocus(t){this.focusNode=t||ss()}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=!!t&&t.preventScroll;ss()===document.body?setTimeout((()=>e.focus({preventScroll:i}))):e.focus({preventScroll:i}),this.focusNode=null}}
|
|
3368
3366
|
/**
|
|
3369
3367
|
* @license
|
|
3370
3368
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3371
3369
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3372
|
-
*/const
|
|
3370
|
+
*/const yo=[];class wo{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return cs(t,e)?as(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(hs).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");yo.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,yo.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(yo).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}}
|
|
3373
3371
|
/**
|
|
3374
3372
|
* @license
|
|
3375
3373
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3376
3374
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3377
|
-
*/const
|
|
3375
|
+
*/const _o=t=>class extends(ks(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new bo(this),this.__focusTrapController=new wo(this),this.__focusRestorationController=new go}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const t=!os();this.__focusRestorationController.restoreFocus({preventScroll:t})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=ss();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
|
|
3378
3376
|
/**
|
|
3379
3377
|
* @license
|
|
3380
3378
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3381
3379
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3382
|
-
*/,
|
|
3380
|
+
*/,xo=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),ko=()=>xo().filter((t=>t.$.overlay)),Co=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===ko().pop())()}bringToFront(){let t="";const e=xo().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),ko().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=ko();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
|
|
3383
3381
|
/**
|
|
3384
3382
|
* @license
|
|
3385
3383
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3386
3384
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3387
|
-
*/,
|
|
3385
|
+
*/,Ao=t=>class extends(_o(Co(t))){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),no&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e>t&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,r){const s=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const o=this._oldRenderer!==t,n=void 0!==this._oldRenderer;this._oldRenderer=t;const a=this._oldOpened!==r;this._oldOpened=r,o&&n&&(this.innerHTML="",delete this._$litPart$),r&&t&&(o||a||s)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),io(this,(()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const i=`__${t}Handler`,r=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",r),delete this[i])};this[i]=r,this.addEventListener("animationend",r)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
|
|
3388
3386
|
/**
|
|
3389
3387
|
* @license
|
|
3390
3388
|
* Copyright (c) 2024 Vaadin Ltd.
|
|
3391
3389
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3392
|
-
*/,
|
|
3390
|
+
*/,So={start:"top",end:"bottom"},Do={start:"left",end:"right"},To=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),Eo=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)})),this.positionTarget&&(this.__observePositionTargetMove=function(t,e){let i=null;const r=document.documentElement;function s(){i&&i.disconnect(),i=null}return function o(n=!1,a=1){s();const{left:l,top:h,width:c,height:d}=t.getBoundingClientRect();if(n||e(),!c||!d)return;const u={rootMargin:`${-Math.floor(h)}px ${-Math.floor(r.clientWidth-(l+c))}px ${-Math.floor(r.clientHeight-(h+d))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,a))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==a){if(!p)return o();0===e&&(e=1e-7),o(!1,e)}p=!1}),u),i.observe(t)}(!0),s}
|
|
3393
3391
|
/**
|
|
3394
3392
|
* @license
|
|
3395
3393
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3396
3394
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3397
|
-
*/(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,To.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,To.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,r=this.__shouldAlignStartHorizontally(t,i),s=!i&&r||i&&!r;this.style.alignItems=s?"flex-start":"flex-end";const o=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,o,this.noVerticalOverlap,
|
|
3395
|
+
*/(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,To.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,To.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,r=this.__shouldAlignStartHorizontally(t,i),s=!i&&r||i&&!r;this.style.alignItems=s?"flex-start":"flex-end";const o=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,o,this.noVerticalOverlap,So,this,e),a=this.__calculatePositionInOneDimension(t,o,this.noHorizontalOverlap,Do,this,r);Object.assign(this.style,n,a),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!s),this.toggleAttribute("start-aligned",s)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const r=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,r,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Do)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,i,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,So)}__shouldAlignStart(t,e,i,r,s,o,n){const a=i-t[o?n.end:n.start]-r[n.end],l=t[o?n.start:n.end]-r[n.start],h=s?a:l;return s===(h>(s?l:a)||h>e)}__adjustBottomProperty(t,e,i){let r;if(t===e.end){if(e.end===So.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(r=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===Do.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(r=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return r}__calculatePositionInOneDimension(t,e,i,r,s,o){const n=o?r.start:r.end,a=o?r.end:r.start,l=parseFloat(s.style[n]||getComputedStyle(s)[n]),h=this.__adjustBottomProperty(n,r,l),c=h?`${h}px`:`${l+(e[o?r.start:r.end]-t[i===o?r.end:r.start])*(o?-1:1)}px`;return{[n]:c,[a]:""}}}
|
|
3398
3396
|
/**
|
|
3399
3397
|
* @license
|
|
3400
3398
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
3401
3399
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3402
|
-
*/,
|
|
3400
|
+
*/,zo=t=>class extends(Eo(Ao(t))){_shouldCloseOnOutsideClick(t){return!t.composedPath().includes(this.positionTarget)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!ls(t.composedPath()[0])&&t.preventDefault()}}
|
|
3403
3401
|
/**
|
|
3404
3402
|
* @license
|
|
3405
3403
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3410,7 +3408,7 @@ class go{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t
|
|
|
3410
3408
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3411
3409
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3412
3410
|
*/
|
|
3413
|
-
|
|
3411
|
+
xt("vaadin-date-picker-overlay",[Ks,p`
|
|
3414
3412
|
[part='overlay'] {
|
|
3415
3413
|
display: flex;
|
|
3416
3414
|
flex: auto;
|
|
@@ -3425,20 +3423,20 @@ kt("vaadin-date-picker-overlay",[Ks,m`
|
|
|
3425
3423
|
outline: 3px solid;
|
|
3426
3424
|
}
|
|
3427
3425
|
}
|
|
3428
|
-
`],{moduleId:"vaadin-date-picker-overlay-styles"});class
|
|
3426
|
+
`],{moduleId:"vaadin-date-picker-overlay-styles"});class Io extends(zo(cr(Dt(Ri)))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return ji`
|
|
3429
3427
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
3430
3428
|
<div part="overlay" id="overlay">
|
|
3431
3429
|
<div part="content" id="content">
|
|
3432
3430
|
<slot></slot>
|
|
3433
3431
|
</div>
|
|
3434
3432
|
</div>
|
|
3435
|
-
`}}
|
|
3433
|
+
`}}n(Io);
|
|
3436
3434
|
/**
|
|
3437
3435
|
* @license
|
|
3438
3436
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3439
3437
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3440
3438
|
*/
|
|
3441
|
-
const
|
|
3439
|
+
const Mo=p`
|
|
3442
3440
|
:host {
|
|
3443
3441
|
display: inline-block;
|
|
3444
3442
|
position: relative;
|
|
@@ -3498,12 +3496,12 @@ const Fo=m`
|
|
|
3498
3496
|
outline-color: GrayText;
|
|
3499
3497
|
}
|
|
3500
3498
|
}
|
|
3501
|
-
`,
|
|
3499
|
+
`,Po=t=>class extends(is(us(ds(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}}
|
|
3502
3500
|
/**
|
|
3503
3501
|
* @license
|
|
3504
3502
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3505
3503
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3506
|
-
*/;
|
|
3504
|
+
*/;xt("vaadin-button",Mo,{moduleId:"vaadin-button-styles"});class Fo extends(Po(pr(Dt(ks(Ri))))){static get is(){return"vaadin-button"}static get template(){return(t=>t`
|
|
3507
3505
|
<div class="vaadin-button-container">
|
|
3508
3506
|
<span part="prefix" aria-hidden="true">
|
|
3509
3507
|
<slot name="prefix"></slot>
|
|
@@ -3521,7 +3519,7 @@ const Fo=m`
|
|
|
3521
3519
|
* @license
|
|
3522
3520
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3523
3521
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3524
|
-
*/)(
|
|
3522
|
+
*/)(ji)}ready(){super.ready(),this._tooltipController=new _r(this),this.addController(this._tooltipController)}}function Oo(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function No(t,e,i=Oo){return t instanceof Date&&e instanceof Date&&i(t).getTime()===i(e).getTime()}function Bo(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function qo(t,e,i,r){let s=!1;return"function"==typeof r&&t&&(s=r(Bo(t))),(!e||t>=e)&&(!i||t<=i)&&!s}function Lo(t,e){return e.filter((t=>void 0!==t)).reduce(((e,i)=>i?e?Math.abs(t.getTime()-i.getTime())<Math.abs(e.getTime()-t.getTime())?i:e:i:e))}function $o(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function jo(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(t);if(!e)return;const i=new Date(0,0);return i.setFullYear(parseInt(e[1],10)),i.setMonth(parseInt(e[2],10)-1),i.setDate(parseInt(e[3],10)),i}n(Fo);
|
|
3525
3523
|
/**
|
|
3526
3524
|
@license
|
|
3527
3525
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3531,18 +3529,18 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3531
3529
|
Code distributed by Google as part of the polymer project is also
|
|
3532
3530
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3533
3531
|
*/
|
|
3534
|
-
class
|
|
3532
|
+
class Vo{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,Ro.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Ro.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(t,e,i){return t instanceof Vo?t._cancelAsync():t=new Vo,t.setConfig(e,i),t}}let Ro=new Set;const Ho=function(){const t=Boolean(Ro.size);return Ro.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t},Wo=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=Ho()}while(t||e)},Yo=document.createElement("template");Yo.innerHTML='\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id="scroller" tabindex="-1">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class Uo extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(Yo.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+2*this.bufferSize?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=2*this._initialScroll+"px")}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),Wo()}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._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>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=rr.debounce(this._debouncerScrollFinish,Xi.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();this._isVisible(this._buffers[0],t)||this._isVisible(this._buffers[1],t)||(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=rr.debounce(this._debouncerUpdateClones,Xi.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 i=document.createElement("div");i.style.height=`${this.itemHeight}px`,i.instance={};const r=`vaadin-infinite-scroller-item-content-${yr()}`,s=document.createElement("slot");s.setAttribute("name",r),s._itemWrapper=i,e.appendChild(s),i.setAttribute("slot",r),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),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,r)=>{if(!i.updated){const s=this._firstIndex+this.bufferSize*r;[...i.children].forEach(((i,r)=>{const o=i._itemWrapper;t&&!this._isVisible(o,e)||this._updateElement(o.instance,s+r)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
|
|
3535
3533
|
/**
|
|
3536
3534
|
* @license
|
|
3537
3535
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3538
3536
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3539
|
-
*/const
|
|
3537
|
+
*/const Go=document.createElement("template");Go.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 270px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n }\n </style>\n",n(class extends Uo{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(Go.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=$o(e)}});
|
|
3540
3538
|
/**
|
|
3541
3539
|
* @license
|
|
3542
3540
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3543
3541
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3544
3542
|
*/
|
|
3545
|
-
const Qo=document.createElement("template");Qo.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 80px;\n width: 50px;\n display: block;\n height: 100%;\n position: absolute;\n right: 0;\n transform: translateX(100%);\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n /* Center the year scroller position. */\n --vaadin-infinite-scroller-buffer-offset: 50%;\n }\n\n :host::before {\n content: '';\n display: block;\n background: transparent;\n width: 0;\n height: 0;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n border-width: 6px;\n border-style: solid;\n border-color: transparent;\n border-left-color: #000;\n }\n </style>\n",
|
|
3543
|
+
const Qo=document.createElement("template");Qo.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 80px;\n width: 50px;\n display: block;\n height: 100%;\n position: absolute;\n right: 0;\n transform: translateX(100%);\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n /* Center the year scroller position. */\n --vaadin-infinite-scroller-buffer-offset: 50%;\n }\n\n :host::before {\n content: '';\n display: block;\n background: transparent;\n width: 0;\n height: 0;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n border-width: 6px;\n border-style: solid;\n border-color: transparent;\n border-left-color: #000;\n }\n </style>\n",n(class extends Uo{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(Qo.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()}});
|
|
3546
3544
|
/**
|
|
3547
3545
|
* @license
|
|
3548
3546
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3553,7 +3551,7 @@ const Jo=t=>class extends t{static get properties(){return{year:{type:String,syn
|
|
|
3553
3551
|
* @license
|
|
3554
3552
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3555
3553
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3556
|
-
*/;class Ko extends(
|
|
3554
|
+
*/;class Ko extends(Dt(Jo(Ri))){static get is(){return"vaadin-date-picker-year"}static get template(){return ji`
|
|
3557
3555
|
<style>
|
|
3558
3556
|
:host {
|
|
3559
3557
|
display: block;
|
|
@@ -3572,7 +3570,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3572
3570
|
Code distributed by Google as part of the polymer project is also
|
|
3573
3571
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3574
3572
|
*/
|
|
3575
|
-
function
|
|
3573
|
+
function Xo(t,e,i,r,s){let o;s&&(o="object"==typeof i&&null!==i,o&&(r=t.__dataTemp[e]));let n=r!==i&&(r==r||i==i);return o&&n&&(t.__dataTemp[e]=i),n}n(Ko);const Zo=Zt((t=>class extends t{_shouldPropertyChange(t,e,i){return Xo(this,t,e,i,!0)}})),tn=Zt((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return Xo(this,t,e,i,this.mutableData)}}));Zo._mutablePropertyChange=Xo;
|
|
3576
3574
|
/**
|
|
3577
3575
|
@license
|
|
3578
3576
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3582,7 +3580,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3582
3580
|
Code distributed by Google as part of the polymer project is also
|
|
3583
3581
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3584
3582
|
*/
|
|
3585
|
-
let
|
|
3583
|
+
let en=null;function rn(){return en}rn.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:rn,writable:!0}});const sn=Pi(rn),on=Zo(sn),nn=Pi(class{});class an extends nn{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__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 t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}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,(t=>{t.model=this,i(t)}));else{let r=this.__dataHost.__dataHost;r&&r._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let r=e[i];if(Boolean(t)!=Boolean(r.__hideTemplateChildren__))if(r.nodeType===Node.TEXT_NODE)t?(r.__polymerTextContent__=r.textContent,r.textContent=""):r.textContent=r.__polymerTextContent__;else if("slot"===r.localName)if(t)r.__polymerReplaced__=document.createComment("hidden-slot"),me(me(r).parentNode).replaceChild(r.__polymerReplaced__,r);else{const t=r.__polymerReplaced__;t&&me(me(t).parentNode).replaceChild(r,t)}else r.style&&(t?(r.__polymerDisplay__=r.style.display,r.style.display="none"):r.style.display=r.__polymerDisplay__);r.__hideTemplateChildren__=t,r._showHideChildren&&r._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?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 ln=Zo(an);function hn(t){let e=t.__dataHost;return e&&e._methodHost||e}function cn(t,e){return function(t,i,r){e.call(t.__templatizeOwner,i.substring(6),r[i])}}function dn(t,e){return function(t,i,r){e.call(t.__templatizeOwner,t,i,r[i])}}function un(t,e,i){if(jt&&!hn(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(i=i||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let r=(e?e.constructor:an)._parseTemplate(t),s=r.templatizeInstanceClass;s||(s=function(t,e,i){let r=i.mutableData?ln:an;un.mixin&&(r=un.mixin(r));let s=class extends r{};return s.prototype.__templatizeOptions=i,s.prototype._bindTemplate(t),function(t,e,i,r){let s=i.hostProps||{};for(let e in r.instanceProps){delete s[e];let i=r.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:dn(0,i)})}if(r.forwardHostProp&&e.__dataHost)for(let e in s)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(s,t,e,i),s}(t,r,i),r.templatizeInstanceClass=s);const o=hn(t);!function(t,e,i,r){let s=i.forwardHostProp;if(s&&e.hasHostProps){const o="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(o){let t=i.mutableData?on:sn;class r extends t{}n=e.templatizeTemplateClass=r}else{const i=t.constructor;class r extends i{}n=e.templatizeTemplateClass=r}let a=e.hostProps;for(let t in a)n.prototype._addPropertyEffect("_host_"+t,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:cn(0,s)}),n.prototype._createNotifyingProperty("_host_"+t);Ht&&r&&function(t,e,i){const r=i.constructor._properties,{propertyEffects:s}=t,{instanceProps:o}=e;for(let t in s)if(!(r[t]||o&&o[t])){const e=s[t];for(let i=0;i<e.length;i++){const{part:r}=e[i].info;if(!r.signature||!r.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,r)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),o)!function(t,e){en=t,Object.setPrototypeOf(t,e.prototype),new e,en=null}(t,n),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,n.prototype);const i=e.hostProps;for(let e in i)if(e="_host_"+e,e in t){const i=t[e];delete t[e],t.__data[e]=i}}}}(t,r,i,o);let n=class extends s{};return n.prototype._methodHost=o,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=r.hostProps,n}
|
|
3586
3584
|
/**
|
|
3587
3585
|
@license
|
|
3588
3586
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3592,7 +3590,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3592
3590
|
Code distributed by Google as part of the polymer project is also
|
|
3593
3591
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3594
3592
|
*/
|
|
3595
|
-
let
|
|
3593
|
+
let pn=!1;
|
|
3596
3594
|
/**
|
|
3597
3595
|
@license
|
|
3598
3596
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3602,13 +3600,13 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3602
3600
|
Code distributed by Google as part of the polymer project is also
|
|
3603
3601
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3604
3602
|
*/
|
|
3605
|
-
const
|
|
3603
|
+
const mn=tn(Ri);class fn extends mn{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:!Jt,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(),function(){if(Rt&&!Bt){if(!pn){pn=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=me(me(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 t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=un(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let r,s=0;s<i.length&&(r=i[s]);s++)r.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if((r=this.as)===(s=e)||be(r,s)||ge(r,s)){let r=t[this.itemsIndexAs];e==this.as&&(this.items[r]=i);let s=ye(this.as,`${JSCompiler_renameProperty("items",this)}.${r}`,e);this.notifyPath(s,i)}var r,s}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){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){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else 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)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=Vo.debounce(this.__renderDebouncer,e>0?Oe.after(e):Ne,t.bind(this)),Ro.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),Wo()}__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),Jt&&!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(((e,i,r)=>this.__filterFn(t[e],i,r)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let r;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),r=Math.max(e-i,0),this.__chunkCount=r||1):(r=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+r,t)),this.__shouldMeasureChunk=r===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;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const r=this.__itemsIdxToInstIdx={};let s;for(s=0;s<e;s++){let e=this.__instances[s],o=i[s],n=t[o];r[o]=s,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,s),e._setPendingProperty(this.itemsIndexAs,o),e._flushProperties()):this.__insertInstance(n,s,o)}for(let t=this.__instances.length-1;t>=s;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=me(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let r={};return r[this.as]=t,r[this.indexAs]=e,r[this.itemsIndexAs]=i,new this.__ctor(r)}__insertInstance(t,e,i){const r=this.__stampInstance(t,e,i);let s=this.__instances[e+1],o=s?s.children[0]:this;return me(me(this).parentNode).insertBefore(r.root,o),this.__instances[e]=r,r}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),r=i.indexOf("."),s=r<0?i:i.substring(0,r);if(s==parseInt(s,10)){let t=r<0?"":i.substring(r+1);this.__handleObservedPaths(t);let o=this.__instances[this.__itemsIdxToInstIdx[s]];return o&&(o._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),o._flushProperties()),!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 function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=me(e).parentNode;return null}(this.template,t)}}customElements.define(fn.is,fn);
|
|
3606
3604
|
/**
|
|
3607
3605
|
* @license
|
|
3608
3606
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3609
3607
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3610
3608
|
*/
|
|
3611
|
-
const
|
|
3609
|
+
const vn=t=>class extends(ds(t)){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((t=>No(t.date,this.focusedDate)))}ready(){super.ready(),Wr(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(t,e,i){const r=new Date(0,0);r.setFullYear(t.getFullYear()),r.setMonth(t.getMonth()),r.setDate(1);const s=new Date(0,0);return s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()+1),s.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||qo(r,e,i)||qo(s,e,i))}_getTitle(t,e){if(void 0!==t&&void 0!==e)return e.formatTitle(e.monthNames[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300)}_dateAdd(t,e){t.setDate(t.getDate()+e)}_applyFirstDayOfWeek(t,e){if(void 0!==t&&void 0!==e)return t.slice(e).concat(t.slice(0,e))}_getWeekDayNames(t,e){if(void 0===t||void 0===e)return[];const{weekdays:i,weekdaysShort:r,firstDayOfWeek:s}=t,o=this._applyFirstDayOfWeek(r,s);return this._applyFirstDayOfWeek(i,s).map(((t,e)=>({weekDay:t,weekDayShort:o[e]}))).slice(0,7)}__focusedDateChanged(t,e){Array.isArray(e)&&e.some((e=>No(e,t)))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(t){return t?t.getDate():""}_showWeekSeparator(t,e){return t&&e&&1===e.firstDayOfWeek}_isToday(t){return No(new Date,t)}_getDays(t,e){if(void 0===t||void 0===e)return[];const i=new Date(0,0);for(i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(1);i.getDay()!==e.firstDayOfWeek;)this._dateAdd(i,-1);const r=[],s=i.getMonth(),o=t.getMonth();for(;i.getMonth()===o||i.getMonth()===s;)r.push(i.getMonth()===o?new Date(i.getTime()):null),this._dateAdd(i,1);return r}_getWeeks(t){return t.reduce(((t,e,i)=>(i%7==0&&t.push([]),t[t.length-1].push(e),t)),[])}_handleTap(t){this.ignoreTaps||this._notTapping||!t.target.date||t.target.hasAttribute("disabled")||(this.selectedDate=t.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:!0,composed:!0})))}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){const e=t.reduce(((t,e)=>!t&&e?e:t));
|
|
3612
3610
|
/**
|
|
3613
3611
|
* @license
|
|
3614
3612
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3625,7 +3623,7 @@ return function(t){let e=t.getDay();0===e&&(e=7);const i=4-e,r=new Date(t.getTim
|
|
|
3625
3623
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3626
3624
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3627
3625
|
*/
|
|
3628
|
-
|
|
3626
|
+
xt("vaadin-month-calendar",p`
|
|
3629
3627
|
:host {
|
|
3630
3628
|
display: block;
|
|
3631
3629
|
}
|
|
@@ -3681,7 +3679,7 @@ kt("vaadin-month-calendar",m`
|
|
|
3681
3679
|
outline: 3px solid;
|
|
3682
3680
|
}
|
|
3683
3681
|
}
|
|
3684
|
-
`,{moduleId:"vaadin-month-calendar-styles"});class
|
|
3682
|
+
`,{moduleId:"vaadin-month-calendar-styles"});class bn extends(vn(Dt(Ri))){static get template(){return ji`
|
|
3685
3683
|
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
|
|
3686
3684
|
<table
|
|
3687
3685
|
id="monthGrid"
|
|
@@ -3709,7 +3707,7 @@ kt("vaadin-month-calendar",m`
|
|
|
3709
3707
|
<template is="dom-repeat" items="[[week]]">
|
|
3710
3708
|
<td
|
|
3711
3709
|
role="gridcell"
|
|
3712
|
-
part$="[[__getDatePart(item, focusedDate, selectedDate, minDate, maxDate, isDateDisabled
|
|
3710
|
+
part$="[[__getDatePart(item, focusedDate, selectedDate, minDate, maxDate, isDateDisabled)]]"
|
|
3713
3711
|
date="[[item]]"
|
|
3714
3712
|
tabindex$="[[__getDayTabindex(item, focusedDate)]]"
|
|
3715
3713
|
disabled$="[[__isDayDisabled(item, minDate, maxDate, isDateDisabled)]]"
|
|
@@ -3723,18 +3721,18 @@ kt("vaadin-month-calendar",m`
|
|
|
3723
3721
|
</template>
|
|
3724
3722
|
</tbody>
|
|
3725
3723
|
</table>
|
|
3726
|
-
`}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&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,i,r,s,o
|
|
3724
|
+
`}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&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,i,r,s,o){const n=["date"],a=t>Oo(new Date),l=t<Oo(new Date);return this.__isDayDisabled(t,r,s,o)&&n.push("disabled"),this.__isDayFocused(t,e)&&n.push("focused"),this.__isDaySelected(t,i)&&n.push("selected"),this._isToday(t)&&n.push("today"),l&&n.push("past"),a&&n.push("future"),n.join(" ")}__isDayFocused(t,e){return No(t,e)}__isDaySelected(t,e){return No(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i,r){return!qo(t,e,i,r)}__getDayAriaDisabled(t,e,i,r){if(void 0!==t&&(void 0!==e||void 0!==i||void 0!==r))return this.__isDayDisabled(t,e,i,r)?"true":void 0}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}n(bn);
|
|
3727
3725
|
/**
|
|
3728
3726
|
* @license
|
|
3729
3727
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3730
3728
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3731
3729
|
*/
|
|
3732
|
-
class
|
|
3730
|
+
class gn{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){"function"==typeof this.callback&&this.callback(t.matches)}}
|
|
3733
3731
|
/**
|
|
3734
3732
|
* @license
|
|
3735
3733
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3736
3734
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3737
|
-
*/const wn=t=>class extends t{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",sync:!0},_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},enteredDate:{type:Date,sync:!0},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled, enteredDate)","__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((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){Ur(this.$.scrollers,"pan-y"),Yr(this.$.scrollers,"track",this._track.bind(this)),Yr(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Yr(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Yr(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new yn(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new _r(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Yr(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new _r(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Yr(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new _r(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new _r(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Yr(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,r,s){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,r,s))}__updateCalendars(t,e,i,r,s,o,n,a,l,h,c){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=r,t.isDateDisabled=h,t.focusedDate=o,t.selectedDate=s,t.showWeekNumbers=n,t.ignoreTaps=a,t.enteredDate=c,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const r=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+r,e)}const r=this._monthScroller.position>i,s=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,o=this._monthScroller.position+s-1<i;r?this._scrollToPosition(i,e):o&&this._scrollToPosition(i-s+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-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=sr.debounce(this._debouncer,Zi.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(Lo(t)):i}_onTodayTap(){const t=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2);this._scrollToPosition(this._monthScroller.position+e/this._yearScroller.itemHeight*12,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let r=0;const s=this._monthScroller.position,o=t=>{r||(r=t);const e=t-r;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,s,this._targetPosition-s);this._monthScroller.position=t,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:s}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return qo(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){Bo(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),e=!0);break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&Bo(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}async focusDate(t,e){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),await this.focusDateElement(!1)}async focusDateElement(t=!0){this.__pendingDateFocus=this.focusedDate,this.calendars.length||await new Promise((t=>{ro(this,(()=>{Yo(),t()}))})),t&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(jo(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,r=this.isDateDisabled){return Vo(t,e,i,r)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
|
|
3735
|
+
*/const yn=t=>class extends t{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((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){Ur(this.$.scrollers,"pan-y"),Wr(this.$.scrollers,"track",this._track.bind(this)),Wr(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Wr(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Wr(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new gn(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new wr(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Wr(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new wr(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Wr(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new wr(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new wr(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Wr(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,r,s){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,r,s))}__updateCalendars(t,e,i,r,s,o,n,a,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=r,t.isDateDisabled=h,t.focusedDate=o,t.selectedDate=s,t.showWeekNumbers=n,t.ignoreTaps=a,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const r=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+r,e)}const r=this._monthScroller.position>i,s=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,o=this._monthScroller.position+s-1<i;r?this._scrollToPosition(i,e):o&&this._scrollToPosition(i-s+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-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=rr.debounce(this._debouncer,Xi.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(Bo(t)):i}_onTodayTap(){const t=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2);this._scrollToPosition(this._monthScroller.position+e/this._yearScroller.itemHeight*12,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let r=0;const s=this._monthScroller.position,o=t=>{r||(r=t);const e=t-r;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,s,this._targetPosition-s);this._monthScroller.position=t,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:s}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return $o(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){No(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),e=!0);break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&No(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}async focusDate(t,e){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),await this.focusDateElement(!1)}async focusDateElement(t=!0){this.__pendingDateFocus=this.focusedDate,this.calendars.length||await new Promise((t=>{io(this,(()=>{Wo(),t()}))})),t&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(Lo(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,r=this.isDateDisabled){return qo(t,e,i,r)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
|
|
3738
3736
|
/**
|
|
3739
3737
|
* @license
|
|
3740
3738
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3745,7 +3743,7 @@ class yn{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=t
|
|
|
3745
3743
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3746
3744
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3747
3745
|
*/
|
|
3748
|
-
|
|
3746
|
+
xt("vaadin-date-picker-overlay-content",p`
|
|
3749
3747
|
:host {
|
|
3750
3748
|
display: flex;
|
|
3751
3749
|
flex-direction: column;
|
|
@@ -3805,7 +3803,7 @@ kt("vaadin-date-picker-overlay-content",m`
|
|
|
3805
3803
|
z-index: 2;
|
|
3806
3804
|
flex-shrink: 0;
|
|
3807
3805
|
}
|
|
3808
|
-
`,{moduleId:"vaadin-date-picker-overlay-content-styles"});class
|
|
3806
|
+
`,{moduleId:"vaadin-date-picker-overlay-content-styles"});class wn extends(yn(ks(Dt(cr(Ri))))){static get template(){return ji`
|
|
3809
3807
|
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
|
3810
3808
|
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
|
3811
3809
|
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
@@ -3825,23 +3823,23 @@ kt("vaadin-date-picker-overlay-content",m`
|
|
|
3825
3823
|
<slot name="today-button"></slot>
|
|
3826
3824
|
<slot name="cancel-button"></slot>
|
|
3827
3825
|
</div>
|
|
3828
|
-
`}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}
|
|
3826
|
+
`}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}n(wn);
|
|
3829
3827
|
/**
|
|
3830
3828
|
* @license
|
|
3831
3829
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3832
3830
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3833
3831
|
*/
|
|
3834
|
-
const
|
|
3832
|
+
const _n=new WeakMap,xn=Zt((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return _n.has(t)||_n.set(t,new Set),_n.get(t)}(t);this.slotStyles.forEach((i=>{e.has(i)||(function(t,e){const i=document.createElement("style");i.textContent=t,e===document?document.head.appendChild(i):e.insertBefore(i,e.firstChild)}(i,t),e.add(i))}))}})),kn=t=>class extends(fs(es(t))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),lo||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
|
|
3835
3833
|
/**
|
|
3836
3834
|
* @license
|
|
3837
3835
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3838
3836
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3839
|
-
*/,
|
|
3837
|
+
*/,Cn=Zt((t=>class extends(ms(Is(fs(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),r=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():r&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return Boolean(t)||0===t}})),An=t=>class extends(xn(ps(Cn(Ms(kn(es(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=rr.debounce(this._preventInputDebouncer,Xi.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
|
|
3840
3838
|
/**
|
|
3841
3839
|
* @license
|
|
3842
3840
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3843
3841
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3844
|
-
*/,
|
|
3842
|
+
*/,Sn=[p`
|
|
3845
3843
|
:host {
|
|
3846
3844
|
display: inline-flex;
|
|
3847
3845
|
outline: none;
|
|
@@ -3880,7 +3878,7 @@ const xn=new WeakMap,kn=te((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3880
3878
|
* @license
|
|
3881
3879
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3882
3880
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3883
|
-
*/,
|
|
3881
|
+
*/,p`
|
|
3884
3882
|
[class$='container'] {
|
|
3885
3883
|
display: flex;
|
|
3886
3884
|
flex-direction: column;
|
|
@@ -3893,7 +3891,7 @@ const xn=new WeakMap,kn=te((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3893
3891
|
* @license
|
|
3894
3892
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3895
3893
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3896
|
-
*/,
|
|
3894
|
+
*/,p`
|
|
3897
3895
|
[part='clear-button'] {
|
|
3898
3896
|
display: none;
|
|
3899
3897
|
cursor: default;
|
|
@@ -3911,7 +3909,7 @@ const xn=new WeakMap,kn=te((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3911
3909
|
* @license
|
|
3912
3910
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3913
3911
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3914
|
-
*/],
|
|
3912
|
+
*/],Dn=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e)return;if(void 0===t)return;const{classList:i}=e;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&i.remove(...t)}const r="string"==typeof t?t.split(" ").filter(Boolean):[];r.length>0&&i.add(...r),this.__previousClasses=r}}
|
|
3915
3913
|
/**
|
|
3916
3914
|
* @license
|
|
3917
3915
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -3921,7 +3919,7 @@ const xn=new WeakMap,kn=te((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3921
3919
|
* @license
|
|
3922
3920
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3923
3921
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3924
|
-
*/const zn=Object.freeze({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let r,s=i.getMonth(),o=i.getFullYear();if(3===e.length?(s=parseInt(e[0])-1,r=parseInt(e[1]),o=parseInt(e[2]),e[2].length<3&&o>=0&&(o=function(t,e,i=0,r=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let s=e+100*Math.floor(t.getFullYear()/100);return t<new Date(s-50,i,r)?s-=100:t>new Date(s+50,i,r)&&(s+=100),s}(this.referenceDate?$o(this.referenceDate):new Date,o,s,r))):2===e.length?(s=parseInt(e[0])-1,r=parseInt(e[1])):1===e.length&&(r=parseInt(e[0])),void 0!==r)return{day:r,month:s,year:o}},formatTitle:(t,e)=>`${t} ${e}`}),In=t=>class extends(En(Cs(ms(An(is(t)))))){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:{type:Boolean,sync:!0},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:()=>({...zn})},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:ao},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},__enteredDate:{type:Date,sync:!0}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled, __enteredDate)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t;const e=this.__parseDate(t);this.__setEnteredDate(e)}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(t){super._onFocus(t),this._noInput&&!ns()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this._requestValidation())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new yn(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Tn(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=$o(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(Lo(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||Vo(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let r=!0;return this.inputElement&&this.inputElement.checkValidity&&(r=this.inputElement.checkValidity()),e&&i&&r}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this._requestValidation(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,r,s,o){return!t||e&&(!o||s)||i&&s||!r.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",r="0000",s=t.year;return s<0?(s=-s,i="-",r="000000"):t.year>=1e4&&(i="+",r="000000"),[i+e(s,r),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0!==t&&void 0!==e&&(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0!==t&&void 0!==e&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(t))}_valueChanged(t,e){const i=$o(t);!t||i?(t?Bo(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this._requestValidation()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,r,s,o,n,a,l,h){t&&(t.i18n=e,t.label=i,t.minDate=r,t.maxDate=s,t.focusedDate=o,t.selectedDate=n,t.showWeekNumbers=a,t.isDateDisabled=l,t.enteredDate=h)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const r=this._nativeInput;this._noInput&&r&&(r.blur(),this._overlayContent.focusDateElement()),this.__showOthers=bo(this._noInput?t:[r,t])}_getInitialPosition(){const t=$o(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||Vo(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?jo(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this._keyboardActive||this._requestValidation()}_onScroll(t){t.target!==window&&this._overlayContent.contains(t.target)||this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){this.autoOpenDisabled&&!this._noInput||(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened)return this.clearButtonVisible&&this.value&&!this.readonly?(t.stopPropagation(),void this._onClearButtonClick(t)):void(""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate))}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open();const t=this.__parseDate(this._inputElementValue||"");t&&(this._ignoreFocusedDateChange=!0,Bo(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1),this.__setEnteredDate(t)}__setEnteredDate(t){t?Bo(this.__enteredDate,t)||(this.__enteredDate=t):null!=this.__enteredDate&&(this.__enteredDate=null)}__computeMinOrMaxDate(t){return $o(t)}}
|
|
3922
|
+
*/const En=t=>class extends(Dn(ks(ps(Cn(es(t)))))){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(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let r,s=i.getMonth(),o=i.getFullYear();if(3===e.length?(s=parseInt(e[0])-1,r=parseInt(e[1]),o=parseInt(e[2]),e[2].length<3&&o>=0&&(o=function(t,e,i=0,r=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let s=e+100*Math.floor(t.getFullYear()/100);return t<new Date(s-50,i,r)?s-=100:t>new Date(s+50,i,r)&&(s+=100),s}(this.referenceDate?jo(this.referenceDate):new Date,o,s,r))):2===e.length?(s=parseInt(e[0])-1,r=parseInt(e[1])):1===e.length&&(r=parseInt(e[0])),void 0!==r)return{day:r,month:s,year:o}},formatTitle:(t,e)=>`${t} ${e}`})},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:no},_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(t){super._inputElementValue=t,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(t){super._onFocus(t),this._noInput&&!os()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new gn(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Tn(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=jo(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(Bo(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||qo(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())),e&&i&&r}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,r,s,o){return!t||e&&(!o||s)||i&&s||!r.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",r="0000",s=t.year;return s<0?(s=-s,i="-",r="000000"):t.year>=1e4&&(i="+",r="000000"),[i+e(s,r),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0!==t&&void 0!==e&&(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0!==t&&void 0!==e&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(t))}_valueChanged(t,e){const i=jo(t);!t||i?(t?No(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,r,s,o,n,a,l){t&&(t.i18n=e,t.label=i,t.minDate=r,t.maxDate=s,t.focusedDate=o,t.selectedDate=n,t.showWeekNumbers=a,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const r=this._nativeInput;this._noInput&&r&&(r.blur(),this._overlayContent.focusDateElement()),this.__showOthers=vo(this._noInput?t:[r,t])}_getInitialPosition(){const t=jo(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||qo(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?Lo(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this._keyboardActive||this.validate()}_onScroll(t){t.target!==window&&this._overlayContent.contains(t.target)||this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){this.autoOpenDisabled&&!this._noInput||(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened)return this.clearButtonVisible&&this.value&&!this.readonly?(t.stopPropagation(),void this._onClearButtonClick(t)):void(""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate))}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,No(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return jo(t)}}
|
|
3925
3923
|
/**
|
|
3926
3924
|
* @license
|
|
3927
3925
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3932,7 +3930,7 @@ const xn=new WeakMap,kn=te((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3932
3930
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3933
3931
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3934
3932
|
*/
|
|
3935
|
-
|
|
3933
|
+
xt("vaadin-date-picker",[Sn,p`
|
|
3936
3934
|
:host([opened]) {
|
|
3937
3935
|
pointer-events: auto;
|
|
3938
3936
|
}
|
|
@@ -3945,7 +3943,7 @@ kt("vaadin-date-picker",[Dn,m`
|
|
|
3945
3943
|
direction: rtl;
|
|
3946
3944
|
text-align: left;
|
|
3947
3945
|
}
|
|
3948
|
-
`],{moduleId:"vaadin-date-picker-styles"});class
|
|
3946
|
+
`],{moduleId:"vaadin-date-picker-styles"});class zn extends(En(An(Dt(pr(Ri))))){static get is(){return"vaadin-date-picker"}static get template(){return ji`
|
|
3949
3947
|
<div class="vaadin-date-picker-container">
|
|
3950
3948
|
<div part="label">
|
|
3951
3949
|
<slot name="label"></slot>
|
|
@@ -3987,29 +3985,29 @@ kt("vaadin-date-picker",[Dn,m`
|
|
|
3987
3985
|
></vaadin-date-picker-overlay>
|
|
3988
3986
|
|
|
3989
3987
|
<slot name="tooltip"></slot>
|
|
3990
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Os(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new Ps(this.inputElement,this._labelController)),this._tooltipController=new xr(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(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}}function Fn(t){return Fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fn(t)}function On(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Pn(t){On(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Fn(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Nn(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Bn(t,e){return On(2,arguments),function(t,e){On(2,arguments);var i=Pn(t).getTime(),r=Nn(e);return new Date(i+r)}(t,-Nn(e))}function Ln(t){On(1,arguments);var e=Pn(t),i=e.getUTCDay(),r=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function Vn(t){On(1,arguments);var e=Pn(t),i=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(i+1,0,4),r.setUTCHours(0,0,0,0);var s=Ln(r),o=new Date(0);o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0);var n=Ln(o);return e.getTime()>=s.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}a(Mn);function jn(t){On(1,arguments);var e=Pn(t),i=Ln(e).getTime()-function(t){On(1,arguments);var e=Vn(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Ln(i)}(e).getTime();return Math.round(i/6048e5)+1}var qn={};function $n(){return qn}function Rn(t,e){var i,r,s,o,n,a,l,h;On(1,arguments);var c=$n(),d=Nn(null!==(i=null!==(r=null!==(s=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==s?s:c.weekStartsOn)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Pn(t),p=u.getUTCDay(),m=(p<d?7:0)+p-d;return u.setUTCDate(u.getUTCDate()-m),u.setUTCHours(0,0,0,0),u}function Hn(t,e){var i,r,s,o,n,a,l,h;On(1,arguments);var c=Pn(t),d=c.getUTCFullYear(),u=$n(),p=Nn(null!==(i=null!==(r=null!==(s=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==s?s:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(d+1,0,p),m.setUTCHours(0,0,0,0);var f=Rn(m,e),v=new Date(0);v.setUTCFullYear(d,0,p),v.setUTCHours(0,0,0,0);var b=Rn(v,e);return c.getTime()>=f.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}function Wn(t,e){On(1,arguments);var i=Pn(t),r=Rn(i,e).getTime()-function(t,e){var i,r,s,o,n,a,l,h;On(1,arguments);var c=$n(),d=Nn(null!==(i=null!==(r=null!==(s=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==s?s:c.firstWeekContainsDate)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),u=Hn(t,e),p=new Date(0);return p.setUTCFullYear(u,0,d),p.setUTCHours(0,0,0,0),Rn(p,e)}(i,e).getTime();return Math.round(r/6048e5)+1}function Yn(t,e){for(var i=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return i+r}const Gn=function(t,e){var i=t.getUTCFullYear(),r=i>0?i:1-i;return Yn("yy"===e?r%100:r,e.length)},Un=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Yn(i+1,2)},Xn=function(t,e){return Yn(t.getUTCDate(),e.length)},Qn=function(t,e){return Yn(t.getUTCHours()%12||12,e.length)},Jn=function(t,e){return Yn(t.getUTCHours(),e.length)},Kn=function(t,e){return Yn(t.getUTCMinutes(),e.length)},Zn=function(t,e){return Yn(t.getUTCSeconds(),e.length)},ta=function(t,e){var i=e.length,r=t.getUTCMilliseconds();return Yn(Math.floor(r*Math.pow(10,i-3)),e.length)};function ea(t,e){var i=t>0?"-":"+",r=Math.abs(t),s=Math.floor(r/60),o=r%60;if(0===o)return i+String(s);var n=e||"";return i+String(s)+n+Yn(o,2)}function ia(t,e){return t%60==0?(t>0?"-":"+")+Yn(Math.abs(t)/60,2):ra(t,e)}function ra(t,e){var i=e||"",r=t>0?"-":"+",s=Math.abs(t);return r+Yn(Math.floor(s/60),2)+i+Yn(s%60,2)}const sa={G:function(t,e,i){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});default:return i.era(r,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var r=t.getUTCFullYear();return i.ordinalNumber(r>0?r:1-r,{unit:"year"})}return Gn(t,e)},Y:function(t,e,i,r){var s=Hn(t,r),o=s>0?s:1-s;return"YY"===e?Yn(o%100,2):"Yo"===e?i.ordinalNumber(o,{unit:"year"}):Yn(o,e.length)},R:function(t,e){return Yn(Vn(t),e.length)},u:function(t,e){return Yn(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Yn(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Yn(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,i){var r=t.getUTCMonth();switch(e){case"M":case"MM":return Un(t,e);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,i){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Yn(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,i,r){var s=Wn(t,r);return"wo"===e?i.ordinalNumber(s,{unit:"week"}):Yn(s,e.length)},I:function(t,e,i){var r=jn(t);return"Io"===e?i.ordinalNumber(r,{unit:"week"}):Yn(r,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Xn(t,e)},D:function(t,e,i){var r=function(t){On(1,arguments);var e=Pn(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime();return Math.floor((i-r)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(r,{unit:"dayOfYear"}):Yn(r,e.length)},E:function(t,e,i){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,i,r){var s=t.getUTCDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Yn(o,2);case"eo":return i.ordinalNumber(o,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,r){var s=t.getUTCDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Yn(o,e.length);case"co":return i.ordinalNumber(o,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var r=t.getUTCDay(),s=0===r?7:r;switch(e){case"i":return String(s);case"ii":return Yn(s,e.length);case"io":return i.ordinalNumber(s,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,i){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,i){var r,s=t.getUTCHours();switch(r=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,i){var r,s=t.getUTCHours();switch(r=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return Qn(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Jn(t,e)},K:function(t,e,i){var r=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(r,{unit:"hour"}):Yn(r,e.length)},k:function(t,e,i){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?i.ordinalNumber(r,{unit:"hour"}):Yn(r,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Kn(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Zn(t,e)},S:function(t,e){return ta(t,e)},X:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return ia(s);case"XXXX":case"XX":return ra(s);default:return ra(s,":")}},x:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return ia(s);case"xxxx":case"xx":return ra(s);default:return ra(s,":")}},O:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+ea(s,":");default:return"GMT"+ra(s,":")}},z:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+ea(s,":");default:return"GMT"+ra(s,":")}},t:function(t,e,i,r){return Yn(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,r){return Yn((r._originalDate||t).getTime(),e.length)}};var oa=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},na=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},aa={p:na,P:function(t,e){var i,r=t.match(/(P+)(p+)?/)||[],s=r[1],o=r[2];if(!o)return oa(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",oa(s,e)).replace("{{time}}",na(o,e))}};const la=aa;function ha(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var ca=["D","DD"],da=["YY","YYYY"];function ua(t){return-1!==ca.indexOf(t)}function pa(t){return-1!==da.indexOf(t)}function ma(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var fa={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function va(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var ba,ga={date:va({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:va({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:va({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ya={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function wa(t){return function(e,i){var r;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,o=null!=i&&i.width?String(i.width):s;r=t.formattingValues[o]||t.formattingValues[s]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;r=t.values[a]||t.values[n]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function _a(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.width,s=e.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!s)return null;var o,n=s[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return o=t.valueCallback?t.valueCallback(l):l,{value:o=i.valueCallback?i.valueCallback(o):o,rest:e.slice(n.length)}}}const xa={code:"en-US",formatDistance:function(t,e,i){var r,s=fa[t];return r="string"==typeof s?s:1===e?s.one:s.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r},formatLong:ga,formatRelative:function(t){return ya[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:wa({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:wa({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:wa({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:wa({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:wa({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(ba={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(ba.matchPattern);if(!i)return null;var r=i[0],s=t.match(ba.parsePattern);if(!s)return null;var o=ba.valueCallback?ba.valueCallback(s[0]):s[0];return{value:o=e.valueCallback?e.valueCallback(o):o,rest:t.slice(r.length)}}),era:_a({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:_a({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:_a({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:_a({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:_a({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var ka=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ca=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Aa=/^'([^]*?)'?$/,Sa=/''/g,Da=/[a-zA-Z]/;function Ea(t,e,i){var r,s,o,n,a,l,h,c,d,u,p,m,f,v,b,g,y,w;On(2,arguments);var _=String(e),x=$n(),k=null!==(r=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:x.locale)&&void 0!==r?r:xa,C=Nn(null!==(o=null!==(n=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:x.firstWeekContainsDate)&&void 0!==n?n:null===(d=x.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=Nn(null!==(p=null!==(m=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(b=i.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==f?f:x.weekStartsOn)&&void 0!==m?m:null===(y=x.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var S=Pn(t);if(!function(t){if(On(1,arguments),!function(t){return On(1,arguments),t instanceof Date||"object"===Fn(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Pn(t);return!isNaN(Number(e))}(S))throw new RangeError("Invalid time value");var D=Bn(S,ha(S)),E={firstWeekContainsDate:C,weekStartsOn:A,locale:k,_originalDate:S};return _.match(Ca).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,la[e])(t,k.formatLong):t})).join("").match(ka).map((function(r){if("''"===r)return"'";var s,o,n=r[0];if("'"===n)return(o=(s=r).match(Aa))?o[1].replace(Sa,"'"):s;var a=sa[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||!pa(r)||ma(r,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!ua(r)||ma(r,e,String(t)),a(D,r,k.localize,E);if(n.match(Da))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return r})).join("")}function Ta(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=Array(e);i<e;i++)r[i]=t[i];return r}function za(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Ta(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ta(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,o=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw o}}}}function Ia(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function Ma(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Fa(t,e){return Fa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fa(t,e)}function Oa(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fa(t,e)}function Pa(t){return Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pa(t)}function Na(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Na=function(){return!!t})()}function Ba(t){var e=Na();return function(){var i,r=Pa(t);if(e){var s=Pa(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return function(t,e){if(e&&("object"==Fn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ma(t)}(this,i)}}function La(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Va(t){var e=function(t){if("object"!=Fn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Fn(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fn(e)?e:e+""}function ja(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Va(r.key),r)}}function qa(t,e,i){return e&&ja(t.prototype,e),i&&ja(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function $a(t,e,i){return(e=Va(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Ra=function(){function t(){La(this,t),$a(this,"priority",void 0),$a(this,"subPriority",0)}return qa(t,[{key:"validate",value:function(){return!0}}]),t}(),Ha=function(){Oa(e,Ra);var t=Ba(e);function e(i,r,s,o,n){var a;return La(this,e),(a=t.call(this)).value=i,a.validateValue=r,a.setValue=s,a.priority=o,n&&(a.subPriority=n),a}return qa(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Wa=function(){Oa(e,Ra);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",10),$a(Ma(i),"subPriority",-1),i}return qa(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),Ya=function(){function t(){La(this,t),$a(this,"incompatibleTokens",void 0),$a(this,"priority",void 0),$a(this,"subPriority",void 0)}return qa(t,[{key:"run",value:function(t,e,i,r){var s=this.parse(t,e,i,r);return s?{setter:new Ha(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Ga=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",140),$a(Ma(i),"incompatibleTokens",["R","u","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ua=/^(1[0-2]|0?\d)/,Xa=/^(3[0-1]|[0-2]?\d)/,Qa=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Ja=/^(5[0-3]|[0-4]?\d)/,Ka=/^(2[0-3]|[0-1]?\d)/,Za=/^(2[0-4]|[0-1]?\d)/,tl=/^(1[0-1]|0?\d)/,el=/^(1[0-2]|0?\d)/,il=/^[0-5]?\d/,rl=/^[0-5]?\d/,sl=/^\d/,ol=/^\d{1,2}/,nl=/^\d{1,3}/,al=/^\d{1,4}/,ll=/^-?\d+/,hl=/^-?\d/,cl=/^-?\d{1,2}/,dl=/^-?\d{1,3}/,ul=/^-?\d{1,4}/,pl=/^([+-])(\d{2})(\d{2})?|Z/,ml=/^([+-])(\d{2})(\d{2})|Z/,fl=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,vl=/^([+-])(\d{2}):(\d{2})|Z/,bl=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function gl(t,e){return t?{value:e(t.value),rest:t.rest}:t}function yl(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function wl(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function _l(t){return yl(ll,t)}function xl(t,e){switch(t){case 1:return yl(sl,e);case 2:return yl(ol,e);case 3:return yl(nl,e);case 4:return yl(al,e);default:return yl(new RegExp("^\\d{1,"+t+"}"),e)}}function kl(t,e){switch(t){case 1:return yl(hl,e);case 2:return yl(cl,e);case 3:return yl(dl,e);case 4:return yl(ul,e);default:return yl(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Cl(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Al(t,e){var i,r=e>0,s=r?e:1-e;if(s<=50)i=t||100;else{var o=s+50;i=t+100*Math.floor(o/100)-(t>=o%100?100:0)}return r?i:1-i}function Sl(t){return t%400==0||t%4==0&&t%100!=0}var Dl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",130),$a(Ma(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){var r=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return gl(xl(4,t),r);case"yo":return gl(i.ordinalNumber(t,{unit:"year"}),r);default:return gl(xl(e.length,t),r)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var r=t.getUTCFullYear();if(i.isTwoDigitYear){var s=Al(i.year,r);return t.setUTCFullYear(s,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),El=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",130),$a(Ma(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){var r=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return gl(xl(4,t),r);case"Yo":return gl(i.ordinalNumber(t,{unit:"year"}),r);default:return gl(xl(e.length,t),r)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,r){var s=Hn(t,r);if(i.isTwoDigitYear){var o=Al(i.year,s);return t.setUTCFullYear(o,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Rn(t,r)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Rn(t,r)}}]),e}(),Tl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",130),$a(Ma(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e){return kl("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var r=new Date(0);return r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0),Ln(r)}}]),e}(),zl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",130),$a(Ma(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e){return kl("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Il=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",120),$a(Ma(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return xl(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ml=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",120),$a(Ma(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return xl(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Fl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),$a(Ma(i),"priority",110),i}return qa(e,[{key:"parse",value:function(t,e,i){var r=function(t){return t-1};switch(e){case"M":return gl(yl(Ua,t),r);case"MM":return gl(xl(2,t),r);case"Mo":return gl(i.ordinalNumber(t,{unit:"month"}),r);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ol=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",110),$a(Ma(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){var r=function(t){return t-1};switch(e){case"L":return gl(yl(Ua,t),r);case"LL":return gl(xl(2,t),r);case"Lo":return gl(i.ordinalNumber(t,{unit:"month"}),r);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Pl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",100),$a(Ma(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return yl(Ja,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return xl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,r){return Rn(function(t,e,i){On(2,arguments);var r=Pn(t),s=Nn(e),o=Wn(r,i)-s;return r.setUTCDate(r.getUTCDate()-7*o),r}(t,i,r),r)}}]),e}(),Nl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",100),$a(Ma(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return yl(Ja,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return xl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Ln(function(t,e){On(2,arguments);var i=Pn(t),r=Nn(e),s=jn(i)-r;return i.setUTCDate(i.getUTCDate()-7*s),i}(t,i))}}]),e}(),Bl=[31,28,31,30,31,30,31,31,30,31,30,31],Ll=[31,29,31,30,31,30,31,31,30,31,30,31],Vl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",90),$a(Ma(i),"subPriority",1),$a(Ma(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return yl(Xa,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return xl(e.length,t)}}},{key:"validate",value:function(t,e){var i=Sl(t.getUTCFullYear()),r=t.getUTCMonth();return i?e>=1&&e<=Ll[r]:e>=1&&e<=Bl[r]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),jl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",90),$a(Ma(i),"subpriority",1),$a(Ma(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return yl(Qa,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return xl(e.length,t)}}},{key:"validate",value:function(t,e){return Sl(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function ql(t,e,i){var r,s,o,n,a,l,h,c;On(2,arguments);var d=$n(),u=Nn(null!==(r=null!==(s=null!==(o=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:d.weekStartsOn)&&void 0!==s?s:null===(h=d.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==r?r:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pn(t),m=Nn(e),f=((m%7+7)%7<u?7:0)+m-p.getUTCDay();return p.setUTCDate(p.getUTCDate()+f),p}var $l=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",90),$a(Ma(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,r){return(t=ql(t,i,r)).setUTCHours(0,0,0,0),t}}]),e}(),Rl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",90),$a(Ma(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i,r){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return gl(xl(e.length,t),s);case"eo":return gl(i.ordinalNumber(t,{unit:"day"}),s);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,r){return(t=ql(t,i,r)).setUTCHours(0,0,0,0),t}}]),e}(),Hl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",90),$a(Ma(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i,r){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return gl(xl(e.length,t),s);case"co":return gl(i.ordinalNumber(t,{unit:"day"}),s);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,r){return(t=ql(t,i,r)).setUTCHours(0,0,0,0),t}}]),e}(),Wl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",90),$a(Ma(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){var r=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return xl(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return gl(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r);case"iiiii":return gl(i.day(t,{width:"narrow",context:"formatting"}),r);case"iiiiii":return gl(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r);default:return gl(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){On(2,arguments);var i=Nn(e);i%7==0&&(i-=7);var r=Pn(t),s=((i%7+7)%7<1?7:0)+i-r.getUTCDay();return r.setUTCDate(r.getUTCDate()+s),r}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Yl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",80),$a(Ma(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Cl(i),0,0,0),t}}]),e}(),Gl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",80),$a(Ma(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Cl(i),0,0,0),t}}]),e}(),Ul=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",80),$a(Ma(i),"incompatibleTokens",["a","b","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Cl(i),0,0,0),t}}]),e}(),Xl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",70),$a(Ma(i),"incompatibleTokens",["H","K","k","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return yl(el,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return xl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&i<12?i+12:r||12!==i?i:0,0,0,0),t}}]),e}(),Ql=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",70),$a(Ma(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return yl(Ka,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return xl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Jl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",70),$a(Ma(i),"incompatibleTokens",["h","H","k","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return yl(tl,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return xl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&i<12?i+12:i,0,0,0),t}}]),e}(),Kl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",70),$a(Ma(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return yl(Za,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return xl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),Zl=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",60),$a(Ma(i),"incompatibleTokens",["t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return yl(il,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return xl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),th=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",50),$a(Ma(i),"incompatibleTokens",["t","T"]),i}return qa(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return yl(rl,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return xl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),eh=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",30),$a(Ma(i),"incompatibleTokens",["t","T"]),i}return qa(e,[{key:"parse",value:function(t,e){return gl(xl(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),ih=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",10),$a(Ma(i),"incompatibleTokens",["t","T","x"]),i}return qa(e,[{key:"parse",value:function(t,e){switch(e){case"X":return wl(pl,t);case"XX":return wl(ml,t);case"XXXX":return wl(fl,t);case"XXXXX":return wl(bl,t);default:return wl(vl,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),rh=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",10),$a(Ma(i),"incompatibleTokens",["t","T","X"]),i}return qa(e,[{key:"parse",value:function(t,e){switch(e){case"x":return wl(pl,t);case"xx":return wl(ml,t);case"xxxx":return wl(fl,t);case"xxxxx":return wl(bl,t);default:return wl(vl,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),sh=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",40),$a(Ma(i),"incompatibleTokens","*"),i}return qa(e,[{key:"parse",value:function(t){return _l(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),oh=function(){Oa(e,Ya);var t=Ba(e);function e(){var i;La(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(Ma(i=t.call.apply(t,[this].concat(s))),"priority",20),$a(Ma(i),"incompatibleTokens","*"),i}return qa(e,[{key:"parse",value:function(t){return _l(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),nh={G:new Ga,y:new Dl,Y:new El,R:new Tl,u:new zl,Q:new Il,q:new Ml,M:new Fl,L:new Ol,w:new Pl,I:new Nl,d:new Vl,D:new jl,E:new $l,e:new Rl,c:new Hl,i:new Wl,a:new Yl,b:new Gl,B:new Ul,h:new Xl,H:new Ql,K:new Jl,k:new Kl,m:new Zl,s:new th,S:new eh,X:new ih,x:new rh,t:new sh,T:new oh},ah=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hh=/^'([^]*?)'?$/,ch=/''/g,dh=/\S/,uh=/[a-zA-Z]/;function ph(t,e,i,r){var s,o,n,a,l,h,c,d,u,p,m,f,v,b,g,y,w,_;On(3,arguments);var x=String(t),k=String(e),C=$n(),A=null!==(s=null!==(o=null==r?void 0:r.locale)&&void 0!==o?o:C.locale)&&void 0!==s?s:xa;if(!A.match)throw new RangeError("locale must contain match property");var S=Nn(null!==(n=null!==(a=null!==(l=null!==(h=null==r?void 0:r.firstWeekContainsDate)&&void 0!==h?h:null==r||null===(c=r.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==l?l:C.firstWeekContainsDate)&&void 0!==a?a:null===(u=C.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=Nn(null!==(m=null!==(f=null!==(v=null!==(b=null==r?void 0:r.weekStartsOn)&&void 0!==b?b:null==r||null===(g=r.locale)||void 0===g||null===(y=g.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==v?v:C.weekStartsOn)&&void 0!==f?f:null===(w=C.locale)||void 0===w||null===(_=w.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==m?m:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===x?Pn(i):new Date(NaN);var E,T={firstWeekContainsDate:S,weekStartsOn:D,locale:A},z=[new Wa],I=k.match(lh).map((function(t){var e=t[0];return e in la?(0,la[e])(t,A.formatLong):t})).join("").match(ah),M=[],F=za(I);try{var O=function(){var e=E.value;null!=r&&r.useAdditionalWeekYearTokens||!pa(e)||ma(e,k,t),null!=r&&r.useAdditionalDayOfYearTokens||!ua(e)||ma(e,k,t);var i=e[0],s=nh[i];if(s){var o=s.incompatibleTokens;if(Array.isArray(o)){var n=M.find((function(t){return o.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===s.incompatibleTokens&&M.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));M.push({token:i,fullToken:e});var a=s.run(x,e,A.match,T);if(!a)return{v:new Date(NaN)};z.push(a.setter),x=a.rest}else{if(i.match(uh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(hh)[1].replace(ch,"'")),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(F.s();!(E=F.n()).done;){var P=O();if("object"===Fn(P))return P.v}}catch(t){F.e(t)}finally{F.f()}if(x.length>0&&dh.test(x))return new Date(NaN);var N=z.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return z.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),B=Pn(i);if(isNaN(B.getTime()))return new Date(NaN);var L,V=Bn(B,ha(B)),j={},q=za(N);try{for(q.s();!(L=q.n()).done;){var $=L.value;if(!$.validate(V,T))return new Date(NaN);var R=$.set(V,j,T);Array.isArray(R)?(V=R[0],Ia(j,R[1])):V=R}}catch(t){q.e(t)}finally{q.f()}return V}function mh(t,e){On(2,arguments);var i=Pn(t),r=Pn(e);return i.getTime()>r.getTime()}function fh(t,e){On(2,arguments);var i=Pn(t),r=Pn(e);return i.getTime()<r.getTime()}const vh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.emitOnClick=!1,this.limitStylingAppends=!1,this.showTooltip=!1,this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:r}=t;return Ea(new Date(e,i,r),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=ph(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=ph((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=ph((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){if(this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker){const t=this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');t&&t.addEventListener("click",(()=>this.handleCalendarIconClick()))}this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleCalendarIconClick(){this.datePicker.opened&&this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=ph(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!fh(this.valueAsDate,this.minDate)&&!mh(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return fh(this.valueAsDate,this.minDate)||mh(this.valueAsDate,this.maxDate)?s("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?s("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?s("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"fc9cd0a618c7b6e62962c0800399a470fffa1fc4",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{key:"abc7c1715dd2d0c60dd2ac6d028355de910be501",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{key:"a6b40a978b573d41490457d708f9a7ac78622a6f",id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),i("small",{key:"d802ea7b25a64802aca3a7491107fcee7af2a23c",class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"46edd200a9ce9eba27414a6434c6b3d5e9dc9964",class:"date__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return r(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};vh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.date__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:rgba(204, 0, 0, 0.7019607843)}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const bh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,r;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):r}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return s("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(r=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===r?void 0:r.errorMessage;return s(`${t}`,this.language)?s(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"23ac67984ab7a0f4db01e5fe01f4f326b4c6a912",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"aa2405e435aea20f1678dd74776a8ce4094bc95b",class:"email__wrapper--flex"},i("label",{key:"970b83bbcf082d1721c1647993fecd076939b65d",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"2f03eaf161aab9b45282c1bc0de15bea8455427c",class:"email__wrapper--relative"},this.tooltip&&i("img",{key:"3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b",class:"email__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"491f83c0f562893c02e3425b4d54eecc214e3c95",id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"edb6660d958cc5d0cb41b0db195bd7e847ecbefe",class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};bh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emw--color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.email__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__input::placeholder{color:var(--emw--color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const gh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):r}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?s("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?s("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"2032f77ca52b330ae2e8f484d7a0aba60ee7b9d5",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"0786901cd928bba86597180f058bff43fba522b6",class:"number__wrapper--flex"},i("label",{key:"ff7f39306cef7aeba3e0e4508df03c5a945e748b",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"dced91223621551472fee374d56f1ad7476f4191",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"a804a983e342e4d117126720a32c4c34a2b267dc",class:"number__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"fd59afaedf7d9f761684b057a1809474d735cc26",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"ca11558b5704b69311626736ab84a298449b98d7",class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};gh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emw--color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}',
|
|
3988
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ps(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new Fs(this.inputElement,this._labelController)),this._tooltipController=new _r(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(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}}function In(t){return In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},In(t)}function Mn(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Pn(t){Mn(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===In(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Fn(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function On(t,e){return Mn(2,arguments),function(t,e){Mn(2,arguments);var i=Pn(t).getTime(),r=Fn(e);return new Date(i+r)}(t,-Fn(e))}function Nn(t){Mn(1,arguments);var e=Pn(t),i=e.getUTCDay(),r=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function Bn(t){Mn(1,arguments);var e=Pn(t),i=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(i+1,0,4),r.setUTCHours(0,0,0,0);var s=Nn(r),o=new Date(0);o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0);var n=Nn(o);return e.getTime()>=s.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}n(zn);function qn(t){Mn(1,arguments);var e=Pn(t),i=Nn(e).getTime()-function(t){Mn(1,arguments);var e=Bn(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Nn(i)}(e).getTime();return Math.round(i/6048e5)+1}var Ln={};function $n(){return Ln}function jn(t,e){var i,r,s,o,n,a,l,h;Mn(1,arguments);var c=$n(),d=Fn(null!==(i=null!==(r=null!==(s=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==s?s:c.weekStartsOn)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Pn(t),p=u.getUTCDay(),m=(p<d?7:0)+p-d;return u.setUTCDate(u.getUTCDate()-m),u.setUTCHours(0,0,0,0),u}function Vn(t,e){var i,r,s,o,n,a,l,h;Mn(1,arguments);var c=Pn(t),d=c.getUTCFullYear(),u=$n(),p=Fn(null!==(i=null!==(r=null!==(s=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==s?s:u.firstWeekContainsDate)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(d+1,0,p),m.setUTCHours(0,0,0,0);var f=jn(m,e),v=new Date(0);v.setUTCFullYear(d,0,p),v.setUTCHours(0,0,0,0);var b=jn(v,e);return c.getTime()>=f.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}function Rn(t,e){Mn(1,arguments);var i=Pn(t),r=jn(i,e).getTime()-function(t,e){var i,r,s,o,n,a,l,h;Mn(1,arguments);var c=$n(),d=Fn(null!==(i=null!==(r=null!==(s=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==s?s:c.firstWeekContainsDate)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),u=Vn(t,e),p=new Date(0);return p.setUTCFullYear(u,0,d),p.setUTCHours(0,0,0,0),jn(p,e)}(i,e).getTime();return Math.round(r/6048e5)+1}function Hn(t,e){for(var i=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return i+r}const Wn=function(t,e){var i=t.getUTCFullYear(),r=i>0?i:1-i;return Hn("yy"===e?r%100:r,e.length)},Yn=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Hn(i+1,2)},Un=function(t,e){return Hn(t.getUTCDate(),e.length)},Gn=function(t,e){return Hn(t.getUTCHours()%12||12,e.length)},Qn=function(t,e){return Hn(t.getUTCHours(),e.length)},Jn=function(t,e){return Hn(t.getUTCMinutes(),e.length)},Kn=function(t,e){return Hn(t.getUTCSeconds(),e.length)},Xn=function(t,e){var i=e.length,r=t.getUTCMilliseconds();return Hn(Math.floor(r*Math.pow(10,i-3)),e.length)};function Zn(t,e){var i=t>0?"-":"+",r=Math.abs(t),s=Math.floor(r/60),o=r%60;if(0===o)return i+String(s);var n=e||"";return i+String(s)+n+Hn(o,2)}function ta(t,e){return t%60==0?(t>0?"-":"+")+Hn(Math.abs(t)/60,2):ea(t,e)}function ea(t,e){var i=e||"",r=t>0?"-":"+",s=Math.abs(t);return r+Hn(Math.floor(s/60),2)+i+Hn(s%60,2)}const ia={G:function(t,e,i){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});default:return i.era(r,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var r=t.getUTCFullYear();return i.ordinalNumber(r>0?r:1-r,{unit:"year"})}return Wn(t,e)},Y:function(t,e,i,r){var s=Vn(t,r),o=s>0?s:1-s;return"YY"===e?Hn(o%100,2):"Yo"===e?i.ordinalNumber(o,{unit:"year"}):Hn(o,e.length)},R:function(t,e){return Hn(Bn(t),e.length)},u:function(t,e){return Hn(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Hn(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Hn(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,i){var r=t.getUTCMonth();switch(e){case"M":case"MM":return Yn(t,e);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,i){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Hn(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,i,r){var s=Rn(t,r);return"wo"===e?i.ordinalNumber(s,{unit:"week"}):Hn(s,e.length)},I:function(t,e,i){var r=qn(t);return"Io"===e?i.ordinalNumber(r,{unit:"week"}):Hn(r,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Un(t,e)},D:function(t,e,i){var r=function(t){Mn(1,arguments);var e=Pn(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime();return Math.floor((i-r)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(r,{unit:"dayOfYear"}):Hn(r,e.length)},E:function(t,e,i){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,i,r){var s=t.getUTCDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Hn(o,2);case"eo":return i.ordinalNumber(o,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,r){var s=t.getUTCDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Hn(o,e.length);case"co":return i.ordinalNumber(o,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var r=t.getUTCDay(),s=0===r?7:r;switch(e){case"i":return String(s);case"ii":return Hn(s,e.length);case"io":return i.ordinalNumber(s,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,i){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,i){var r,s=t.getUTCHours();switch(r=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,i){var r,s=t.getUTCHours();switch(r=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return Gn(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Qn(t,e)},K:function(t,e,i){var r=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(r,{unit:"hour"}):Hn(r,e.length)},k:function(t,e,i){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?i.ordinalNumber(r,{unit:"hour"}):Hn(r,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Jn(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Kn(t,e)},S:function(t,e){return Xn(t,e)},X:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return ta(s);case"XXXX":case"XX":return ea(s);default:return ea(s,":")}},x:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return ta(s);case"xxxx":case"xx":return ea(s);default:return ea(s,":")}},O:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Zn(s,":");default:return"GMT"+ea(s,":")}},z:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Zn(s,":");default:return"GMT"+ea(s,":")}},t:function(t,e,i,r){return Hn(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,r){return Hn((r._originalDate||t).getTime(),e.length)}};var ra=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},sa=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},oa={p:sa,P:function(t,e){var i,r=t.match(/(P+)(p+)?/)||[],s=r[1],o=r[2];if(!o)return ra(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",ra(s,e)).replace("{{time}}",sa(o,e))}};const na=oa;function aa(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var la=["D","DD"],ha=["YY","YYYY"];function ca(t){return-1!==la.indexOf(t)}function da(t){return-1!==ha.indexOf(t)}function ua(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var pa={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ma(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var fa,va={date:ma({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ma({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ma({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ba={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ga(t){return function(e,i){var r;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,o=null!=i&&i.width?String(i.width):s;r=t.formattingValues[o]||t.formattingValues[s]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;r=t.values[a]||t.values[n]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function ya(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.width,s=e.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!s)return null;var o,n=s[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return o=t.valueCallback?t.valueCallback(l):l,{value:o=i.valueCallback?i.valueCallback(o):o,rest:e.slice(n.length)}}}const wa={code:"en-US",formatDistance:function(t,e,i){var r,s=pa[t];return r="string"==typeof s?s:1===e?s.one:s.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r},formatLong:va,formatRelative:function(t){return ba[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:ga({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ga({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:ga({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ga({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ga({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(fa={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(fa.matchPattern);if(!i)return null;var r=i[0],s=t.match(fa.parsePattern);if(!s)return null;var o=fa.valueCallback?fa.valueCallback(s[0]):s[0];return{value:o=e.valueCallback?e.valueCallback(o):o,rest:t.slice(r.length)}}),era:ya({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ya({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ya({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ya({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ya({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var _a=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xa=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ka=/^'([^]*?)'?$/,Ca=/''/g,Aa=/[a-zA-Z]/;function Sa(t,e,i){var r,s,o,n,a,l,h,c,d,u,p,m,f,v,b,g,y,w;Mn(2,arguments);var _=String(e),x=$n(),k=null!==(r=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:x.locale)&&void 0!==r?r:wa,C=Fn(null!==(o=null!==(n=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:x.firstWeekContainsDate)&&void 0!==n?n:null===(d=x.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=Fn(null!==(p=null!==(m=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(b=i.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==f?f:x.weekStartsOn)&&void 0!==m?m:null===(y=x.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var S=Pn(t);if(!function(t){if(Mn(1,arguments),!function(t){return Mn(1,arguments),t instanceof Date||"object"===In(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Pn(t);return!isNaN(Number(e))}(S))throw new RangeError("Invalid time value");var D=On(S,aa(S)),T={firstWeekContainsDate:C,weekStartsOn:A,locale:k,_originalDate:S};return _.match(xa).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,na[e])(t,k.formatLong):t})).join("").match(_a).map((function(r){if("''"===r)return"'";var s,o,n=r[0];if("'"===n)return(o=(s=r).match(ka))?o[1].replace(Ca,"'"):s;var a=ia[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||!da(r)||ua(r,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!ca(r)||ua(r,e,String(t)),a(D,r,k.localize,T);if(n.match(Aa))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return r})).join("")}function Da(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=Array(e);i<e;i++)r[i]=t[i];return r}function Ta(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Da(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Da(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,o=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw o}}}}function Ea(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function za(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ia(t,e){return Ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ia(t,e)}function Ma(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ia(t,e)}function Pa(t){return Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pa(t)}function Fa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fa=function(){return!!t})()}function Oa(t){var e=Fa();return function(){var i,r=Pa(t);if(e){var s=Pa(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return function(t,e){if(e&&("object"==In(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return za(t)}(this,i)}}function Na(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ba(t){var e=function(t){if("object"!=In(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=In(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==In(e)?e:e+""}function qa(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ba(r.key),r)}}function La(t,e,i){return e&&qa(t.prototype,e),i&&qa(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function $a(t,e,i){return(e=Ba(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var ja=function(){function t(){Na(this,t),$a(this,"priority",void 0),$a(this,"subPriority",0)}return La(t,[{key:"validate",value:function(){return!0}}]),t}(),Va=function(){Ma(e,ja);var t=Oa(e);function e(i,r,s,o,n){var a;return Na(this,e),(a=t.call(this)).value=i,a.validateValue=r,a.setValue=s,a.priority=o,n&&(a.subPriority=n),a}return La(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Ra=function(){Ma(e,ja);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",10),$a(za(i),"subPriority",-1),i}return La(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),Ha=function(){function t(){Na(this,t),$a(this,"incompatibleTokens",void 0),$a(this,"priority",void 0),$a(this,"subPriority",void 0)}return La(t,[{key:"run",value:function(t,e,i,r){var s=this.parse(t,e,i,r);return s?{setter:new Va(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Wa=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",140),$a(za(i),"incompatibleTokens",["R","u","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ya=/^(1[0-2]|0?\d)/,Ua=/^(3[0-1]|[0-2]?\d)/,Ga=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Qa=/^(5[0-3]|[0-4]?\d)/,Ja=/^(2[0-3]|[0-1]?\d)/,Ka=/^(2[0-4]|[0-1]?\d)/,Xa=/^(1[0-1]|0?\d)/,Za=/^(1[0-2]|0?\d)/,tl=/^[0-5]?\d/,el=/^[0-5]?\d/,il=/^\d/,rl=/^\d{1,2}/,sl=/^\d{1,3}/,ol=/^\d{1,4}/,nl=/^-?\d+/,al=/^-?\d/,ll=/^-?\d{1,2}/,hl=/^-?\d{1,3}/,cl=/^-?\d{1,4}/,dl=/^([+-])(\d{2})(\d{2})?|Z/,ul=/^([+-])(\d{2})(\d{2})|Z/,pl=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,ml=/^([+-])(\d{2}):(\d{2})|Z/,fl=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function vl(t,e){return t?{value:e(t.value),rest:t.rest}:t}function bl(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function gl(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function yl(t){return bl(nl,t)}function wl(t,e){switch(t){case 1:return bl(il,e);case 2:return bl(rl,e);case 3:return bl(sl,e);case 4:return bl(ol,e);default:return bl(new RegExp("^\\d{1,"+t+"}"),e)}}function _l(t,e){switch(t){case 1:return bl(al,e);case 2:return bl(ll,e);case 3:return bl(hl,e);case 4:return bl(cl,e);default:return bl(new RegExp("^-?\\d{1,"+t+"}"),e)}}function xl(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function kl(t,e){var i,r=e>0,s=r?e:1-e;if(s<=50)i=t||100;else{var o=s+50;i=t+100*Math.floor(o/100)-(t>=o%100?100:0)}return r?i:1-i}function Cl(t){return t%400==0||t%4==0&&t%100!=0}var Al=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",130),$a(za(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){var r=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return vl(wl(4,t),r);case"yo":return vl(i.ordinalNumber(t,{unit:"year"}),r);default:return vl(wl(e.length,t),r)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var r=t.getUTCFullYear();if(i.isTwoDigitYear){var s=kl(i.year,r);return t.setUTCFullYear(s,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Sl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",130),$a(za(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){var r=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return vl(wl(4,t),r);case"Yo":return vl(i.ordinalNumber(t,{unit:"year"}),r);default:return vl(wl(e.length,t),r)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,r){var s=Vn(t,r);if(i.isTwoDigitYear){var o=kl(i.year,s);return t.setUTCFullYear(o,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),jn(t,r)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),jn(t,r)}}]),e}(),Dl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",130),$a(za(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return La(e,[{key:"parse",value:function(t,e){return _l("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var r=new Date(0);return r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0),Nn(r)}}]),e}(),Tl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",130),$a(za(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return La(e,[{key:"parse",value:function(t,e){return _l("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),El=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",120),$a(za(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return wl(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),zl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",120),$a(za(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return wl(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Il=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),$a(za(i),"priority",110),i}return La(e,[{key:"parse",value:function(t,e,i){var r=function(t){return t-1};switch(e){case"M":return vl(bl(Ya,t),r);case"MM":return vl(wl(2,t),r);case"Mo":return vl(i.ordinalNumber(t,{unit:"month"}),r);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ml=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",110),$a(za(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){var r=function(t){return t-1};switch(e){case"L":return vl(bl(Ya,t),r);case"LL":return vl(wl(2,t),r);case"Lo":return vl(i.ordinalNumber(t,{unit:"month"}),r);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Pl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",100),$a(za(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return bl(Qa,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return wl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,r){return jn(function(t,e,i){Mn(2,arguments);var r=Pn(t),s=Fn(e),o=Rn(r,i)-s;return r.setUTCDate(r.getUTCDate()-7*o),r}(t,i,r),r)}}]),e}(),Fl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",100),$a(za(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return bl(Qa,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return wl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Nn(function(t,e){Mn(2,arguments);var i=Pn(t),r=Fn(e),s=qn(i)-r;return i.setUTCDate(i.getUTCDate()-7*s),i}(t,i))}}]),e}(),Ol=[31,28,31,30,31,30,31,31,30,31,30,31],Nl=[31,29,31,30,31,30,31,31,30,31,30,31],Bl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",90),$a(za(i),"subPriority",1),$a(za(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return bl(Ua,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return wl(e.length,t)}}},{key:"validate",value:function(t,e){var i=Cl(t.getUTCFullYear()),r=t.getUTCMonth();return i?e>=1&&e<=Nl[r]:e>=1&&e<=Ol[r]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),ql=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",90),$a(za(i),"subpriority",1),$a(za(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return bl(Ga,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return wl(e.length,t)}}},{key:"validate",value:function(t,e){return Cl(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Ll(t,e,i){var r,s,o,n,a,l,h,c;Mn(2,arguments);var d=$n(),u=Fn(null!==(r=null!==(s=null!==(o=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:d.weekStartsOn)&&void 0!==s?s:null===(h=d.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==r?r:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Pn(t),m=Fn(e),f=((m%7+7)%7<u?7:0)+m-p.getUTCDay();return p.setUTCDate(p.getUTCDate()+f),p}var $l=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",90),$a(za(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,r){return(t=Ll(t,i,r)).setUTCHours(0,0,0,0),t}}]),e}(),jl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",90),$a(za(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i,r){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return vl(wl(e.length,t),s);case"eo":return vl(i.ordinalNumber(t,{unit:"day"}),s);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,r){return(t=Ll(t,i,r)).setUTCHours(0,0,0,0),t}}]),e}(),Vl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",90),$a(za(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i,r){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return vl(wl(e.length,t),s);case"co":return vl(i.ordinalNumber(t,{unit:"day"}),s);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,r){return(t=Ll(t,i,r)).setUTCHours(0,0,0,0),t}}]),e}(),Rl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",90),$a(za(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){var r=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return wl(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return vl(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r);case"iiiii":return vl(i.day(t,{width:"narrow",context:"formatting"}),r);case"iiiiii":return vl(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r);default:return vl(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){Mn(2,arguments);var i=Fn(e);i%7==0&&(i-=7);var r=Pn(t),s=((i%7+7)%7<1?7:0)+i-r.getUTCDay();return r.setUTCDate(r.getUTCDate()+s),r}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Hl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",80),$a(za(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(xl(i),0,0,0),t}}]),e}(),Wl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",80),$a(za(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(xl(i),0,0,0),t}}]),e}(),Yl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",80),$a(za(i),"incompatibleTokens",["a","b","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(xl(i),0,0,0),t}}]),e}(),Ul=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",70),$a(za(i),"incompatibleTokens",["H","K","k","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return bl(Za,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return wl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&i<12?i+12:r||12!==i?i:0,0,0,0),t}}]),e}(),Gl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",70),$a(za(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return bl(Ja,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return wl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Ql=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",70),$a(za(i),"incompatibleTokens",["h","H","k","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return bl(Xa,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return wl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&i<12?i+12:i,0,0,0),t}}]),e}(),Jl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",70),$a(za(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return bl(Ka,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return wl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),Kl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",60),$a(za(i),"incompatibleTokens",["t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return bl(tl,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return wl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),Xl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",50),$a(za(i),"incompatibleTokens",["t","T"]),i}return La(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return bl(el,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return wl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),Zl=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",30),$a(za(i),"incompatibleTokens",["t","T"]),i}return La(e,[{key:"parse",value:function(t,e){return vl(wl(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),th=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",10),$a(za(i),"incompatibleTokens",["t","T","x"]),i}return La(e,[{key:"parse",value:function(t,e){switch(e){case"X":return gl(dl,t);case"XX":return gl(ul,t);case"XXXX":return gl(pl,t);case"XXXXX":return gl(fl,t);default:return gl(ml,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),eh=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",10),$a(za(i),"incompatibleTokens",["t","T","X"]),i}return La(e,[{key:"parse",value:function(t,e){switch(e){case"x":return gl(dl,t);case"xx":return gl(ul,t);case"xxxx":return gl(pl,t);case"xxxxx":return gl(fl,t);default:return gl(ml,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),ih=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",40),$a(za(i),"incompatibleTokens","*"),i}return La(e,[{key:"parse",value:function(t){return yl(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),rh=function(){Ma(e,Ha);var t=Oa(e);function e(){var i;Na(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return $a(za(i=t.call.apply(t,[this].concat(s))),"priority",20),$a(za(i),"incompatibleTokens","*"),i}return La(e,[{key:"parse",value:function(t){return yl(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),sh={G:new Wa,y:new Al,Y:new Sl,R:new Dl,u:new Tl,Q:new El,q:new zl,M:new Il,L:new Ml,w:new Pl,I:new Fl,d:new Bl,D:new ql,E:new $l,e:new jl,c:new Vl,i:new Rl,a:new Hl,b:new Wl,B:new Yl,h:new Ul,H:new Gl,K:new Ql,k:new Jl,m:new Kl,s:new Xl,S:new Zl,X:new th,x:new eh,t:new ih,T:new rh},oh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ah=/^'([^]*?)'?$/,lh=/''/g,hh=/\S/,ch=/[a-zA-Z]/;function dh(t,e,i,r){var s,o,n,a,l,h,c,d,u,p,m,f,v,b,g,y,w,_;Mn(3,arguments);var x=String(t),k=String(e),C=$n(),A=null!==(s=null!==(o=null==r?void 0:r.locale)&&void 0!==o?o:C.locale)&&void 0!==s?s:wa;if(!A.match)throw new RangeError("locale must contain match property");var S=Fn(null!==(n=null!==(a=null!==(l=null!==(h=null==r?void 0:r.firstWeekContainsDate)&&void 0!==h?h:null==r||null===(c=r.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==l?l:C.firstWeekContainsDate)&&void 0!==a?a:null===(u=C.locale)||void 0===u||null===(p=u.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=Fn(null!==(m=null!==(f=null!==(v=null!==(b=null==r?void 0:r.weekStartsOn)&&void 0!==b?b:null==r||null===(g=r.locale)||void 0===g||null===(y=g.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==v?v:C.weekStartsOn)&&void 0!==f?f:null===(w=C.locale)||void 0===w||null===(_=w.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==m?m:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===x?Pn(i):new Date(NaN);var T,E={firstWeekContainsDate:S,weekStartsOn:D,locale:A},z=[new Ra],I=k.match(nh).map((function(t){var e=t[0];return e in na?(0,na[e])(t,A.formatLong):t})).join("").match(oh),M=[],P=Ta(I);try{var F=function(){var e=T.value;null!=r&&r.useAdditionalWeekYearTokens||!da(e)||ua(e,k,t),null!=r&&r.useAdditionalDayOfYearTokens||!ca(e)||ua(e,k,t);var i=e[0],s=sh[i];if(s){var o=s.incompatibleTokens;if(Array.isArray(o)){var n=M.find((function(t){return o.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===s.incompatibleTokens&&M.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));M.push({token:i,fullToken:e});var a=s.run(x,e,A.match,E);if(!a)return{v:new Date(NaN)};z.push(a.setter),x=a.rest}else{if(i.match(ch))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(ah)[1].replace(lh,"'")),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(P.s();!(T=P.n()).done;){var O=F();if("object"===In(O))return O.v}}catch(t){P.e(t)}finally{P.f()}if(x.length>0&&hh.test(x))return new Date(NaN);var N=z.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return z.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),B=Pn(i);if(isNaN(B.getTime()))return new Date(NaN);var q,L=On(B,aa(B)),$={},j=Ta(N);try{for(j.s();!(q=j.n()).done;){var V=q.value;if(!V.validate(L,E))return new Date(NaN);var R=V.set(L,$,E);Array.isArray(R)?(L=R[0],Ea($,R[1])):L=R}}catch(t){j.e(t)}finally{j.f()}return L}function uh(t,e){Mn(2,arguments);var i=Pn(t),r=Pn(e);return i.getTime()>r.getTime()}function ph(t,e){Mn(2,arguments);var i=Pn(t),r=Pn(e);return i.getTime()<r.getTime()}const mh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:r}=t;return Sa(new Date(e,i,r),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=dh(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.dateFormat=void 0,this.emitOnClick=!1,this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=dh((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=dh((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){if(this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker){const t=this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');t&&t.addEventListener("click",(()=>this.handleCalendarIconClick()))}this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleCalendarIconClick(){this.datePicker.opened&&this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=dh(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!ph(this.valueAsDate,this.minDate)&&!uh(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return ph(this.valueAsDate,this.minDate)||uh(this.valueAsDate,this.maxDate)?s("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?s("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?s("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"ad6360e0afb065a91f860574f5e3c08f5bdb2534",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{key:"3e8d26e0c8ae0983997b84e95cb34887df1f5fe5",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{key:"62ee430506c2ab1a5ebb632d72e84ef905296888",id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),i("small",{key:"6b7c0e9c3437b484bd534060f93ad4fcd9eaeb60",class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"6479b29563710abfe1be584c9de110fafe69ca3d",class:"date__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return r(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};mh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.date__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:rgba(204, 0, 0, 0.7019607843)}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const fh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,r;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):r}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return s("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(r=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===r?void 0:r.errorMessage;return s(`${t}`,this.language)?s(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"a46093cfafc840d2fd563ee9676ccd2f16fb1620",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"2eab4a96efc36cdb94e9f92b2a161e208f0ebcd4",class:"email__wrapper--flex"},i("label",{key:"f5ed857f61ea6763c5fe88590732258b4dedac1b",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"58cadc7857cd91dec968852be71e0108f55fbda7",class:"email__wrapper--relative"},this.tooltip&&i("img",{key:"03009d036fde1c36b9348ac45cefa3389194260c",class:"email__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"b2a9fd96ed301df5f1d7cf6f5a2a5b52f96ab189",id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"edb17f53141a3406bfc657f80098b914044a8894",class:"email__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};fh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emw--color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.email__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__input::placeholder{color:var(--emw--color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const vh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):r}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?s("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?s("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"841265bba6b75cc61a0eac1450c3f5aa5f917a2e",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"645c7817cf5a0bdc352de9d8c0698fde235aa6d3",class:"number__wrapper--flex"},i("label",{key:"3343cbbb8482b71cd152161a8d422f318f07f3fe",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"1f3341b2127095870610fc0e0b4b5d220c5d2e2c",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"8bbe2fe9f62347cbcd37b753d4a1b0718dc39091",class:"number__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"100401abdc33069f34e27e0807c9f31ddf7e42ec",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"db1e0043bb9b6de2ad8e18f49f96152b9451b93c",class:"number__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};vh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emw--color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}',
|
|
3991
3989
|
/**
|
|
3992
3990
|
* @license
|
|
3993
3991
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3994
3992
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3995
3993
|
*/
|
|
3996
|
-
|
|
3994
|
+
xt("vaadin-text-field",Gs,{moduleId:"lumo-text-field-styles"});
|
|
3997
3995
|
/**
|
|
3998
3996
|
* @license
|
|
3999
3997
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4000
3998
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4001
3999
|
*/
|
|
4002
|
-
const
|
|
4000
|
+
const bh=t=>class extends(An(t)){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(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}
|
|
4003
4001
|
/**
|
|
4004
4002
|
* @license
|
|
4005
4003
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4006
4004
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4007
|
-
*/,
|
|
4005
|
+
*/,gh=t=>class extends(bh(t)){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 Ps(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Fs(this.inputElement,this._labelController))}}
|
|
4008
4006
|
/**
|
|
4009
4007
|
* @license
|
|
4010
4008
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4011
4009
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4012
|
-
*/;
|
|
4010
|
+
*/;xt("vaadin-text-field",Sn,{moduleId:"vaadin-text-field-styles"});class yh extends(gh(Dt(pr(Ri)))){static get is(){return"vaadin-text-field"}static get template(){return ji`
|
|
4013
4011
|
<div class="vaadin-field-container">
|
|
4014
4012
|
<div part="label">
|
|
4015
4013
|
<slot name="label"></slot>
|
|
@@ -4038,7 +4036,7 @@ const yh=t=>class extends(Sn(t)){static get properties(){return{autocomplete:{ty
|
|
|
4038
4036
|
</div>
|
|
4039
4037
|
</div>
|
|
4040
4038
|
<slot name="tooltip"></slot>
|
|
4041
|
-
`}ready(){super.ready(),this._tooltipController=new
|
|
4039
|
+
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new _r(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}n(yh),xt("vaadin-password-field-button",[Ys,p`
|
|
4042
4040
|
:host {
|
|
4043
4041
|
position: absolute;
|
|
4044
4042
|
right: 0;
|
|
@@ -4051,7 +4049,7 @@ const yh=t=>class extends(Sn(t)){static get properties(){return{autocomplete:{ty
|
|
|
4051
4049
|
background: transparent;
|
|
4052
4050
|
outline: none;
|
|
4053
4051
|
}
|
|
4054
|
-
`],{moduleId:"lumo-password-field-button"}),
|
|
4052
|
+
`],{moduleId:"lumo-password-field-button"}),xt("vaadin-password-field",[Gs,p`
|
|
4055
4053
|
[part='reveal-button']::before {
|
|
4056
4054
|
content: var(--lumo-icons-eye);
|
|
4057
4055
|
}
|
|
@@ -4075,22 +4073,22 @@ const yh=t=>class extends(Sn(t)){static get properties(){return{autocomplete:{ty
|
|
|
4075
4073
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4076
4074
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4077
4075
|
*/
|
|
4078
|
-
|
|
4076
|
+
xt("vaadin-password-field-button",Mo,{moduleId:"vaadin-password-field-button-styles"});class wh extends(Po(cr(Dt(Ri)))){static get is(){return"vaadin-password-field-button"}static get template(){return ji``}}n(wh);
|
|
4079
4077
|
/**
|
|
4080
4078
|
* @license
|
|
4081
4079
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4082
4080
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4083
4081
|
*/
|
|
4084
|
-
const
|
|
4082
|
+
const _h=t=>class extends(xn(ts(ds(fs(t))))){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(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new wr(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t&&t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}}
|
|
4085
4083
|
/**
|
|
4086
4084
|
* @license
|
|
4087
4085
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4088
4086
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4089
|
-
*/,
|
|
4087
|
+
*/,xh=ji`
|
|
4090
4088
|
<div part="reveal-button" slot="suffix">
|
|
4091
4089
|
<slot name="reveal"></slot>
|
|
4092
4090
|
</div>
|
|
4093
|
-
`;let Ah;class Sh extends(kh(_h)){static get is(){return"vaadin-password-field"}static get template(){if(!Ah){Ah=super.template.cloneNode(!0);const t=Ch.content.querySelector('[part="reveal-button"]');Ah.content.querySelector('[part="input-field"]').appendChild(t)}return Ah}}a(Sh);const Dh=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.passwordButton.addEventListener("click",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern).test(t);return{rule:e.displayName,ruleKey:e.errorKey,passed:i}}))}setValidity(){var t,e;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,r;if(this.isDuplicateInput&&!this.originalValid)return s("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):r}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return s("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(r=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===r?void 0:r.errorMessage;return s(`${t}`,this.language)?s(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,r=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},s("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},s(r?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,s(`${t.ruleKey}`,this.language)?s(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"c704b51efdf53817beb1541b4794e0b11b490a24",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"e590afa403084ff95a8735ade400ab81ad16937f",class:"password__wrapper--flex"},i("label",{key:"9d8db00b59c4b9594538aeacee3ef5a0e678c0e9",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"bb39f6018cf688fafcd0b5bef91ba079edf09daf",class:"password__wrapper--relative"},this.tooltip&&i("img",{key:"d8dbd086da34a8c7db9b5826654530bdb888c927",class:"password__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{key:"ae1c212d663fe379561b1c514087629409196ac3",type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),i("small",{key:"2fa1e25239a7314399c16b2f897873b7a31e9f77",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return r(this)}static get watchers(){return{isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};Dh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:"Roboto";font-style:normal}.password__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.password__wrapper--autofilled{pointer-events:none}.password__wrapper--autofilled .password__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.password__wrapper--autofilled .password__input::part(input-field){color:var(--emw--color-black, #000000)}.password__wrapper--flex{display:flex;gap:5px}.password__wrapper--relative{position:relative}.password__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.password__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.password__input{width:inherit;border:none}.password__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.password__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.password__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);background-color:var(--emw--color-white, #FFFFFF);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;position:relative;margin-bottom:unset;height:44px;padding:0;width:100%}.password__input::part(reveal-button){position:relative;right:10px}.password__input::part(reveal-button)::before{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.password__input>input{padding:5px 15px}.password__input>input:placeholder-shown{color:var(--emw--color-gray-150, #828282)}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.password__complexity{position:relative;padding:10px;display:flex;flex-direction:column;gap:20px;justify-content:center;margin-top:20px;font-weight:300;background:var(--emw--color-white, #FFFFFF);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:150px;border:1px solid #B0B0B0;}.password__complexity meter{border-color:transparent;}.password__complexity meter[value="1"]::-moz-meter-bar{background-color:var(--emw--color-valid, #48952a)}.password__complexity meter[value="1"]::-webkit-meter-optimum-value{background-color:var(--emw--color-valid, #48952a)}.password__complexity meter:not([value="1"])::-moz-meter-bar{background-color:var(--emw--color-error, #FD2839)}.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value{background-color:var(--emw--color-error, #FD2839)}.password__complexity--strength{display:flex;justify-content:space-evenly;align-items:center}.password__complexity--strength meter::-moz-meter-bar{background:#B0B0B0}.password__complexity--hidden{display:none}.password__complexity--text-bold{font-weight:500}.password__complexity--checkbox{margin-right:5px}.password__complexity:after{content:"";position:absolute;width:25px;height:25px;border-top:1px solid var(--emw--color-gray-150, #828282);border-right:0 solid var(--emw--color-gray-150, #828282);border-left:1px solid var(--emw--color-gray-150, #828282);border-bottom:0 solid var(--emw--color-gray-150, #828282);bottom:92%;left:50%;margin-left:-25px;transform:rotate(45deg);margin-top:-25px;background-color:var(--emw--color-white, #FFFFFF)}.password__tooltip-icon{width:16px;height:auto}.password__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-150, #828282);color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.password__tooltip.visible{opacity:1}';const Eh=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{key:"3d90735f7dc8fef6a96dc85b8f9ba22880cb205f",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{key:"9472ed76f5c7fabb90d2b3d39eeb9e18f05a30dd",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{key:"2ae0947580bb8a0a3d889a2d9ebd0b82458fdfd2",class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"4f3cbf341f1c559bbdf44ca5d169be7a64d46e97",class:"radio__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Eh.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";const Th=m`
|
|
4091
|
+
`;let kh;class Ch extends(_h(yh)){static get is(){return"vaadin-password-field"}static get template(){if(!kh){kh=super.template.cloneNode(!0);const t=xh.content.querySelector('[part="reveal-button"]');kh.content.querySelector('[part="input-field"]').appendChild(t)}return kh}}n(Ch);const Ah=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.passwordButton.addEventListener("click",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern).test(t);return{rule:e.displayName,ruleKey:e.errorKey,passed:i}}))}setValidity(){var t,e;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,r;if(this.isDuplicateInput&&!this.originalValid)return s("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):r}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return s("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(r=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===r?void 0:r.errorMessage;return s(`${t}`,this.language)?s(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,r=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},s("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},s(r?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,s(`${t.ruleKey}`,this.language)?s(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"36d21c63dcd15b6de2d2de417ce97b520493cd16",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"3de600f4ccbf2ffe7a8a8858e9d5a483701dd4d7",class:"password__wrapper--flex"},i("label",{key:"74fee343f4d6adbbb22e88c5d51d3a471979d42e",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"d1f30d776c5612b1a5581859b929bee171105bf5",class:"password__wrapper--relative"},this.tooltip&&i("img",{key:"932201990b5fa67f448d4ab8ca7f844f757d5e47",class:"password__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{key:"83f00cb4452b60fd883efcd742d6eb463a8fc729",type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),i("small",{key:"0f6f7ba5e9ec6f492f22a46ac77c7977f7a8e835",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return r(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};Ah.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:"Roboto";font-style:normal}.password__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.password__wrapper--autofilled{pointer-events:none}.password__wrapper--autofilled .password__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.password__wrapper--autofilled .password__input::part(input-field){color:var(--emw--color-black, #000000)}.password__wrapper--flex{display:flex;gap:5px}.password__wrapper--relative{position:relative}.password__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.password__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.password__input{width:inherit;border:none}.password__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.password__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.password__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);background-color:var(--emw--color-white, #FFFFFF);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;position:relative;margin-bottom:unset;height:44px;padding:0;width:100%}.password__input::part(reveal-button){position:relative;right:10px}.password__input::part(reveal-button)::before{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.password__input>input{padding:5px 15px}.password__input>input:placeholder-shown{color:var(--emw--color-gray-150, #828282)}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.password__complexity{position:relative;padding:10px;display:flex;flex-direction:column;gap:20px;justify-content:center;margin-top:20px;font-weight:300;background:var(--emw--color-white, #FFFFFF);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:150px;border:1px solid #B0B0B0;}.password__complexity meter{border-color:transparent;}.password__complexity meter[value="1"]::-moz-meter-bar{background-color:var(--emw--color-valid, #48952a)}.password__complexity meter[value="1"]::-webkit-meter-optimum-value{background-color:var(--emw--color-valid, #48952a)}.password__complexity meter:not([value="1"])::-moz-meter-bar{background-color:var(--emw--color-error, #FD2839)}.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value{background-color:var(--emw--color-error, #FD2839)}.password__complexity--strength{display:flex;justify-content:space-evenly;align-items:center}.password__complexity--strength meter::-moz-meter-bar{background:#B0B0B0}.password__complexity--hidden{display:none}.password__complexity--text-bold{font-weight:500}.password__complexity--checkbox{margin-right:5px}.password__complexity:after{content:"";position:absolute;width:25px;height:25px;border-top:1px solid var(--emw--color-gray-150, #828282);border-right:0 solid var(--emw--color-gray-150, #828282);border-left:1px solid var(--emw--color-gray-150, #828282);border-bottom:0 solid var(--emw--color-gray-150, #828282);bottom:92%;left:50%;margin-left:-25px;transform:rotate(45deg);margin-top:-25px;background-color:var(--emw--color-white, #FFFFFF)}.password__tooltip-icon{width:16px;height:auto}.password__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-150, #828282);color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.password__tooltip.visible{opacity:1}';const Sh=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{key:"29ff8fcc910622397750532629ac0c202c9726ba",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{key:"cdab5b331863f3d31aab50c1d95b5a8845d53329",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{key:"bd6cd89510e7ace1348b391f3ce9ba334a03e695",class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"27036c51c89612dbb87e5248355d3a5466c49705",class:"radio__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Sh.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";const Dh=p`
|
|
4094
4092
|
:host {
|
|
4095
4093
|
display: flex;
|
|
4096
4094
|
align-items: center;
|
|
@@ -4174,7 +4172,7 @@ const kh=t=>class extends(kn(es(us(vs(t))))){static get properties(){return{reve
|
|
|
4174
4172
|
width: var(--lumo-icon-size-m);
|
|
4175
4173
|
height: var(--lumo-icon-size-m);
|
|
4176
4174
|
}
|
|
4177
|
-
`;
|
|
4175
|
+
`;xt("vaadin-item",Dh,{moduleId:"lumo-item"}),xt("vaadin-combo-box-item",[Dh,p`
|
|
4178
4176
|
:host {
|
|
4179
4177
|
transition: background-color 100ms;
|
|
4180
4178
|
overflow: hidden;
|
|
@@ -4186,7 +4184,7 @@ const kh=t=>class extends(kn(es(us(vs(t))))){static get properties(){return{reve
|
|
|
4186
4184
|
:host([focused]:not([disabled])) {
|
|
4187
4185
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
4188
4186
|
}
|
|
4189
|
-
`],{moduleId:"lumo-combo-box-item"}),
|
|
4187
|
+
`],{moduleId:"lumo-combo-box-item"}),xt("vaadin-combo-box-overlay",[Rs,Hs,p`
|
|
4190
4188
|
[part='content'] {
|
|
4191
4189
|
padding: 0;
|
|
4192
4190
|
}
|
|
@@ -4207,7 +4205,7 @@ const kh=t=>class extends(kn(es(us(vs(t))))){static get properties(){return{reve
|
|
|
4207
4205
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
4208
4206
|
margin-bottom: var(--lumo-space-xs);
|
|
4209
4207
|
}
|
|
4210
|
-
`,
|
|
4208
|
+
`,p`
|
|
4211
4209
|
[part~='loader'] {
|
|
4212
4210
|
box-sizing: border-box;
|
|
4213
4211
|
width: var(--lumo-icon-size-s);
|
|
@@ -4249,7 +4247,7 @@ const kh=t=>class extends(kn(es(us(vs(t))))){static get properties(){return{reve
|
|
|
4249
4247
|
transform: rotate(360deg);
|
|
4250
4248
|
}
|
|
4251
4249
|
}
|
|
4252
|
-
`,
|
|
4250
|
+
`,p`
|
|
4253
4251
|
[part~='loader'] {
|
|
4254
4252
|
position: absolute;
|
|
4255
4253
|
z-index: 1;
|
|
@@ -4257,12 +4255,12 @@ const kh=t=>class extends(kn(es(us(vs(t))))){static get properties(){return{reve
|
|
|
4257
4255
|
top: var(--lumo-space-s);
|
|
4258
4256
|
margin-inline: auto 0;
|
|
4259
4257
|
}
|
|
4260
|
-
`,
|
|
4258
|
+
`,p`
|
|
4261
4259
|
:host {
|
|
4262
4260
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
4263
4261
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
4264
4262
|
}
|
|
4265
|
-
`],{moduleId:"lumo-combo-box-overlay"}),
|
|
4263
|
+
`],{moduleId:"lumo-combo-box-overlay"}),xt("vaadin-combo-box",[Gs,p`
|
|
4266
4264
|
[part='toggle-button']::before {
|
|
4267
4265
|
content: var(--lumo-icons-dropdown);
|
|
4268
4266
|
}
|
|
@@ -4272,12 +4270,12 @@ const kh=t=>class extends(kn(es(us(vs(t))))){static get properties(){return{reve
|
|
|
4272
4270
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4273
4271
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4274
4272
|
*/
|
|
4275
|
-
const
|
|
4273
|
+
const Th=t=>class extends t{static get properties(){return{index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return[...super.observedAttributes,"hidden"]}attributeChangedCallback(t,e,i){"hidden"===t&&null!==i?this.index=void 0:super.attributeChangedCallback(t,e,i)}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const t=this._owner.getAttribute("dir");t&&this.setAttribute("dir",t)}requestContentUpdate(){this.renderer&&!this.hidden&&this.renderer(this,this._owner,{index:this.index,item:this.item,focused:this.focused,selected:this.selected})}__rendererOrItemChanged(t,e,i){void 0!==i&&void 0!==e&&(this._oldRenderer!==t&&(this.innerHTML="",delete this._$litPart$),t&&(this._oldRenderer=t,this.requestContentUpdate()))}__updateLabel(t,e){e||(this.textContent=t)}}
|
|
4276
4274
|
/**
|
|
4277
4275
|
* @license
|
|
4278
4276
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4279
4277
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4280
|
-
*/;class
|
|
4278
|
+
*/;class Eh extends(Th(Dt(cr(Ri)))){static get template(){return ji`
|
|
4281
4279
|
<style>
|
|
4282
4280
|
:host {
|
|
4283
4281
|
display: block;
|
|
@@ -4291,18 +4289,18 @@ const zh=t=>class extends t{static get properties(){return{index:{type:Number},i
|
|
|
4291
4289
|
<div part="content">
|
|
4292
4290
|
<slot></slot>
|
|
4293
4291
|
</div>
|
|
4294
|
-
`}static get is(){return"vaadin-combo-box-item"}}
|
|
4292
|
+
`}static get is(){return"vaadin-combo-box-item"}}n(Eh);
|
|
4295
4293
|
/**
|
|
4296
4294
|
* @license
|
|
4297
4295
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4298
4296
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4299
4297
|
*/
|
|
4300
|
-
const
|
|
4298
|
+
const zh=t=>class extends(Eo(t)){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const t=this._comboBox,e=t&&t.getAttribute("dir");e&&this.setAttribute("dir",e)}_shouldCloseOnOutsideClick(t){const e=t.composedPath();return!e.includes(this.positionTarget)&&!e.includes(this)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!ls(t.composedPath()[0])&&t.preventDefault()}_updateOverlayWidth(){const t=this.localName;this.style.setProperty(`--_${t}-default-width`,`${this.positionTarget.clientWidth}px`);const e=getComputedStyle(this._comboBox).getPropertyValue(`--${t}-width`);""===e?this.style.removeProperty(`--${t}-width`):this.style.setProperty(`--${t}-width`,e)}_setOverlayWidth(t,e){t&&e&&(this._updateOverlayWidth(),this._updatePosition())}}
|
|
4301
4299
|
/**
|
|
4302
4300
|
* @license
|
|
4303
4301
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4304
4302
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4305
|
-
*/;
|
|
4303
|
+
*/;xt("vaadin-combo-box-overlay",[Ks,p`
|
|
4306
4304
|
#overlay {
|
|
4307
4305
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
4308
4306
|
}
|
|
@@ -4312,7 +4310,7 @@ const Mh=t=>class extends(zo(t)){static get observers(){return["_setOverlayWidth
|
|
|
4312
4310
|
flex-direction: column;
|
|
4313
4311
|
height: 100%;
|
|
4314
4312
|
}
|
|
4315
|
-
`],{moduleId:"vaadin-combo-box-overlay-styles"});class
|
|
4313
|
+
`],{moduleId:"vaadin-combo-box-overlay-styles"});class Ih extends(zh(Ao(cr(Dt(Ri))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return ji`
|
|
4316
4314
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
4317
4315
|
<div part="overlay" id="overlay">
|
|
4318
4316
|
<div part="loader"></div>
|
|
@@ -4324,7 +4322,7 @@ const Mh=t=>class extends(zo(t)){static get observers(){return["_setOverlayWidth
|
|
|
4324
4322
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
4325
4323
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4326
4324
|
*/
|
|
4327
|
-
function
|
|
4325
|
+
function Mh(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
4328
4326
|
/**
|
|
4329
4327
|
* @license
|
|
4330
4328
|
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
@@ -4333,12 +4331,12 @@ function Oh(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
|
4333
4331
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
4334
4332
|
* Code distributed by Google as part of the polymer project is also
|
|
4335
4333
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
4336
|
-
*/a(Fh);const Ph=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),Nh=Ph&&Ph[1]>=8,Bh={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,r)=>{e<this._scrollBottom&&(t=r),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),ir)}},_getReusables(t){let e,i,r;const s=[],o=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let h=this._physicalTop+this._scrollOffset;const c=this._scrollPosition,d=this._scrollBottom;for(t?(e=this._physicalStart,i=c-h):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-d);r=this._getPhysicalSizeIncrement(e),i-=r,!(s.length>=l||i<=o);)if(t){if(a+s.length+1>=this._virtualCount)break;if(h+r>=c-this._scrollOffset)break;s.push(e),h+=r,e=(e+1)%l}else{if(n-s.length<=0)break;if(h+this._physicalSize-r<=d)break;s.push(e),h-=r,e=0===e?l-1:e-1}return{indexes:s,physicalTop:h-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),er):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),ir))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,tr))},_iterateItems(t,e){let i,r,s,o;if(2===arguments.length&&e){for(o=0;o<e.length;o++)if(i=e[o],r=this._computeVidx(i),null!=(s=t.call(this,i,r)))return s}else{for(i=this._physicalStart,r=this._virtualStart;i<this._physicalCount;i++,r++)if(null!=(s=t.call(this,i,r)))return s;for(i=0;i<this._physicalStart;i++,r++)if(null!=(s=t.call(this,i,r)))return s}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!Nh&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1)return;if(ar(),0===this._physicalCount)return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,r=0;const s=this._hiddenContentSize;for(;i<t&&r<=s;)r+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+r),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)}),tr)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=sr.debounce(this._debouncers[t],i,e.bind(this)),or(this._debouncers[t])}},Lh=1e3;class Vh{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:r,elementsContainer:s,reorderElements:o}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=r,this.elementsContainer=s||r,this.reorderElements=o,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),new ResizeObserver((([{contentRect:t}])=>{const e=0===t.width&&0===t.height;!e&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=e})).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.scrollTarget.addEventListener("virtualizer-element-focused",(t=>this.__onElementFocused(t))),this.elementsContainer.addEventListener("focusin",(()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))})),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<Lh?(i=t,this._vidxOffset=0):(i=Lh,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),ar(),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((r=>{r.__virtualIndex>=t&&r.__virtualIndex<=e&&(this.__updateElement(r,r.__virtualIndex,!0),i.push(r))})),this.__afterElementsUpdated(i)}_updateMetrics(t){ar();let e=0,i=0;const r=this._physicalAverageCount,s=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==r&&(this._physicalAverage=Math.round((s*r+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),this.__preventElementUpdates||t.__lastUpdatedIndex===e&&!i||(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=sr.debounce(this.__placeholderClearDebouncer,tr,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0===this.__pendingScrollToIndex||this.__hasPlaceholders()||this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;let e,i;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),ar(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const r=this.__getIndexScrollOffset(e);void 0!==i&&void 0!==r&&(this._scrollTop+=i-r)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),ar(),this._debounce("_update",this._update,ir)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=Boolean("rtl"===t.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const r=this._physicalItems[t];r.hidden=i>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=i+(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,r){r.style.transform=`translateY(${e})`}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return 0===e.indexOf(t)&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const r=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,r)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,r)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=sr.debounce(this.__fixInvalidItemPositioningDebouncer,Zi.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=sr.debounce(this.__scrollReorderDebouncer,Zi.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalBottom<this._scrollBottom;if(this._physicalTop>this._scrollTop&&0!==this.adjustedFirstVisibleIndex||t&&this.adjustedLastVisibleIndex!==this.size-1){const e=t,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(e?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=sr.debounce(this.__debouncerWheelAnimationFrame,tr,(()=>{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=sr.debounce(this._debouncerIgnoreNewWheel,Zi.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage);super._increasePoolIfNeeded(Math.max(t,Math.min(100,e-this._physicalCount)))}else super._increasePoolIfNeeded(t)}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(0===this._physicalCount)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const r=i.__virtualIndex-t,s=e.indexOf(i)-r;if(s>0)for(let t=0;t<s;t++)this.elementsContainer.appendChild(e[t]);else if(s<0)for(let t=e.length+s;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(lo){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4)this._vidxOffset=Math.round(this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight)*e);else{const t=this._vidxOffset,i=Lh,r=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<i&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-i&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(Vh.prototype,Bh);class jh{constructor(t){this.__adapter=new Vh(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()}}
|
|
4334
|
+
*/n(Ih);const Ph=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),Fh=Ph&&Ph[1]>=8,Oh={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,r)=>{e<this._scrollBottom&&(t=r),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),er)}},_getReusables(t){let e,i,r;const s=[],o=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let h=this._physicalTop+this._scrollOffset;const c=this._scrollPosition,d=this._scrollBottom;for(t?(e=this._physicalStart,i=c-h):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-d);r=this._getPhysicalSizeIncrement(e),i-=r,!(s.length>=l||i<=o);)if(t){if(a+s.length+1>=this._virtualCount)break;if(h+r>=c-this._scrollOffset)break;s.push(e),h+=r,e=(e+1)%l}else{if(n-s.length<=0)break;if(h+this._physicalSize-r<=d)break;s.push(e),h-=r,e=0===e?l-1:e-1}return{indexes:s,physicalTop:h-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),tr):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),er))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Zi))},_iterateItems(t,e){let i,r,s,o;if(2===arguments.length&&e){for(o=0;o<e.length;o++)if(i=e[o],r=this._computeVidx(i),null!=(s=t.call(this,i,r)))return s}else{for(i=this._physicalStart,r=this._virtualStart;i<this._physicalCount;i++,r++)if(null!=(s=t.call(this,i,r)))return s;for(i=0;i<this._physicalStart;i++,r++)if(null!=(s=t.call(this,i,r)))return s}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!Fh&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1)return;if(nr(),0===this._physicalCount)return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,r=0;const s=this._hiddenContentSize;for(;i<t&&r<=s;)r+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+r),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)}),Zi)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=rr.debounce(this._debouncers[t],i,e.bind(this)),sr(this._debouncers[t])}},Nh=1e3;class Bh{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:r,elementsContainer:s,reorderElements:o}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=r,this.elementsContainer=s||r,this.reorderElements=o,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),new ResizeObserver((([{contentRect:t}])=>{const e=0===t.width&&0===t.height;!e&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=e})).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.scrollTarget.addEventListener("virtualizer-element-focused",(t=>this.__onElementFocused(t))),this.elementsContainer.addEventListener("focusin",(()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))})),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<Nh?(i=t,this._vidxOffset=0):(i=Nh,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),nr(),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((r=>{r.__virtualIndex>=t&&r.__virtualIndex<=e&&(this.__updateElement(r,r.__virtualIndex,!0),i.push(r))})),this.__afterElementsUpdated(i)}_updateMetrics(t){nr();let e=0,i=0;const r=this._physicalAverageCount,s=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==r&&(this._physicalAverage=Math.round((s*r+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),this.__preventElementUpdates||t.__lastUpdatedIndex===e&&!i||(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=rr.debounce(this.__placeholderClearDebouncer,Zi,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0===this.__pendingScrollToIndex||this.__hasPlaceholders()||this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;let e,i;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),nr(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const r=this.__getIndexScrollOffset(e);void 0!==i&&void 0!==r&&(this._scrollTop+=i-r)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),nr(),this._debounce("_update",this._update,er)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=Boolean("rtl"===t.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const r=this._physicalItems[t];r.hidden=i>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=i+(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,r){r.style.transform=`translateY(${e})`}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return 0===e.indexOf(t)&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const r=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,r)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,r)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=rr.debounce(this.__fixInvalidItemPositioningDebouncer,Xi.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=rr.debounce(this.__scrollReorderDebouncer,Xi.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalBottom<this._scrollBottom;if(this._physicalTop>this._scrollTop&&0!==this.adjustedFirstVisibleIndex||t&&this.adjustedLastVisibleIndex!==this.size-1){const e=t,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(e?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=rr.debounce(this.__debouncerWheelAnimationFrame,Zi,(()=>{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=rr.debounce(this._debouncerIgnoreNewWheel,Xi.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage);super._increasePoolIfNeeded(Math.max(t,Math.min(100,e-this._physicalCount)))}else super._increasePoolIfNeeded(t)}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(0===this._physicalCount)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const r=i.__virtualIndex-t,s=e.indexOf(i)-r;if(s>0)for(let t=0;t<s;t++)this.elementsContainer.appendChild(e[t]);else if(s<0)for(let t=e.length+s;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(ao){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4)this._vidxOffset=Math.round(this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight)*e);else{const t=this._vidxOffset,i=Nh,r=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<i&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-i&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(Bh.prototype,Oh);class qh{constructor(t){this.__adapter=new Bh(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()}}
|
|
4337
4335
|
/**
|
|
4338
4336
|
* @license
|
|
4339
4337
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4340
4338
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4341
|
-
*/const
|
|
4339
|
+
*/const Lh=class{toString(){return""}},$h=t=>class extends t{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${yr()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(t){if(!this.__virtualizer||!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const r=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!r||t!==r.index)return;const s=r.getBoundingClientRect(),o=this.getBoundingClientRect(),n=s.bottom-o.bottom+this._viewportTotalPaddingBottom;n>0&&(this.scrollTop+=n)}_isItemSelected(t,e,i){return!(t instanceof Lh)&&(i&&void 0!==t&&void 0!==e?Mh(i,t)===Mh(i,e):t===e)}__initVirtualizer(){this.__virtualizer=new qh({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(t){t&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.requestContentUpdate()}__focusedIndexChanged(t,e){t!==e&&this.requestContentUpdate(),t>=0&&!this.loading&&this.scrollIntoView(t)}__rendererChanged(t,e){(t||e)&&this.requestContentUpdate()}__createElements(t){return[...Array(t)].map((()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t}))}_updateElement(t,e){const i=this.items[e],r=this.focusedIndex,s=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:s,renderer:this.renderer,focused:!this.loading&&r===e}),"function"==typeof this.itemClassNameGenerator?t.className=this.itemClassNameGenerator(i):""!==t.className&&(t.className=""),t.performUpdate&&!t.hasUpdated&&t.performUpdate(),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",s.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof Lh&&this.__requestItemByIndex(e)}__onItemClick(t){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:t.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(t=>{(0===this.scrollTop&&t.deltaY<0||this.scrollHeight-this.scrollTop-this.clientHeight<=1&&t.deltaY>0)&&t.preventDefault()}))}__requestItemByIndex(t){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
|
|
4342
4340
|
/**
|
|
4343
4341
|
* @license
|
|
4344
4342
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
@@ -4348,7 +4346,7 @@ function Oh(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
|
4348
4346
|
* @license
|
|
4349
4347
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4350
4348
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4351
|
-
*/class
|
|
4349
|
+
*/class jh extends($h(Ri)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return ji`
|
|
4352
4350
|
<style>
|
|
4353
4351
|
:host {
|
|
4354
4352
|
display: block;
|
|
@@ -4375,33 +4373,33 @@ function Oh(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
|
4375
4373
|
<div id="selector">
|
|
4376
4374
|
<slot></slot>
|
|
4377
4375
|
</div>
|
|
4378
|
-
`}}
|
|
4376
|
+
`}}n(jh);
|
|
4379
4377
|
/**
|
|
4380
4378
|
* @license
|
|
4381
4379
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4382
4380
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4383
4381
|
*/
|
|
4384
|
-
const
|
|
4382
|
+
const Vh=t=>class extends(Cn(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}}
|
|
4385
4383
|
/**
|
|
4386
4384
|
* @license
|
|
4387
4385
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4388
4386
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4389
|
-
*/;function
|
|
4387
|
+
*/;function Rh(t,e,i=0){let r=e;for(const e of t.subCaches){const t=e.parentCacheIndex;if(r<=t)break;if(r<=t+e.flatSize)return Rh(e,r-t-1,i+1);r-=e.flatSize}return{cache:t,item:t.items[r],index:r,page:Math.floor(r/t.pageSize),level:i}}function Hh({getItemId:t},e,i,r=0,s=0){for(let o=0;o<e.items.length;o++){const n=e.items[o];if(n&&t(n)===t(i))return{cache:e,level:r,item:n,index:o,page:Math.floor(o/e.pageSize),subCache:e.getSubCache(o),flatIndex:s+e.getFlatIndex(o)}}for(const o of e.subCaches){const n=Hh({getItemId:t},o,i,r+1,s+e.getFlatIndex(o.parentCacheIndex)+1);if(n)return n}}function Wh(t,[e,...i],r=0){e===1/0&&(e=t.size-1);const s=t.getFlatIndex(e),o=t.getSubCache(e);return o&&o.flatSize>0&&i.length?Wh(o,i,r+s+1):r+s}
|
|
4390
4388
|
/**
|
|
4391
4389
|
* @license
|
|
4392
4390
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4393
4391
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4394
|
-
*/class
|
|
4392
|
+
*/class Yh{context;pageSize;items=[];pendingRequests={};__subCacheByIndex={};__size=0;__flatSize=0;constructor(t,e,i,r,s){this.context=t,this.pageSize=e,this.size=i,this.parentCache=r,this.parentCacheIndex=s,this.__flatSize=i||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0||this.subCaches.some((t=>t.isLoading))}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){if(this.__size!==t){if(this.__size=t,void 0!==this.context.placeholder){this.items.length=t||0;for(let e=0;e<t;e++)this.items[e]||=this.context.placeholder}Object.keys(this.pendingRequests).forEach((t=>{parseInt(t)*this.pageSize>=this.size&&delete this.pendingRequests[t]}))}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce(((t,e)=>(e.recalculateFlatSize(),t+e.flatSize)),0):0}setPage(t,e){const i=t*this.pageSize;e.forEach(((t,e)=>{const r=i+e;(void 0===this.size||r<this.size)&&(this.items[r]=t)}))}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(t){const e=new Yh(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce(((t,i)=>e>i.parentCacheIndex?t+i.flatSize:t),e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=Rh(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}=Rh(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}}
|
|
4395
4393
|
/**
|
|
4396
4394
|
* @license
|
|
4397
4395
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4398
4396
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4399
|
-
*/class
|
|
4397
|
+
*/class Uh extends EventTarget{host;dataProvider;dataProviderParams;pageSize;isExpanded;getItemId;rootCache;placeholder;isPlaceholder;constructor(t,{size:e,pageSize:i,isExpanded:r,getItemId:s,isPlaceholder:o,placeholder:n,dataProvider:a,dataProviderParams:l}){super(),this.host=t,this.pageSize=i,this.getItemId=s,this.isExpanded=r,this.placeholder=n,this.isPlaceholder=o,this.dataProvider=a,this.dataProviderParams=l,this.rootCache=this.__createRootCache(e)}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return{isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(t){this.pageSize=t,this.clearCache()}setDataProvider(t){this.dataProvider=t,this.clearCache()}recalculateFlatSize(){this.rootCache.recalculateFlatSize()}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size)}getFlatIndexContext(t){return Rh(this.rootCache,t)}getItemContext(t){return Hh({getItemId:this.getItemId},this.rootCache,t)}getFlatIndexByPath(t){return Wh(this.rootCache,t)}ensureFlatIndexLoaded(t){const{cache:e,page:i,item:r}=this.getFlatIndexContext(t);this.__isItemLoaded(r)||this.__loadCachePage(e,i)}ensureFlatIndexHierarchy(t){const{cache:e,item:i,index:r}=this.getFlatIndexContext(t);if(this.__isItemLoaded(i)&&this.isExpanded(i)&&!e.getSubCache(r)){const t=e.createSubCache(r);this.__loadCachePage(t,0)}}loadFirstPage(){this.__loadCachePage(this.rootCache,0)}__createRootCache(t){return new Yh(this.__cacheContext,this.pageSize,t)}__loadCachePage(t,e){if(!this.dataProvider||t.pendingRequests[e])return;let i={page:e,pageSize:this.pageSize,parentItem:t.parentItem};this.dataProviderParams&&(i={...i,...this.dataProviderParams()});const r=(s,o)=>{t.pendingRequests[e]===r&&(void 0!==o?t.size=o:i.parentItem&&(t.size=s.length),t.setPage(e,s),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete t.pendingRequests[e],this.dispatchEvent(new CustomEvent("page-loaded")))};t.pendingRequests[e]=r,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(i,r)}__isItemLoaded(t){return this.isPlaceholder?!this.isPlaceholder(t):this.placeholder?t!==this.placeholder:!!t}}
|
|
4400
4398
|
/**
|
|
4401
4399
|
* @license
|
|
4402
4400
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4403
4401
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4404
|
-
*/const
|
|
4402
|
+
*/const Gh=t=>class extends t{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new Uh(this,{placeholder:new Lh,isPlaceholder:t=>t instanceof Lh,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",(t=>{if(!this._shouldFetchData())return;const e=t.detail.index;void 0!==e&&this.__dataProviderController.ensureFlatIndexLoaded(e)})),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(t){void 0!==this.__previousDataProviderFilter||""!==t?this.__previousDataProviderFilter!==t&&(this.__previousDataProviderFilter=t,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1):this.__previousDataProviderFilter=t}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(t){this._shouldFetchData()&&t&&(this._forceNextRequest||void 0===this.size?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){const{rootCache:t}=this.__dataProviderController;t.items=[...t.items],this.__synchronizeControllerState(),this.opened||this._isInputFocused()||this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(t){const{rootCache:e}=this.__dataProviderController;e.size!==t&&(e.size=t,e.items=[...e.items],this.__synchronizeControllerState())}_filteredItemsChanged(t){if(super._filteredItemsChanged(t),this.dataProvider&&t){const{rootCache:e}=this.__dataProviderController;e.items!==t&&(e.items=t,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:t}=this.__dataProviderController;this.size=t.size,this.filteredItems=t.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(t,e){if(Math.floor(t)!==t||t<1)throw this.pageSize=e,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(t),this.clearCache()}_dataProviderChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.dataProvider=e})),this.__dataProviderController.setDataProvider(t),this.clearCache()}_ensureItemsOrDataProvider(t){if(void 0!==this.items&&void 0!==this.dataProvider)throw t(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(t,e){if(t&&""!==e&&null==this.selectedItem){const t=this.__getItemIndexByValue(this.filteredItems,e);(t<0||!this._getItemLabel(this.filteredItems[t]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}}
|
|
4405
4403
|
/**
|
|
4406
4404
|
* @license
|
|
4407
4405
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -4412,12 +4410,12 @@ const Hh=t=>class extends(An(t)){static get properties(){return{pattern:{type:St
|
|
|
4412
4410
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4413
4411
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4414
4412
|
*/
|
|
4415
|
-
function Jh(t){return null!=t}function Kh(t,e){return t.findIndex((t=>!(t instanceof qh)&&e(t)))}const Zh=t=>class extends(En(Cs(Ms(us(is(vs(es(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};var e;this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),e=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`),this.addController(new Tn(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,r,s,o,n,a,l,h){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:r,selectedItem:s,itemIdPath:o,focusedIndex:n,renderer:a,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,r){this._overlayOpened=t&&(r||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&cs(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?this._isInputFocused()||ho||this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?Oh(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?Oh(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{ho&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){this.loading&&!this.allowCustomValue||this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,this.opened||this._isClearButton(t)||this.autoOpenDisabled||(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||(Jh(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this._requestValidation(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){if(!t)return t;const i=t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)));return i}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,r=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&r>=0&&(this.selectedItem=t[r]);const s=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=s>-1?s:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&Jh(e)?Kh(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Kh(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof qh||this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(ns())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){this.clearElement&&t.composedPath()[0]===this.clearElement&&(t.preventDefault(),this._onClearAction())}}
|
|
4413
|
+
function Qh(t){return null!=t}function Jh(t,e){return t.findIndex((t=>!(t instanceof Lh)&&e(t)))}const Kh=t=>class extends(Dn(ks(Is(ds(es(fs(ts(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};var e;this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),e=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`),this.addController(new Tn(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,r,s,o,n,a,l,h){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:r,selectedItem:s,itemIdPath:o,focusedIndex:n,renderer:a,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,r){this._overlayOpened=t&&(r||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&hs(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?this._isInputFocused()||lo||this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?Mh(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?Mh(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{lo&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){this.loading&&!this.allowCustomValue||this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,this.opened||this._isClearButton(t)||this.autoOpenDisabled||(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||(Qh(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){if(!t)return t;const i=t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)));return i}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,r=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&r>=0&&(this.selectedItem=t[r]);const s=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=s>-1?s:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&Qh(e)?Jh(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Jh(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof Lh||this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(os())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){this.clearElement&&t.composedPath()[0]===this.clearElement&&(t.preventDefault(),this._onClearAction())}}
|
|
4416
4414
|
/**
|
|
4417
4415
|
* @license
|
|
4418
4416
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4419
4417
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4420
|
-
*/;
|
|
4418
|
+
*/;xt("vaadin-combo-box",Sn,{moduleId:"vaadin-combo-box-styles"});class Xh extends(Gh(Kh(Vh(An(Dt(pr(Ri))))))){static get is(){return"vaadin-combo-box"}static get template(){return ji`
|
|
4421
4419
|
<style>
|
|
4422
4420
|
:host([opened]) {
|
|
4423
4421
|
pointer-events: auto;
|
|
@@ -4462,4 +4460,4 @@ function Jh(t){return null!=t}function Kh(t,e){return t.findIndex((t=>!(t instan
|
|
|
4462
4460
|
></vaadin-combo-box-overlay>
|
|
4463
4461
|
|
|
4464
4462
|
<slot name="tooltip"></slot>
|
|
4465
|
-
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Os(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ps(this.inputElement,this._labelController)),this._tooltipController=new xr(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)}}a(tc);const ec=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.options=[],this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.touched=!1,this.handleChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value.toUpperCase()})))}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{const e=Object.keys(t)[0];this.displayedOptions=t[e].map((t=>({label:t.Name,value:t.Alpha2Code})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue.toUpperCase(),this.valueHandler({name:this.name,value:this.value}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"3d298b9709617233adacd88b8acb7d6298d35627",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"9ba53148a200b925da11ad0dea5589e9634ffb03",class:"select__wrapper--flex"},i("label",{key:"eb2fa2233926ada4da750e47304325d0d7ea3985",class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{key:"3cbe968f9a7c612d0b8d0517621a933cccd1bd58",class:"select__wrapper--relative"},this.tooltip&&i("img",{key:"9fa9be645ed72897a95705b0e17b3aee855eb6d4",class:"select__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-combo-box",{key:"f596a5fa5b480791080dfa63359ed30eeabfaa02",name:this.name,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",readOnly:this.autofilled,required:this.validation.mandatory,value:this.defaultValue,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleChange,onBlur:this.handleBlur}),i("small",{key:"a9c652406489ba1d23497c55aa14e7b67fa701bd",class:"select__error-message"},this.errorMessage))}get element(){return r(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ec.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%}vaadin-combo-box>input{background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emw--color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.select__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emw--color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__input>input{padding:5px 15px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const ic=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.phoneValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.touched=!0,this.errorMessage=this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.phoneValue=this.defaultValue.phone||null)}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):r}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?s("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"5febd36c339710683111039d477196daac87853c",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"fb779beee03992b23478ffcaac85095420048ceb",class:"tel__wrapper--flex-label"},i("label",{key:"5b69271c1c8bf403a003d765adb40a553e09466e",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"040c487308231459fc92eba2e643a80639df09d6",class:"tel__wrapper--relative"},this.tooltip&&i("img",{key:"91efd4656c718c75e5047413daf10c22c37e8f93",class:"tel__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"6215f80b6bccb3dfb03dbbc485c850725633627c",class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{key:"3b7b1ef3415619c51d74f5fc7c5e034acb8f037f",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{key:"886553206896c367ba96f015d81b44ea86f741ea",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:this.phoneValue,placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{key:"d4c88d386c3342c789527d925e9cd061494b785c",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ic.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emw--color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);overflow:hidden}.tel__wrapper--flex:focus-within{border-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.tel__wrapper--flex--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 5px 5px 0;background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emw--color-white, #FFFFFF)}.tel__prefix::part(toggle-button){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emw--registration-typography, var(--emw--color-black, #000000));background-color:var(--emw--color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emw--color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const rc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.validationPattern="",this.duplicateInputValue=null,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.isValid=this.setValidity()}setValidity(){var t;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&(null===(t=this.inputReference)||void 0===t?void 0:t.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,r;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):r}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return s("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(r=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===r?void 0:r.errorMessage;return s(`${t}`,this.language)?s(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"bfb803110a70b89dd484e993c204b572f0115a17",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"6e9f8f5aada98821d5dc78ccb8b1431ba23b81ab",class:"text__wrapper--flex"},i("label",{key:"05cf07855121a79641475a5b020774cf8120d1ed",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"f8c48a999f6827a61ec392ce99858c19559c77d2",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"e866f1df104ce57c29164e73b4ad4d017c7201cd",class:"text__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"d761c265b1487fe73af54568b6da7fed82656b8d",name:this.name,id:`${this.name}__input`,value:this.defaultValue,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"5c8df34dd47959eb1668cdf389524d145c69fa84",class:"text__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};rc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}';export{$s as checkbox_group_input,Rs as checkbox_input,vh as date_input,bh as email_input,gh as number_input,Dh as password_input,Eh as radio_input,ec as select_input,ic as tel_input,rc as text_input}
|
|
4463
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ps(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Fs(this.inputElement,this._labelController)),this._tooltipController=new _r(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}n(Xh);const Zh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.handleChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value.toUpperCase()})))}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{const e=Object.keys(t)[0];this.displayedOptions=t[e].map((t=>({label:t.Name,value:t.Alpha2Code})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue.toUpperCase(),this.valueHandler({name:this.name,value:this.value}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return s("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"f02c73635c87a1937f4718c9de8df3aae8397815",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"26bf79a073dd4c84570e380b1f36bfe848fec568",class:"select__wrapper--flex"},i("label",{key:"6eaafabe58a2dd4e1604ac2e3d55d001e2c4bc7c",class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{key:"a1de9c4bd3dd4158b26004c6df9dca5915f73978",class:"select__wrapper--relative"},this.tooltip&&i("img",{key:"5cb869c82f53a463c91cd060fad5520d2fbc3d0d",class:"select__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-combo-box",{key:"2e94c1faa107657034a98d70b1e98d5c5ab5caa5",name:this.name,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",readOnly:this.autofilled,required:this.validation.mandatory,value:this.defaultValue,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleChange,onBlur:this.handleBlur}),i("small",{key:"2c8162576d30265ea49cdc6d99071f614d833d7e",class:"select__error-message"},this.errorMessage))}get element(){return r(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Zh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%}vaadin-combo-box>input{background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emw--color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.select__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emw--color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__input>input{padding:5px 15px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const tc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.phoneValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.touched=!0,this.errorMessage=this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.showLabels=void 0,this.action=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.phoneValue=this.defaultValue.phone||null)}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):r}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?s("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"f0f70d8568ba083ee19f9e73e5921104f599e15f",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"8da9e1c2a6b3ca19caff07540f0218266de22bb2",class:"tel__wrapper--flex-label"},i("label",{key:"d0d90bc96e3ea853f401bae9be3f033d4cfd9b17",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"fdf7929f51edcbea8568b35804b0d9e9a93a7249",class:"tel__wrapper--relative"},this.tooltip&&i("img",{key:"0fbc9b5e8c5feef727caa71ef07d4ae80007e04a",class:"tel__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"b4a11808a7ae5e5cddce47b51a51003bce3a84f8",class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{key:"2d81ff4c11e559f302a8446816f4aca0de2cfcef",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{key:"ab52185589bf4d52205bad4cecc9c7ecb54cd409",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:this.phoneValue,placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{key:"6d219de32297bc2fab31995b5a33b14f2eea21d9",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};tc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emw--color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);overflow:hidden}.tel__wrapper--flex:focus-within{border-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.tel__wrapper--flex--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 5px 5px 0;background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emw--color-white, #FFFFFF)}.tel__prefix::part(toggle-button){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emw--registration-typography, var(--emw--color-black, #000000));background-color:var(--emw--color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emw--color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const ec=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.isValid=this.setValidity()}setValidity(){var t;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&(null===(t=this.inputReference)||void 0===t?void 0:t.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,r;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return s(`${i}`,this.language)?s(`${i}`,this.language):r}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return s("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return s("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(r=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===r?void 0:r.errorMessage;return s(`${t}`,this.language)?s(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"e297f841a57c6acf854535a786916aa641831556",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"7fd284a58e58d5c61a03caf4cc317b8dd9dbd82f",class:"text__wrapper--flex"},i("label",{key:"f80a2003386ec867e5310190a7568105c2912569",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"e8f5197bd370100406d600be5a336f85f4c6934d",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"ff8c38fe3495a41a41ac4a1569169ce26a1ec9ce",class:"text__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"581106e515810ab43f7d6b6eda504ccf23906b0e",name:this.name,id:`${this.name}__input`,value:this.defaultValue,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"20620710026982d5fb670a3173bab57a7fa9e7ce",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ec.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}';export{js as checkbox_group_input,Vs as checkbox_input,mh as date_input,fh as email_input,vh as number_input,Ah as password_input,Sh as radio_input,Zh as select_input,tc as tel_input,ec as text_input}
|