@openremote/or-scheduler 1.26.0 → 1.26.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/umd/index.js CHANGED
@@ -1,5 +1,5 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ORCore"),require("ORTranslate"),require("moment"),require("ORIcon")):"function"==typeof define&&define.amd?define(["ORCore","ORTranslate","moment","ORIcon"],t):"object"==typeof exports?exports.ORScheduler=t(require("ORCore"),require("ORTranslate"),require("moment"),require("ORIcon")):e.ORScheduler=t(e.ORCore,e.ORTranslate,e.moment,e.ORIcon)}(self,(e,t,i,s)=>(()=>{"use strict";var r={954(t){t.exports=e},368(e){e.exports=s},673(e){e.exports=t},416(e){e.exports=i}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,a),i.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{let e,t;a.r(o),a.d(o,{BY_RRULE_PARTS:()=>a8,EventTypes:()=>d,RRULE_ENDS:()=>oi,INTUITIVE_NOT_APPLICABLE:()=>a9,OrSchedulerChangedEvent:()=>oc,RFC_STRICT_NOT_APPLICABLE:()=>a6,FREQUENCIES:()=>a4,OrScheduler:()=>o_,OrSchedulerRemovedEvent:()=>op,MONTHS:()=>ot,WEEKDAYS:()=>oe}),a(368);var i,s,r,n,l,d,h=a(673);let u=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},c=globalThis,p=c.ShadowRoot&&(void 0===c.ShadyCSS||c.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_=Symbol(),v=new WeakMap;class m{constructor(e,t,i){if(this._$cssResult$=!0,i!==_)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(p&&void 0===e){let i=void 0!==t&&1===t.length;i&&(e=v.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&v.set(t,e))}return e}toString(){return this.cssText}}let f=e=>new m("string"==typeof e?e:e+"",void 0,_),g=(e,...t)=>new m(1===e.length?e[0]:t.reduce((t,i,s)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[s+1],e[0]),e,_),b=(e,t)=>{if(p)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let i of t){let t=document.createElement("style"),s=c.litNonce;void 0!==s&&t.setAttribute("nonce",s),t.textContent=i.cssText,e.appendChild(t)}},y=p?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(let i of e.cssRules)t+=i.cssText;return f(t)})(e):e,{is:w,defineProperty:x,getOwnPropertyDescriptor:C,getOwnPropertyNames:k,getOwnPropertySymbols:E,getPrototypeOf:T}=Object,I=globalThis,D=I.trustedTypes,S=D?D.emptyScript:"",A=I.reactiveElementPolyfillSupport,O={toAttribute(e,t){switch(t){case Boolean:e=e?S:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},P=(e,t)=>!w(e,t),$={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:P};Symbol.metadata??=Symbol("metadata"),I.litPropertyMetadata??=new WeakMap;class L extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=$){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(e,i,t);void 0!==s&&x(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){let{get:s,set:r}=C(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:s,set(t){let n=s?.call(this);r?.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??$}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;let e=T(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){let e=this.properties;for(let t of[...k(e),...E(e)])this.createProperty(t,e[t])}let e=this[Symbol.metadata];if(null!==e){let t=litPropertyMetadata.get(e);if(void 0!==t)for(let[e,i]of t)this.elementProperties.set(e,i)}for(let[e,t]of(this._$Eh=new Map,this.elementProperties)){let i=this._$Eu(e,t);void 0!==i&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e))for(let i of new Set(e.flat(1/0).reverse()))t.unshift(y(i));else void 0!==e&&t.push(y(e));return t}static _$Eu(e,t){let i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.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(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map;for(let t of this.constructor.elementProperties.keys())this.hasOwnProperty(t)&&(e.set(t,this[t]),delete this[t]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return b(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){let i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(void 0!==s&&!0===i.reflect){let r=(void 0!==i.converter?.toAttribute?i.converter:O).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,t){let i=this.constructor,s=i._$Eh.get(e);if(void 0!==s&&this._$Em!==s){let e=i.getPropertyOptions(s),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:O;this._$Em=s;let n=r.fromAttribute(t,e.type);this[s]=n??this._$Ej?.get(s)??n,this._$Em=null}}requestUpdate(e,t,i){if(void 0!==e){let s=this.constructor,r=this[e];if(!(((i??=s.getPropertyOptions(e)).hasChanged??P)(r,t)||i.useDefault&&i.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:r},n){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,n??t??this[e]),!0!==r||void 0!==n)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===s&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,i]of e){let{wrapped:e}=i,s=this[t];!0!==e||this._$AL.has(t)||void 0===s||this.C(t,void 0,i,s)}}let e=!1,t=this._$AL;try{(e=this.shouldUpdate(t))?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}}L.elementStyles=[],L.shadowRootOptions={mode:"open"},L.elementProperties=new Map,L.finalized=new Map,A?.({ReactiveElement:L}),(I.reactiveElementVersions??=[]).push("2.1.1");let M={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:P};function R(e){return(t,i)=>{let s;return"object"==typeof i?((e=M,t,i)=>{let{kind:s,metadata:r}=i,n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),"setter"===s&&((e=Object.create(e)).wrapped=!0),n.set(i.name,e),"accessor"===s){let{name:s}=i;return{set(i){let r=t.get.call(this);t.set.call(this,i),this.requestUpdate(s,r,e)},init(t){return void 0!==t&&this.C(s,void 0,e,t),t}}}if("setter"===s){let{name:s}=i;return function(i){let r=this[s];t.call(this,i),this.requestUpdate(s,r,e)}}throw Error("Unsupported decorator location: "+s)})(e,t,i):(s=t.hasOwnProperty(i),t.constructor.createProperty(i,e),s?Object.getOwnPropertyDescriptor(t,i):void 0)}}function V(e){return R({...e,state:!0,attribute:!1})}let N=globalThis,B=N.trustedTypes,z=B?B.createPolicy("lit-html",{createHTML:e=>e}):void 0,F="$lit$",U=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+U,j=`<${H}>`,Y=document,q=()=>Y.createComment(""),W=e=>null===e||"object"!=typeof e&&"function"!=typeof e,K=Array.isArray,G=e=>K(e)||"function"==typeof e?.[Symbol.iterator],X="[ \n\f\r]",Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Q=/-->/g,J=/>/g,ee=RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
2
- \f\r"'\`<>=]|("|')|))|$)`,"g"),et=/'/g,ei=/"/g,es=/^(?:script|style|textarea|title)$/i,er=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),en=er(1),ea=(er(2),er(3),Symbol.for("lit-noChange")),eo=Symbol.for("lit-nothing"),el=new WeakMap,ed=Y.createTreeWalker(Y,129);function eh(e,t){if(!K(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==z?z.createHTML(t):t}let eu=(e,t)=>{let i=e.length-1,s=[],r,n=2===t?"<svg>":3===t?"<math>":"",a=Z;for(let t=0;t<i;t++){let i=e[t],o,l,d=-1,h=0;for(;h<i.length&&(a.lastIndex=h,null!==(l=a.exec(i)));)h=a.lastIndex,a===Z?"!--"===l[1]?a=Q:void 0!==l[1]?a=J:void 0!==l[2]?(es.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=ee):void 0!==l[3]&&(a=ee):a===ee?">"===l[0]?(a=r??Z,d=-1):void 0===l[1]?d=-2:(d=a.lastIndex-l[2].length,o=l[1],a=void 0===l[3]?ee:'"'===l[3]?ei:et):a===ei||a===et?a=ee:a===Q||a===J?a=Z:(a=ee,r=void 0);let u=a===ee&&e[t+1].startsWith("/>")?" ":"";n+=a===Z?i+j:d>=0?(s.push(o),i.slice(0,d)+F+i.slice(d)+U+u):i+U+(-2===d?t:u)}return[eh(e,n+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),s]};class ec{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let r=0,n=0;const a=e.length-1,o=this.parts,[l,d]=eu(e,t);if(this.el=ec.createElement(l,i),ed.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(s=ed.nextNode())&&o.length<a;){if(1===s.nodeType){if(s.hasAttributes())for(const e of s.getAttributeNames())if(e.endsWith(F)){const t=d[n++],i=s.getAttribute(e).split(U),a=/([.?@])?(.*)/.exec(t);o.push({type:1,index:r,name:a[2],strings:i,ctor:"."===a[1]?ef:"?"===a[1]?eg:"@"===a[1]?eb:em}),s.removeAttribute(e)}else e.startsWith(U)&&(o.push({type:6,index:r}),s.removeAttribute(e));if(es.test(s.tagName)){const e=s.textContent.split(U),t=e.length-1;if(t>0){s.textContent=B?B.emptyScript:"";for(let i=0;i<t;i++)s.append(e[i],q()),ed.nextNode(),o.push({type:2,index:++r});s.append(e[t],q())}}}else if(8===s.nodeType)if(s.data===H)o.push({type:2,index:r});else{let e=-1;for(;-1!==(e=s.data.indexOf(U,e+1));)o.push({type:7,index:r}),e+=U.length-1}r++}}static createElement(e,t){let i=Y.createElement("template");return i.innerHTML=e,i}}function ep(e,t,i=e,s){if(t===ea)return t;let r=void 0!==s?i._$Co?.[s]:i._$Cl,n=W(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(e))._$AT(e,i,s),void 0!==s?(i._$Co??=[])[s]=r:i._$Cl=r),void 0!==r&&(t=ep(e,r._$AS(e,t.values),r,s)),t}class e_{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:i}=this._$AD,s=(e?.creationScope??Y).importNode(t,!0);ed.currentNode=s;let r=ed.nextNode(),n=0,a=0,o=i[0];for(;void 0!==o;){if(n===o.index){let t;2===o.type?t=new ev(r,r.nextSibling,this,e):1===o.type?t=new o.ctor(r,o.name,o.strings,this,e):6===o.type&&(t=new ey(r,this,e)),this._$AV.push(t),o=i[++a]}n!==o?.index&&(r=ed.nextNode(),n++)}return ed.currentNode=Y,s}p(e){let t=0;for(let i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class ev{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,s){this.type=2,this._$AH=eo,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){W(e=ep(this,e,t))?e===eo||null==e||""===e?(this._$AH!==eo&&this._$AR(),this._$AH=eo):e!==this._$AH&&e!==ea&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):G(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==eo&&W(this._$AH)?this._$AA.nextSibling.data=e:this.T(Y.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:i}=e,s="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=ec.createElement(eh(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(t);else{let e=new e_(s,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=el.get(e.strings);return void 0===t&&el.set(e.strings,t=new ec(e)),t}k(e){K(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,i,s=0;for(let r of e)s===t.length?t.push(i=new ev(this.O(q()),this.O(q()),this,this.options)):i=t[s],i._$AI(r),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class em{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,r){this.type=1,this._$AH=eo,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=eo}_$AI(e,t=this,i,s){let r=this.strings,n=!1;if(void 0===r)(n=!W(e=ep(this,e,t,0))||e!==this._$AH&&e!==ea)&&(this._$AH=e);else{let s,a,o=e;for(e=r[0],s=0;s<r.length-1;s++)(a=ep(this,o[i+s],t,s))===ea&&(a=this._$AH[s]),n||=!W(a)||a!==this._$AH[s],a===eo?e=eo:e!==eo&&(e+=(a??"")+r[s+1]),this._$AH[s]=a}n&&!s&&this.j(e)}j(e){e===eo?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ef extends em{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===eo?void 0:e}}class eg extends em{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==eo)}}class eb extends em{constructor(e,t,i,s,r){super(e,t,i,s,r),this.type=5}_$AI(e,t=this){if((e=ep(this,e,t,0)??eo)===ea)return;let i=this._$AH,s=e===eo&&i!==eo||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==eo&&(i===eo||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class ey{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){ep(this,e)}}let ew=N.litHtmlPolyfillSupport;ew?.(ec,ev),(N.litHtmlVersions??=[]).push("3.3.1");let ex=(e,t,i)=>{let s=i?.renderBefore??t,r=s._$litPart$;if(void 0===r){let e=i?.renderBefore??null;s._$litPart$=r=new ev(t.insertBefore(q(),e),e,void 0,i??{})}return r._$AI(e),r},eC=globalThis;class ek extends L{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ex(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ea}}ek._$litElement$=!0,ek.finalized=!0,eC.litElementHydrateSupport?.({LitElement:ek});let eE=eC.litElementPolyfillSupport;eE?.({LitElement:ek}),(eC.litElementVersions??=[]).push("4.2.1"),window.Vaadin||={},window.Vaadin.featureFlags||={};let eT={};function eI(e,t="25.1.4"){if(Object.defineProperty(e,"version",{get:()=>t}),e.experimental){let t="string"==typeof e.experimental?e.experimental:`${e.is.split("-").slice(1).join("-").replace(/-[a-z]/gu,e=>e[1].toUpperCase())}Component`;if(window.Vaadin.featureFlags[t]||eT[t]){if(eT[t])return void eT[t].add(e)}else{eT[t]=new Set,eT[t].add(e),Object.defineProperty(window.Vaadin.featureFlags,t,{get:()=>0===eT[t].size,set(e){e&&eT[t].size>0&&(eT[t].forEach(e=>{customElements.define(e.is,e)}),eT[t].clear())}});return}}let i=customElements.get(e.is);if(i){let t=i.version;t&&e.version&&t===e.version?console.warn(`The component ${e.is} has been loaded twice`):console.error(`Tried to define ${e.is} version ${e.version} when version ${i.version} is already in use. Something will probably break.`)}else customElements.define(e.is,e)}let eD=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,eS=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function eA(e,t){if("function"!=typeof e)return;let i=eD.exec(e.toString());if(i)try{e=Function(i[1])}catch(e){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",e)}return e(t)}window.Vaadin=window.Vaadin||{};let eO=function(e,t){if(window.Vaadin.developmentMode)return eA(e,t)};function eP(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{if(localStorage.getItem("vaadin.developmentmode.force"))return!0;if(!(["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0))return!1;if(eS)return!(eS&&Object.keys(eS).map(e=>eS[e]).filter(e=>e.productionMode).length>0);return!eA(function(){return!0})}catch(e){return!1}}());let e$=function(){if("function"==typeof eO)return eO(eP)},eL=0,eM=0,eR=[],eV=!1,eN={after:e=>({run:t=>window.setTimeout(t,e),cancel(e){window.clearTimeout(e)}}),run:(e,t)=>window.setTimeout(e,t),cancel(e){window.clearTimeout(e)}},eB={run:e=>window.requestAnimationFrame(e),cancel(e){window.cancelAnimationFrame(e)}},ez={run:e=>window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16),cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}},eF={run(e){eV||(eV=!0,queueMicrotask(()=>(function(){eV=!1;let e=eR.length;for(let t=0;t<e;t++){let e=eR[t];if(e)try{e()}catch(e){setTimeout(()=>{throw e})}}eR.splice(0,e),eM+=e})())),eR.push(e);let t=eL;return eL+=1,t},cancel(e){let t=e-eM;if(t>=0){if(!eR[t])throw Error(`invalid async handle: ${e}`);eR[t]=null}}},eU=new Set;class eH{static debounce(e,t,i){return e instanceof eH?e._cancelAsync():e=new eH,e.setConfig(t,i),e}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(e,t){this._asyncModule=e,this._callback=t,this._timer=this._asyncModule.run(()=>{this._timer=null,eU.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),eU.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}}let ej=()=>{let e;do e=function(){let e=!!eU.size;return eU.forEach(e=>{try{e.flush()}catch(e){setTimeout(()=>{throw e})}}),e}();while(e)},eY=[];function eq(e,t,i=e.getAttribute("dir")){t?e.setAttribute("dir",t):null!=i&&e.removeAttribute("dir")}function eW(){return document.documentElement.getAttribute("dir")}new MutationObserver(function(){let e=eW();eY.forEach(t=>{eq(t,e)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});let eK=e=>class extends e{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>""===e?null:e}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),eq(this,eW(),null))}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),"dir"!==e)return;let s=eW(),r=i===s&&-1===eY.indexOf(this),n=!i&&t&&-1===eY.indexOf(this),a=i!==s&&t===s;r||n?(this.__subscribe(),eq(this,s,i)):a&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=eY.includes(this),this.__unsubscribe()}_valueToNodeAttribute(e,t,i){("dir"!==i||""!==t||e.hasAttribute("dir"))&&super._valueToNodeAttribute(e,t,i)}_attributeToProperty(e,t,i){"dir"!==e||t?super._attributeToProperty(e,t,i):this.dir=""}__subscribe(){eY.includes(this)||eY.push(this)}__unsubscribe(){eY.includes(this)&&eY.splice(eY.indexOf(this),1)}};window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){e$()};let eG=new Set,eX=t=>class extends eK(t){static _ensureRegistrations(){let{is:t}=this;if(t&&!eG.has(t)){window.Vaadin.registrations.push(this),eG.add(t);let s=window.Vaadin.developmentModeCallback;if(s){var i;i=e=eH.debounce(e,ez,()=>{s["vaadin-usage-statistics"]()}),eU.add(i)}}}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.'),this.constructor._ensureRegistrations()}},eZ=new WeakMap;function eQ(e){return t=>{if(function(e,t){let i=t;for(;i;){if(eZ.get(i)===e)return!0;i=Object.getPrototypeOf(i)}return!1}(e,t))return t;let i=e(t);return eZ.set(i,e),i}}function eJ(e,t){return e.split(".").reduce((e,t)=>e?e[t]:void 0,t)}let e0={},e1=/([A-Z])/gu;function e2(e){return e0[e]||(e0[e]=e.replace(e1,"-$1").toLowerCase()),e0[e]}function e3(e){return e[0].toUpperCase()+e.substring(1)}function e5(e){let[t,i]=e.split("(");return{method:t,observerProps:i.replace(")","").split(",").map(e=>e.trim())}}function e4(e,t){return Object.prototype.hasOwnProperty.call(e,t)||(e[t]=new Map(e[t])),e[t]}let e8=eQ(e=>class extends e{static enabledWarnings=[];static createProperty(e,t){[String,Boolean,Number,Array].includes(t)&&(t={type:t}),t&&t.reflectToAttribute&&(t.reflect=!0),super.createProperty(e,t)}static getOrCreateMap(e){return e4(this,e)}static finalize(){if(window.litIssuedWarnings&&(window.litIssuedWarnings.add("no-override-create-property"),window.litIssuedWarnings.add("no-override-get-property-descriptor")),super.finalize(),Array.isArray(this.observers)){let e=this.getOrCreateMap("__complexObservers");this.observers.forEach(t=>{let{method:i,observerProps:s}=e5(t);e.set(i,s)})}}static addCheckedInitializer(e){super.addInitializer(t=>{t instanceof this&&e(t)})}static getPropertyDescriptor(e,t,i){let s=super.getPropertyDescriptor(e,t,i),r=s;if(this.getOrCreateMap("__propKeys").set(e,t),i.sync&&(r={get:s.get,set(s){let r=this[e];P(s,r)&&(this[t]=s,this.requestUpdate(e,r,i),this.hasUpdated&&this.performUpdate())},configurable:!0,enumerable:!0}),i.readOnly){let t=r.set;this.addCheckedInitializer(i=>{i[`_set${e3(e)}`]=function(e){t.call(i,e)}}),r={get:r.get,set(){},configurable:!0,enumerable:!0}}if("value"in i&&this.addCheckedInitializer(t=>{let s="function"==typeof i.value?i.value.call(t):i.value;i.readOnly?t[`_set${e3(e)}`](s):t[e]=s}),i.observer){let t=i.observer;this.getOrCreateMap("__observers").set(e,t),this.addCheckedInitializer(e=>{e[t]||console.warn(`observer method ${t} not defined`)})}if(i.notify){if(this.__notifyProps){if(!this.hasOwnProperty("__notifyProps")){let e=this.__notifyProps;this.__notifyProps=new Set(e)}}else this.__notifyProps=new Set;this.__notifyProps.add(e)}if(i.computed){let t=`__assignComputed${e}`,s=e5(i.computed);this.prototype[t]=function(...t){this[e]=this[s.method](...t)},this.getOrCreateMap("__computedObservers").set(t,s.observerProps)}return i.attribute||(i.attribute=e2(e)),r}static get polylitConfig(){return{asyncFirstRender:!1}}connectedCallback(){super.connectedCallback();let{polylitConfig:e}=this.constructor;this.hasUpdated||e.asyncFirstRender||this.performUpdate()}firstUpdated(){super.firstUpdated(),this.$||(this.$={}),this.renderRoot.querySelectorAll("[id]").forEach(e=>{this.$[e.id]=e})}ready(){}willUpdate(e){this.constructor.__computedObservers&&this.__runComplexObservers(e,this.constructor.__computedObservers)}updated(e){let t=this.__isReadyInvoked;this.__isReadyInvoked=!0,this.constructor.__observers&&this.__runObservers(e,this.constructor.__observers),this.constructor.__complexObservers&&this.__runComplexObservers(e,this.constructor.__complexObservers),this.__dynamicPropertyObservers&&this.__runDynamicObservers(e,this.__dynamicPropertyObservers),this.__dynamicMethodObservers&&this.__runComplexObservers(e,this.__dynamicMethodObservers),this.constructor.__notifyProps&&this.__runNotifyProps(e,this.constructor.__notifyProps),t||this.ready()}setProperties(e){Object.entries(e).forEach(([e,t])=>{let i=this.constructor.__propKeys.get(e),s=this[i];this[i]=t,this.requestUpdate(e,s)}),this.hasUpdated&&this.performUpdate()}_createMethodObserver(e){let t=e4(this,"__dynamicMethodObservers"),{method:i,observerProps:s}=e5(e);t.set(i,s)}_createPropertyObserver(e,t){e4(this,"__dynamicPropertyObservers").set(t,e)}__runComplexObservers(e,t){t.forEach((t,i)=>{t.some(t=>e.has(t))&&(this[i]?this[i](...t.map(e=>this[e])):console.warn(`observer method ${i} not defined`))})}__runDynamicObservers(e,t){t.forEach((t,i)=>{e.has(t)&&this[i]&&this[i](this[t],e.get(t))})}__runObservers(e,t){e.forEach((e,i)=>{let s=t.get(i);void 0!==s&&this[s]&&this[s](this[i],e)})}__runNotifyProps(e,t){e.forEach((e,i)=>{t.has(i)&&this.dispatchEvent(new CustomEvent(`${e2(i)}-changed`,{detail:{value:this[i]}}))})}_get(e,t){return eJ(e,t)}_set(e,t,i){let s,r;r=(s=e.split(".")).pop(),s.reduce((e,t)=>e[t],i)[r]=t}});function e6(e){return e?new Set(e.split(" ")):new Set}function e7(e){return e?[...e].join(" "):""}function e9(e,t,i){let s=e6(e.getAttribute(t));s.add(i),e.setAttribute(t,e7(s))}class te{constructor(e,t,i){this.slot=e,this.callback=t,this.forceInitial=i,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(){let e=this.slot.assignedNodes({flatten:!0}),t=[],i=[],s=[];e.length&&(t=e.filter(e=>!this._storedNodes.includes(e))),this._storedNodes.length&&this._storedNodes.forEach((t,r)=>{let n=e.indexOf(t);-1===n?i.push(t):n!==r&&s.push(t)}),(t.length||i.length||s.length||this.forceInitial)&&this.callback({addedNodes:t,currentNodes:e,movedNodes:s,removedNodes:i}),this.forceInitial&&(this.forceInitial=!1),this._storedNodes=e}}let tt=0;class ti extends EventTarget{static generateId(e,t="default"){return`${t}-${e.localName}-${tt++}`}constructor(e,t,i,s={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:o,uniqueIdPrefix:l}=s;this.host=e,this.slotName=t,this.tagName=i,this.observe="boolean"!=typeof a||a,this.multiple="boolean"==typeof n&&n,this.slotInitializer=r,n&&(this.nodes=[]),o&&(this.defaultId=this.constructor.generateId(e,l||t))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let e=this.getSlotChild();e?(this.node=e,this.initAddedNode(e)):(e=this.attachDefaultNode(),this.initNode(e))}initMultiple(){let e=this.getSlotChildren();if(0===e.length){let e=this.attachDefaultNode();e&&(this.nodes=[e],this.initNode(e))}else this.nodes=e,e.forEach(e=>{this.initAddedNode(e)})}attachDefaultNode(){let{host:e,slotName:t,tagName:i}=this,s=this.defaultNode;return!s&&i&&(s=document.createElement(i))instanceof Element&&(""!==t&&s.setAttribute("slot",t),this.defaultNode=s),s&&(this.node=s,e.appendChild(s)),s}getSlotChildren(){let{slotName:e}=this;return Array.from(this.host.childNodes).filter(t=>!(t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute("data-slot-ignore"))&&(t.nodeType===Node.ELEMENT_NODE&&t.slot===e||t.nodeType===Node.TEXT_NODE&&t.textContent.trim()&&""===e))}getSlotChild(){return this.getSlotChildren()[0]}initNode(e){let{slotInitializer:t}=this;t&&t(e,this.host)}initCustomNode(e){}teardownNode(e){}initAddedNode(e){e!==this.defaultNode&&(this.initCustomNode(e),this.initNode(e))}observeSlot(){let{slotName:e}=this,t=""===e?"slot:not([name])":`slot[name=${e}]`,i=this.host.shadowRoot.querySelector(t);this.__slotObserver=new te(i,({addedNodes:e,removedNodes:t})=>{let i=this.multiple?this.nodes:[this.node],s=e.filter(e=>(e.nodeType!==Node.TEXT_NODE||""!==e.textContent.trim())&&!i.includes(e)&&!(e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("data-slot-ignore")));t.length&&(this.nodes=i.filter(e=>!t.includes(e)),t.forEach(e=>{this.teardownNode(e)})),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...s].filter(e=>e!==this.defaultNode),s.forEach(e=>{this.initAddedNode(e)})):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))})}}class ts extends ti{constructor(e){super(e,"tooltip"),this.setTarget(e),this.__onContentChange=this.__onContentChange.bind(this)}initCustomNode(e){e.target=this.target,void 0!==this.ariaTarget&&(e.ariaTarget=this.ariaTarget),void 0!==this.context&&(e.context=this.context),void 0!==this.manual&&(e.manual=this.manual),void 0!==this.opened&&(e.opened=this.opened),void 0!==this.position&&(e._position=this.position),void 0!==this.shouldShow&&(e.shouldShow=this.shouldShow),this.manual||this.host.setAttribute("has-tooltip",""),this.__notifyChange(e),e.addEventListener("content-changed",this.__onContentChange)}teardownNode(e){this.manual||this.host.removeAttribute("has-tooltip"),e.removeEventListener("content-changed",this.__onContentChange),this.__notifyChange(null)}setAriaTarget(e){this.ariaTarget=e;let t=this.node;t&&(t.ariaTarget=e)}setContext(e){this.context=e;let t=this.node;t&&(t.context=e)}setManual(e){this.manual=e;let t=this.node;t&&(t.manual=e)}setOpened(e){this.opened=e;let t=this.node;t&&(t.opened=e)}setPosition(e){this.position=e;let t=this.node;t&&(t._position=e)}setShouldShow(e){this.shouldShow=e;let t=this.node;t&&(t.shouldShow=e)}setTarget(e){this.target=e;let t=this.node;t&&(t.target=e)}__onContentChange(e){this.__notifyChange(e.target)}__notifyChange(e){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:e}}))}}class tr extends EventTarget{#e;#t=new Set;#i;#s=!1;constructor(e){super(),this.#e=e,this.#i=new CSSStyleSheet}#r(e){let{propertyName:t}=e;this.#t.has(t)&&this.dispatchEvent(new CustomEvent("property-changed",{detail:{propertyName:t}}))}observe(e){this.connect(),this.#t.has(e)||(this.#t.add(e),this.#i.replaceSync(`
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ORCore"),require("ORTranslate"),require("moment"),require("ORIcon")):"function"==typeof define&&define.amd?define(["ORCore","ORTranslate","moment","ORIcon"],t):"object"==typeof exports?exports.ORScheduler=t(require("ORCore"),require("ORTranslate"),require("moment"),require("ORIcon")):e.ORScheduler=t(e.ORCore,e.ORTranslate,e.moment,e.ORIcon)}(self,(e,t,i,s)=>(()=>{"use strict";var r={954(t){t.exports=e},368(e){e.exports=s},673(e){e.exports=t},416(e){e.exports=i}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,a),i.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{let e,t;a.r(o),a.d(o,{BY_RRULE_PARTS:()=>a9,EventTypes:()=>d,RRULE_ENDS:()=>on,INTUITIVE_NOT_APPLICABLE:()=>oi,OrSchedulerChangedEvent:()=>ov,RFC_STRICT_NOT_APPLICABLE:()=>oe,FREQUENCIES:()=>a7,OrScheduler:()=>of,OrSchedulerRemovedEvent:()=>om,MONTHS:()=>or,WEEKDAYS:()=>os}),a(368);var i,s,r,n,l,d,h=a(673);let u=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},c=globalThis,p=c.ShadowRoot&&(void 0===c.ShadyCSS||c.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_=Symbol(),v=new WeakMap;class m{constructor(e,t,i){if(this._$cssResult$=!0,i!==_)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(p&&void 0===e){let i=void 0!==t&&1===t.length;i&&(e=v.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&v.set(t,e))}return e}toString(){return this.cssText}}let f=e=>new m("string"==typeof e?e:e+"",void 0,_),g=(e,...t)=>new m(1===e.length?e[0]:t.reduce((t,i,s)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[s+1],e[0]),e,_),b=(e,t)=>{if(p)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let i of t){let t=document.createElement("style"),s=c.litNonce;void 0!==s&&t.setAttribute("nonce",s),t.textContent=i.cssText,e.appendChild(t)}},y=p?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(let i of e.cssRules)t+=i.cssText;return f(t)})(e):e,{is:w,defineProperty:x,getOwnPropertyDescriptor:C,getOwnPropertyNames:k,getOwnPropertySymbols:E,getPrototypeOf:I}=Object,T=globalThis,D=T.trustedTypes,S=D?D.emptyScript:"",A=T.reactiveElementPolyfillSupport,O={toAttribute(e,t){switch(t){case Boolean:e=e?S:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},P=(e,t)=>!w(e,t),$={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:P};Symbol.metadata??=Symbol("metadata"),T.litPropertyMetadata??=new WeakMap;class L extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=$){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(e,i,t);void 0!==s&&x(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){let{get:s,set:r}=C(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:s,set(t){let n=s?.call(this);r?.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??$}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;let e=I(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){let e=this.properties;for(let t of[...k(e),...E(e)])this.createProperty(t,e[t])}let e=this[Symbol.metadata];if(null!==e){let t=litPropertyMetadata.get(e);if(void 0!==t)for(let[e,i]of t)this.elementProperties.set(e,i)}for(let[e,t]of(this._$Eh=new Map,this.elementProperties)){let i=this._$Eu(e,t);void 0!==i&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e))for(let i of new Set(e.flat(1/0).reverse()))t.unshift(y(i));else void 0!==e&&t.push(y(e));return t}static _$Eu(e,t){let i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.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(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map;for(let t of this.constructor.elementProperties.keys())this.hasOwnProperty(t)&&(e.set(t,this[t]),delete this[t]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return b(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){let i=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,i);if(void 0!==s&&!0===i.reflect){let r=(void 0!==i.converter?.toAttribute?i.converter:O).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,t){let i=this.constructor,s=i._$Eh.get(e);if(void 0!==s&&this._$Em!==s){let e=i.getPropertyOptions(s),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:O;this._$Em=s;let n=r.fromAttribute(t,e.type);this[s]=n??this._$Ej?.get(s)??n,this._$Em=null}}requestUpdate(e,t,i){if(void 0!==e){let s=this.constructor,r=this[e];if(!(((i??=s.getPropertyOptions(e)).hasChanged??P)(r,t)||i.useDefault&&i.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:s,wrapped:r},n){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,n??t??this[e]),!0!==r||void 0!==n)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===s&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,i]of e){let{wrapped:e}=i,s=this[t];!0!==e||this._$AL.has(t)||void 0===s||this.C(t,void 0,i,s)}}let e=!1,t=this._$AL;try{(e=this.shouldUpdate(t))?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}}L.elementStyles=[],L.shadowRootOptions={mode:"open"},L.elementProperties=new Map,L.finalized=new Map,A?.({ReactiveElement:L}),(T.reactiveElementVersions??=[]).push("2.1.1");let M={attribute:!0,type:String,converter:O,reflect:!1,hasChanged:P};function R(e){return(t,i)=>{let s;return"object"==typeof i?((e=M,t,i)=>{let{kind:s,metadata:r}=i,n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),"setter"===s&&((e=Object.create(e)).wrapped=!0),n.set(i.name,e),"accessor"===s){let{name:s}=i;return{set(i){let r=t.get.call(this);t.set.call(this,i),this.requestUpdate(s,r,e)},init(t){return void 0!==t&&this.C(s,void 0,e,t),t}}}if("setter"===s){let{name:s}=i;return function(i){let r=this[s];t.call(this,i),this.requestUpdate(s,r,e)}}throw Error("Unsupported decorator location: "+s)})(e,t,i):(s=t.hasOwnProperty(i),t.constructor.createProperty(i,e),s?Object.getOwnPropertyDescriptor(t,i):void 0)}}function V(e){return R({...e,state:!0,attribute:!1})}let N=globalThis,B=N.trustedTypes,z=B?B.createPolicy("lit-html",{createHTML:e=>e}):void 0,F="$lit$",U=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+U,j=`<${H}>`,Y=document,q=()=>Y.createComment(""),W=e=>null===e||"object"!=typeof e&&"function"!=typeof e,K=Array.isArray,G=e=>K(e)||"function"==typeof e?.[Symbol.iterator],X="[ \n\f\r]",Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Q=/-->/g,J=/>/g,ee=RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
2
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),et=/'/g,ei=/"/g,es=/^(?:script|style|textarea|title)$/i,er=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),en=er(1),ea=(er(2),er(3),Symbol.for("lit-noChange")),eo=Symbol.for("lit-nothing"),el=new WeakMap,ed=Y.createTreeWalker(Y,129);function eh(e,t){if(!K(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==z?z.createHTML(t):t}let eu=(e,t)=>{let i=e.length-1,s=[],r,n=2===t?"<svg>":3===t?"<math>":"",a=Z;for(let t=0;t<i;t++){let i=e[t],o,l,d=-1,h=0;for(;h<i.length&&(a.lastIndex=h,null!==(l=a.exec(i)));)h=a.lastIndex,a===Z?"!--"===l[1]?a=Q:void 0!==l[1]?a=J:void 0!==l[2]?(es.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=ee):void 0!==l[3]&&(a=ee):a===ee?">"===l[0]?(a=r??Z,d=-1):void 0===l[1]?d=-2:(d=a.lastIndex-l[2].length,o=l[1],a=void 0===l[3]?ee:'"'===l[3]?ei:et):a===ei||a===et?a=ee:a===Q||a===J?a=Z:(a=ee,r=void 0);let u=a===ee&&e[t+1].startsWith("/>")?" ":"";n+=a===Z?i+j:d>=0?(s.push(o),i.slice(0,d)+F+i.slice(d)+U+u):i+U+(-2===d?t:u)}return[eh(e,n+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),s]};class ec{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let r=0,n=0;const a=e.length-1,o=this.parts,[l,d]=eu(e,t);if(this.el=ec.createElement(l,i),ed.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(s=ed.nextNode())&&o.length<a;){if(1===s.nodeType){if(s.hasAttributes())for(const e of s.getAttributeNames())if(e.endsWith(F)){const t=d[n++],i=s.getAttribute(e).split(U),a=/([.?@])?(.*)/.exec(t);o.push({type:1,index:r,name:a[2],strings:i,ctor:"."===a[1]?ef:"?"===a[1]?eg:"@"===a[1]?eb:em}),s.removeAttribute(e)}else e.startsWith(U)&&(o.push({type:6,index:r}),s.removeAttribute(e));if(es.test(s.tagName)){const e=s.textContent.split(U),t=e.length-1;if(t>0){s.textContent=B?B.emptyScript:"";for(let i=0;i<t;i++)s.append(e[i],q()),ed.nextNode(),o.push({type:2,index:++r});s.append(e[t],q())}}}else if(8===s.nodeType)if(s.data===H)o.push({type:2,index:r});else{let e=-1;for(;-1!==(e=s.data.indexOf(U,e+1));)o.push({type:7,index:r}),e+=U.length-1}r++}}static createElement(e,t){let i=Y.createElement("template");return i.innerHTML=e,i}}function ep(e,t,i=e,s){if(t===ea)return t;let r=void 0!==s?i._$Co?.[s]:i._$Cl,n=W(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(e))._$AT(e,i,s),void 0!==s?(i._$Co??=[])[s]=r:i._$Cl=r),void 0!==r&&(t=ep(e,r._$AS(e,t.values),r,s)),t}class e_{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:i}=this._$AD,s=(e?.creationScope??Y).importNode(t,!0);ed.currentNode=s;let r=ed.nextNode(),n=0,a=0,o=i[0];for(;void 0!==o;){if(n===o.index){let t;2===o.type?t=new ev(r,r.nextSibling,this,e):1===o.type?t=new o.ctor(r,o.name,o.strings,this,e):6===o.type&&(t=new ey(r,this,e)),this._$AV.push(t),o=i[++a]}n!==o?.index&&(r=ed.nextNode(),n++)}return ed.currentNode=Y,s}p(e){let t=0;for(let i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class ev{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,s){this.type=2,this._$AH=eo,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){W(e=ep(this,e,t))?e===eo||null==e||""===e?(this._$AH!==eo&&this._$AR(),this._$AH=eo):e!==this._$AH&&e!==ea&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):G(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==eo&&W(this._$AH)?this._$AA.nextSibling.data=e:this.T(Y.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:i}=e,s="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=ec.createElement(eh(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(t);else{let e=new e_(s,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=el.get(e.strings);return void 0===t&&el.set(e.strings,t=new ec(e)),t}k(e){K(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,i,s=0;for(let r of e)s===t.length?t.push(i=new ev(this.O(q()),this.O(q()),this,this.options)):i=t[s],i._$AI(r),s++;s<t.length&&(this._$AR(i&&i._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class em{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,s,r){this.type=1,this._$AH=eo,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=eo}_$AI(e,t=this,i,s){let r=this.strings,n=!1;if(void 0===r)(n=!W(e=ep(this,e,t,0))||e!==this._$AH&&e!==ea)&&(this._$AH=e);else{let s,a,o=e;for(e=r[0],s=0;s<r.length-1;s++)(a=ep(this,o[i+s],t,s))===ea&&(a=this._$AH[s]),n||=!W(a)||a!==this._$AH[s],a===eo?e=eo:e!==eo&&(e+=(a??"")+r[s+1]),this._$AH[s]=a}n&&!s&&this.j(e)}j(e){e===eo?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ef extends em{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===eo?void 0:e}}class eg extends em{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==eo)}}class eb extends em{constructor(e,t,i,s,r){super(e,t,i,s,r),this.type=5}_$AI(e,t=this){if((e=ep(this,e,t,0)??eo)===ea)return;let i=this._$AH,s=e===eo&&i!==eo||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==eo&&(i===eo||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class ey{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){ep(this,e)}}let ew=N.litHtmlPolyfillSupport;ew?.(ec,ev),(N.litHtmlVersions??=[]).push("3.3.1");let ex=(e,t,i)=>{let s=i?.renderBefore??t,r=s._$litPart$;if(void 0===r){let e=i?.renderBefore??null;s._$litPart$=r=new ev(t.insertBefore(q(),e),e,void 0,i??{})}return r._$AI(e),r},eC=globalThis;class ek extends L{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ex(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ea}}ek._$litElement$=!0,ek.finalized=!0,eC.litElementHydrateSupport?.({LitElement:ek});let eE=eC.litElementPolyfillSupport;eE?.({LitElement:ek}),(eC.litElementVersions??=[]).push("4.2.1"),window.Vaadin||={},window.Vaadin.featureFlags||={};let eI={};function eT(e,t="25.2.1"){if(Object.defineProperty(e,"version",{get:()=>t}),e.experimental){let t="string"==typeof e.experimental?e.experimental:`${e.is.split("-").slice(1).join("-").replace(/-[a-z]/gu,e=>e[1].toUpperCase())}Component`;if(window.Vaadin.featureFlags[t]||eI[t]){if(eI[t])return void eI[t].add(e)}else{eI[t]=new Set,eI[t].add(e),Object.defineProperty(window.Vaadin.featureFlags,t,{get:()=>0===eI[t].size,set(e){e&&eI[t].size>0&&(eI[t].forEach(e=>{customElements.define(e.is,e)}),eI[t].clear())}});return}}let i=customElements.get(e.is);if(i){let t=i.version;t&&e.version&&t===e.version?console.warn(`The component ${e.is} has been loaded twice`):console.error(`Tried to define ${e.is} version ${e.version} when version ${i.version} is already in use. Something will probably break.`)}else customElements.define(e.is,e)}let eD=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,eS=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function eA(e,t){if("function"!=typeof e)return;let i=eD.exec(e.toString());if(i)try{e=Function(i[1])}catch(e){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",e)}return e(t)}window.Vaadin=window.Vaadin||{};let eO=function(e,t){if(window.Vaadin.developmentMode)return eA(e,t)};function eP(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{if(localStorage.getItem("vaadin.developmentmode.force"))return!0;if(!(["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0))return!1;if(eS)return!(eS&&Object.keys(eS).map(e=>eS[e]).filter(e=>e.productionMode).length>0);return!eA(function(){return!0})}catch(e){return!1}}());let e$=function(){if("function"==typeof eO)return eO(eP)},eL=0,eM=0,eR=[],eV=!1,eN={after:e=>({run:t=>window.setTimeout(t,e),cancel(e){window.clearTimeout(e)}}),run:(e,t)=>window.setTimeout(e,t),cancel(e){window.clearTimeout(e)}},eB={run:e=>window.requestAnimationFrame(e),cancel(e){window.cancelAnimationFrame(e)}},ez={run:e=>window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16),cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}},eF={run(e){eV||(eV=!0,queueMicrotask(()=>(function(){eV=!1;let e=eR.length;for(let t=0;t<e;t++){let e=eR[t];if(e)try{e()}catch(e){setTimeout(()=>{throw e})}}eR.splice(0,e),eM+=e})())),eR.push(e);let t=eL;return eL+=1,t},cancel(e){let t=e-eM;if(t>=0){if(!eR[t])throw Error(`invalid async handle: ${e}`);eR[t]=null}}},eU=new Set;class eH{static debounce(e,t,i){return e instanceof eH?e._cancelAsync():e=new eH,e.setConfig(t,i),e}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(e,t){this._asyncModule=e,this._callback=t,this._timer=this._asyncModule.run(()=>{this._timer=null,eU.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),eU.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}}let ej=()=>{let e;do e=function(){let e=!!eU.size;return eU.forEach(e=>{try{e.flush()}catch(e){setTimeout(()=>{throw e})}}),e}();while(e)},eY=[];function eq(e,t,i=e.getAttribute("dir")){t?e.setAttribute("dir",t):null!=i&&e.removeAttribute("dir")}function eW(){return document.documentElement.getAttribute("dir")}new MutationObserver(function(){let e=eW();eY.forEach(t=>{eq(t,e)})}).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});let eK=e=>class extends e{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>""===e?null:e}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),eq(this,eW(),null))}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),"dir"!==e)return;let s=eW(),r=i===s&&-1===eY.indexOf(this),n=!i&&t&&-1===eY.indexOf(this),a=i!==s&&t===s;r||n?(this.__subscribe(),eq(this,s,i)):a&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=eY.includes(this),this.__unsubscribe()}_valueToNodeAttribute(e,t,i){("dir"!==i||""!==t||e.hasAttribute("dir"))&&super._valueToNodeAttribute(e,t,i)}_attributeToProperty(e,t,i){"dir"!==e||t?super._attributeToProperty(e,t,i):this.dir=""}__subscribe(){eY.includes(this)||eY.push(this)}__unsubscribe(){eY.includes(this)&&eY.splice(eY.indexOf(this),1)}};window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){e$()};let eG=new Set,eX=t=>class extends eK(t){static _ensureRegistrations(){let{is:t}=this;if(t&&!eG.has(t)){window.Vaadin.registrations.push(this),eG.add(t);let s=window.Vaadin.developmentModeCallback;if(s){var i;i=e=eH.debounce(e,ez,()=>{s["vaadin-usage-statistics"]()}),eU.add(i)}}}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.'),this.constructor._ensureRegistrations()}},eZ=new WeakMap;function eQ(e){return t=>{if(function(e,t){let i=t;for(;i;){if(eZ.get(i)===e)return!0;i=Object.getPrototypeOf(i)}return!1}(e,t))return t;let i=e(t);return eZ.set(i,e),i}}function eJ(e,t){return e.split(".").reduce((e,t)=>e?e[t]:void 0,t)}let e0={},e1=/([A-Z])/gu;function e2(e){return e0[e]||(e0[e]=e.replace(e1,"-$1").toLowerCase()),e0[e]}function e3(e){return e[0].toUpperCase()+e.substring(1)}function e5(e){let[t,i]=e.split("(");return{method:t,observerProps:i.replace(")","").split(",").map(e=>e.trim())}}function e4(e,t){return Object.prototype.hasOwnProperty.call(e,t)||(e[t]=new Map(e[t])),e[t]}let e8=eQ(e=>class extends e{static enabledWarnings=[];static createProperty(e,t){[String,Boolean,Number,Array].includes(t)&&(t={type:t}),t?.reflectToAttribute&&(t.reflect=!0),super.createProperty(e,t)}static getOrCreateMap(e){return e4(this,e)}static finalize(){if(window.litIssuedWarnings&&(window.litIssuedWarnings.add("no-override-create-property"),window.litIssuedWarnings.add("no-override-get-property-descriptor")),super.finalize(),Array.isArray(this.observers)){let e=this.getOrCreateMap("__complexObservers");this.observers.forEach(t=>{let{method:i,observerProps:s}=e5(t);e.set(i,s)})}}static addCheckedInitializer(e){super.addInitializer(t=>{t instanceof this&&e(t)})}static getPropertyDescriptor(e,t,i){let s=super.getPropertyDescriptor(e,t,i),r=s;if(this.getOrCreateMap("__propKeys").set(e,t),i.sync&&(r={get:s.get,set(s){let r=this[e];P(s,r)&&(this[t]=s,this.requestUpdate(e,r,i),this.hasUpdated&&this.performUpdate())},configurable:!0,enumerable:!0}),i.readOnly){let t=r.set;this.addCheckedInitializer(i=>{i[`_set${e3(e)}`]=function(e){t.call(i,e)}}),r={get:r.get,set(){},configurable:!0,enumerable:!0}}if("value"in i&&this.addCheckedInitializer(t=>{let s="function"==typeof i.value?i.value.call(t):i.value;i.readOnly?t[`_set${e3(e)}`](s):t[e]=s}),i.observer){let t=i.observer;this.getOrCreateMap("__observers").set(e,t),this.addCheckedInitializer(e=>{e[t]||console.warn(`observer method ${t} not defined`)})}if(i.notify){if(this.__notifyProps){if(!this.hasOwnProperty("__notifyProps")){let e=this.__notifyProps;this.__notifyProps=new Set(e)}}else this.__notifyProps=new Set;this.__notifyProps.add(e)}if(i.computed){let t=`__assignComputed${e}`,s=e5(i.computed);this.prototype[t]=function(...t){this[e]=this[s.method](...t)},this.getOrCreateMap("__computedObservers").set(t,s.observerProps)}return i.attribute||(i.attribute=e2(e)),r}static get polylitConfig(){return{asyncFirstRender:!1}}connectedCallback(){super.connectedCallback();let{polylitConfig:e}=this.constructor;this.hasUpdated||e.asyncFirstRender||this.performUpdate()}firstUpdated(){super.firstUpdated(),this.$||(this.$={}),this.renderRoot.querySelectorAll("[id]").forEach(e=>{this.$[e.id]=e})}ready(){}willUpdate(e){this.constructor.__computedObservers&&this.__runComplexObservers(e,this.constructor.__computedObservers)}updated(e){let t=this.__isReadyInvoked;this.__isReadyInvoked=!0,this.constructor.__observers&&this.__runObservers(e,this.constructor.__observers),this.constructor.__complexObservers&&this.__runComplexObservers(e,this.constructor.__complexObservers),this.__dynamicPropertyObservers&&this.__runDynamicObservers(e,this.__dynamicPropertyObservers),this.__dynamicMethodObservers&&this.__runComplexObservers(e,this.__dynamicMethodObservers),this.constructor.__notifyProps&&this.__runNotifyProps(e,this.constructor.__notifyProps),t||this.ready()}setProperties(e){Object.entries(e).forEach(([e,t])=>{let i=this.constructor.__propKeys.get(e),s=this[i];this[i]=t,this.requestUpdate(e,s)}),this.hasUpdated&&this.performUpdate()}_createMethodObserver(e){let t=e4(this,"__dynamicMethodObservers"),{method:i,observerProps:s}=e5(e);t.set(i,s)}_createPropertyObserver(e,t){e4(this,"__dynamicPropertyObservers").set(t,e)}__runComplexObservers(e,t){t.forEach((t,i)=>{t.some(t=>e.has(t))&&(this[i]?this[i](...t.map(e=>this[e])):console.warn(`observer method ${i} not defined`))})}__runDynamicObservers(e,t){t.forEach((t,i)=>{e.has(t)&&this[i]&&this[i](this[t],e.get(t))})}__runObservers(e,t){e.forEach((e,i)=>{let s=t.get(i);void 0!==s&&this[s]&&this[s](this[i],e)})}__runNotifyProps(e,t){e.forEach((e,i)=>{t.has(i)&&this.dispatchEvent(new CustomEvent(`${e2(i)}-changed`,{detail:{value:this[i]}}))})}_get(e,t){return eJ(e,t)}_set(e,t,i){let s,r;r=(s=e.split(".")).pop(),s.reduce((e,t)=>e[t],i)[r]=t}});function e6(e){return e?new Set(e.split(" ")):new Set}function e7(e){return e?[...e].join(" "):""}function e9(e,t,i){let s=e6(e.getAttribute(t));s.add(i),e.setAttribute(t,e7(s))}class te{constructor(e,t,i){this.target=e,this.callback=t,this.forceInitial=i,this._storedNodes=[],this._isSlot=e instanceof HTMLSlotElement,this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.target.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.target.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask(()=>{this.flush()}))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_collectNodes(){return[...new Set((this._isSlot?[this.target]:[...this.target.querySelectorAll("slot")]).flatMap(e=>e.assignedNodes({flatten:!0})))]}_groupNodesBySlot(e){let t=new Map;return e.forEach(e=>{let i=e.assignedSlot;t.set(i,t.get(i)??[]),t.get(i).push(e)}),t}_collectMovedNodes(e){let t=this._groupNodesBySlot(e),i=this._groupNodesBySlot(this._storedNodes),s=[];return t.forEach((e,t)=>{let r=i.get(t)||[];new Set(r).difference(new Set(e)).size>0||r.forEach((t,i)=>{e.indexOf(t)!==i&&s.push(t)})}),s}_processNodes(){let e=this._collectNodes(),t=e.filter(e=>!this._storedNodes.includes(e)),i=this._storedNodes.filter(t=>!e.includes(t)),s=this._collectMovedNodes(e);(t.length||i.length||s.length||this.forceInitial)&&this.callback({addedNodes:t,currentNodes:e,movedNodes:s,removedNodes:i}),this.forceInitial&&(this.forceInitial=!1),this._storedNodes=e}}let tt=0;class ti extends EventTarget{static generateId(e,t="default"){return`${t}-${e.localName}-${tt++}`}constructor(e,t,i,s={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:o,uniqueIdPrefix:l}=s;this.host=e,this.slotName=t,this.tagName=i,this.observe="boolean"!=typeof a||a,this.multiple="boolean"==typeof n&&n,this.slotInitializer=r,n&&(this.nodes=[]),o&&(this.defaultId=this.constructor.generateId(e,l||t))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let e=this.getSlotChild();e?(this.node=e,this.initAddedNode(e)):(e=this.attachDefaultNode(),this.initNode(e))}initMultiple(){let e=this.getSlotChildren();if(0===e.length){let e=this.attachDefaultNode();e&&(this.nodes=[e],this.initNode(e))}else this.nodes=e,e.forEach(e=>{this.initAddedNode(e)})}attachDefaultNode(){let{host:e,slotName:t,tagName:i}=this,s=this.defaultNode;return!s&&i&&(s=document.createElement(i))instanceof Element&&(""!==t&&s.setAttribute("slot",t),this.defaultNode=s),s&&(this.node=s,e.appendChild(s)),s}getSlotChildren(){let{slotName:e}=this;return Array.from(this.host.childNodes).filter(t=>!(t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute("data-slot-ignore"))&&(t.nodeType===Node.ELEMENT_NODE&&t.slot===e||t.nodeType===Node.TEXT_NODE&&t.textContent.trim()&&""===e))}getSlotChild(){return this.getSlotChildren()[0]}initNode(e){let{slotInitializer:t}=this;t&&t(e,this.host)}initCustomNode(e){}teardownNode(e){}initAddedNode(e){e!==this.defaultNode&&(this.initCustomNode(e),this.initNode(e))}observeSlot(){let{slotName:e}=this,t=""===e?"slot:not([name])":`slot[name=${e}]`,i=this.host.shadowRoot.querySelector(t);this.__slotObserver=new te(i,({addedNodes:e,removedNodes:t})=>{let i=this.multiple?this.nodes:[this.node],s=e.filter(e=>(e.nodeType!==Node.TEXT_NODE||""!==e.textContent.trim())&&!i.includes(e)&&!(e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("data-slot-ignore")));t.length&&(this.nodes=i.filter(e=>!t.includes(e)),t.forEach(e=>{this.teardownNode(e)})),s?.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...s].filter(e=>e!==this.defaultNode),s.forEach(e=>{this.initAddedNode(e)})):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))})}}class ts extends ti{constructor(e){super(e,"tooltip"),this.setTarget(e),this.__onContentChange=this.__onContentChange.bind(this)}initCustomNode(e){e.target=this.target,void 0!==this.ariaTarget&&(e.ariaTarget=this.ariaTarget),void 0!==this.context&&(e.context=this.context),void 0!==this.manual&&(e.manual=this.manual),void 0!==this.position&&(e._position=this.position),void 0!==this.shouldShow&&(e.shouldShow=this.shouldShow),this.manual||this.host.setAttribute("has-tooltip",""),this.__notifyChange(e),e.addEventListener("content-changed",this.__onContentChange)}teardownNode(e){this.manual||this.host.removeAttribute("has-tooltip"),e.removeEventListener("content-changed",this.__onContentChange),this.__notifyChange(null)}setAriaTarget(e){this.ariaTarget=e;let t=this.node;t&&(t.ariaTarget=e)}setContext(e){this.context=e;let t=this.node;t&&(t.context=e)}setManual(e){this.manual=e;let t=this.node;t&&(t.manual=e)}setPosition(e){this.position=e;let t=this.node;t&&(t._position=e)}setShouldShow(e){this.shouldShow=e;let t=this.node;t&&(t.shouldShow=e)}setTarget(e){this.target=e;let t=this.node;t&&(t.target=e)}open(e){let t=this.node;t?.isConnected&&t._stateController.open(e)}close(e){let t=this.node;t&&t._stateController.close(e)}__onContentChange(e){this.__notifyChange(e.target)}__notifyChange(e){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:e}}))}}function tr(e){try{CSS.registerProperty(e)}catch(t){if(t instanceof DOMException&&"InvalidModificationError"===t.name)console.warn(`The CSS property ${e.name} has already been registered.`);else throw t}}class tn extends EventTarget{#e;#t=new Set;#i;#s=!1;constructor(e){super(),this.#e=e,this.#i=new CSSStyleSheet}#r(e){let{propertyName:t}=e;this.#t.has(t)&&this.dispatchEvent(new CustomEvent("property-changed",{detail:{propertyName:t}}))}observe(e){this.connect(),this.#t.has(e)||(this.#t.add(e),this.#i.replaceSync(`
3
3
  :root::before, :host::before {
4
4
  content: '' !important;
5
5
  position: absolute !important;
@@ -9,7 +9,7 @@
9
9
  transition: 1ms allow-discrete step-end !important;
10
10
  transition-property: ${[...this.#t].join(", ")} !important;
11
11
  }
12
- `))}connect(){this.#s||(this.#e.adoptedStyleSheets.unshift(this.#i),this.#n.addEventListener("transitionstart",e=>this.#r(e)),this.#n.addEventListener("transitionend",e=>this.#r(e)),this.#s=!0)}disconnect(){this.#t.clear(),this.#e.adoptedStyleSheets=this.#e.adoptedStyleSheets.filter(e=>e!==this.#i),this.#n.removeEventListener("transitionstart",this.#r),this.#n.removeEventListener("transitionend",this.#r),this.#s=!1}get #n(){return this.#e.documentElement??this.#e.host}static for(e){return e.__cssPropertyObserver||=new tr(e),e.__cssPropertyObserver}}function tn(e){b(e.shadowRoot,function(e){let{baseStyles:t,themeStyles:i,elementStyles:s,lumoInjector:r}=e.constructor,n=e.__lumoStyleSheet;return n&&(t||i)?[...r.includeBaseStyles?t:[],n,...i]:[n,...s].filter(Boolean)}(e))}function ta(e,t){e.__lumoStyleSheet=t,tn(e)}function to(e){e.__lumoStyleSheet=void 0,tn(e)}let tl=new Set;function td(e){tl.has(e)||(tl.add(e),console.warn(e))}let th=new WeakMap;function tu(e){try{return e.media.mediaText}catch{return td('[LumoInjector] Browser denied to access property "mediaText" for some CSS rules, so they were skipped.'),""}}function tc(e){return`--_lumo-${e.is}-inject`}class tp{#e;#a;#o=new Map;#l=new Map;constructor(e=document){this.#e=e,this.handlePropertyChange=this.handlePropertyChange.bind(this),this.#a=tr.for(e),this.#a.addEventListener("property-changed",this.handlePropertyChange)}disconnect(){this.#a.removeEventListener("property-changed",this.handlePropertyChange),this.#o.clear(),this.#l.values().forEach(e=>e.forEach(to))}forceUpdate(){for(let e of this.#o.keys())this.#d(e)}componentConnected(e){let{lumoInjector:t}=e.constructor,{is:i}=t;this.#l.set(i,this.#l.get(i)??new Set),this.#l.get(i).add(e);let s=this.#o.get(i);if(s){s.cssRules.length>0&&ta(e,s);return}this.#h(i);let r=tc(t);this.#a.observe(r)}componentDisconnected(e){let{is:t}=e.constructor.lumoInjector;this.#l.get(t)?.delete(e),to(e)}handlePropertyChange(e){let{propertyName:t}=e.detail,i=t.match(/^--_lumo-(.*)-inject$/u)?.[1];i&&this.#d(i)}#h(e){this.#o.set(e,new CSSStyleSheet),this.#d(e)}#d(e){let{tags:t,modules:i}=function(e){let t=new Map,i=new Map;for(let s of e){let e=th.get(s);e||(e=function e(t,i={tags:new Map,modules:new Map}){for(let s of function(e){try{return e.cssRules}catch{return td('[LumoInjector] Browser denied to access property "cssRules" for some CSS stylesheets, so they were skipped.'),[]}}(t)){if(s instanceof CSSImportRule){let t=tu(s);t.startsWith("lumo_")?i.modules.set(t,[...s.styleSheet.cssRules]):e(s.styleSheet,i);continue}if(s instanceof CSSMediaRule){let e=tu(s);e.startsWith("lumo_")&&i.modules.set(e,[...s.cssRules]);continue}if(s instanceof CSSStyleRule&&s.cssText.includes("-inject")){for(let e of s.style){let t=e.match(/^--_lumo-(.*)-inject-modules$/u)?.[1];if(!t)continue;let r=s.style.getPropertyValue(e);i.tags.set(t,r.split(",").map(e=>e.trim().replace(/'|"/gu,"")))}continue}}return i}(s),th.set(s,e)),t=new Map([...t,...e.tags]),i=new Map([...i,...e.modules])}return{tags:t,modules:i}}(this.#u),s=(t.get(e)??[]).flatMap(e=>i.get(e)??[]).map(e=>e.cssText).join("\n"),r=this.#o.get(e);r.replaceSync(s),this.#l.get(e)?.forEach(e=>{s?ta(e,r):to(e)})}get #u(){let e=new Set;for(let t of[this.#e,document])e=(e=e.union(new Set(t.styleSheets))).union(new Set(t.adoptedStyleSheets));return[...e]}}let t_=new Set,tv=e=>class extends e{static finalize(){super.finalize();let e=tc(this.lumoInjector);this.is&&!t_.has(e)&&(t_.add(e),CSS.registerProperty({name:e,syntax:"<number>",inherits:!0,initialValue:"0"}))}static get lumoInjector(){return{is:this.is,includeBaseStyles:!1}}connectedCallback(){super.connectedCallback();let e=function e(t){let i=t.getRootNode();return i.host&&i.host.constructor.version?e(i.host):i}(this);!e.__lumoInjectorDisabled&&this.isConnected&&(e.__lumoInjector||=new tp(e),this.__lumoInjector=e.__lumoInjector,this.__lumoInjector.componentConnected(this))}disconnectedCallback(){super.disconnectedCallback(),this.__lumoInjector&&(this.__lumoInjector.componentDisconnected(this),this.__lumoInjector=void 0)}},tm=e=>class extends e{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"theme"===e&&this._set_theme(i)}},tf=[],tg=new Set,tb=new Set,ty=e=>class extends tm(e){constructor(){super(),tg.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&tb.add(this.is),this.elementStyles)return;let e=this.prototype._template;if(!(!e||this&&Object.prototype.hasOwnProperty.call(this,"__themes"))){var t=this.getStylesForThis();let i=document.createElement("style");i.id="vaadin-themable-mixin-style",i.textContent=t.map(e=>e.cssText).join("\n"),e.content.appendChild(i)}}static finalizeStyles(e){return this.baseStyles=e?[e].flat(1/0):[],this.themeStyles=this.getStylesForThis(),[...this.baseStyles,...this.themeStyles]}static getStylesForThis(){var t;let i,s,r=e.__themes||[],n=Object.getPrototypeOf(this.prototype),a=(n?n.constructor.__themes:[])||[];this.__themes=[...r,...a,...(t=this.is,i=`${t}-default-theme`,(s=tf.filter(e=>{var s;return e.moduleId!==i&&(s=e.themeFor,(s||"").split(" ").some(e=>RegExp(`^${e.split("*").join(".*")}$`,"u").test(t)))}).map(e=>({...e,styles:[...function e(t){let i=[];return t.include&&[].concat(t.include).forEach(t=>{let s=tf.find(e=>e.moduleId===t);s?i.push(...e(s),...s.styles):console.warn(`Included moduleId ${t} not found in style registry`)},t.styles),i}(e),...e.styles],includePriority:function(e=""){let t=0;return e.startsWith("lumo-")||e.startsWith("material-")?t=1:e.startsWith("vaadin-")&&(t=2),t}(e.moduleId)})).sort((e,t)=>t.includePriority-e.includePriority)).length>0?s:tf.filter(e=>e.moduleId===i))];let o=this.__themes.flatMap(e=>e.styles);return o.filter((e,t)=>t===o.lastIndexOf(e))}};["--vaadin-text-color","--vaadin-text-color-disabled","--vaadin-text-color-secondary","--vaadin-border-color","--vaadin-border-color-secondary","--vaadin-background-color"].forEach(e=>{CSS.registerProperty({name:e,syntax:"<color>",inherits:!0,initialValue:"transparent"})}),((e,...t)=>{let i=document.createElement("style");i.id=e,i.textContent=t.map(e=>e.toString()).join("\n"),document.head.insertAdjacentElement("afterbegin",i)})("vaadin-base",g`
12
+ `))}connect(){this.#s||(this.#e.adoptedStyleSheets.unshift(this.#i),this.#n.addEventListener("transitionstart",e=>this.#r(e)),this.#n.addEventListener("transitionend",e=>this.#r(e)),this.#s=!0)}disconnect(){this.#t.clear(),this.#e.adoptedStyleSheets=this.#e.adoptedStyleSheets.filter(e=>e!==this.#i),this.#n.removeEventListener("transitionstart",this.#r),this.#n.removeEventListener("transitionend",this.#r),this.#s=!1}get #n(){return this.#e.documentElement??this.#e.host}static for(e){return e.__cssPropertyObserver||=new tn(e),e.__cssPropertyObserver}}function ta(e){b(e.shadowRoot,function(e){let{baseStyles:t,themeStyles:i,elementStyles:s,lumoInjector:r}=e.constructor,n=e.__lumoStyleSheet;return n?[...r.includeBaseStyles?t??s:[],n,...i??[]]:s}(e))}function to(e,t){e.__lumoStyleSheet=t,ta(e)}function tl(e){e.__lumoStyleSheet=void 0,ta(e)}let td=new Set;function th(e){td.has(e)||(td.add(e),console.warn(e))}let tu=new WeakMap;function tc(e){try{return e.media.mediaText}catch{return th('[LumoInjector] Browser denied to access property "mediaText" for some CSS rules, so they were skipped.'),""}}function tp(e){return`--_lumo-${e.is}-inject`}class t_{#e;#a;#o=new Map;#l=new Map;constructor(e=document){this.#e=e,this.handlePropertyChange=this.handlePropertyChange.bind(this),this.#a=tn.for(e),this.#a.addEventListener("property-changed",this.handlePropertyChange)}disconnect(){this.#a.removeEventListener("property-changed",this.handlePropertyChange),this.#o.clear(),this.#l.values().forEach(e=>e.forEach(tl))}forceUpdate(){for(let e of this.#o.keys())this.#d(e)}componentConnected(e){let{lumoInjector:t}=e.constructor,{is:i}=t;this.#l.set(i,this.#l.get(i)??new Set),this.#l.get(i).add(e);let s=this.#o.get(i);if(s){s.cssRules.length>0&&to(e,s);return}this.#h(i);let r=tp(t);this.#a.observe(r)}componentDisconnected(e){let{is:t}=e.constructor.lumoInjector;this.#l.get(t)?.delete(e),tl(e)}handlePropertyChange(e){let{propertyName:t}=e.detail,i=t.match(/^--_lumo-(.*)-inject$/u)?.[1];i&&this.#d(i)}#h(e){this.#o.set(e,new CSSStyleSheet),this.#d(e)}#d(e){let{tags:t,modules:i}=function(e){let t=new Map,i=new Map;for(let s of e){let e=tu.get(s);e||(e=function e(t,i={tags:new Map,modules:new Map}){for(let s of function(e){try{return e.cssRules}catch{return th('[LumoInjector] Browser denied to access property "cssRules" for some CSS stylesheets, so they were skipped.'),[]}}(t)){if(s instanceof CSSImportRule){let t=tc(s);t.startsWith("lumo_")?i.modules.set(t,[...s.styleSheet.cssRules]):e(s.styleSheet,i);continue}if(s instanceof CSSMediaRule){let e=tc(s);e.startsWith("lumo_")&&i.modules.set(e,[...s.cssRules]);continue}if(s instanceof CSSStyleRule&&s.cssText.includes("-inject")){for(let e of s.style){let t=e.match(/^--_lumo-(.*)-inject-modules$/u)?.[1];if(!t)continue;let r=s.style.getPropertyValue(e);i.tags.set(t,r.split(",").map(e=>e.trim().replace(/'|"/gu,"")))}continue}}return i}(s),tu.set(s,e)),t=new Map([...t,...e.tags]),i=new Map([...i,...e.modules])}return{tags:t,modules:i}}(this.#u),s=(t.get(e)??[]).flatMap(e=>i.get(e)??[]).map(e=>e.cssText).join("\n"),r=this.#o.get(e);r.replaceSync(s),this.#l.get(e)?.forEach(e=>{s?to(e,r):tl(e)})}get #u(){let e=new Set;for(let t of[this.#e,document])e=(e=e.union(new Set(t.styleSheets))).union(new Set(t.adoptedStyleSheets));return[...e]}}let tv=new Set,tm=e=>class extends e{static finalize(){super.finalize();let e=tp(this.lumoInjector);this.is&&!tv.has(e)&&(tv.add(e),tr({name:e,syntax:"<number>",inherits:!0,initialValue:"0"}))}static get lumoInjector(){return{is:this.is,includeBaseStyles:!1}}connectedCallback(){super.connectedCallback();let e=function e(t){let i=t.getRootNode();return i.host&&i.host.constructor.version?e(i.host):i}(this);!e.__lumoInjectorDisabled&&this.isConnected&&(e.__lumoInjector||=new t_(e),this.__lumoInjector=e.__lumoInjector,this.__lumoInjector.componentConnected(this))}disconnectedCallback(){super.disconnectedCallback(),this.__lumoInjector&&(this.__lumoInjector.componentDisconnected(this),this.__lumoInjector=void 0)}},tf=e=>class extends e{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"theme"===e&&this._set_theme(i)}},tg=[],tb=new Set,ty=new Set,tw=e=>class extends tf(e){constructor(){super(),tb.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&ty.add(this.is),this.elementStyles)return;let e=this.prototype._template;if(!(!e||this&&Object.prototype.hasOwnProperty.call(this,"__themes"))){var t=this.getStylesForThis();let i=document.createElement("style");i.id="vaadin-themable-mixin-style",i.textContent=t.map(e=>e.cssText).join("\n"),e.content.appendChild(i)}}static finalizeStyles(e){return this.baseStyles=e?[e].flat(1/0):[],this.themeStyles=this.getStylesForThis(),[...this.baseStyles,...this.themeStyles]}static getStylesForThis(){var t;let i,s,r=e.__themes||[],n=Object.getPrototypeOf(this.prototype),a=(n?n.constructor.__themes:[])||[];this.__themes=[...r,...a,...(t=this.is,i=`${t}-default-theme`,(s=tg.filter(e=>{var s;return e.moduleId!==i&&(s=e.themeFor,(s||"").split(" ").some(e=>RegExp(`^${e.split("*").join(".*")}$`,"u").test(t)))}).map(e=>({...e,styles:[...function e(t){let i=[];return t.include&&[].concat(t.include).forEach(t=>{let s=tg.find(e=>e.moduleId===t);s?i.push(...e(s),...s.styles):console.warn(`Included moduleId ${t} not found in style registry`)},t.styles),i}(e),...e.styles],includePriority:function(e=""){let t=0;return e.startsWith("lumo-")||e.startsWith("material-")?t=1:e.startsWith("vaadin-")&&(t=2),t}(e.moduleId)})).sort((e,t)=>t.includePriority-e.includePriority)).length>0?s:tg.filter(e=>e.moduleId===i))];let o=this.__themes.flatMap(e=>e.styles);return o.filter((e,t)=>t===o.lastIndexOf(e))}};["--vaadin-text-color","--vaadin-text-color-disabled","--vaadin-text-color-secondary","--vaadin-border-color","--vaadin-border-color-secondary","--vaadin-background-color"].forEach(e=>{tr({name:e,syntax:"<color>",inherits:!0,initialValue:"transparent"})}),((e,...t)=>{let i=document.createElement("style");i.id=e,i.textContent=t.map(e=>e.toString()).join("\n"),document.head.insertAdjacentElement("afterbegin",i)})("vaadin-base",g`
13
13
  @layer vaadin.base {
14
14
  html {
15
15
  /* Background color */
@@ -65,9 +65,11 @@
65
65
  --_vaadin-icon-calendar: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2v4"/><path d="M16 2v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/></svg>');
66
66
  --_vaadin-icon-checkmark: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5" /></svg>');
67
67
  --_vaadin-icon-chevron-down: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>');
68
+ --_vaadin-icon-chevron-right: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>');
68
69
  --_vaadin-icon-clock: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 6v6l4 2"/><circle cx="12" cy="12" r="10"/></svg>');
69
70
  --_vaadin-icon-cross: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" /></svg>');
70
71
  --_vaadin-icon-drag: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M11 7c0 .82843-.6716 1.5-1.5 1.5C8.67157 8.5 8 7.82843 8 7s.67157-1.5 1.5-1.5c.8284 0 1.5.67157 1.5 1.5Zm0 5c0 .8284-.6716 1.5-1.5 1.5-.82843 0-1.5-.6716-1.5-1.5s.67157-1.5 1.5-1.5c.8284 0 1.5.6716 1.5 1.5Zm0 5c0 .8284-.6716 1.5-1.5 1.5-.82843 0-1.5-.6716-1.5-1.5s.67157-1.5 1.5-1.5c.8284 0 1.5.6716 1.5 1.5Zm5-10c0 .82843-.6716 1.5-1.5 1.5S13 7.82843 13 7s.6716-1.5 1.5-1.5S16 6.17157 16 7Zm0 5c0 .8284-.6716 1.5-1.5 1.5S13 12.8284 13 12s.6716-1.5 1.5-1.5 1.5.6716 1.5 1.5Zm0 5c0 .8284-.6716 1.5-1.5 1.5S13 17.8284 13 17s.6716-1.5 1.5-1.5 1.5.6716 1.5 1.5Z" fill="currentColor"/></svg>');
72
+ --_vaadin-icon-ellipsis: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>');
71
73
  --_vaadin-icon-eye: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" /></svg>');
72
74
  --_vaadin-icon-eye-slash: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88" /></svg>');
73
75
  --_vaadin-icon-file: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>');
@@ -83,6 +85,7 @@
83
85
  --_vaadin-icon-redo: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 7v6h-6"/><path d="M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7"/></svg>');
84
86
  --_vaadin-icon-refresh: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M22 10C22 10 19.995 7.26822 18.3662 5.63824C16.7373 4.00827 14.4864 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.1031 21 19.5649 18.2543 20.6482 14.5M22 10V4M22 10H16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
85
87
  --_vaadin-icon-resize: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.5303 7.46967c.2929.29289.2929.76777 0 1.06066L8.53033 18.5304c-.29289.2929-.76777.2929-1.06066 0s-.29289-.7678 0-1.0607L17.4697 7.46967c.2929-.29289.7677-.29289 1.0606 0Zm0 4.50003c.2929.2929.2929.7678 0 1.0607l-5.5 5.5c-.2929.2928-.7677.2928-1.0606 0-.2929-.2929-.2929-.7678 0-1.0607l5.4999-5.5c.2929-.2929.7678-.2929 1.0607 0Zm0 4.5c.2929.2928.2929.7677 0 1.0606l-1 1.0001c-.2929.2928-.7677.2929-1.0606 0-.2929-.2929-.2929-.7678 0-1.0607l1-1c.2929-.2929.7677-.2929 1.0606 0Z" fill="currentColor"/></svg>');
88
+ --_vaadin-icon-slash: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><rect x="13.7812" y="4.22583" width="1.5" height="16" rx="0.75" transform="rotate(20 13.7812 4.22583)" fill="currentColor"/></svg>');
86
89
  --_vaadin-icon-sort: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="12" viewBox="0 0 8 12" fill="none"><path d="M7.49854 6.99951C7.92795 6.99951 8.15791 7.50528 7.87549 7.82861L4.37646 11.8296C4.17728 12.0571 3.82272 12.0571 3.62354 11.8296L0.125488 7.82861C-0.157248 7.50531 0.0719873 6.99956 0.501465 6.99951H7.49854ZM3.62354 0.17041C3.82275 -0.0573875 4.17725 -0.0573848 4.37646 0.17041L7.87549 4.17041C8.15825 4.49373 7.92806 5.00049 7.49854 5.00049L0.501465 4.99951C0.0719873 4.99946 -0.157248 4.49371 0.125488 4.17041L3.62354 0.17041Z" fill="black"/></svg>');
87
90
  --_vaadin-icon-undo: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7v6h6"/><path d="M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13"/></svg>');
88
91
  --_vaadin-icon-upload: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v12"/><path d="m17 8-5-5-5 5"/><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/></svg>');
@@ -98,6 +101,13 @@
98
101
  --safe-area-inset-right: env(safe-area-inset-right, 0px);
99
102
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
100
103
  --safe-area-inset-left: env(safe-area-inset-left, 0px);
104
+ --safe-area-inset-inline-start: var(--safe-area-inset-left);
105
+ --safe-area-inset-inline-end: var(--safe-area-inset-right);
106
+
107
+ &:dir(rtl) {
108
+ --safe-area-inset-inline-start: var(--safe-area-inset-right);
109
+ --safe-area-inset-inline-end: var(--safe-area-inset-left);
110
+ }
101
111
  }
102
112
 
103
113
  @supports not (color: hsl(0 0 0)) {
@@ -119,14 +129,14 @@
119
129
  }
120
130
  }
121
131
  }
122
- `);let tw=g`
132
+ `);let tx=g`
123
133
  :host {
124
134
  display: inline-flex;
125
135
  align-items: center;
126
136
  justify-content: center;
127
137
  text-align: center;
128
138
  gap: var(--vaadin-button-gap, 0 var(--vaadin-gap-s));
129
- white-space: nowrap;
139
+ white-space: var(--vaadin-button-label-wrap, normal);
130
140
  -webkit-tap-highlight-color: transparent;
131
141
  -webkit-user-select: none;
132
142
  user-select: none;
@@ -160,7 +170,8 @@
160
170
  }
161
171
 
162
172
  [part='label'] {
163
- display: inline-flex;
173
+ overflow: hidden;
174
+ text-overflow: ellipsis;
164
175
  }
165
176
 
166
177
  :host(:is([focus-ring], :focus-visible)) {
@@ -215,7 +226,7 @@
215
226
  opacity: 1;
216
227
  }
217
228
  }
218
- `,tx="string"==typeof document.head.style.touchAction,tC="__polymerGestures",tk="__polymerGesturesHandled",tE="__polymerGesturesTouchAction",tT=["mousedown","mousemove","mouseup","click"],tI=[0,1,4,2],tD=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}}();function tS(e){return tT.indexOf(e)>-1}let tA=!1;try{let e=Object.defineProperty({},"passive",{get(){tA=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}let tO=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),tP={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function t$(e){let t=e.type;if(!tS(t))return!1;if("mousemove"===t){let t=void 0===e.buttons?1:e.buttons;return e instanceof window.MouseEvent&&!tD&&(t=tI[e.which]||0),!!(1&t)}return 0===(void 0===e.button?0:e.button)}let tL={x:0,y:0,id:-1,scrollDecided:!1};function tM(e,t,i){e.movefn=t,e.upfn=i,document.addEventListener("mousemove",t),document.addEventListener("mouseup",i)}function tR(e){document.removeEventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upfn),e.movefn=null,e.upfn=null}let tV=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:e=>e.composedPath&&e.composedPath()||[],tN={},tB=[];function tz(e){let t=tV(e);return t.length>0?t[0]:e.target}function tF(e){let t=e.type,i=e.currentTarget[tC];if(!i)return;let s=i[t];if(!s)return;if(!e[tk]&&(e[tk]={},t.startsWith("touch"))){let i=e.changedTouches[0];if("touchstart"===t&&1===e.touches.length&&(tL.id=i.identifier),tL.id!==i.identifier)return;tx||"touchstart"!==t&&"touchmove"!==t||function(e){let t=e.changedTouches[0],i=e.type;if("touchstart"===i)tL.x=t.clientX,tL.y=t.clientY,tL.scrollDecided=!1;else if("touchmove"===i){if(tL.scrollDecided)return;tL.scrollDecided=!0;let i=function(e){let t="auto",i=tV(e);for(let e=0,s;e<i.length;e++)if((s=i[e])[tE]){t=s[tE];break}return t}(e),s=!1,r=Math.abs(tL.x-t.clientX),n=Math.abs(tL.y-t.clientY);e.cancelable&&("none"===i?s=!0:"pan-x"===i?s=n>r:"pan-y"===i&&(s=r>n)),s?e.preventDefault():tY("track")}}(e)}let r=e[tk];if(!r.skip){for(let t=0,i;t<tB.length;t++)s[(i=tB[t]).name]&&!r[i.name]&&i.flow&&i.flow.start.indexOf(e.type)>-1&&i.reset&&i.reset();for(let i=0,n;i<tB.length;i++)s[(n=tB[i]).name]&&!r[n.name]&&(r[n.name]=!0,n[t](e))}}function tU(e,t,i){return!!tN[t]&&(function(e,t,i){var s,r;let n=tN[t],a=n.deps,o=n.name,l=e[tC];l||(e[tC]=l={});for(let t=0,i,s;t<a.length;t++)i=a[t],tO&&tS(i)&&"click"!==i||((s=l[i])||(l[i]=s={_count:0}),0===s._count&&e.addEventListener(i,tF,void tS(i)),s[o]=(s[o]||0)+1,s._count=(s._count||0)+1);e.addEventListener(t,i),n.touchAction&&(s=e,r=n.touchAction,tx&&s instanceof HTMLElement&&eF.run(()=>{s.style.touchAction=r}),s[tE]=r)}(e,t,i),!0)}function tH(e){tB.push(e),e.emits.forEach(t=>{tN[t]=e})}function tj(e,t,i){let s=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,e.dispatchEvent(s),s.defaultPrevented){let e=i.preventer||i.sourceEvent;e&&e.preventDefault&&e.preventDefault()}}function tY(e){let t=function(e){for(let t=0,i;t<tB.length;t++){i=tB[t];for(let t=0;t<i.emits.length;t++)if(i.emits[t]===e)return i}return null}(e);t.info&&(t.info.prevent=!0)}function tq(e,t,i,s){t&&tj(t,e,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:e=>tY(e)})}function tW(e,t,i){if(e.prevent)return!1;if(e.started)return!0;let s=Math.abs(e.x-t),r=Math.abs(e.y-i);return s>=5||r>=5}function tK(e,t,i){if(!t)return;let s=e.moves[e.moves.length-2],r=e.moves[e.moves.length-1],n=r.x-e.x,a=r.y-e.y,o,l=0;s&&(o=r.x-s.x,l=r.y-s.y),tj(t,"track",{state:e.state,x:i.clientX,y:i.clientY,dx:n,dy:a,ddx:o,ddy:l,sourceEvent:i,hover:()=>(function(e,t){let i=document.elementFromPoint(e,t),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM&&s!==(s=s.shadowRoot.elementFromPoint(e,t));)s&&(i=s);return i})(i.clientX,i.clientY)})}function tG(e,t,i){let s=Math.abs(t.clientX-e.x),r=Math.abs(t.clientY-e.y),n=tz(i||t);!(!n||tP[n.localName]&&n.hasAttribute("disabled"))&&(isNaN(s)||isNaN(r)||s<=25&&r<=25||function(e){if("click"===e.type){if(0===e.detail)return!0;let t=tz(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;let i=t.getBoundingClientRect(),s=e.pageX,r=e.pageY;return!(s>=i.left&&s<=i.right&&r>=i.top&&r<=i.bottom)}return!1}(t))&&!e.prevent&&tj(n,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:i})}tH({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){tR(this.info)},mousedown(e){if(!t$(e))return;let t=tz(e),i=this;tM(this.info,e=>{t$(e)||(tq("up",t,e),tR(i.info))},e=>{t$(e)&&tq("up",t,e),tR(i.info)}),tq("down",t,e)},touchstart(e){tq("down",tz(e),e.changedTouches[0],e)},touchend(e){tq("up",tz(e),e.changedTouches[0],e)}}),tH({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(e){this.moves.length>2&&this.moves.shift(),this.moves.push(e)},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,tR(this.info)},mousedown(e){if(!t$(e))return;let t=tz(e),i=this,s=e=>{let s=e.clientX,r=e.clientY;tW(i.info,s,r)&&(i.info.state=i.info.started?"mouseup"===e.type?"end":"track":"start","start"===i.info.state&&tY("tap"),i.info.addMove({x:s,y:r}),t$(e)||(i.info.state="end",tR(i.info)),t&&tK(i.info,t,e),i.info.started=!0)};tM(this.info,s,e=>{i.info.started&&s(e),tR(i.info)}),this.info.x=e.clientX,this.info.y=e.clientY},touchstart(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove(e){let t=tz(e),i=e.changedTouches[0],s=i.clientX,r=i.clientY;tW(this.info,s,r)&&("start"===this.info.state&&tY("tap"),this.info.addMove({x:s,y:r}),tK(this.info,t,i),this.info.state="track",this.info.started=!0)},touchend(e){let t=tz(e),i=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),tK(this.info,t,i))}}),tH({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(e){t$(e)&&(this.info.x=e.clientX,this.info.y=e.clientY)},click(e){t$(e)&&tG(this.info,e)},touchstart(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchend(e){tG(this.info,e.changedTouches[0],e)}});let tX=eQ(e=>class extends e{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(e){this._setAriaDisabled(e)}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}}),tZ=eQ(e=>class extends e{ready(){super.ready(),this.addEventListener("keydown",e=>{this._onKeyDown(e)}),this.addEventListener("keyup",e=>{this._onKeyUp(e)})}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e)}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}}),tQ=e=>class extends tX(tZ(e)){get _activeKeys(){return[" "]}ready(){super.ready(),tU(this,"down",e=>{this._shouldSetActive(e)&&this._setActive(!0)}),tU(this,"up",()=>{this._setActive(!1)})}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(e){return!this.disabled}_onKeyDown(e){super._onKeyDown(e),this._shouldSetActive(e)&&this._activeKeys.includes(e.key)&&(this._setActive(!0),document.addEventListener("keyup",e=>{this._activeKeys.includes(e.key)&&this._setActive(!1)},{once:!0}))}_setActive(e){this.toggleAttribute("active",e)}},tJ=!1;function t0(){let e=document.activeElement||document.body;for(;e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function t1(e){let t=e.style;if("hidden"===t.visibility||"none"===t.display)return!0;let i=window.getComputedStyle(e);return"hidden"===i.visibility||"none"===i.display}function t2(e){return e.checkVisibility?!e.checkVisibility({visibilityProperty:!0}):null===e.offsetParent&&0===e.clientWidth&&0===e.clientHeight||t1(e)}function t3(e){return!e.matches('[tabindex="-1"]')&&(e.matches("input, select, textarea, button, object")?e.matches(":not([disabled])"):e.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function t5(e){return e.getRootNode().activeElement===e}window.addEventListener("keydown",()=>{tJ=!0},{capture:!0}),window.addEventListener("mousedown",()=>{tJ=!1},{capture:!0});let t4=eQ(e=>class extends e{get _keyboardActive(){return tJ}ready(){this.addEventListener("focusin",e=>{this._shouldSetFocus(e)&&this._setFocused(!0)}),this.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1)}),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}focus(e){super.focus(e),e&&!1===e.focusVisible||this.setAttribute("focus-ring","")}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&this._keyboardActive)}_shouldSetFocus(e){return!0}_shouldRemoveFocus(e){return!0}}),t8=e=>class extends tX(e){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged",sync:!0},_lastTabIndex:{type:Number}}}_disabledChanged(e,t){super._disabledChanged(e,t),!this.__shouldAllowFocusWhenDisabled()&&(e?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.setAttribute("tabindex","-1")):t&&(void 0!==this._lastTabIndex?this.setAttribute("tabindex",this._lastTabIndex):this.tabindex=void 0))}_tabindexChanged(e){!this.__shouldAllowFocusWhenDisabled()&&this.disabled&&-1!==e&&(this._lastTabIndex=e,this.setAttribute("tabindex","-1"))}focus(e){(!this.disabled||this.__shouldAllowFocusWhenDisabled())&&super.focus(e)}__shouldAllowFocusWhenDisabled(){return!1}},t6=["mousedown","mouseup","click","dblclick","keypress","keydown","keyup"],t7=e=>class extends tQ(t8(t4(e))){constructor(){super(),this.__onInteractionEvent=this.__onInteractionEvent.bind(this),t6.forEach(e=>{this.addEventListener(e,this.__onInteractionEvent,!0)}),this.tabindex=0}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button"),this.__shouldAllowFocusWhenDisabled()&&this.style.setProperty("--_vaadin-button-disabled-pointer-events","auto")}_onKeyDown(e){super._onKeyDown(e),e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||this._activeKeys.includes(e.key)&&(e.preventDefault(),this.click())}__onInteractionEvent(e){this.__shouldSuppressInteractionEvent(e)&&e.stopImmediatePropagation()}__shouldSuppressInteractionEvent(e){return this.disabled}};class t9 extends t7(eX(ty(e8(tv(ek))))){static get is(){return"vaadin-button"}static get styles(){return tw}static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}render(){return en`
229
+ `,tC="string"==typeof document.head.style.touchAction,tk="__polymerGestures",tE="__polymerGesturesHandled",tI="__polymerGesturesTouchAction",tT=["mousedown","mousemove","mouseup","click"],tD=[0,1,4,2],tS=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}}();function tA(e){return tT.indexOf(e)>-1}let tO=!1;try{let e=Object.defineProperty({},"passive",{get(){tO=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}let tP=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),t$={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function tL(e){let t=e.type;if(!tA(t))return!1;if("mousemove"===t){let t=e.buttons??1;return e instanceof window.MouseEvent&&!tS&&(t=tD[e.which]||0),!!(1&t)}return 0===(e.button??0)}let tM={x:0,y:0,id:-1,scrollDecided:!1};function tR(e,t,i){e.movefn=t,e.upfn=i,document.addEventListener("mousemove",t),document.addEventListener("mouseup",i)}function tV(e){document.removeEventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upfn),e.movefn=null,e.upfn=null}let tN=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:e=>e.composedPath&&e.composedPath()||[],tB={},tz=[];function tF(e){let t=tN(e);return t.length>0?t[0]:e.target}function tU(e){let t=e.type,i=e.currentTarget[tk];if(!i)return;let s=i[t];if(!s)return;if(!e[tE]&&(e[tE]={},t.startsWith("touch"))){let i=e.changedTouches[0];if("touchstart"===t&&1===e.touches.length&&(tM.id=i.identifier),tM.id!==i.identifier)return;tC||"touchstart"!==t&&"touchmove"!==t||function(e){let t=e.changedTouches[0],i=e.type;if("touchstart"===i)tM.x=t.clientX,tM.y=t.clientY,tM.scrollDecided=!1;else if("touchmove"===i){if(tM.scrollDecided)return;tM.scrollDecided=!0;let i=function(e){let t="auto",i=tN(e);for(let e=0,s;e<i.length;e++)if((s=i[e])[tI]){t=s[tI];break}return t}(e),s=!1,r=Math.abs(tM.x-t.clientX),n=Math.abs(tM.y-t.clientY);e.cancelable&&("none"===i?s=!0:"pan-x"===i?s=n>r:"pan-y"===i&&(s=r>n)),s?e.preventDefault():tq("track")}}(e)}let r=e[tE];if(!r.skip){for(let t=0,i;t<tz.length;t++)s[(i=tz[t]).name]&&!r[i.name]&&i.flow&&i.flow.start.indexOf(e.type)>-1&&i.reset&&i.reset();for(let i=0,n;i<tz.length;i++)s[(n=tz[i]).name]&&!r[n.name]&&(r[n.name]=!0,n[t](e))}}function tH(e,t,i){return!!tB[t]&&(function(e,t,i){var s,r;let n=tB[t],a=n.deps,o=n.name,l=e[tk];l||(e[tk]=l={});for(let t=0,i,s;t<a.length;t++)i=a[t],tP&&tA(i)&&"click"!==i||((s=l[i])||(l[i]=s={_count:0}),0===s._count&&e.addEventListener(i,tU,void tA(i)),s[o]=(s[o]||0)+1,s._count=(s._count||0)+1);e.addEventListener(t,i),n.touchAction&&(s=e,r=n.touchAction,tC&&s instanceof HTMLElement&&eF.run(()=>{s.style.touchAction=r}),s[tI]=r)}(e,t,i),!0)}function tj(e){tz.push(e),e.emits.forEach(t=>{tB[t]=e})}function tY(e,t,i){let s=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,e.dispatchEvent(s),s.defaultPrevented){let e=i.preventer||i.sourceEvent;e?.preventDefault&&e.preventDefault()}}function tq(e){let t=function(e){for(let t=0,i;t<tz.length;t++){i=tz[t];for(let t=0;t<i.emits.length;t++)if(i.emits[t]===e)return i}return null}(e);t.info&&(t.info.prevent=!0)}function tW(e,t,i,s){t&&tY(t,e,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:e=>tq(e)})}function tK(e,t,i){if(e.prevent)return!1;if(e.started)return!0;let s=Math.abs(e.x-t),r=Math.abs(e.y-i);return s>=5||r>=5}function tG(e,t,i){if(!t)return;let s=e.moves[e.moves.length-2],r=e.moves[e.moves.length-1],n=r.x-e.x,a=r.y-e.y,o,l=0;s&&(o=r.x-s.x,l=r.y-s.y),tY(t,"track",{state:e.state,x:i.clientX,y:i.clientY,dx:n,dy:a,ddx:o,ddy:l,sourceEvent:i,hover:()=>(function(e,t){let i=document.elementFromPoint(e,t),s=i;for(;s?.shadowRoot&&!window.ShadyDOM&&s!==(s=s.shadowRoot.elementFromPoint(e,t));)s&&(i=s);return i})(i.clientX,i.clientY)})}function tX(e,t,i){let s=Math.abs(t.clientX-e.x),r=Math.abs(t.clientY-e.y),n=tF(i||t);!(!n||t$[n.localName]&&n.hasAttribute("disabled"))&&(isNaN(s)||isNaN(r)||s<=25&&r<=25||function(e){if("click"===e.type){if(0===e.detail)return!0;let t=tF(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;let i=t.getBoundingClientRect(),s=e.pageX,r=e.pageY;return!(s>=i.left&&s<=i.right&&r>=i.top&&r<=i.bottom)}return!1}(t))&&!e.prevent&&tY(n,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:i})}tj({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){tV(this.info)},mousedown(e){if(!tL(e))return;let t=tF(e),i=this;tR(this.info,e=>{tL(e)||(tW("up",t,e),tV(i.info))},e=>{tL(e)&&tW("up",t,e),tV(i.info)}),tW("down",t,e)},touchstart(e){tW("down",tF(e),e.changedTouches[0],e)},touchend(e){tW("up",tF(e),e.changedTouches[0],e)}}),tj({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(e){this.moves.length>2&&this.moves.shift(),this.moves.push(e)},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,tV(this.info)},mousedown(e){if(!tL(e))return;let t=tF(e),i=this,s=e=>{let s=e.clientX,r=e.clientY;tK(i.info,s,r)&&(i.info.state=i.info.started?"mouseup"===e.type?"end":"track":"start","start"===i.info.state&&tq("tap"),i.info.addMove({x:s,y:r}),tL(e)||(i.info.state="end",tV(i.info)),t&&tG(i.info,t,e),i.info.started=!0)};tR(this.info,s,e=>{i.info.started&&s(e),tV(i.info)}),this.info.x=e.clientX,this.info.y=e.clientY},touchstart(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove(e){let t=tF(e),i=e.changedTouches[0],s=i.clientX,r=i.clientY;tK(this.info,s,r)&&("start"===this.info.state&&tq("tap"),this.info.addMove({x:s,y:r}),tG(this.info,t,i),this.info.state="track",this.info.started=!0)},touchend(e){let t=tF(e),i=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),tG(this.info,t,i))}}),tj({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(e){tL(e)&&(this.info.x=e.clientX,this.info.y=e.clientY)},click(e){tL(e)&&tX(this.info,e)},touchstart(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchend(e){tX(this.info,e.changedTouches[0],e)}});let tZ=eQ(e=>class extends e{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(e){this._setAriaDisabled(e)}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}}),tQ=eQ(e=>class extends e{ready(){super.ready(),this.addEventListener("keydown",e=>{this._onKeyDown(e)}),this.addEventListener("keyup",e=>{this._onKeyUp(e)})}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e)}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}}),tJ=e=>class extends tZ(tQ(e)){get _activeKeys(){return[" "]}ready(){super.ready(),tH(this,"down",e=>{this._shouldSetActive(e)&&this._setActive(!0)}),tH(this,"up",()=>{this._setActive(!1)})}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(e){return!this.disabled}_onKeyDown(e){super._onKeyDown(e),this._shouldSetActive(e)&&this._activeKeys.includes(e.key)&&(this._setActive(!0),document.addEventListener("keyup",e=>{this._activeKeys.includes(e.key)&&this._setActive(!1)},{once:!0}))}_setActive(e){this.toggleAttribute("active",e)}},t0=!1;function t1(){let e=document.activeElement||document.body;for(;e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function t2(e){let t=e.style;if("hidden"===t.visibility||"none"===t.display)return!0;let i=window.getComputedStyle(e);return"hidden"===i.visibility||"none"===i.display}function t3(e){return e.checkVisibility?!e.checkVisibility({visibilityProperty:!0}):null===e.offsetParent&&0===e.clientWidth&&0===e.clientHeight||t2(e)}function t5(e){return!e.matches('[tabindex="-1"]')&&(e.matches("input, select, textarea, button, object")?e.matches(":not([disabled])"):e.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function t4(e){return e.getRootNode().activeElement===e}window.addEventListener("keydown",()=>{t0=!0},{capture:!0}),window.addEventListener("mousedown",()=>{t0=!1},{capture:!0});let t8=eQ(e=>class extends e{get _keyboardActive(){return t0}ready(){this.addEventListener("focusin",e=>{this._shouldSetFocus(e)&&this._setFocused(!0)}),this.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1)}),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}focus(e){super.focus(e),e?.focusVisible!==!1&&this.setAttribute("focus-ring","")}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&this._keyboardActive)}_shouldSetFocus(e){return!0}_shouldRemoveFocus(e){return!0}}),t6=e=>class extends tZ(e){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged",sync:!0},_lastTabIndex:{type:Number}}}_disabledChanged(e,t){super._disabledChanged(e,t),!this.__shouldAllowFocusWhenDisabled()&&(e?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.setAttribute("tabindex","-1")):t&&(void 0!==this._lastTabIndex?this.setAttribute("tabindex",this._lastTabIndex):this.tabindex=void 0))}_tabindexChanged(e){!this.__shouldAllowFocusWhenDisabled()&&this.disabled&&-1!==e&&(this._lastTabIndex=e,this.setAttribute("tabindex","-1"))}focus(e){(!this.disabled||this.__shouldAllowFocusWhenDisabled())&&super.focus(e)}__shouldAllowFocusWhenDisabled(){return!1}},t7=["mousedown","mouseup","click","dblclick","keypress","keydown","keyup"],t9=e=>class extends tJ(t6(t8(e))){constructor(){super(),this.__onInteractionEvent=this.__onInteractionEvent.bind(this),t7.forEach(e=>{this.addEventListener(e,this.__onInteractionEvent,!0)}),this.tabindex=0}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button"),this.__shouldAllowFocusWhenDisabled()&&this.style.setProperty("--_vaadin-button-disabled-pointer-events","auto")}_onKeyDown(e){super._onKeyDown(e),e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||this._activeKeys.includes(e.key)&&(e.preventDefault(),this.click())}__onInteractionEvent(e){this.__shouldSuppressInteractionEvent(e)&&e.stopImmediatePropagation()}__shouldSuppressInteractionEvent(e){return this.disabled}};class ie extends t9(eX(tw(e8(tm(ek))))){static get is(){return"vaadin-button"}static get styles(){return tx}static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}render(){return en`
219
230
  <div class="vaadin-button-container">
220
231
  <span part="prefix" aria-hidden="true">
221
232
  <slot name="prefix"></slot>
@@ -229,7 +240,7 @@
229
240
 
230
241
  <slot name="tooltip"></slot>
231
242
  </div>
232
- `}ready(){super.ready(),this._tooltipController=new ts(this),this.addController(this._tooltipController)}__shouldAllowFocusWhenDisabled(){return window.Vaadin.featureFlags.accessibleDisabledButtons}}eI(t9);let ie=class extends t9{};ie=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-button")],ie);let it=(e,t=e)=>g`
243
+ `}ready(){super.ready(),this._tooltipController=new ts(this),this.addController(this._tooltipController)}__shouldAllowFocusWhenDisabled(){return window.Vaadin.featureFlags.accessibleDisabledButtons}}eT(ie);let it=class extends ie{};it=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-button")],it);let ii=(e,t=e)=>g`
233
244
  :host {
234
245
  align-items: baseline;
235
246
  column-gap: var(--vaadin-${f(t)}-gap, var(--vaadin-gap-s));
@@ -259,7 +270,7 @@
259
270
  ::slotted(label) {
260
271
  font-size: var(--vaadin-${f(t)}-label-font-size, var(--vaadin-input-field-label-font-size, inherit));
261
272
  line-height: var(--vaadin-${f(t)}-label-line-height, var(--vaadin-input-field-label-line-height, inherit));
262
- font-weight: var(--vaadin-${f(t)}-font-weight, var(--vaadin-input-field-label-font-weight, 500));
273
+ font-weight: var(--vaadin-${f(t)}-label-font-weight, var(--vaadin-input-field-label-font-weight, 500));
263
274
  color: var(--vaadin-${f(t)}-label-color, var(--vaadin-input-field-label-color, var(--vaadin-text-color)));
264
275
  word-break: break-word;
265
276
  cursor: var(--_cursor);
@@ -393,7 +404,7 @@
393
404
  background: GrayText !important;
394
405
  }
395
406
  }
396
- `,ii=g`
407
+ `,is=g`
397
408
  :host {
398
409
  --_helper-below-field: initial;
399
410
  --_helper-above-field: ;
@@ -592,7 +603,7 @@
592
603
  background: CanvasText;
593
604
  }
594
605
  }
595
- `,is=g`
606
+ `,ir=g`
596
607
  [part='checkbox'] {
597
608
  color: var(--vaadin-checkbox-checkmark-color, var(--_color));
598
609
  }
@@ -614,11 +625,11 @@
614
625
  :host([indeterminate]) [part='checkbox']::after {
615
626
  mask-image: var(--_vaadin-icon-minus);
616
627
  }
617
- `,ir=[ii,it("checkbox"),is],ia=eQ(e=>class extends t4(t8(e)){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged",sync:!0},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame(()=>{this.focus()})}focus(e){this.focusElement&&!this.disabled&&(this.focusElement.focus(),e&&!1===e.focusVisible||this.setAttribute("focus-ring",""))}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(e,t){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):t&&this._removeFocusListeners(t)}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus)}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,t){super._disabledChanged(e,t),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur()}_tabindexChanged(e){this.__forwardTabIndex(e)}__forwardTabIndex(e){void 0!==e&&this.focusElement&&(this.focusElement.tabIndex=e,-1!==e&&(this.tabindex=void 0)),this.disabled&&e&&(-1!==e&&(this._lastTabIndex=e),this.tabindex=void 0),void 0===e&&this.hasAttribute("tabindex")&&this.removeAttribute("tabindex")}}),io=new WeakMap,il=eQ(e=>class extends e{get slotStyles(){return[]}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){let e=this.getRootNode(),t=(io.has(e)||io.set(e,new Set),io.get(e));this.slotStyles.forEach(i=>{if(!t.has(i)){let s;(s=document.createElement("style")).textContent=i,e===document?document.head.appendChild(s):e.insertBefore(s,e.firstChild),t.add(i)}})}}),id=eQ(e=>class extends e{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(e){e&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach(e=>{this._delegateAttribute(e,this[e])})}_ensurePropsDelegated(){this.constructor.delegateProps.forEach(e=>{this._delegateProperty(e,this[e])})}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach((t,i)=>{this._delegateAttribute(t,e[i])})}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((t,i)=>{this._delegateProperty(t,e[i])})}_delegateAttribute(e,t){this.stateTarget&&("invalid"===e&&this._delegateAttribute("aria-invalid",!!t&&"true"),"boolean"==typeof t?this.stateTarget.toggleAttribute(e,t):t?this.stateTarget.setAttribute(e,t):this.stateTarget.removeAttribute(e))}_delegateProperty(e,t){this.stateTarget&&(this.stateTarget[e]=t)}}),ih=eQ(e=>class extends e{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged",sync:!0},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0}}}constructor(){super(),this._boundOnInput=this._onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e)}clear(){this.value="",this._inputElementValue=""}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange)}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange)}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=null!=e?e:"")}_inputElementChanged(e,t){e?this._addInputListeners(e):t&&this._removeInputListeners(t)}_onInput(e){let t=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=t.value,this.__userInput=!1}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e)}_valueChanged(e,t){this._toggleHasValue(this._hasValue),""===e&&void 0===t||this.__userInput||this._forwardInputValue(e)}}),iu=e=>class extends id(tX(ih(e))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(e){let t=e.target;this._toggleChecked(t.checked)}_toggleChecked(e){this.checked=e}},ic=new Map;function ip(e){return ic.has(e)||ic.set(e,new WeakMap),ic.get(e)}function i_(e,t){e&&e.removeAttribute(t)}function iv(e,t){if(!e||!t)return;let i=ip(t);if(i.has(e))return;let s=e6(e.getAttribute(t));i.set(e,new Set(s))}function im(e,t,i={newId:null,oldId:null,fromUser:!1}){let s;if(!e||!t)return;let{newId:r,oldId:n,fromUser:a}=i,o=ip(t),l=o.get(e);if(!a&&l){n&&l.delete(n),r&&l.add(r);return}a&&(l?r||o.delete(e):iv(e,t),i_(e,t)),((s=e6(e.getAttribute(t))).delete(n),0===s.size)?e.removeAttribute(t):e.setAttribute(t,e7(s));let d=r||e7(l);d&&e9(e,t,d)}class ig{constructor(e){this.host=e,this.__required=!1}setTarget(e){this.__target=e,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(e){this.__setAriaRequiredAttribute(e),this.__required=e}setAriaLabel(e){this.__setAriaLabelToAttribute(e),this.__label=e}setLabelId(e,t=!1){let i=t?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(e,i,t),t?this.__labelIdFromUser=e:this.__labelId=e}setErrorId(e){this.__setErrorIdToAriaAttribute(e,this.__errorId),this.__errorId=e}setHelperId(e){this.__setHelperIdToAriaAttribute(e,this.__helperId),this.__helperId=e}__setAriaLabelToAttribute(e){if(this.__target)if(e){var t;iv(t=this.__target,"aria-labelledby"),i_(t,"aria-labelledby"),this.__target.setAttribute("aria-label",e)}else this.__label&&(!function(e,t){if(!e||!t)return;let i=ip(t),s=i.get(e);s&&0!==s.size?e9(e,t,e7(s)):e.removeAttribute(t),i.delete(e)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label"))}__setLabelIdToAriaAttribute(e,t,i){im(this.__target,"aria-labelledby",{newId:e,oldId:t,fromUser:i})}__setErrorIdToAriaAttribute(e,t){im(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setHelperIdToAriaAttribute(e,t){im(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setAriaRequiredAttribute(e){!this.__target||["input","textarea"].includes(this.__target.localName)||(e?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required"))}}let ib=document.createElement("div");function iy(e,i={}){let s=i.mode||"polite",r=void 0===i.timeout?150:i.timeout;"alert"===s?(ib.removeAttribute("aria-live"),ib.removeAttribute("role"),t=eH.debounce(t,eB,()=>{ib.setAttribute("role","alert")})):(t&&t.cancel(),ib.removeAttribute("role"),ib.setAttribute("aria-live",s)),ib.textContent="",setTimeout(()=>{ib.textContent=e},r)}ib.style.position="fixed",ib.style.clip="rect(0px, 0px, 0px, 0px)",ib.setAttribute("aria-live","polite"),document.body.appendChild(ib);class iw extends ti{constructor(e,t,i,s={}){super(e,t,i,{...s,useUniqueId:!0})}initCustomNode(e){this.__updateNodeId(e),this.__notifyChange(e)}teardownNode(e){let t=this.getSlotChild();t&&t!==this.defaultNode?this.__notifyChange(t):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){let e=super.attachDefaultNode();return e&&this.__updateNodeId(e),e}restoreDefaultNode(){}updateDefaultNode(e){this.__notifyChange(e)}observeNode(e){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(e=>{e.forEach(e=>{let t=e.target,i=t===this.node;"attributes"===e.type?i&&this.__updateNodeId(t):(i||t.parentElement===this.node)&&this.__notifyChange(this.node)})}),this.__nodeObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(e){return!!e&&(e.nodeType===Node.ELEMENT_NODE&&(customElements.get(e.localName)||e.children.length>0)||e.textContent&&""!==e.textContent.trim())}__notifyChange(e){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(e),node:e}}))}__updateNodeId(e){let t=!this.nodes||e===this.nodes[0];e.nodeType!==Node.ELEMENT_NODE||this.multiple&&!t||e.id||(e.id=this.defaultId)}}class ix extends iw{constructor(e){super(e,"error-message","div")}setErrorMessage(e){this.errorMessage=e,this.updateDefaultNode(this.node)}setInvalid(e){this.invalid=e,this.updateDefaultNode(this.node)}initAddedNode(e){e!==this.defaultNode&&this.initCustomNode(e)}initNode(e){this.updateDefaultNode(e)}initCustomNode(e){e.textContent&&!this.errorMessage&&(this.errorMessage=e.textContent.trim()),super.initCustomNode(e)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(e){let{errorMessage:t,invalid:i}=this,s=!!(i&&t&&""!==t.trim());e&&(e.textContent=s?t:"",e.hidden=!s,s&&iy(t,{mode:"assertive"})),super.updateDefaultNode(e)}}class iC extends iw{constructor(e){super(e,"helper",null)}setHelperText(e){this.helperText=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){let{helperText:e}=this;if(e&&""!==e.trim()){this.tagName="div";let e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.helperText),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}class ik extends iw{constructor(e){super(e,"label","label")}setLabel(e){this.label=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){let{label:e}=this;if(e&&""!==e.trim()){let e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.label),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}let iE=e=>class extends e{static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new ik(this),this._labelController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-label",e.detail.hasContent)})}get _labelId(){let e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(e){this._labelController.setLabel(e)}},iT=eQ(e=>class extends e{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1,sync:!0},manualValidation:{type:Boolean,value:!1},required:{type:Boolean,reflectToAttribute:!0,sync:!0}}}validate(){let e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return!this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}_requestValidation(){this.manualValidation||this.validate()}}),iI=e=>class extends iT(iE(e)){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 ig(this),this._helperController=new iC(this),this._errorController=new ix(this),this._errorController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-error-message",e.detail.hasContent)}),this._labelController.addEventListener("slot-content-changed",e=>{let{hasContent:t,node:i}=e.detail;this.__labelChanged(t,i)}),this._helperController.addEventListener("slot-content-changed",e=>{let{hasContent:t,node:i}=e.detail;this.toggleAttribute("has-helper",t),this.__helperChanged(t,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(e,t){e?this._fieldAriaController.setHelperId(t.id):this._fieldAriaController.setHelperId(null)}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e)}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0)}__labelChanged(e,t){e?this._fieldAriaController.setLabelId(t.id):this._fieldAriaController.setLabelId(null)}_errorMessageChanged(e){this._errorController.setErrorMessage(e)}_helperTextChanged(e){this._helperController.setHelperText(e)}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e)}_requiredChanged(e){this._fieldAriaController.setRequired(e)}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout(()=>{if(e){let e=this._errorNode;this._fieldAriaController.setErrorId(e&&e.id)}else this._fieldAriaController.setErrorId(null)})}};class iD extends ti{constructor(e,t,i={}){const{uniqueIdPrefix:s}=i;super(e,"input","input",{initializer:(e,i)=>{i.value&&(e.value=i.value),i.type&&e.setAttribute("type",i.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0,uniqueIdPrefix:s})}}class iS{constructor(e,t){this.input=e,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),t.addEventListener("slot-content-changed",e=>{this.__initLabel(e.detail.node)}),this.__initLabel(t.node)}__initLabel(e){e&&(e.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&e.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){let e=t=>{t.stopImmediatePropagation(),this.input.removeEventListener("click",e)};this.input.addEventListener("click",e)}}let iA=e=>class extends il(iI(iu(ia(tQ(e))))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},readonly:{type:Boolean,value:!1,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",this.tabindex=0}get slotStyles(){let e=this.localName;return[`
628
+ `,ia=[is,ii("checkbox"),ir],io=eQ(e=>class extends t8(t6(e)){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged",sync:!0},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame(()=>{this.focus()})}focus(e){this.focusElement&&!this.disabled&&(this.focusElement.focus(),e?.focusVisible!==!1&&this.setAttribute("focus-ring",""))}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(e,t){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):t&&this._removeFocusListeners(t)}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus)}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,t){super._disabledChanged(e,t),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur()}_tabindexChanged(e){this.__forwardTabIndex(e)}__forwardTabIndex(e){void 0!==e&&this.focusElement&&(this.focusElement.tabIndex=e,-1!==e&&(this.tabindex=void 0)),this.disabled&&e&&(-1!==e&&(this._lastTabIndex=e),this.tabindex=void 0),void 0===e&&this.hasAttribute("tabindex")&&this.removeAttribute("tabindex")}}),il=new WeakMap,id=eQ(e=>class extends e{get slotStyles(){return[]}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){let e=this.getRootNode(),t=(il.has(e)||il.set(e,new Set),il.get(e));this.slotStyles.forEach(i=>{if(!t.has(i)){let s;(s=document.createElement("style")).textContent=i,e===document?document.head.appendChild(s):e.insertBefore(s,e.firstChild),t.add(i)}})}}),ih=eQ(e=>class extends e{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(e){e&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach(e=>{this._delegateAttribute(e,this[e])})}_ensurePropsDelegated(){this.constructor.delegateProps.forEach(e=>{this._delegateProperty(e,this[e])})}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach((t,i)=>{this._delegateAttribute(t,e[i])})}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((t,i)=>{this._delegateProperty(t,e[i])})}_delegateAttribute(e,t){this.stateTarget&&("invalid"===e&&this._delegateAttribute("aria-invalid",!!t&&"true"),"boolean"==typeof t?this.stateTarget.toggleAttribute(e,t):t?this.stateTarget.setAttribute(e,t):this.stateTarget.removeAttribute(e))}_delegateProperty(e,t){this.stateTarget&&(this.stateTarget[e]=t)}}),iu=eQ(e=>class extends e{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged",sync:!0},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0}}}constructor(){super(),this._boundOnInput=this._onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e)}clear(){this.value="",this._inputElementValue=""}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange)}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange)}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=null!=e?e:"")}_inputElementChanged(e,t){e?this._addInputListeners(e):t&&this._removeInputListeners(t)}_onInput(e){let t=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=t.value,this.__userInput=!1}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e)}_valueChanged(e,t){this._toggleHasValue(this._hasValue),""===e&&void 0===t||this.__userInput||this._forwardInputValue(e)}}),ic=e=>class extends ih(tZ(iu(e))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(e){let t=e.target;this._toggleChecked(t.checked)}_toggleChecked(e){this.checked=e}},ip=new Map;function i_(e){return ip.has(e)||ip.set(e,new WeakMap),ip.get(e)}function iv(e,t){e&&e.removeAttribute(t)}function im(e,t){if(!e||!t)return;let i=i_(t);if(i.has(e))return;let s=e6(e.getAttribute(t));i.set(e,new Set(s))}function ig(e,t,i={newId:null,oldId:null,fromUser:!1}){let s;if(!e||!t)return;let{newId:r,oldId:n,fromUser:a}=i,o=i_(t),l=o.get(e);if(!a&&l){n&&l.delete(n),r&&l.add(r);return}a&&(l?r||o.delete(e):im(e,t),iv(e,t)),((s=e6(e.getAttribute(t))).delete(n),0===s.size)?e.removeAttribute(t):e.setAttribute(t,e7(s));let d=r||e7(l);d&&e9(e,t,d)}class ib{constructor(e){this.host=e,this.__required=!1}setTarget(e){this.__target=e,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(e){this.__setAriaRequiredAttribute(e),this.__required=e}setAriaLabel(e){this.__setAriaLabelToAttribute(e),this.__label=e}setLabelId(e,t=!1){let i=t?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(e,i,t),t?this.__labelIdFromUser=e:this.__labelId=e}setErrorId(e){this.__setErrorIdToAriaAttribute(e,this.__errorId),this.__errorId=e}setHelperId(e){this.__setHelperIdToAriaAttribute(e,this.__helperId),this.__helperId=e}__setAriaLabelToAttribute(e){if(this.__target)if(e){var t;im(t=this.__target,"aria-labelledby"),iv(t,"aria-labelledby"),this.__target.setAttribute("aria-label",e)}else this.__label&&(!function(e,t){if(!e||!t)return;let i=i_(t),s=i.get(e);s&&0!==s.size?e9(e,t,e7(s)):e.removeAttribute(t),i.delete(e)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label"))}__setLabelIdToAriaAttribute(e,t,i){ig(this.__target,"aria-labelledby",{newId:e,oldId:t,fromUser:i})}__setErrorIdToAriaAttribute(e,t){ig(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setHelperIdToAriaAttribute(e,t){ig(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setAriaRequiredAttribute(e){!this.__target||["input","textarea"].includes(this.__target.localName)||(e?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required"))}}let iy=document.createElement("div");function iw(e,i={}){let s=i.mode||"polite",r=i.timeout??150;"alert"===s?(iy.removeAttribute("aria-live"),iy.removeAttribute("role"),t=eH.debounce(t,eB,()=>{iy.setAttribute("role","alert")})):(t&&t.cancel(),iy.removeAttribute("role"),iy.setAttribute("aria-live",s)),iy.textContent="",setTimeout(()=>{iy.textContent=e},r)}iy.style.position="fixed",iy.style.clip="rect(0px, 0px, 0px, 0px)",iy.setAttribute("aria-live","polite"),document.body.appendChild(iy);class ix extends ti{constructor(e,t,i,s={}){super(e,t,i,{...s,useUniqueId:!0})}initCustomNode(e){this.__updateNodeId(e),this.__notifyChange(e)}teardownNode(e){let t=this.getSlotChild();t&&t!==this.defaultNode?this.__notifyChange(t):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){let e=super.attachDefaultNode();return e&&this.__updateNodeId(e),e}restoreDefaultNode(){}updateDefaultNode(e){this.__notifyChange(e)}observeNode(e){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(e=>{e.forEach(e=>{let t=e.target,i=t===this.node;"attributes"===e.type?i&&this.__updateNodeId(t):(i||t.parentElement===this.node)&&this.__notifyChange(this.node)})}),this.__nodeObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(e){return!!e&&(e.nodeType===Node.ELEMENT_NODE&&(customElements.get(e.localName)||e.children.length>0)||e.textContent&&""!==e.textContent.trim())}__notifyChange(e){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(e),node:e}}))}__updateNodeId(e){let t=!this.nodes||e===this.nodes[0];e.nodeType!==Node.ELEMENT_NODE||this.multiple&&!t||e.id||(e.id=this.defaultId)}}class iC extends ix{constructor(e){super(e,"error-message","div")}setErrorMessage(e){this.errorMessage=e,this.updateDefaultNode(this.node)}setInvalid(e){this.invalid=e,this.updateDefaultNode(this.node)}initAddedNode(e){e!==this.defaultNode&&this.initCustomNode(e)}initNode(e){this.updateDefaultNode(e)}initCustomNode(e){e.textContent&&!this.errorMessage&&(this.errorMessage=e.textContent.trim()),super.initCustomNode(e)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(e){let{errorMessage:t,invalid:i}=this,s=!!(i&&t&&""!==t.trim());e&&(e.textContent=s?t:"",e.hidden=!s,s&&iw(t,{mode:"assertive"})),super.updateDefaultNode(e)}}class ik extends ix{constructor(e){super(e,"helper",null)}setHelperText(e){this.helperText=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){let{helperText:e}=this;if(e&&""!==e.trim()){this.tagName="div";let e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.helperText),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}class iE extends ix{constructor(e){super(e,"label","label")}setLabel(e){this.label=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){let{label:e}=this;if(e&&""!==e.trim()){let e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.label),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}let iI=e=>class extends e{static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new iE(this),this._labelController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-label",e.detail.hasContent)})}get _labelId(){let e=this._labelNode;return e?.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(e){this._labelController.setLabel(e)}},iT=eQ(e=>class extends e{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1,sync:!0},manualValidation:{type:Boolean,value:!1},required:{type:Boolean,reflectToAttribute:!0,sync:!0}}}validate(){let e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return!this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}_requestValidation(){this.manualValidation||this.validate()}}),iD=e=>class extends iT(iI(e)){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 ib(this),this._helperController=new ik(this),this._errorController=new iC(this),this._errorController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-error-message",e.detail.hasContent)}),this._labelController.addEventListener("slot-content-changed",e=>{let{hasContent:t,node:i}=e.detail;this.__labelChanged(t,i)}),this._helperController.addEventListener("slot-content-changed",e=>{let{hasContent:t,node:i}=e.detail;this.toggleAttribute("has-helper",t),this.__helperChanged(t,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(e,t){e?this._fieldAriaController.setHelperId(t.id):this._fieldAriaController.setHelperId(null)}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e)}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0)}__labelChanged(e,t){e?this._fieldAriaController.setLabelId(t.id):this._fieldAriaController.setLabelId(null)}_errorMessageChanged(e){this._errorController.setErrorMessage(e)}_helperTextChanged(e){this._helperController.setHelperText(e)}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e)}_requiredChanged(e){this._fieldAriaController.setRequired(e)}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout(()=>{if(e){let e=this._errorNode;this._fieldAriaController.setErrorId(e?.id)}else this._fieldAriaController.setErrorId(null)})}};class iS extends ti{constructor(e,t,i={}){const{uniqueIdPrefix:s}=i;super(e,"input","input",{initializer:(e,i)=>{i.value&&(e.value=i.value),i.type&&e.setAttribute("type",i.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0,uniqueIdPrefix:s})}}class iA{constructor(e,t){this.input=e,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),t.addEventListener("slot-content-changed",e=>{this.__initLabel(e.detail.node)}),this.__initLabel(t.node)}__initLabel(e){e&&(e.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&e.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){let e=t=>{t.stopImmediatePropagation(),this.input.removeEventListener("click",e)};this.input.addEventListener("click",e)}}let iO=e=>class extends id(iD(ic(io(tJ(e))))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},readonly:{type:Boolean,value:!1,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",this.tabindex=0}get slotStyles(){let e=this.localName;return[`
618
629
  ${e} > input[slot='input'] {
619
630
  opacity: 0;
620
631
  }
621
- `]}ready(){super.ready(),this.addController(new iD(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new iS(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)")}_shouldSetActive(e){return!this.readonly&&"a"!==e.target.localName&&e.target!==this._helperNode&&e.target!==this._errorNode&&super._shouldSetActive(e)}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("click",this._boundOnInputClick)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("click",this._boundOnInputClick)}_onInputClick(e){this.readonly&&e.preventDefault()}__readonlyChanged(e,t){t&&(e?t.setAttribute("aria-readonly","true"):t.removeAttribute("aria-readonly"))}_toggleChecked(e){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(e)}checkValidity(){return!this.required||!!this.checked}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this._requestValidation()}_checkedChanged(e){(e||this.__oldChecked)&&this._requestValidation(),this.__oldChecked=e}_requiredChanged(e){super._requiredChanged(e),!1===e&&this._requestValidation()}_onRequiredIndicatorClick(){this._labelNode.click()}};class iO extends iA(eX(ty(e8(tv(ek))))){static get is(){return"vaadin-checkbox"}static get styles(){return ir}render(){return en`
632
+ `]}ready(){super.ready(),this.addController(new iS(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new iA(this.inputElement,this._labelController)),this._createPropertyObserver("checked","_checkedChanged")}_shouldSetActive(e){return!this.readonly&&"a"!==e.target.localName&&e.target!==this._helperNode&&e.target!==this._errorNode&&super._shouldSetActive(e)}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("click",this._boundOnInputClick)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("click",this._boundOnInputClick)}_onInputClick(e){this.readonly&&e.preventDefault()}__readonlyChanged(e,t){t&&(e?t.setAttribute("aria-readonly","true"):t.removeAttribute("aria-readonly"))}_toggleChecked(e){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(e)}checkValidity(){return!this.required||!!this.checked}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this._requestValidation()}_checkedChanged(e,t){(e||t)&&this._requestValidation()}_requiredChanged(e){super._requiredChanged(e),!1===e&&this._requestValidation()}_onRequiredIndicatorClick(){this._labelNode.click()}};class iP extends iO(eX(tw(e8(tm(ek))))){static get is(){return"vaadin-checkbox"}static get styles(){return ia}render(){return en`
622
633
  <div class="vaadin-checkbox-container">
623
634
  <div part="checkbox" aria-hidden="true"></div>
624
635
  <slot name="input"></slot>
@@ -634,7 +645,7 @@
634
645
  </div>
635
646
  </div>
636
647
  <slot name="tooltip"></slot>
637
- `}ready(){super.ready(),this._tooltipController=new ts(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}eI(iO);let iP=class extends iO{};iP=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-checkbox")],iP);let i$=g`
648
+ `}ready(){super.ready(),this._tooltipController=new ts(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}eT(iP);let i$=class extends iP{};i$=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-checkbox")],i$);let iL=g`
638
649
  [part='label'],
639
650
  [part='helper-text'],
640
651
  [part='error-message'] {
@@ -658,7 +669,7 @@
658
669
  padding-inline: 0;
659
670
  border-block: var(--vaadin-input-field-border-width, 1px) solid transparent;
660
671
  }
661
- `,iL=[ii,i$],iM=e=>class extends iI(t4(tX(e))){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 ts(this),this._tooltipController.addEventListener("tooltip-changed",e=>{let t=e.detail.node;if(t&&t.isConnected){let e=this.__checkboxes.map(e=>e.inputElement);this._tooltipController.setAriaTarget(e)}else this._tooltipController.setAriaTarget([])})}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");let e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new te(e,({addedNodes:e,removedNodes:t})=>{let i=this.__filterCheckboxes(e),s=this.__filterCheckboxes(t);i.forEach(this.__registerCheckbox),s.forEach(this.__unregisterCheckbox);let r=this.__checkboxes.map(e=>e.inputElement);this._tooltipController.setAriaTarget(r),this.__warnOfCheckboxesWithoutValue(i)}),this.addController(this._tooltipController)}checkValidity(){return!this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(e){return e.filter(e=>e.nodeType===Node.ELEMENT_NODE&&"vaadin-checkbox"===e.localName)}__warnOfCheckboxesWithoutValue(e){e.some(e=>{let{value:t}=e;return!e.hasAttribute("value")&&(!t||"on"===t)})&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(e){e.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(e.disabled=!0),this.readonly&&(e.readonly=!0),e.checked?this.__addCheckboxToValue(e.value):this.value&&this.value.includes(e.value)&&(e.checked=!0)}__unregisterCheckbox(e){e.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),e.checked&&this.__removeCheckboxFromValue(e.value)}_disabledChanged(e,t){super._disabledChanged(e,t),(e||void 0!==t)&&t!==e&&this.__checkboxes.forEach(t=>{t.disabled=e})}__addCheckboxToValue(e){this.value?this.value.includes(e)||(this.value=[...this.value,e]):this.value=[e]}__removeCheckboxFromValue(e){this.value&&this.value.includes(e)&&(this.value=this.value.filter(t=>t!==e))}__onCheckboxCheckedChanged(e){let t=e.target;t.checked?this.__addCheckboxToValue(t.value):this.__removeCheckboxFromValue(t.value)}__valueChanged(e,t){e&&0===e.length&&void 0===t||(this.toggleAttribute("has-value",e&&e.length>0),this.__checkboxes.forEach(t=>{t.checked=e&&e.includes(t.value)}),void 0!==t&&this._requestValidation())}__readonlyChanged(e,t){(e||t)&&this.__checkboxes.forEach(t=>{t.readonly=e})}_shouldRemoveFocus(e){return!this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this._requestValidation()}};class iR extends iM(eX(ty(e8(tv(ek))))){static get is(){return"vaadin-checkbox-group"}static get styles(){return iL}render(){return en`
672
+ `,iM=[is,iL],iR=e=>class extends iD(t8(tZ(e))){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 ts(this),this._tooltipController.addEventListener("tooltip-changed",e=>{let t=e.detail.node;if(t?.isConnected){let e=this.__checkboxes.map(e=>e.inputElement);this._tooltipController.setAriaTarget(e)}else this._tooltipController.setAriaTarget([])})}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");let e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new te(e,({addedNodes:e,removedNodes:t})=>{let i=this.__filterCheckboxes(e),s=this.__filterCheckboxes(t);i.forEach(this.__registerCheckbox),s.forEach(this.__unregisterCheckbox);let r=this.__checkboxes.map(e=>e.inputElement);this._tooltipController.setAriaTarget(r),this.__warnOfCheckboxesWithoutValue(i)}),this.addController(this._tooltipController)}checkValidity(){return!this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(e){return e.filter(e=>e.nodeType===Node.ELEMENT_NODE&&"vaadin-checkbox"===e.localName)}__warnOfCheckboxesWithoutValue(e){e.some(e=>{let{value:t}=e;return!e.hasAttribute("value")&&(!t||"on"===t)})&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(e){e.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(e.disabled=!0),this.readonly&&(e.readonly=!0),e.checked?this.__addCheckboxToValue(e.value):this.value&&this.value.includes(e.value)&&(e.checked=!0)}__unregisterCheckbox(e){e.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),e.checked&&this.__removeCheckboxFromValue(e.value)}_disabledChanged(e,t){super._disabledChanged(e,t),(e||void 0!==t)&&t!==e&&this.__checkboxes.forEach(t=>{t.disabled=e})}__addCheckboxToValue(e){this.value?this.value.includes(e)||(this.value=[...this.value,e]):this.value=[e]}__removeCheckboxFromValue(e){this.value&&this.value.includes(e)&&(this.value=this.value.filter(t=>t!==e))}__onCheckboxCheckedChanged(e){let t=e.target;t.checked?this.__addCheckboxToValue(t.value):this.__removeCheckboxFromValue(t.value)}__valueChanged(e,t){(e?.length!==0||void 0!==t)&&(this.toggleAttribute("has-value",e?.length>0),this.__checkboxes.forEach(t=>{t.checked=e?.includes(t.value)}),void 0!==t&&this._requestValidation())}__readonlyChanged(e,t){(e||t)&&this.__checkboxes.forEach(t=>{t.readonly=e})}_shouldRemoveFocus(e){return!this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this._requestValidation()}};class iV extends iR(eX(tw(e8(tm(ek))))){static get is(){return"vaadin-checkbox-group"}static get styles(){return iM}render(){return en`
662
673
  <div class="vaadin-group-field-container">
663
674
  <div part="label">
664
675
  <slot name="label"></slot>
@@ -679,7 +690,7 @@
679
690
  </div>
680
691
 
681
692
  <slot name="tooltip"></slot>
682
- `}}eI(iR);let iV=class extends iR{};iV=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-checkbox-group")],iV);let iN=g`
693
+ `}}eT(iV);let iN=class extends iV{__filterCheckboxes(e){return e.filter(e=>e instanceof iP)}};iN=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-checkbox-group")],iN);let iB=g`
683
694
  :host {
684
695
  display: flex;
685
696
  align-items: center;
@@ -823,11 +834,11 @@
823
834
  --vaadin-icon-color: GrayText;
824
835
  }
825
836
  }
826
- `;class iB extends ty(eK(e8(tv(ek)))){static get is(){return"vaadin-input-container"}static get styles(){return iN}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}render(){return en`
837
+ `;class iz extends tw(eK(e8(tm(ek)))){static get is(){return"vaadin-input-container"}static get styles(){return iB}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}render(){return en`
827
838
  <slot name="prefix"></slot>
828
839
  <slot></slot>
829
840
  <slot name="suffix"></slot>
830
- `}ready(){super.ready(),this.addEventListener("pointerdown",e=>{e.target===this&&e.preventDefault()}),this.addEventListener("click",e=>{e.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach(e=>e.focus&&e.focus())})}}eI(iB);let iz=g`
841
+ `}ready(){super.ready(),this.addEventListener("pointerdown",e=>{e.target===this&&e.preventDefault()}),this.addEventListener("click",e=>{e.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach(e=>e.focus&&e.focus())})}}eT(iz);let iF=g`
831
842
  :host {
832
843
  z-index: 200;
833
844
  position: fixed;
@@ -923,7 +934,7 @@
923
934
  border: 3px solid !important;
924
935
  }
925
936
  }
926
- `,iF=g`
937
+ `,iU=g`
927
938
  [part='overlay'] {
928
939
  display: flex;
929
940
  flex: auto;
@@ -931,19 +942,16 @@
931
942
  box-sizing: content-box;
932
943
  width: var(
933
944
  --vaadin-date-picker-overlay-width,
934
- calc(
945
+ round(
935
946
  var(--vaadin-date-picker-date-width, 2rem) * 7 +
936
947
  var(--vaadin-date-picker-month-padding, var(--vaadin-padding-s)) * 2 +
937
- var(--vaadin-date-picker-year-scroller-width, 3rem)
948
+ var(--vaadin-date-picker-year-scroller-width, 3rem),
949
+ 1px
938
950
  )
939
951
  );
940
952
  cursor: default;
941
953
  }
942
954
 
943
- :host([fullscreen]) {
944
- --vaadin-date-picker-date-width: calc(100% / 7);
945
- }
946
-
947
955
  :host([fullscreen]) [part='backdrop'] {
948
956
  display: block;
949
957
  }
@@ -964,14 +972,14 @@
964
972
  inset: auto 0 0 !important;
965
973
  }
966
974
  }
967
- `;/Android/u.test(navigator.userAgent),/Chrome/u.test(navigator.userAgent)&&/Google Inc/u.test(navigator.vendor),/Firefox/u.test(navigator.userAgent);let iU=/^iPad/u.test(navigator.platform)||/^Mac/u.test(navigator.platform)&&navigator.maxTouchPoints>1,iH=/^iPhone/u.test(navigator.platform)||iU,ij=/^((?!chrome|android).)*safari/iu.test(navigator.userAgent),iY=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})();class iq{saveFocus(e){this.focusNode=e||t0()}restoreFocus(e){let t=this.focusNode;if(!t)return;let i={preventScroll:!!e&&e.preventScroll,focusVisible:!!e&&e.focusVisible};t0()===document.body?setTimeout(()=>t.focus(i)):t.focus(i),this.focusNode=null}}let iW=[];class iK{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){var e;let t;return e=this.__trapNode,!function e(t,i){if(t.nodeType!==Node.ELEMENT_NODE||t1(t))return!1;let s=t3(t)?Number(t.getAttribute("tabindex")||0):-1,r=s>0;s>=0&&i.push(t);return[..."slot"===t.localName?t.assignedNodes({flatten:!0}):(t.shadowRoot||t).children].forEach(t=>{r=e(t,i)||r}),r}(e,t=[])?t:function e(t){let i=t.length;if(i<2)return t;let s=Math.ceil(i/2),r=e(t.slice(0,s)),n=e(t.slice(s)),a=[];for(;r.length>0&&n.length>0;)!function(e,t){let i=Math.max(e.tabIndex,0),s=Math.max(t.tabIndex,0);return 0===i||0===s?s>i:i>s}(r[0],n[0])?a.push(r.shift()):a.push(n.shift());return a.concat(r,n)}(t)}get __focusedElementIndex(){let e=this.__focusableElements;return e.indexOf(e.filter(t5).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(e){if(this.__trapNode=e,0===this.__focusableElements.length)throw this.__trapNode=null,Error("The trap node should have at least one focusable descendant or be focusable itself.");iW.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus({focusVisible:tJ})}releaseFocus(){this.__trapNode=null,iW.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(iW).pop()&&"Tab"===e.key){if(e.defaultPrevented)return;e.preventDefault();let t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){let t=this.__focusableElements,i=this.__focusedElementIndex,s=(t.length+i+(e?-1:1))%t.length,r=t[s];r.focus({focusVisible:!0}),"input"===r.localName&&r.select()}}let iG=e=>class extends e{static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__focusTrapController=new iK(this),this.__focusRestorationController=new iq}get _contentRoot(){return this}ready(){super.ready(),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}get _focusTrapRoot(){return this.$.overlay}_resetFocus(){if(this.focusTrap&&this.__focusTrapController.releaseFocus(),this.restoreFocusOnClose&&this._shouldRestoreFocus()){let e=tJ;this.__focusRestorationController.restoreFocus({preventScroll:!e,focusVisible:e})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&!t2(this._focusTrapRoot)&&this.__focusTrapController.trapFocus(this._focusTrapRoot)}_shouldRestoreFocus(){let e=t0();return e===document.body||this._deepContains(e)}_deepContains(e){if(this._contentRoot.contains(e))return!0;let t=e,i=e.ownerDocument;for(;t&&t!==i&&t!==this._contentRoot;)t=t.parentNode||t.host;return t===this._contentRoot}},iX=new Set,iZ=()=>[...iX].filter(e=>!e.hasAttribute("closing")),iQ=e=>{let t=iZ(),i=t[t.indexOf(e)+1];return!i||!!e._deepContains(i)&&iQ(i)},iJ=(e,t=e=>!0)=>e===iZ().filter(t).pop(),i0=e=>class extends e{get _last(){return iJ(this)}get _isAttached(){return iX.has(this)}bringToFront(){iJ(this)||iQ(this)||(this.matches(":popover-open")&&(this.hidePopover(),this.showPopover()),this._removeAttachedInstance(),this._appendAttachedInstance())}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),iZ().forEach(e=>{e!==this&&(e.$.overlay.style.pointerEvents="none")})}_exitModalState(){let e;void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);let t=iZ();for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}_appendAttachedInstance(){iX.add(this)}_removeAttachedInstance(){this._isAttached&&iX.delete(this)}};function i1(e,t,i){let s=[e];e.owner&&s.push(e.owner),"string"==typeof i?s.forEach(e=>{e.setAttribute(t,i)}):i?s.forEach(e=>{e.setAttribute(t,"")}):s.forEach(e=>{e.removeAttribute(t)})}let i2=e=>class extends iG(i0(e)){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},owner:{type:Object,sync:!0},model:{type:Object,sync:!0},renderer:{type:Object,sync:!0},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged",sync:!0},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged",sync:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_withBackdropChanged",sync:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}get _rendererRoot(){return this}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),iH&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}firstUpdated(){super.firstUpdated(),this.popover="manual",this.addEventListener("click",()=>{}),this.$.backdrop&&this.$.backdrop.addEventListener("click",()=>{}),this.addEventListener("mouseup",()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}),this.addEventListener("animationcancel",()=>{this._flushAnimation("opening"),this._flushAnimation("closing")})}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener)),this.opened&&this._attachOverlay()}disconnectedCallback(){super.disconnectedCallback(),this.__scheduledOpen&&(cancelAnimationFrame(this.__scheduledOpen),this.__scheduledOpen=null),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this._rendererRoot,this.owner,this.model)}close(e){let t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{overlay:this,sourceEvent:e}});this.dispatchEvent(t),document.body.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}setBounds(e,t=!0){let i=this.$.overlay,s={...e};t&&"absolute"!==i.style.position&&(i.style.position="absolute"),Object.keys(s).forEach(e=>{null===s[e]||isNaN(s[e])||(s[e]=`${s[e]}px`)}),Object.assign(i.style,s)}_detectIosNavbar(){if(!this.opened)return;let e=window.innerHeight,t=window.innerWidth,i=document.documentElement.clientHeight;t>e&&i>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${i-e}px`):this.style.setProperty("--vaadin-overlay-viewport-bottom","0px")}_shouldAddGlobalListeners(){return!this.modeless}_addGlobalListeners(){this.__hasGlobalListeners||(this.__hasGlobalListeners=!0,document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0))}_removeGlobalListeners(){this.__hasGlobalListeners&&(this.__hasGlobalListeners=!1,document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0))}_rendererOrDataChanged(e,t,i,s){let r=this._oldOwner!==t||this._oldModel!==i;this._oldModel=i,this._oldOwner=t;let n=this._oldRenderer!==e,a=void 0!==this._oldRenderer;this._oldRenderer=e;let o=this._oldOpened!==s;this._oldOpened=s,n&&a&&(this._rendererRoot.innerHTML="",delete this._rendererRoot._$litPart$),s&&e&&(n||o||r)&&this.requestContentUpdate()}_modelessChanged(e){this.opened&&(this._shouldAddGlobalListeners()?this._addGlobalListeners():this._removeGlobalListeners()),e?this._exitModalState():this.opened&&this._enterModalState(),i1(this,"modeless",e)}_withBackdropChanged(e){i1(this,"with-backdrop",e)}_openedChanged(e,t){if(e){if(!this.isConnected){this.opened=!1;return}this._saveFocus(),this._animatedOpening(),this.__scheduledOpen=requestAnimationFrame(()=>{setTimeout(()=>{this._trapFocus();let e=new CustomEvent("vaadin-overlay-open",{detail:{overlay:this},bubbles:!0});this.dispatchEvent(e),document.body.dispatchEvent(e)})}),document.addEventListener("keydown",this._boundKeydownListener),this._shouldAddGlobalListeners()&&this._addGlobalListeners()}else t&&(this.__scheduledOpen&&(cancelAnimationFrame(this.__scheduledOpen),this.__scheduledOpen=null),this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this._shouldAddGlobalListeners()&&this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){let e=getComputedStyle(this),t=e.getPropertyValue("animation-name");return"none"!==e.getPropertyValue("display")&&t&&"none"!==t}_enqueueAnimation(e,t){let i=`__${e}Handler`,s=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(e){let t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this._isAttached&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this._appendAttachedInstance(),this.bringToFront(),this.modeless||this._enterModalState(),i1(this,"opening",!0),this._shouldAnimate()?this._enqueueAnimation("opening",()=>{this._finishOpening()}):this._finishOpening()}_attachOverlay(){this.matches(":popover-open")||this.showPopover()}_finishOpening(){i1(this,"opening",!1)}_finishClosing(){this._detachOverlay(),this._removeAttachedInstance(),this.$.overlay.style.removeProperty("pointer-events"),i1(this,"closing",!1),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._isAttached&&(this._exitModalState(),i1(this,"closing",!0),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",()=>{this._finishClosing()}):this._finishClosing())}_detachOverlay(){this.hidePopover()}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(e))return;let t=new CustomEvent("vaadin-overlay-outside-click",{cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last&&!e.defaultPrevented&&(this._shouldAddGlobalListeners()||e.composedPath().includes(this._focusTrapRoot))&&"Escape"===e.key){let t=new CustomEvent("vaadin-overlay-escape-press",{cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}},i3={start:"top",end:"bottom"},i5={start:"left",end:"right"},i4=new ResizeObserver(e=>{setTimeout(()=>{e.forEach(e=>{e.target.__overlay&&e.target.__overlay._updatePosition()})})}),i8=e=>class extends e{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}}}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()}updated(e){if(super.updated(e),e.has("positionTarget")){let t=e.get("positionTarget");this.__oldContentWidth=void 0,this.__oldContentHeight=void 0,(!this.positionTarget&&t||this.positionTarget&&!t&&this.__margins)&&this.__resetPosition()}(e.has("opened")||e.has("positionTarget"))&&this.__updatePositionSettings(this.opened,this.positionTarget),["horizontalAlign","verticalAlign","noHorizontalOverlap","noVerticalOverlap","requiredVerticalSpace"].some(t=>e.has(t))&&this._updatePosition()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(e){let t=[];for(;e;){if(e.nodeType===Node.DOCUMENT_NODE){t.push(e);break}if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(e),e=e.host;continue}if(e.assignedSlot){e=e.assignedSlot;continue}e=e.parentNode}return t}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0)}),this.positionTarget&&(this.__observePositionTargetMove=function(e,t){let i,s=null,r=document.documentElement;function n(){i&&clearTimeout(i),s&&s.disconnect(),s=null}return!function a(o=!1,l=1){n();let{left:d,top:h,width:u,height:c}=e.getBoundingClientRect();if(o||t(),!u||!c)return;let p=Math.floor(h),_=Math.floor(r.clientWidth-(d+u)),v=Math.floor(r.clientHeight-(h+c)),m=Math.floor(d),f=!0;(s=new IntersectionObserver(function(e){let t=e[0].intersectionRatio;if(t!==l){if(!f)return a();t?a(!1,t):i=setTimeout(()=>{a(!1,1e-7)},1e3)}f=!1},{rootMargin:`${-p}px ${-_}px ${-v}px ${-m}px`,threshold:Math.max(0,Math.min(1,l))||1})).observe(e)}(!0),n}(this.positionTarget,()=>{this._updatePosition()}))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0)}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__updatePositionSettings(e,t){if(this.__removeUpdatePositionEventListeners(),t&&(t.__overlay=null,i4.unobserve(t),e&&(this.__addUpdatePositionEventListeners(),t.__overlay=this,i4.observe(t))),e){let e=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(t=>{this.__margins[t]=parseInt(e[t],10)})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition())}}__onScroll(e){e.target instanceof Node&&this._deepContains(e.target)||this._updatePosition()}__resetPosition(){this.__margins=null,Object.assign(this.style,{justifyContent:"",alignItems:"",top:"",bottom:"",left:"",right:""}),i1(this,"bottom-aligned",!1),i1(this,"top-aligned",!1),i1(this,"end-aligned",!1),i1(this,"start-aligned",!1)}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;let e=this.positionTarget.getBoundingClientRect();if(0===e.width&&0===e.height&&this.opened){this.opened=!1;return}let t=this.__shouldAlignStartVertically(e);this.style.justifyContent=t?"flex-start":"flex-end";let i=this.__isRTL,s=this.__shouldAlignStartHorizontally(e,i),r=!i&&s||i&&!s;this.style.alignItems=r?"flex-start":"flex-end";let n=this.getBoundingClientRect(),a=this.__calculatePositionInOneDimension(e,n,this.noVerticalOverlap,i3,this,t),o=this.__calculatePositionInOneDimension(e,n,this.noHorizontalOverlap,i5,this,s);Object.assign(this.style,a,o),i1(this,"bottom-aligned",!t),i1(this,"top-aligned",t),i1(this,"end-aligned",!r),i1(this,"start-aligned",r)}__shouldAlignStartHorizontally(e,t){let i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;let s=Math.min(window.innerWidth,document.documentElement.clientWidth),r=!t&&"start"===this.horizontalAlign||t&&"end"===this.horizontalAlign;return this.__shouldAlignStart(e,i,s,this.__margins,r,this.noHorizontalOverlap,i5)}__shouldAlignStartVertically(e){let t=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;let i=Math.min(window.innerHeight,document.documentElement.clientHeight),s="top"===this.verticalAlign;return this.__shouldAlignStart(e,t,i,this.__margins,s,this.noVerticalOverlap,i3)}__shouldAlignStart(e,t,i,s,r,n,a){let o=i-e[n?a.end:a.start]-s[a.end],l=e[n?a.start:a.end]-s[a.start],d=r?o:l;return r===(d>(r?l:o)||d>t)}__adjustBottomProperty(e,t,i){let s;if(e===t.end){if(t.end===i3.end){let e=Math.min(window.innerHeight,document.documentElement.clientHeight);i>e&&this.__oldViewportHeight&&(s=i-(this.__oldViewportHeight-e)),this.__oldViewportHeight=e}if(t.end===i5.end){let e=Math.min(window.innerWidth,document.documentElement.clientWidth);i>e&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-e)),this.__oldViewportWidth=e}}return s}__calculatePositionInOneDimension(e,t,i,s,r,n){let a=n?s.start:s.end,o=n?s.end:s.start,l=parseFloat(r.style[a]||getComputedStyle(r)[a]),d=this.__adjustBottomProperty(a,s,l),h=t[n?s.start:s.end]-e[i===n?s.end:s.start];return{[a]:d?`${d}px`:`${l+h*(n?-1:1)}px`,[o]:""}}},i6=e=>class extends i8(i2(e)){_shouldCloseOnOutsideClick(e){return!e.composedPath().includes(this.positionTarget)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!t3(e.composedPath()[0])&&e.preventDefault()}};class i7 extends i6(eK(ty(e8(tv(ek))))){static get is(){return"vaadin-date-picker-overlay"}static get styles(){return[iz,iF]}render(){return en`
975
+ `;/Android/u.test(navigator.userAgent),/Chrome/u.test(navigator.userAgent)&&/Google Inc/u.test(navigator.vendor),/Firefox/u.test(navigator.userAgent);let iH=/^iPad/u.test(navigator.platform)||/^Mac/u.test(navigator.platform)&&navigator.maxTouchPoints>1,ij=/^iPhone/u.test(navigator.platform)||iH,iY=/^((?!chrome|android).)*safari/iu.test(navigator.userAgent),iq=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})();class iW{saveFocus(e){this.focusNode=e||t1()}restoreFocus(e){let t=this.focusNode;if(!t)return;let i={preventScroll:!!e&&e.preventScroll,focusVisible:!!e&&e.focusVisible};t1()===document.body?setTimeout(()=>t.focus(i)):t.focus(i),this.focusNode=null}}let iK=[];class iG{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){var e;let t;return e=this.__trapNode,!function e(t,i){if(t.nodeType!==Node.ELEMENT_NODE||t2(t))return!1;let s=t5(t)?Number(t.getAttribute("tabindex")||0):-1,r=s>0;s>=0&&i.push(t);return[..."slot"===t.localName?t.assignedNodes({flatten:!0}):(t.shadowRoot||t).children].forEach(t=>{r=e(t,i)||r}),r}(e,t=[])?t:function e(t){let i=t.length;if(i<2)return t;let s=Math.ceil(i/2),r=e(t.slice(0,s)),n=e(t.slice(s)),a=[];for(;r.length>0&&n.length>0;)!function(e,t){let i=Math.max(e.tabIndex,0),s=Math.max(t.tabIndex,0);return 0===i||0===s?s>i:i>s}(r[0],n[0])?a.push(r.shift()):a.push(n.shift());return a.concat(r,n)}(t)}get __focusedElementIndex(){let e=this.__focusableElements;return e.indexOf(e.filter(t4).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(e){if(this.__trapNode=e,0===this.__focusableElements.length)throw this.__trapNode=null,Error("The trap node should have at least one focusable descendant or be focusable itself.");iK.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus({focusVisible:t0})}releaseFocus(){this.__trapNode=null,iK.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(iK).pop()&&"Tab"===e.key){if(e.defaultPrevented)return;e.preventDefault();let t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){let t=this.__focusableElements,i=this.__focusedElementIndex,s=(t.length+i+(e?-1:1))%t.length,r=t[s];r.focus({focusVisible:!0}),"input"===r.localName&&r.select()}}let iX=e=>class extends e{static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__focusTrapController=new iG(this),this.__focusRestorationController=new iW}get _contentRoot(){return this}ready(){super.ready(),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}get _focusTrapRoot(){return this.$.overlay}_resetFocus(){if(this.focusTrap&&this.__focusTrapController.releaseFocus(),this.restoreFocusOnClose&&this._shouldRestoreFocus()){let e=t0;this.__focusRestorationController.restoreFocus({preventScroll:!e,focusVisible:e})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&!t3(this._focusTrapRoot)&&this.__focusTrapController.trapFocus(this._focusTrapRoot)}_shouldRestoreFocus(){let e=t1();return e===document.body||this._deepContains(e)}_deepContains(e){if(this._contentRoot.contains(e))return!0;let t=e,i=e.ownerDocument;for(;t&&t!==i&&t!==this._contentRoot;)t=t.parentNode||t.host;return t===this._contentRoot}},iZ=new Set,iQ=()=>[...iZ].filter(e=>!e.hasAttribute("closing")),iJ=e=>{let t=iQ(),i=t[t.indexOf(e)+1];return!i||!!e._deepContains(i)&&iJ(i)},i0=(e,t=e=>!0)=>e===iQ().filter(t).pop(),i1=e=>class extends e{get _last(){return i0(this)}get _isAttached(){return iZ.has(this)}bringToFront(){i0(this)||iJ(this)||(this.matches(":popover-open")&&(this.hidePopover(),this.showPopover()),this._removeAttachedInstance(),this._appendAttachedInstance())}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),iQ().forEach(e=>{e!==this&&(e.$.overlay.style.pointerEvents="none")})}_exitModalState(){let e;void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);let t=iQ();for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}_appendAttachedInstance(){iZ.add(this)}_removeAttachedInstance(){this._isAttached&&iZ.delete(this)}};function i2(e,t,i){let s=[e];e.owner&&s.push(e.owner),"string"==typeof i?s.forEach(e=>{e.setAttribute(t,i)}):i?s.forEach(e=>{e.setAttribute(t,"")}):s.forEach(e=>{e.removeAttribute(t)})}let i3=e=>class extends iX(i1(e)){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},owner:{type:Object,sync:!0},model:{type:Object,sync:!0},renderer:{type:Object,sync:!0},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged",sync:!0},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged",sync:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_withBackdropChanged",sync:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}get _rendererRoot(){return this}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),ij&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}firstUpdated(){super.firstUpdated(),this.popover="manual",this.addEventListener("click",()=>{}),this.$.backdrop&&this.$.backdrop.addEventListener("click",()=>{}),this.addEventListener("mouseup",()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}),this.addEventListener("animationcancel",()=>{this._flushAnimation("opening"),this._flushAnimation("closing")})}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener)),this.opened&&this._attachOverlay()}disconnectedCallback(){super.disconnectedCallback(),this.__scheduledOpen&&(cancelAnimationFrame(this.__scheduledOpen),this.__scheduledOpen=null),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this._rendererRoot,this.owner,this.model)}close(e){let t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{overlay:this,sourceEvent:e}});this.dispatchEvent(t),document.body.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}setBounds(e,t=!0){let i=this.$.overlay,s={...e};t&&"absolute"!==i.style.position&&(i.style.position="absolute"),Object.keys(s).forEach(e=>{null===s[e]||isNaN(s[e])||(s[e]=`${s[e]}px`)}),Object.assign(i.style,s)}_detectIosNavbar(){if(!this.opened)return;let e=window.innerHeight,t=window.innerWidth,i=document.documentElement.clientHeight;t>e&&i>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${i-e}px`):this.style.setProperty("--vaadin-overlay-viewport-bottom","0px")}_shouldAddGlobalListeners(){return!this.modeless}_addGlobalListeners(){this.__hasGlobalListeners||(this.__hasGlobalListeners=!0,document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0))}_removeGlobalListeners(){this.__hasGlobalListeners&&(this.__hasGlobalListeners=!1,document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0))}_rendererOrDataChanged(e,t,i,s){let r=this._oldOwner!==t||this._oldModel!==i;this._oldModel=i,this._oldOwner=t;let n=this._oldRenderer!==e,a=void 0!==this._oldRenderer;this._oldRenderer=e;let o=this._oldOpened!==s;this._oldOpened=s,n&&a&&(this._rendererRoot.innerHTML="",delete this._rendererRoot._$litPart$),s&&e&&(n||o||r)&&this.requestContentUpdate()}_modelessChanged(e){this.opened&&(this._shouldAddGlobalListeners()?this._addGlobalListeners():this._removeGlobalListeners()),e?this._exitModalState():this.opened&&this._enterModalState(),i2(this,"modeless",e)}_withBackdropChanged(e){i2(this,"with-backdrop",e)}_openedChanged(e,t){if(e){if(!this.isConnected){this.opened=!1;return}this._saveFocus(),this._animatedOpening(),this.__scheduledOpen=requestAnimationFrame(()=>{setTimeout(()=>{this._trapFocus();let e=new CustomEvent("vaadin-overlay-open",{detail:{overlay:this},bubbles:!0});this.dispatchEvent(e),document.body.dispatchEvent(e)})}),document.addEventListener("keydown",this._boundKeydownListener),this._shouldAddGlobalListeners()&&this._addGlobalListeners()}else t&&(this.__scheduledOpen&&(cancelAnimationFrame(this.__scheduledOpen),this.__scheduledOpen=null),this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this._shouldAddGlobalListeners()&&this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){let e=getComputedStyle(this),t=e.getPropertyValue("animation-name");return"none"!==e.getPropertyValue("display")&&t&&"none"!==t}_enqueueAnimation(e,t){let i=`__${e}Handler`,s=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(e){let t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this._isAttached&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this._appendAttachedInstance(),this.bringToFront(),this.modeless||this._enterModalState(),i2(this,"opening",!0),this._shouldAnimate()?this._enqueueAnimation("opening",()=>{this._finishOpening()}):this._finishOpening()}_attachOverlay(){this.matches(":popover-open")||this.showPopover()}_finishOpening(){i2(this,"opening",!1)}_finishClosing(){this._detachOverlay(),this._removeAttachedInstance(),this.$.overlay.style.removeProperty("pointer-events"),i2(this,"closing",!1),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._isAttached&&(this._exitModalState(),i2(this,"closing",!0),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",()=>{this._finishClosing()}):this._finishClosing())}_detachOverlay(){this.hidePopover()}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(e))return;let t=new CustomEvent("vaadin-overlay-outside-click",{cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last&&!e.defaultPrevented&&(this._shouldAddGlobalListeners()||e.composedPath().includes(this._focusTrapRoot))&&"Escape"===e.key){let t=new CustomEvent("vaadin-overlay-escape-press",{cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}},i5={start:"top",end:"bottom"},i4={start:"left",end:"right"},i8=new ResizeObserver(e=>{setTimeout(()=>{e.forEach(e=>{e.target.__overlay&&e.target.__overlay._updatePosition()})})}),i6=e=>class extends e{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}}}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()}updated(e){if(super.updated(e),e.has("positionTarget")){let t=e.get("positionTarget");this.__oldContentWidth=void 0,this.__oldContentHeight=void 0,(!this.positionTarget&&t||this.positionTarget&&!t&&this.__margins)&&this.__resetPosition()}(e.has("opened")||e.has("positionTarget"))&&this.__updatePositionSettings(this.opened,this.positionTarget),["horizontalAlign","verticalAlign","noHorizontalOverlap","noVerticalOverlap","requiredVerticalSpace"].some(t=>e.has(t))&&this._updatePosition()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(e){let t=[];for(;e;){if(e.nodeType===Node.DOCUMENT_NODE){t.push(e);break}if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(e),e=e.host;continue}if(e.assignedSlot){e=e.assignedSlot;continue}e=e.parentNode}return t}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0)}),this.positionTarget&&(this.__observePositionTargetMove=function(e,t){let i,s=null,r=document.documentElement;function n(){i&&clearTimeout(i),s?.disconnect(),s=null}return!function a(o=!1,l=1){n();let{left:d,top:h,width:u,height:c}=e.getBoundingClientRect();if(o||t(),!u||!c)return;let p=Math.floor(h),_=Math.floor(r.clientWidth-(d+u)),v=Math.floor(r.clientHeight-(h+c)),m=Math.floor(d),f=!0;(s=new IntersectionObserver(function(e){let t=e[0].intersectionRatio;if(t!==l){if(!f)return a();t?a(!1,t):i=setTimeout(()=>{a(!1,1e-7)},1e3)}f=!1},{rootMargin:`${-p}px ${-_}px ${-v}px ${-m}px`,threshold:Math.max(0,Math.min(1,l))||1})).observe(e)}(!0),n}(this.positionTarget,()=>{this._updatePosition()}))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0)}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__updatePositionSettings(e,t){if(this.__removeUpdatePositionEventListeners(),t&&(t.__overlay=null,i8.unobserve(t),e&&(this.__addUpdatePositionEventListeners(),t.__overlay=this,i8.observe(t))),e){let e=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(t=>{this.__margins[t]=parseInt(e[t],10)})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition())}}__onScroll(e){e.target instanceof Node&&this._deepContains(e.target)||this._updatePosition()}__resetPosition(){this.__margins=null,Object.assign(this.style,{justifyContent:"",alignItems:"",top:"",bottom:"",left:"",right:""}),i2(this,"bottom-aligned",!1),i2(this,"top-aligned",!1),i2(this,"end-aligned",!1),i2(this,"start-aligned",!1)}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;let e=this.positionTarget.getBoundingClientRect();if(0===e.width&&0===e.height&&this.opened){this.opened=!1;return}let t=this.__shouldAlignStartVertically(e);this.style.justifyContent=t?"flex-start":"flex-end";let i=this.__isRTL,s=this.__shouldAlignStartHorizontally(e,i),r=!i&&s||i&&!s;this.style.alignItems=r?"flex-start":"flex-end";let n=this.getBoundingClientRect(),a=this.__calculatePositionInOneDimension(e,n,this.noVerticalOverlap,i5,this,t),o=this.__calculatePositionInOneDimension(e,n,this.noHorizontalOverlap,i4,this,s);Object.assign(this.style,a,o),i2(this,"bottom-aligned",!t),i2(this,"top-aligned",t),i2(this,"end-aligned",!r),i2(this,"start-aligned",r)}__shouldAlignStartHorizontally(e,t){let i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;let s=Math.min(window.innerWidth,document.documentElement.clientWidth),r=!t&&"start"===this.horizontalAlign||t&&"end"===this.horizontalAlign;return this.__shouldAlignStart(e,i,s,this.__margins,r,this.noHorizontalOverlap,i4)}__shouldAlignStartVertically(e){let t=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;let i=Math.min(window.innerHeight,document.documentElement.clientHeight),s="top"===this.verticalAlign;return this.__shouldAlignStart(e,t,i,this.__margins,s,this.noVerticalOverlap,i5)}__shouldAlignStart(e,t,i,s,r,n,a){let o=i-e[n?a.end:a.start]-s[a.end],l=e[n?a.start:a.end]-s[a.start],d=r?o:l;return r===(d>(r?l:o)||d>t)}__adjustBottomProperty(e,t,i){let s;if(e===t.end){if(t.end===i5.end){let e=Math.min(window.innerHeight,document.documentElement.clientHeight);i>e&&this.__oldViewportHeight&&(s=i-(this.__oldViewportHeight-e)),this.__oldViewportHeight=e}if(t.end===i4.end){let e=Math.min(window.innerWidth,document.documentElement.clientWidth);i>e&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-e)),this.__oldViewportWidth=e}}return s}__calculatePositionInOneDimension(e,t,i,s,r,n){let a=n?s.start:s.end,o=n?s.end:s.start,l=parseFloat(r.style[a]||getComputedStyle(r)[a]),d=this.__adjustBottomProperty(a,s,l),h=t[n?s.start:s.end]-e[i===n?s.end:s.start];return{[a]:d?`${d}px`:`${l+h*(n?-1:1)}px`,[o]:""}}},i7=e=>class extends i6(i3(e)){_shouldCloseOnOutsideClick(e){return!e.composedPath().includes(this.positionTarget)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!t5(e.composedPath()[0])&&e.preventDefault()}};class i9 extends i7(eK(tw(e8(tm(ek))))){static get is(){return"vaadin-date-picker-overlay"}static get styles(){return[iF,iU]}render(){return en`
968
976
  <div id="backdrop" part="backdrop" ?hidden="${!this.withBackdrop}"></div>
969
977
  <div part="overlay" id="overlay">
970
978
  <div part="content" id="content">
971
979
  <slot></slot>
972
980
  </div>
973
981
  </div>
974
- `}get _contentRoot(){return this.owner._overlayContent}}function i9(e){let t=new Date(e);return t.setHours(0,0,0,0),t}function se(e){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),0,0,0,0))}function st(e,t,i=i9){return e instanceof Date&&t instanceof Date&&i(e).getTime()===i(t).getTime()}function si(e){return{day:e.getDate(),month:e.getMonth(),year:e.getFullYear()}}function ss(e,t,i,s){let r=!1;return"function"==typeof s&&e&&(r=s(si(e))),(!t||e>=t)&&(!i||e<=i)&&!r}function sr(e,t){return t.filter(e=>void 0!==e).reduce((t,i)=>i?t?Math.abs(e.getTime()-i.getTime())<Math.abs(t.getTime()-e.getTime())?i:t:i:t)}function sn(e){let t=new Date,i=new Date(t);return i.setDate(1),i.setMonth(parseInt(e)+t.getMonth()),i}function sa(e){let t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(e);if(!t)return;let i=new Date(0,0);return i.setFullYear(parseInt(t[1],10)),i.setMonth(parseInt(t[2],10)-1),i.setDate(parseInt(t[3],10)),i}function so(e){let t=(e,t="00")=>(t+e).substr((t+e).length-t.length),i="",s="0000",r=e.year;return r<0?(r=-r,i="-",s="000000"):e.year>=1e4&&(i="+",s="000000"),[i+t(r,s),t(e.month+1),t(e.day)].join("-")}eI(i7);let sl=document.createElement("template");sl.innerHTML=`
982
+ `}get _contentRoot(){return this.owner._overlayContent}}function se(e){let t=new Date(e);return t.setHours(0,0,0,0),t}function st(e){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),0,0,0,0))}function si(e,t,i=se){return e instanceof Date&&t instanceof Date&&i(e).getTime()===i(t).getTime()}function ss(e){return{day:e.getDate(),month:e.getMonth(),year:e.getFullYear()}}function sr(e,t,i,s){let r=!1;return"function"==typeof s&&e&&(r=s(ss(e))),(!t||e>=t)&&(!i||e<=i)&&!r}function sn(e,t){return t.filter(e=>void 0!==e).reduce((t,i)=>i?t?Math.abs(e.getTime()-i.getTime())<Math.abs(t.getTime()-e.getTime())?i:t:i:t)}function sa(e){let t=new Date,i=new Date(t);return i.setDate(1),i.setMonth(parseInt(e)+t.getMonth()),i}function so(e){let t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(e);if(!t)return;let i=new Date(0,0);return i.setFullYear(parseInt(t[1],10)),i.setMonth(parseInt(t[2],10)-1),i.setDate(parseInt(t[3],10)),i}function sl(e){let t=(e,t="00")=>(t+e).substr((t+e).length-t.length),i="",s="0000",r=e.year;return r<0?(r=-r,i="-",s="000000"):e.year>=1e4&&(i="+",s="000000"),[i+t(r,s),t(e.month+1),t(e.day)].join("-")}eT(i9);let sd=document.createElement("template");sd.innerHTML=`
975
983
  <style>
976
984
  :host {
977
985
  display: block;
@@ -1005,7 +1013,7 @@
1005
1013
  <div class="buffer"></div>
1006
1014
  <div id="fullHeight"></div>
1007
1015
  </div>
1008
- `;class sd extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(sl.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(e){e&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){let e=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),t="background-position";this.$.fullHeight.style.setProperty(t,e);let i=getComputedStyle(this.$.fullHeight).getPropertyValue(t);this.$.fullHeight.style.removeProperty(t),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(e){this._preventScrollEvent=!0,e>this._firstIndex&&e<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(e-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~e,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=e%1*this.itemHeight,this._scrollDisabled=!1)}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach(e=>{this.$[e.id]=e}),this.$.scroller.addEventListener("scroll",()=>this._scroll()),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=`${2*this._initialScroll}px`)}disconnectedCallback(){this._debouncerScrollFinish&&this._debouncerScrollFinish.cancel(),this._debouncerUpdateClones&&this._debouncerUpdateClones.cancel(),this.__pendingFinishInit&&cancelAnimationFrame(this.__pendingFinishInit)}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel())}_createElement(){}_updateElement(e,t){}_finishInit(){this._initDone||(this._buffers.forEach(e=>{[...e.children].forEach(e=>{this._ensureStampedInstance(e._itemWrapper)})}),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(e){let t=+!!e;this._buffers[t].translateY=this._buffers[+!t].translateY+this._bufferHeight*(t?-1:1),this._buffers[t].style.transform=`translate3d(0, ${this._buffers[t].translateY}px, 0)`,this._buffers[t].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;let e=this.$.scroller.scrollTop;(e<this._bufferHeight||e>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());let t=this.itemHeight+this.bufferOffset,i=e>this._buffers[1].translateY+t,s=e<this._buffers[0].translateY+t;(i||s)&&(this._translateBuffer(s),this._updateClones()),this._preventScrollEvent||this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._preventScrollEvent=!1,this._debouncerScrollFinish=eH.debounce(this._debouncerScrollFinish,eN.after(200),()=>{let e=this.$.scroller.getBoundingClientRect();this._isVisible(this._buffers[0],e)||this._isVisible(this._buffers[1],e)||(this.position=this.position)})}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach(e=>{e.style.transform=`translate3d(0, ${e.translateY}px, 0)`}),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=eH.debounce(this._debouncerUpdateClones,eN.after(200),()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()}),this._scrollDisabled=!1}_createPool(){let e=this.innerHeight;this._buffers.forEach(t=>{for(let i=0;i<this.bufferSize;i++){let s=document.createElement("div");s.style.height=`${this.itemHeight}px`,s.instance={};let r=`vaadin-infinite-scroller-item-content-${tt++}`,n=document.createElement("slot");n.setAttribute("name",r),n._itemWrapper=s,t.appendChild(n),s.setAttribute("slot",r),this.appendChild(s),this.itemHeight*i<=e&&this._ensureStampedInstance(s)}}),this.__pendingFinishInit=requestAnimationFrame(()=>{this._finishInit(),this.__pendingFinishInit=null})}_ensureStampedInstance(e){if(e.firstElementChild)return;let t=e.instance;e.instance=this._createElement(),e.appendChild(e.instance),Object.keys(t).forEach(i=>{e.instance[i]=t[i]})}_updateClones(e){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;let t=e?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach((i,s)=>{if(!i.updated){let r=this._firstIndex+this.bufferSize*s;[...i.children].forEach((i,s)=>{let n=i._itemWrapper;(!e||this._isVisible(n,t))&&this._updateElement(n.instance,r+s)}),i.updated=!0}})}_isVisible(e,t){let i=e.getBoundingClientRect();return i.bottom>t.top&&i.top<t.bottom}}let sh=document.createElement("template");sh.innerHTML=`
1016
+ `;class sh extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(sd.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(e){e&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){let e=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),t="background-position";this.$.fullHeight.style.setProperty(t,e);let i=getComputedStyle(this.$.fullHeight).getPropertyValue(t);this.$.fullHeight.style.removeProperty(t),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(e){this._preventScrollEvent=!0,e>this._firstIndex&&e<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(e-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~e,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=e%1*this.itemHeight,this._scrollDisabled=!1)}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach(e=>{this.$[e.id]=e}),this.$.scroller.addEventListener("scroll",()=>this._scroll()),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=`${2*this._initialScroll}px`)}disconnectedCallback(){this._debouncerScrollFinish&&this._debouncerScrollFinish.cancel(),this._debouncerUpdateClones&&this._debouncerUpdateClones.cancel(),this.__pendingFinishInit&&cancelAnimationFrame(this.__pendingFinishInit)}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel())}_createElement(){}_updateElement(e,t){}_finishInit(){this._initDone||(this._buffers.forEach(e=>{[...e.children].forEach(e=>{this._ensureStampedInstance(e._itemWrapper)})}),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(e){let t=+!!e;this._buffers[t].translateY=this._buffers[+!t].translateY+this._bufferHeight*(t?-1:1),this._buffers[t].style.transform=`translate3d(0, ${this._buffers[t].translateY}px, 0)`,this._buffers[t].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;let e=this.$.scroller.scrollTop;(e<this._bufferHeight||e>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());let t=this.itemHeight+this.bufferOffset,i=e>this._buffers[1].translateY+t,s=e<this._buffers[0].translateY+t;(i||s)&&(this._translateBuffer(s),this._updateClones()),this._preventScrollEvent||this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._preventScrollEvent=!1,this._debouncerScrollFinish=eH.debounce(this._debouncerScrollFinish,eN.after(200),()=>{let e=this.$.scroller.getBoundingClientRect();this._isVisible(this._buffers[0],e)||this._isVisible(this._buffers[1],e)||(this.position=this.position)})}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach(e=>{e.style.transform=`translate3d(0, ${e.translateY}px, 0)`}),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=eH.debounce(this._debouncerUpdateClones,eN.after(200),()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()}),this._scrollDisabled=!1}_createPool(){let e=this.innerHeight;this._buffers.forEach(t=>{for(let i=0;i<this.bufferSize;i++){let s=document.createElement("div");s.style.height=`${this.itemHeight}px`,s.instance={};let r=`vaadin-infinite-scroller-item-content-${tt++}`,n=document.createElement("slot");n.setAttribute("name",r),n._itemWrapper=s,t.appendChild(n),s.setAttribute("slot",r),this.appendChild(s),this.itemHeight*i<=e&&this._ensureStampedInstance(s)}}),this.__pendingFinishInit=requestAnimationFrame(()=>{this._finishInit(),this.__pendingFinishInit=null})}_ensureStampedInstance(e){if(e.firstElementChild)return;let t=e.instance;e.instance=this._createElement(),e.appendChild(e.instance),Object.keys(t).forEach(i=>{e.instance[i]=t[i]})}_updateClones(e){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;let t=e?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach((i,s)=>{if(!i.updated){let r=this._firstIndex+this.bufferSize*s;[...i.children].forEach((i,s)=>{let n=i._itemWrapper;(!e||this._isVisible(n,t))&&this._updateElement(n.instance,r+s)}),i.updated=!0}})}_isVisible(e,t){let i=e.getBoundingClientRect();return i.bottom>t.top&&i.top<t.bottom}}let su=document.createElement("template");su.innerHTML=`
1009
1017
  <style>
1010
1018
  :host {
1011
1019
  --vaadin-infinite-scroller-item-height: 270px;
@@ -1013,7 +1021,7 @@
1013
1021
  height: auto;
1014
1022
  }
1015
1023
  </style>
1016
- `,eI(class extends sd{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(sh.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(e,t){e.month=sn(t)}});let su=document.createElement("template");su.innerHTML=`
1024
+ `,eT(class extends sh{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(su.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(e,t){e.month=sa(t)}});let sc=document.createElement("template");sc.innerHTML=`
1017
1025
  <style>
1018
1026
  :host {
1019
1027
  --vaadin-infinite-scroller-item-height: 80px;
@@ -1045,7 +1053,7 @@
1045
1053
  border-left-color: #000;
1046
1054
  }
1047
1055
  </style>
1048
- `,eI(class extends sd{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(su.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-date-picker-year")}_updateElement(e,t){e.year=this._yearAfterXYears(t)}_yearAfterXYears(e){let t=new Date,i=new Date(t);return i.setFullYear(parseInt(e)+t.getFullYear()),i.getFullYear()}});let sc=g`
1056
+ `,eT(class extends sh{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(sc.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-date-picker-year")}_updateElement(e,t){e.year=this._yearAfterXYears(t)}_yearAfterXYears(e){let t=new Date,i=new Date(t);return i.setFullYear(parseInt(e)+t.getFullYear()),i.getFullYear()}});let sp=g`
1049
1057
  :host {
1050
1058
  display: block;
1051
1059
  height: 100%;
@@ -1063,10 +1071,10 @@
1063
1071
  :host([current]) [part='year-number'] {
1064
1072
  color: var(--vaadin-date-picker-year-scroller-current-year-color, var(--vaadin-text-color));
1065
1073
  }
1066
- `;class sp extends ty(e8(tv(ek))){static get is(){return"vaadin-date-picker-year"}static get styles(){return sc}static get properties(){return{year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}render(){return en`
1074
+ `;class s_ extends tw(e8(tm(ek))){static get is(){return"vaadin-date-picker-year"}static get styles(){return sp}static get properties(){return{year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}render(){return en`
1067
1075
  <div part="year-number">${this.year}</div>
1068
1076
  <div part="year-separator" aria-hidden="true"></div>
1069
- `}updated(e){super.updated(e),e.has("year")&&this.toggleAttribute("current",this.year===new Date().getFullYear()),(e.has("year")||e.has("selectedDate"))&&this.toggleAttribute("selected",this.selectedDate&&this.selectedDate.getFullYear()===this.year)}}eI(sp);let s_=g`
1077
+ `}updated(e){super.updated(e),e.has("year")&&this.toggleAttribute("current",this.year===new Date().getFullYear()),(e.has("year")||e.has("selectedDate"))&&this.toggleAttribute("selected",this.selectedDate&&this.selectedDate.getFullYear()===this.year)}}eT(s_);let sv=g`
1070
1078
  :host {
1071
1079
  display: block;
1072
1080
  padding: var(--vaadin-date-picker-month-padding, var(--vaadin-padding-s));
@@ -1076,20 +1084,20 @@
1076
1084
  color: var(--vaadin-date-picker-month-header-color, var(--vaadin-text-color));
1077
1085
  font-size: var(--vaadin-date-picker-month-header-font-size, 0.9375rem);
1078
1086
  font-weight: var(--vaadin-date-picker-month-header-font-weight, 500);
1079
- line-height: inherit;
1087
+ line-height: 1;
1080
1088
  margin-bottom: 0.75rem;
1081
1089
  text-align: center;
1082
1090
  }
1083
1091
 
1084
1092
  table {
1085
- border-collapse: collapse;
1086
- display: flex;
1087
- flex-direction: column;
1093
+ display: grid;
1094
+ grid-template-columns: repeat(7, 1fr);
1088
1095
  }
1089
1096
 
1097
+ thead,
1098
+ tbody,
1090
1099
  tr {
1091
- display: flex;
1092
- flex-wrap: wrap;
1100
+ display: contents;
1093
1101
  }
1094
1102
 
1095
1103
  [part~='weekday'] {
@@ -1097,7 +1105,6 @@
1097
1105
  font-size: var(--vaadin-date-picker-weekday-font-size, 0.75rem);
1098
1106
  font-weight: var(--vaadin-date-picker-weekday-font-weight, 500);
1099
1107
  margin-bottom: 0.375rem;
1100
- width: var(--vaadin-date-picker-date-width, 2rem);
1101
1108
  }
1102
1109
 
1103
1110
  /* Week numbers are on a separate row, don't reserve space on weekday row. */
@@ -1106,10 +1113,10 @@
1106
1113
  }
1107
1114
 
1108
1115
  [part~='week-number'] {
1116
+ grid-column: -1 / 1;
1109
1117
  color: var(--vaadin-date-picker-week-number-color, var(--vaadin-text-color-secondary));
1110
1118
  font-size: var(--vaadin-date-picker-week-number-font-size, 0.7rem);
1111
1119
  line-height: 1;
1112
- width: 100%;
1113
1120
  margin-top: 0.125em;
1114
1121
  margin-bottom: 0.125em;
1115
1122
  gap: 0.25em;
@@ -1137,22 +1144,25 @@
1137
1144
  [part~='date'] {
1138
1145
  border-radius: var(--vaadin-date-picker-date-border-radius, var(--vaadin-radius-m));
1139
1146
  position: relative;
1140
- width: var(--vaadin-date-picker-date-width, 2rem);
1141
1147
  height: var(--vaadin-date-picker-date-height, 2rem);
1142
1148
  cursor: var(--vaadin-clickable-cursor);
1143
1149
  outline: none;
1144
1150
  }
1145
1151
 
1152
+ [part~='date']:empty {
1153
+ pointer-events: none !important;
1154
+ }
1155
+
1146
1156
  [part~='date']::after {
1147
1157
  border-radius: inherit;
1148
1158
  content: '';
1149
1159
  position: absolute;
1150
1160
  z-index: -1;
1151
- height: inherit;
1161
+ height: min(2em, 100%);
1152
1162
  aspect-ratio: 1;
1153
1163
  }
1154
1164
 
1155
- :where([part~='date']:focus)::after {
1165
+ :where([part~='date']:focus-visible)::after {
1156
1166
  outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
1157
1167
  outline-offset: calc(var(--vaadin-focus-ring-width) * -1);
1158
1168
  }
@@ -1200,7 +1210,7 @@
1200
1210
  color: GrayText !important;
1201
1211
  }
1202
1212
  }
1203
- `,sv=e=>class extends t4(e){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},enteredDate:{type:Date},disabled:{type:Boolean,reflectToAttribute:!0,computed:"__computeDisabled(month, minDate, maxDate)"},_days:{type:Array,computed:"__computeDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"__computeWeeks(_days)"},_notTapping:{type:Boolean},__hasFocus:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)","_showWeekNumbersChanged(showWeekNumbers, i18n)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find(e=>st(e.date,this.focusedDate))}ready(){super.ready(),tU(this.$.monthGrid,"tap",this._handleTap.bind(this))}_setFocused(e){super._setFocused(e),this.__hasFocus=e}__computeDisabled(e,t,i){let s=new Date(0,0);s.setFullYear(e.getFullYear()),s.setMonth(e.getMonth()),s.setDate(1);let r=new Date(0,0);return r.setFullYear(e.getFullYear()),r.setMonth(e.getMonth()+1),r.setDate(0),!(t&&i&&t.getMonth()===i.getMonth()&&t.getMonth()===e.getMonth()&&i.getDate()-t.getDate()>=0)&&!ss(s,t,i)&&!ss(r,t,i)}_getTitle(e,t){if(void 0!==e&&void 0!==t)return t.formatTitle(t.monthNames[e.getMonth()],e.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0},300)}_dateAdd(e,t){e.setDate(e.getDate()+t)}_applyFirstDayOfWeek(e,t){if(void 0!==e&&void 0!==t)return e.slice(t).concat(e.slice(0,t))}__computeWeekDayNames(e,t){if(void 0===e||void 0===t)return[];let{weekdays:i,weekdaysShort:s,firstDayOfWeek:r}=e,n=this._applyFirstDayOfWeek(s,r);return this._applyFirstDayOfWeek(i,r).map((e,t)=>({weekDay:e,weekDayShort:n[t]})).slice(0,7)}__focusedDateChanged(e,t){Array.isArray(t)&&t.some(t=>st(t,e))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(e){return e?e.getDate():""}__computeShowWeekSeparator(e,t){return e&&t&&1===t.firstDayOfWeek}_isToday(e){return st(new Date,e)}__computeDays(e,t){if(void 0===e||void 0===t)return[];let i=new Date(0,0);for(i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(1);i.getDay()!==t.firstDayOfWeek;)this._dateAdd(i,-1);let s=[],r=i.getMonth(),n=e.getMonth();for(;i.getMonth()===n||i.getMonth()===r;)s.push(i.getMonth()===n?new Date(i.getTime()):null),this._dateAdd(i,1);return s}__computeWeeks(e){return e.reduce((e,t,i)=>(i%7==0&&e.push([]),e[e.length-1].push(t),e),[])}_handleTap(e){this.ignoreTaps||this._notTapping||!e.target.date||e.target.hasAttribute("disabled")||(this.selectedDate=e.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:e.target.date},bubbles:!0,composed:!0})))}_preventDefault(e){e.preventDefault()}__computeWeekNumber(e){var t;let i,s,r,n;return 0===(i=(t=e.reduce((e,t)=>!e&&t?t:e)).getDay())&&(i=7),s=4-i,r=new Date(t.getTime()+24*s*36e5),(n=new Date(0,0)).setFullYear(r.getFullYear()),Math.floor(Math.round((r.getTime()-n.getTime())/864e5)/7+1)}__computeDayAriaLabel(e){if(!e)return"";let t=`${this._getDate(e)} ${this.i18n.monthNames[e.getMonth()]} ${e.getFullYear()}, ${this.i18n.weekdays[e.getDay()]}`;return this._isToday(e)&&(t+=`, ${this.i18n.today}`),t}_showWeekNumbersChanged(e,t){this.__computeShowWeekSeparator(e,t)?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__computeDatePart(e,t,i,s,r,n,a,o){let l=["date"];return this.__isDayDisabled(e,s,r,n)&&l.push("disabled"),st(e,t)&&(o||st(e,a))&&l.push("focused"),this.__isDaySelected(e,i)&&l.push("selected"),this._isToday(e)&&l.push("today"),e<i9(new Date)&&l.push("past"),e>i9(new Date)&&l.push("future"),l.join(" ")}__isDaySelected(e,t){return st(e,t)}__computeDayAriaSelected(e,t){return String(this.__isDaySelected(e,t))}__isDayDisabled(e,t,i,s){return!ss(e,t,i,s)}__computeDayAriaDisabled(e,t,i,s){return void 0===e||void 0===t&&void 0===i&&void 0===s?"false":String(this.__isDayDisabled(e,t,i,s))}__computeDayTabIndex(e,t){return st(e,t)?"0":"-1"}};class sm extends sv(ty(e8(tv(ek)))){static get is(){return"vaadin-month-calendar"}static get styles(){return s_}render(){let e=this.__computeWeekDayNames(this.i18n,this.showWeekNumbers),t=this._weeks,i=!this.__computeShowWeekSeparator(this.showWeekNumbers,this.i18n);return en`
1213
+ `,sm=e=>class extends t8(e){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},enteredDate:{type:Date},disabled:{type:Boolean,reflectToAttribute:!0,computed:"__computeDisabled(month, minDate, maxDate)"},_days:{type:Array,computed:"__computeDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"__computeWeeks(_days)"},_notTapping:{type:Boolean},__hasFocus:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)","_showWeekNumbersChanged(showWeekNumbers, i18n)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find(e=>si(e.date,this.focusedDate))}ready(){super.ready(),tH(this.$.monthGrid,"tap",this._handleTap.bind(this))}_setFocused(e){super._setFocused(e),this.__hasFocus=e}__computeDisabled(e,t,i){let s=new Date(0,0);s.setFullYear(e.getFullYear()),s.setMonth(e.getMonth()),s.setDate(1);let r=new Date(0,0);return r.setFullYear(e.getFullYear()),r.setMonth(e.getMonth()+1),r.setDate(0),!(t&&i&&t.getMonth()===i.getMonth()&&t.getMonth()===e.getMonth()&&i.getDate()-t.getDate()>=0)&&!sr(s,t,i)&&!sr(r,t,i)}_getTitle(e,t){if(void 0!==e&&void 0!==t)return t.formatTitle(t.monthNames[e.getMonth()],e.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0},300)}_dateAdd(e,t){e.setDate(e.getDate()+t)}_applyFirstDayOfWeek(e,t){if(void 0!==e&&void 0!==t)return e.slice(t).concat(e.slice(0,t))}__computeWeekDayNames(e,t){if(void 0===e||void 0===t)return[];let{weekdays:i,weekdaysShort:s,firstDayOfWeek:r}=e,n=this._applyFirstDayOfWeek(s,r);return this._applyFirstDayOfWeek(i,r).map((e,t)=>({weekDay:e,weekDayShort:n[t]})).slice(0,7)}__focusedDateChanged(e,t){Array.isArray(t)&&t.some(t=>si(t,e))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(e){return e?e.getDate():""}__computeShowWeekSeparator(e,t){return e&&t?.firstDayOfWeek===1}_isToday(e){return si(new Date,e)}__computeDays(e,t){if(void 0===e||void 0===t)return[];let i=new Date(0,0);for(i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(1);i.getDay()!==t.firstDayOfWeek;)this._dateAdd(i,-1);let s=[],r=i.getMonth(),n=e.getMonth();for(;i.getMonth()===n||i.getMonth()===r;)s.push(i.getMonth()===n?new Date(i.getTime()):null),this._dateAdd(i,1);return s}__computeWeeks(e){return e.reduce((e,t,i)=>(i%7==0&&e.push([]),e[e.length-1].push(t),e),[])}_handleTap(e){this.ignoreTaps||this._notTapping||!e.target.date||e.target.hasAttribute("disabled")||(this.selectedDate=e.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:e.target.date},bubbles:!0,composed:!0})))}_preventDefault(e){e.preventDefault()}__computeWeekNumber(e){var t;let i,s,r,n;return 0===(i=(t=e.reduce((e,t)=>!e&&t?t:e)).getDay())&&(i=7),s=4-i,r=new Date(t.getTime()+24*s*36e5),(n=new Date(0,0)).setFullYear(r.getFullYear()),Math.floor(Math.round((r.getTime()-n.getTime())/864e5)/7+1)}__computeDayAriaLabel(e){if(!e)return"";let t=`${this._getDate(e)} ${this.i18n.monthNames[e.getMonth()]} ${e.getFullYear()}, ${this.i18n.weekdays[e.getDay()]}`;return this._isToday(e)&&(t+=`, ${this.i18n.today}`),t}_showWeekNumbersChanged(e,t){this.__computeShowWeekSeparator(e,t)?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__computeDatePart(e,t,i,s,r,n,a,o){let l=["date"];return this.__isDayDisabled(e,s,r,n)&&l.push("disabled"),si(e,t)&&(o||si(e,a))&&l.push("focused"),this.__isDaySelected(e,i)&&l.push("selected"),this._isToday(e)&&l.push("today"),e<se(new Date)&&l.push("past"),e>se(new Date)&&l.push("future"),l.join(" ")}__isDaySelected(e,t){return si(e,t)}__computeDayAriaSelected(e,t){return String(this.__isDaySelected(e,t))}__isDayDisabled(e,t,i,s){return!sr(e,t,i,s)}__computeDayAriaDisabled(e,t,i,s){return void 0===e||void 0===t&&void 0===i&&void 0===s?"false":String(this.__isDayDisabled(e,t,i,s))}__computeDayTabIndex(e,t){return si(e,t)?"0":"-1"}};class sf extends sm(tw(e8(tm(ek)))){static get is(){return"vaadin-month-calendar"}static get styles(){return sv}render(){let e=this.__computeWeekDayNames(this.i18n,this.showWeekNumbers),t=this._weeks,i=!this.__computeShowWeekSeparator(this.showWeekNumbers,this.i18n);return en`
1204
1214
  <div part="month-header" id="month-header" aria-hidden="true">${this._getTitle(this.month,this.i18n)}</div>
1205
1215
  <table
1206
1216
  id="monthGrid"
@@ -1242,7 +1252,7 @@
1242
1252
  `)}
1243
1253
  </tbody>
1244
1254
  </table>
1245
- `}}eI(sm);let sf=g`
1255
+ `}}eT(sf);let sg=g`
1246
1256
  :host {
1247
1257
  display: grid;
1248
1258
  grid-template-areas:
@@ -1286,13 +1296,18 @@
1286
1296
  }
1287
1297
 
1288
1298
  ::slotted([slot='months']) {
1289
- --vaadin-infinite-scroller-item-height: calc(
1290
- 16.5rem + var(--_vaadin-date-picker-week-numbers-visible, 0) *
1291
- (var(--vaadin-date-picker-week-number-font-size, 0.7rem) * 1.25 * 6)
1299
+ --vaadin-infinite-scroller-item-height: round(
1300
+ var(--vaadin-date-picker-month-header-font-size, 0.9375rem) + 0.75rem +
1301
+ var(--vaadin-date-picker-date-height, 2rem) * 7 + var(--_vaadin-date-picker-week-numbers-visible, 0) *
1302
+ (
1303
+ var(--vaadin-date-picker-week-number-font-size, 0.7rem) * 6.25 +
1304
+ var(--vaadin-date-picker-month-padding, var(--vaadin-padding-s)) * 3
1305
+ ),
1306
+ 1px
1292
1307
  );
1293
1308
  }
1294
1309
 
1295
- :host([desktop]) ::slotted([slot='months']) {
1310
+ :host(:not([fullscreen])) ::slotted([slot='months']) {
1296
1311
  border-bottom: 1px solid var(--vaadin-border-color-secondary);
1297
1312
  }
1298
1313
 
@@ -1341,7 +1356,7 @@
1341
1356
  grid-area: header;
1342
1357
  border-bottom: 1px solid var(--vaadin-border-color-secondary);
1343
1358
  }
1344
- `;class sg{constructor(e,t){this.query=e,this.callback=t,this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler)}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null}_queryHandler(e){"function"==typeof this.callback&&this.callback(e.matches)}}let sb=e=>class extends e{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)"},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(e=>e.focusableDateElement).find(Boolean)}_initControllers(){this.addController(new sg(this._desktopMediaQuery,e=>{this._desktopMode=e})),this.addController(new ti(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",e=>this.__onTodayButtonKeyDown(e)),e.addEventListener("click",this._onTodayTap.bind(this)),this._todayButton=e}})),this.addController(new ti(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",e=>this.__onCancelButtonKeyDown(e)),e.addEventListener("click",this._cancel.bind(this)),this._cancelButton=e}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller()}focusCancel(){this._cancelButton.focus()}scrollToDate(e,t){let i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+i,t),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new ti(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:e=>{e.addEventListener("custom-scroll",()=>{this._onMonthScroll()}),e.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart()}),e.addEventListener("keydown",e=>{this.__onMonthCalendarKeyDown(e)}),e.addEventListener("init-done",()=>{let e=[...this.querySelectorAll("vaadin-month-calendar")];e.forEach(e=>{e.addEventListener("selected-date-changed",e=>{this.selectedDate=e.detail.value})}),this.calendars=e}),this._monthScroller=e}}))}__initYearScroller(){this.addController(new ti(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),tU(e,"tap",e=>{this._onYearTap(e)}),e.addEventListener("custom-scroll",()=>{this._onYearScroll()}),e.addEventListener("touchstart",()=>{this._onYearScrollTouchStart()}),e.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]}),this._yearScroller=e}}))}__updateCancelButton(e,t){e&&(e.textContent=t&&t.cancel)}__updateTodayButton(e,t,i,s,r){e&&(e.textContent=t&&t.today,e.disabled=!this._isTodayAllowed(i,s,r))}__updateCalendars(e,t,i,s,r,n,a,o,l,d,h){e&&e.length&&e.forEach(e=>{e.i18n=t,e.minDate=i,e.maxDate=s,e.isDateDisabled=d,e.focusedDate=n,e.selectedDate=r,e.showWeekNumbers=a,e.ignoreTaps=o,e.enteredDate=h,l?e.setAttribute("theme",l):e.removeAttribute("theme")})}__updateYears(e,t,i){e&&e.length&&e.forEach(e=>{e.selectedDate=t,i?e.setAttribute("theme",i):e.removeAttribute("theme")})}_selectDate(e){return!!this._dateAllowed(e)&&(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(e){this.toggleAttribute("desktop",e)}_focusedDateChanged(e){this.revealDate(e)}revealDate(e,t=!0){if(!e)return;let i=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){let s=this._calculateWeekScrollOffset(e);this._scrollToPosition(i+s,t);return}let s=this._monthScroller.position>i,r=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,n=this._monthScroller.position+r-1<i;s?this._scrollToPosition(i,t):n&&this._scrollToPosition(i-r+1,t)}_calculateWeekScrollOffset(e){let t=new Date(0,0);t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(1);let i=0;for(;t.getDate()<e.getDate();)t.setDate(t.getDate()+1),t.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(e){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(e)}_repositionYearScroller(){let e=this._monthScroller.position;this._visibleMonthIndex=Math.floor(e),this._yearScroller.position=(e+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=eH.debounce(this._debouncer,eN.after(300),()=>{this._ignoreTaps=!1})}_onTodayTap(){let e=this._getTodayMidnight();.001>Math.abs(this._monthScroller.position-this._differenceInMonths(e,this._originDate))?(this._selectDate(e),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){let t=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+12*t,!0)}}_scrollToPosition(e,t){let i;if(void 0!==this._targetPosition){this._targetPosition=e;return}if(!t){this._monthScroller.position=e,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=e,this._revealPromise=new Promise(e=>{i=e});let s=0,r=this._monthScroller.position,n=e=>{s||(s=e);let t=e-s;if(t<this.scrollDuration){var a,o;let e=(a=t,o=this._targetPosition-r,(a/=this.scrollDuration/2)<1?o/2*a*a+r:-o/2*((a-=1)*(a-2)-1)+r);this._monthScroller.position=e,window.requestAnimationFrame(n)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:r}})),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(n)}_toggleYearScroller(){this.toggleAttribute("years-visible")}_closeYearScroller(){this.removeAttribute("years-visible")}_yearAfterXMonths(e){return sn(e).getFullYear()}_differenceInMonths(e,t){return(e.getFullYear()-t.getFullYear())*12-t.getMonth()+e.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}__toggleDate(e){st(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e)}__onMonthCalendarKeyDown(e){let t=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),t=!0;break;case"ArrowUp":this._moveFocusByDays(-7),t=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),t=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),t=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),t=!0);break;case" ":this.__toggleDate(this.focusedDate),t=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),t=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),t=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),t=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),t=!0;break;case"Tab":this._onTabKeyDown(e,"calendar")}t&&(e.preventDefault(),e.stopPropagation())}_onTabKeyDown(e,t){switch(e.stopPropagation(),t){case"calendar":e.shiftKey&&(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":e.shiftKey&&(e.preventDefault(),this.focusDateElement());break;case"cancel":e.shiftKey||(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(e){"Tab"===e.key&&this._onTabKeyDown(e,"today")}__onCancelButtonKeyDown(e){"Tab"===e.key&&this._onTabKeyDown(e,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){let e=this.focusableDateElement;e&&st(e.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,e.focus())}}async focusDate(e,t){let i=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,t||(this._focusedMonthDate=i.getDate()),await this.focusDateElement(!1)}async focusDateElement(e=!0){this.__pendingDateFocus=this.focusedDate,this.calendars.length||await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(()=>{e()})})}),e&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(e){this.focusDate(sr(e,[this.minDate,this.maxDate]))}_focusAllowedDate(e,t,i){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,i):this._dateAllowed(this.focusedDate)?t>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(e,t){let i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+e),t&&i.setDate(this.focusedDate.getDate()+t),i}_moveFocusByDays(e){let t=this._getDateDiff(0,e);this._focusAllowedDate(t,e,!1)}_moveFocusByMonths(e){let t=this._getDateDiff(e),i=t.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),t.setDate(this._focusedMonthDate),t.getMonth()!==i&&t.setDate(0),this._focusAllowedDate(t,e,!0)}_moveFocusInsideMonth(e,t){let i=new Date(0,0);i.setFullYear(e.getFullYear()),"minDate"===t?(i.setMonth(e.getMonth()),i.setDate(1)):(i.setMonth(e.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(e)?this.focusDate(this[t]):this._focusClosestDate(e)}_dateAllowed(e,t=this.minDate,i=this.maxDate,s=this.isDateDisabled){return ss(e,t,i,s)}_isTodayAllowed(e,t,i){return this._dateAllowed(this._getTodayMidnight(),e,t,i)}_getTodayMidnight(){let e=new Date,t=new Date(0,0);return t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(e.getDate()),t}};class sy extends sb(ty(eK(e8(tv(ek))))){static get is(){return"vaadin-date-picker-overlay-content"}static get styles(){return sf}static get lumoInjector(){return{...super.lumoInjector,includeBaseStyles:!0}}render(){return en`
1359
+ `;class sb{constructor(e,t){this.query=e,this.callback=t,this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler)}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null}_queryHandler(e){"function"==typeof this.callback&&this.callback(e.matches)}}let sy=e=>class extends e{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)"},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(e=>e.focusableDateElement).find(Boolean)}_initControllers(){this.addController(new sb(this._desktopMediaQuery,e=>{this._desktopMode=e})),this.addController(new ti(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",e=>this.__onTodayButtonKeyDown(e)),e.addEventListener("click",this._onTodayTap.bind(this)),this._todayButton=e}})),this.addController(new ti(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",e=>this.__onCancelButtonKeyDown(e)),e.addEventListener("click",this._cancel.bind(this)),this._cancelButton=e}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller()}focusCancel(){this._cancelButton.focus()}scrollToDate(e,t){let i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+i,t),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new ti(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:e=>{e.addEventListener("custom-scroll",()=>{this._onMonthScroll()}),e.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart()}),e.addEventListener("keydown",e=>{this.__onMonthCalendarKeyDown(e)}),e.addEventListener("init-done",()=>{let e=[...this.querySelectorAll("vaadin-month-calendar")];e.forEach(e=>{e.addEventListener("selected-date-changed",e=>{this.selectedDate=e.detail.value})}),this.calendars=e}),this._monthScroller=e}}))}__initYearScroller(){this.addController(new ti(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),tH(e,"tap",e=>{this._onYearTap(e)}),e.addEventListener("custom-scroll",()=>{this._onYearScroll()}),e.addEventListener("touchstart",()=>{this._onYearScrollTouchStart()}),e.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]}),this._yearScroller=e}}))}__updateCancelButton(e,t){e&&(e.textContent=t?.cancel)}__updateTodayButton(e,t,i,s,r){e&&(e.textContent=t?.today,e.disabled=!this._isTodayAllowed(i,s,r))}__updateCalendars(e,t,i,s,r,n,a,o,l,d,h){e?.length&&e.forEach(e=>{e.i18n=t,e.minDate=i,e.maxDate=s,e.isDateDisabled=d,e.focusedDate=n,e.selectedDate=r,e.showWeekNumbers=a,e.ignoreTaps=o,e.enteredDate=h,l?e.setAttribute("theme",l):e.removeAttribute("theme")})}__updateYears(e,t,i){e?.length&&e.forEach(e=>{e.selectedDate=t,i?e.setAttribute("theme",i):e.removeAttribute("theme")})}_selectDate(e){return!!this._dateAllowed(e)&&(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(e){this.toggleAttribute("desktop",e)}_focusedDateChanged(e){this.revealDate(e)}revealDate(e,t=!0){if(!e)return;let i=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){let s=this._calculateWeekScrollOffset(e);this._scrollToPosition(i+s,t);return}let s=this._monthScroller.position>i,r=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,n=this._monthScroller.position+r-1<i;s?this._scrollToPosition(i,t):n&&this._scrollToPosition(i-r+1,t)}_calculateWeekScrollOffset(e){let t=new Date(0,0);t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(1);let i=0;for(;t.getDate()<e.getDate();)t.setDate(t.getDate()+1),t.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(e){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(e)}_repositionYearScroller(){let e=this._monthScroller.position;this._visibleMonthIndex=Math.floor(e),this._yearScroller.position=(e+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=eH.debounce(this._debouncer,eN.after(300),()=>{this._ignoreTaps=!1})}_onTodayTap(){let e=this._getTodayMidnight();.001>Math.abs(this._monthScroller.position-this._differenceInMonths(e,this._originDate))?(this._selectDate(e),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){let t=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+12*t,!0)}}_scrollToPosition(e,t){let i;if(void 0!==this._targetPosition){this._targetPosition=e;return}if(!t){this._monthScroller.position=e,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=e,this._revealPromise=new Promise(e=>{i=e});let s=0,r=this._monthScroller.position,n=e=>{s||(s=e);let t=e-s;if(t<this.scrollDuration){var a,o;let e=(a=t,o=this._targetPosition-r,(a/=this.scrollDuration/2)<1?o/2*a*a+r:-o/2*((a-=1)*(a-2)-1)+r);this._monthScroller.position=e,window.requestAnimationFrame(n)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:r}})),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(n)}_toggleYearScroller(){this.toggleAttribute("years-visible")}_closeYearScroller(){this.removeAttribute("years-visible")}_yearAfterXMonths(e){return sa(e).getFullYear()}_differenceInMonths(e,t){return(e.getFullYear()-t.getFullYear())*12-t.getMonth()+e.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}__toggleDate(e){si(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e)}__onMonthCalendarKeyDown(e){let t=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),t=!0;break;case"ArrowUp":this._moveFocusByDays(-7),t=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),t=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),t=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),t=!0);break;case" ":this.__toggleDate(this.focusedDate),t=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),t=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),t=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),t=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),t=!0;break;case"Tab":this._onTabKeyDown(e,"calendar")}t&&(e.preventDefault(),e.stopPropagation())}_onTabKeyDown(e,t){switch(e.stopPropagation(),t){case"calendar":e.shiftKey&&(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":e.shiftKey&&(e.preventDefault(),this.focusDateElement());break;case"cancel":e.shiftKey||(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(e){"Tab"===e.key&&this._onTabKeyDown(e,"today")}__onCancelButtonKeyDown(e){"Tab"===e.key&&this._onTabKeyDown(e,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){let e=this.focusableDateElement;e&&si(e.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,e.focus())}}async focusDate(e,t){let i=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,t||(this._focusedMonthDate=i.getDate()),await this.focusDateElement(!1)}async focusDateElement(e=!0){this.__pendingDateFocus=this.focusedDate,this.calendars.length||await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(()=>{e()})})}),e&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(e){this.focusDate(sn(e,[this.minDate,this.maxDate]))}_focusAllowedDate(e,t,i){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,i):this._dateAllowed(this.focusedDate)?t>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(e,t){let i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+e),t&&i.setDate(this.focusedDate.getDate()+t),i}_moveFocusByDays(e){let t=this._getDateDiff(0,e);this._focusAllowedDate(t,e,!1)}_moveFocusByMonths(e){let t=this._getDateDiff(e),i=t.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),t.setDate(this._focusedMonthDate),t.getMonth()!==i&&t.setDate(0),this._focusAllowedDate(t,e,!0)}_moveFocusInsideMonth(e,t){let i=new Date(0,0);i.setFullYear(e.getFullYear()),"minDate"===t?(i.setMonth(e.getMonth()),i.setDate(1)):(i.setMonth(e.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(e)?this.focusDate(this[t]):this._focusClosestDate(e)}_dateAllowed(e,t=this.minDate,i=this.maxDate,s=this.isDateDisabled){return sr(e,t,i,s)}_isTodayAllowed(e,t,i){return this._dateAllowed(this._getTodayMidnight(),e,t,i)}_getTodayMidnight(){let e=new Date,t=new Date(0,0);return t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(e.getDate()),t}};class sw extends sy(tw(eK(e8(tm(ek))))){static get is(){return"vaadin-date-picker-overlay-content"}static get styles(){return sg}static get lumoInjector(){return{...super.lumoInjector,includeBaseStyles:!0}}render(){return en`
1345
1360
  <slot name="months"></slot>
1346
1361
  <slot name="years"></slot>
1347
1362
 
@@ -1357,7 +1372,7 @@
1357
1372
  </div>
1358
1373
  <slot name="cancel-button"></slot>
1359
1374
  </div>
1360
- `}firstUpdated(){super.firstUpdated(),this.setAttribute("role","dialog"),this._initControllers()}}eI(sy);let sw=e=>class extends ih(tZ(e)){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",e=>this._onClearButtonMouseDown(e)),this.clearElement.addEventListener("click",e=>this._onClearButtonClick(e)))}_onClearButtonClick(e){e.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(e){this._shouldKeepFocusOnClearMousedown()&&e.preventDefault(),iY||this.inputElement.focus()}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}_shouldKeepFocusOnClearMousedown(){return t5(this.inputElement)}},sx=eQ(e=>class extends id(iT(ih(e))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map(e=>this[e]))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(e){return e.some(e=>this.__isValidConstraint(e))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(e,...t){if(!e)return;let i=this._hasValidConstraints(t),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this._requestValidation():s&&!this.manualValidation&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(e){e.stopPropagation(),this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}))}__isValidConstraint(e){return!!e||0===e}}),sC=e=>class extends il(ia(sx(iI(sw(tZ(e)))))){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(){let e=this.localName;return[`
1375
+ `}firstUpdated(){super.firstUpdated(),this.setAttribute("role","dialog"),this._initControllers()}}eT(sw);let sx=e=>class extends iu(tQ(e)){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",e=>this._onClearButtonMouseDown(e)),this.clearElement.addEventListener("click",e=>this._onClearButtonClick(e)))}_onClearButtonClick(e){e.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(e){this._shouldKeepFocusOnClearMousedown()&&e.preventDefault(),iq||this.inputElement.focus()}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}_shouldKeepFocusOnClearMousedown(){return t4(this.inputElement)}},sC=eQ(e=>class extends ih(iT(iu(e))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map(e=>this[e]))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(e){return e.some(e=>this.__isValidConstraint(e))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(e,...t){if(!e)return;let i=this._hasValidConstraints(t),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this._requestValidation():s&&!this.manualValidation&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(e){e.stopPropagation(),this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}))}__isValidConstraint(e){return!!e||0===e}}),sk=e=>class extends id(io(sC(iD(sx(tQ(e)))))){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(){let e=this.localName;return[`
1361
1376
  /* Needed for Safari, where ::slotted(...)::placeholder does not work */
1362
1377
  ${e} > :is(input[slot='input'], textarea[slot='textarea'])::placeholder {
1363
1378
  font: inherit;
@@ -1375,7 +1390,7 @@
1375
1390
  --vaadin-input-field-value-color: var(--vaadin-input-field-autofill-color, black) !important;
1376
1391
  --vaadin-input-field-button-text-color: var(--vaadin-input-field-autofill-color, black) !important;
1377
1392
  }
1378
- `]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select()}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=eH.debounce(this._preventInputDebouncer,eN.after(200),()=>{this.removeAttribute("input-prevented")})}__shouldAcceptKey(e){return e.metaKey||e.ctrlKey||!e.key||1!==e.key.length||this.__allowedCharRegExp.test(e.key)}_onPaste(e){if(this.allowedCharPattern){let t=e.clipboardData.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onDrop(e){if(this.allowedCharPattern){let t=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onBeforeInput(e){this.allowedCharPattern&&e.data&&!this.__allowedTextRegExp.test(e.data)&&(e.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(e){if(e)try{this.__allowedCharRegExp=RegExp(`^${e}$`,"u"),this.__allowedTextRegExp=RegExp(`^${e}*$`,"u")}catch(e){console.error(e)}}},sk=[ii,g`
1393
+ `]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select()}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=eH.debounce(this._preventInputDebouncer,eN.after(200),()=>{this.removeAttribute("input-prevented")})}__shouldAcceptKey(e){return e.metaKey||e.ctrlKey||!e.key||1!==e.key.length||this.__allowedCharRegExp.test(e.key)}_onPaste(e){if(this.allowedCharPattern){let t=e.clipboardData.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onDrop(e){if(this.allowedCharPattern){let t=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onBeforeInput(e){this.allowedCharPattern&&e.data&&!this.__allowedTextRegExp.test(e.data)&&(e.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(e){if(e)try{this.__allowedCharRegExp=RegExp(`^${e}$`,"u"),this.__allowedTextRegExp=RegExp(`^${e}*$`,"u")}catch(e){console.error(e)}}},sE=[is,g`
1379
1394
  [part$='button'] {
1380
1395
  color: var(--vaadin-input-field-button-text-color, var(--vaadin-text-color-secondary));
1381
1396
  cursor: var(--vaadin-clickable-cursor);
@@ -1426,7 +1441,7 @@
1426
1441
  background: GrayText;
1427
1442
  }
1428
1443
  }
1429
- `],sE=g`
1444
+ `],sI=g`
1430
1445
  :host([opened]) {
1431
1446
  pointer-events: auto;
1432
1447
  }
@@ -1451,7 +1466,7 @@
1451
1466
  :host([readonly]) [part~='toggle-button'] {
1452
1467
  display: none;
1453
1468
  }
1454
- `,sT=new WeakMap,sI=new WeakMap,sD={},sS=0,sA=e=>e&&e.nodeType===Node.ELEMENT_NODE,sO=(...e)=>{console.error(`Error: ${e.join(" ")}. Skip setting aria-hidden.`)};function sP(e,...t){let i=e=>e&&"object"==typeof e&&!Array.isArray(e),s=(e,t)=>{i(t)&&i(e)&&Object.keys(t).forEach(r=>{let n=t[r];i(n)?(e[r]||(e[r]={}),s(e[r],n)):Array.isArray(n)?e[r]=[...n]:null!=n&&(e[r]=n)})};return t.forEach(t=>{s(e,t)}),e}HTMLElement.prototype;let s$=(e,t)=>class extends t{static get properties(){return{i18n:{type:Object},__effectiveI18n:{type:Object,sync:!0}}}constructor(){super(),this.i18n=sP({},e)}get i18n(){return this.__customI18n}set i18n(t){t!==this.__customI18n&&(this.__customI18n=t,this.__effectiveI18n=sP({},e,this.__customI18n))}};class sL{constructor(e){this.host=e,e.addEventListener("opened-changed",()=>{e.opened||this.__setVirtualKeyboardEnabled(!1)}),e.addEventListener("blur",()=>this.__setVirtualKeyboardEnabled(!0)),e.addEventListener("touchstart",()=>this.__setVirtualKeyboardEnabled(!0))}__setVirtualKeyboardEnabled(e){this.host.inputElement&&(this.host.inputElement.inputMode=e?"":"none")}}let sM=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(e){let t=String(e.year).replace(/\d+/u,e=>"0000".substr(e.length)+e);return[e.month+1,e.day,t].join("/")},parseDate(e){let t=e.split("/"),i=new Date,s,r=i.getMonth(),n=i.getFullYear();if(3===t.length?(r=parseInt(t[0])-1,s=parseInt(t[1]),n=parseInt(t[2]),t[2].length<3&&n>=0&&(n=function(e,t,i=0,s=1){if(t>99)throw Error("The provided year cannot have more than 2 digits.");if(t<0)throw Error("The provided year cannot be negative.");let r=t+100*Math.floor(e.getFullYear()/100);return e<new Date(r-50,i,s)?r-=100:e>new Date(r+50,i,s)&&(r+=100),r}(this.referenceDate?sa(this.referenceDate):new Date,n,r,s))):2===t.length?(r=parseInt(t[0])-1,s=parseInt(t[1])):1===t.length&&(s=parseInt(t[0])),void 0!==s)return{day:s,month:r,year:n}},formatTitle:(e,t)=>`${e} ${t}`}),sR=e=>class extends s$(sM,ia(sx(tZ(e)))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:{type: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)"},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)"},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)"},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, __effectiveI18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:iH},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},__enteredDate:{type:Date,sync:!0}}}static get observers(){return["_selectedDateChanged(_selectedDate, __effectiveI18n)","_focusedDateChanged(_focusedDate, __effectiveI18n)","__updateOverlayContent(_overlayContent, __effectiveI18n, 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)}get i18n(){return super.i18n}set i18n(e){super.i18n=e}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(e){super._inputElementValue=e;let t=this.__parseDate(e);this.__setEnteredDate(t)}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(e){super._onFocus(e),this._noInput&&!tJ&&e.target.blur()}_onBlur(e){super._onBlur(e),!this.opened&&(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this._requestValidation())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new sg(this._fullscreenMediaQuery,e=>{this._fullscreen=e})),this.addController(new sL(this)),this._overlayElement=this.$.overlay}updated(e){super.updated(e),(e.has("showWeekNumbers")||e.has("__effectiveI18n"))&&this.toggleAttribute("week-numbers",this.showWeekNumbers&&1===this.__effectiveI18n.firstDayOfWeek)}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}focus(e){this._noInput&&!tJ?this.open():super.focus(e)}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.$.overlay.close()}__ensureContent(){if(this._overlayContent)return;let e=document.createElement("vaadin-date-picker-overlay-content");e.setAttribute("slot","overlay"),this.appendChild(e),this._overlayContent=e,e.addEventListener("close",()=>{this._close()}),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",e=>{this.__commitDate(e.detail.date),this._close()}),e.addEventListener("date-selected",e=>{this.__commitDate(e.detail.date)}),e.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0)}),e.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1)}),e.addEventListener("focused-date-changed",e=>{this._focusedDate=e.detail.value}),e.addEventListener("click",e=>e.stopPropagation())}__parseDate(e){if(!this.__effectiveI18n.parseDate)return;let t=this.__effectiveI18n.parseDate(e);if(t&&(t=sa(`${t.year}-${t.month+1}-${t.day}`)),t&&!isNaN(t.getTime()))return t}__formatDate(e){if(this.__effectiveI18n.formatDate)return this.__effectiveI18n.formatDate(si(e))}checkValidity(){let e=this._inputElementValue,t=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),i=!this._selectedDate||ss(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled),s=!0;return this.inputElement&&this.inputElement.checkValidity&&(s=this.inputElement.checkValidity()),t&&i&&s}_shouldSetFocus(e){return!this._shouldKeepFocusRing}_shouldKeepFocusOnClearMousedown(){return!!this.opened||super._shouldKeepFocusOnClearMousedown()}_shouldRemoveFocus(e){let{relatedTarget:t}=e;return!(!this.opened||null===t||t===document.body||this.contains(t)||this._overlayContent.contains(t))||!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive}__commitValueChange(){let e=this.__unparsableValue;this.__committedValue!==this.value?(this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this._requestValidation(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e}__commitDate(e){this.__keepCommittedValue=!0,this._selectedDate=e,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}_isNoInput(e,t,i,s,r,n){return!e||t&&(!n||r)||i&&r||!s.parseDate}_formatISO(e){return e instanceof Date?so({year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}):""}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(e){e&&this.__ensureContent(),this.inputElement&&this.inputElement.setAttribute("aria-expanded",e)}_selectedDateChanged(e,t){void 0!==e&&void 0!==t&&(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(e,t){void 0!==e&&void 0!==t&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(e))}_valueChanged(e,t){let i=sa(e);if(e&&!i){this.value=t;return}e?st(this._selectedDate,i)||(this._selectedDate=i,void 0!==t&&this._requestValidation()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)}__updateOverlayContent(e,t,i,s,r,n,a,o,l,d){e&&(e.i18n=t,e.label=i,e.minDate=s,e.maxDate=r,e.focusedDate=n,e.selectedDate=a,e.showWeekNumbers=o,e.isDateDisabled=l,e.enteredDate=d)}__updateOverlayContentTheme(e,t){e&&(t?e.setAttribute("theme",t):e.removeAttribute("theme"))}__updateOverlayContentFullScreen(e,t){e&&e.toggleAttribute("fullscreen",t)}_onOverlayEscapePress(e){e.stopPropagation(),this._focusedDate=this._selectedDate,this._applyInputValue(this._selectedDate),this._close()}_onOverlayOpened(){let e=this._overlayContent;e.reset();let t=this._getInitialPosition();e.initialPosition=t;let i=e.focusedDate||t;e.scrollToDate(i),this._ignoreFocusedDateChange=!0,e.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();let s=this.inputElement;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement());let r=this._noInput?e:this;this.__showOthers=((e,t=document.body,i="data-aria-hidden")=>{var s,r;let n,a,o,l,d,h,u,c=Array.from(Array.isArray(e)?e:[e]);return t&&c.push(...Array.from(t.querySelectorAll("[aria-live]"))),s="aria-hidden",r=Array.isArray(c)?c:[c],n=sA(t)?r.map(e=>{if(!sA(e))return sO(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 sO(e,"is not contained inside",t),null}).filter(e=>!!e):(sO(t,"is not a valid element"),[]),sD[i]||(sD[i]=new WeakMap),a=sD[i],o=[],l=new Set,d=new Set(n),h=e=>{if(!e||l.has(e))return;l.add(e);let t=e.assignedSlot;t&&h(t),h(e.parentNode||e.host)},n.forEach(h),(u=e=>{if(!e||d.has(e))return;let t=e.shadowRoot;(t?[...e.children,...t.children]:[...e.children]).forEach(e=>{if(!["template","script","style"].includes(e.localName))if(l.has(e))u(e);else{let t=e.getAttribute(s),r=null!==t&&"false"!==t,n=(sT.get(e)||0)+1,l=(a.get(e)||0)+1;sT.set(e,n),a.set(e,l),o.push(e),1===n&&r&&sI.set(e,!0),1===l&&e.setAttribute(i,"true"),r||e.setAttribute(s,"true")}})})(t),l.clear(),sS+=1,()=>{o.forEach(e=>{let t=sT.get(e)-1,r=a.get(e)-1;sT.set(e,t),a.set(e,r),t||(sI.has(e)?sI.delete(e):e.removeAttribute(s)),r||e.removeAttribute(i)}),(sS-=1)||(sT=new WeakMap,sT=new WeakMap,sI=new WeakMap,sD={})}})(r)}_getInitialPosition(){let e=sa(this.initialPosition),t=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||ss(t,this._minDate,this._maxDate,this.isDateDisabled)?t:this._minDate||this._maxDate?sr(t,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.__effectiveI18n.parseDate){let e=this._inputElementValue||"",t=this.__parseDate(e);t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this.__commitParsedOrFocusedDate(),this.inputElement&&this.inputElement.selectionStart&&(this.inputElement.selectionStart=this.inputElement.selectionEnd),this.value||this._keyboardActive||this._requestValidation()}_onScroll(e){e.target!==window&&this._overlayContent.contains(e.target)||this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):""}_setSelectionRange(e,t){this.inputElement&&this.inputElement.setSelectionRange(e,t)}_onChange(e){e.stopPropagation()}_onClick(e){!e.composedPath().includes(this._overlayElement)&&(this._isClearButton(e)||this._onHostClick(e))}_onHostClick(e){(!this.autoOpenDisabled||this._noInput)&&(e.preventDefault(),this.open())}_onClearButtonClick(e){e.preventDefault(),this.__commitDate(null)}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&-1===["Tab","Escape"].indexOf(e.key)&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(e){e.composedPath().includes(this._overlayContent)||(this.opened?this.close():this.__commitParsedOrFocusedDate())}_onEscape(e){if(this.opened)return void this._onOverlayEscapePress(e);if(this.clearButtonVisible&&this.value&&!this.readonly){e.stopPropagation(),this._onClearButtonClick(e);return}""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open();let e=this.__parseDate(this._inputElementValue||"");e&&(this._ignoreFocusedDateChange=!0,st(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1),this.__setEnteredDate(e)}__setEnteredDate(e){e?st(this.__enteredDate,e)||(this.__enteredDate=e):this.__enteredDate=null}__computeMinOrMaxDate(e){return sa(e)}};class sV extends sR(sC(ty(eX(e8(tv(ek)))))){static get is(){return"vaadin-date-picker"}static get styles(){return[sk,sE]}static get properties(){return{_positionTarget:{type:Object,sync:!0}}}get clearElement(){return this.$.clearButton}render(){return en`
1469
+ `,sT=new WeakMap,sD=new WeakMap,sS={},sA=0,sO=e=>e?.nodeType===Node.ELEMENT_NODE,sP=(...e)=>{console.error(`Error: ${e.join(" ")}. Skip setting aria-hidden.`)};function s$(e,...t){let i=e=>e&&"object"==typeof e&&!Array.isArray(e),s=(e,t)=>{i(t)&&i(e)&&Object.keys(t).forEach(r=>{let n=t[r];i(n)?(e[r]||(e[r]={}),s(e[r],n)):Array.isArray(n)?e[r]=[...n]:null!=n&&(e[r]=n)})};return t.forEach(t=>{s(e,t)}),e}HTMLElement.prototype;let sL=e=>class extends e{static get properties(){return{i18n:{type:Object},__effectiveI18n:{type:Object,sync:!0}}}static get defaultI18n(){return{}}constructor(){super(),this.i18n=s$({},this.constructor.defaultI18n)}get i18n(){return this.__customI18n}set i18n(e){e!==this.__customI18n&&(this.__customI18n=e,this.__effectiveI18n=s$({},this.constructor.defaultI18n,this.__customI18n))}};class sM{constructor(e){this.host=e,e.addEventListener("opened-changed",()=>{e.opened||this.__setVirtualKeyboardEnabled(!1)}),e.addEventListener("blur",()=>this.__setVirtualKeyboardEnabled(!0)),e.addEventListener("touchstart",()=>this.__setVirtualKeyboardEnabled(!0))}__setVirtualKeyboardEnabled(e){this.host.inputElement&&(this.host.inputElement.inputMode=e?"":"none")}}let sR=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(e){let t=String(e.year).replace(/\d+/u,e=>"0000".substr(e.length)+e);return[e.month+1,e.day,t].join("/")},parseDate(e){let t=e.split("/"),i=new Date,s,r=i.getMonth(),n=i.getFullYear();if(3===t.length?(r=parseInt(t[0])-1,s=parseInt(t[1]),n=parseInt(t[2]),t[2].length<3&&n>=0&&(n=function(e,t,i=0,s=1){if(t>99)throw Error("The provided year cannot have more than 2 digits.");if(t<0)throw Error("The provided year cannot be negative.");let r=t+100*Math.floor(e.getFullYear()/100);return e<new Date(r-50,i,s)?r-=100:e>new Date(r+50,i,s)&&(r+=100),r}(this.referenceDate?so(this.referenceDate):new Date,n,r,s))):2===t.length?(r=parseInt(t[0])-1,s=parseInt(t[1])):1===t.length&&(s=parseInt(t[0])),void 0!==s)return{day:s,month:r,year:n}},formatTitle:(e,t)=>`${e} ${t}`}),sV=e=>class extends sL(io(sC(tQ(e)))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:{type: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)"},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)"},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)"},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, __effectiveI18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:ij},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},__enteredDate:{type:Date,sync:!0}}}static get observers(){return["_selectedDateChanged(_selectedDate, __effectiveI18n)","_focusedDateChanged(_focusedDate, __effectiveI18n)","__updateOverlayContent(_overlayContent, __effectiveI18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled, __enteredDate)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get defaultI18n(){return sR}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this)}get i18n(){return super.i18n}set i18n(e){super.i18n=e}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(e){super._inputElementValue=e;let t=this.__parseDate(e);this.__setEnteredDate(t)}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(e){super._onFocus(e),this._noInput&&!t0&&e.target.blur()}_onBlur(e){super._onBlur(e),!this.opened&&(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this._requestValidation())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new sb(this._fullscreenMediaQuery,e=>{this._fullscreen=e})),this.addController(new sM(this)),this._overlayElement=this.$.overlay}updated(e){super.updated(e),(e.has("showWeekNumbers")||e.has("__effectiveI18n"))&&this.toggleAttribute("week-numbers",this.showWeekNumbers&&1===this.__effectiveI18n.firstDayOfWeek)}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}focus(e){this._noInput&&!t0?this.open():super.focus(e)}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.$.overlay.close()}__ensureContent(){if(this._overlayContent)return;let e=document.createElement("vaadin-date-picker-overlay-content");e.setAttribute("slot","overlay"),this.appendChild(e),this._overlayContent=e,e.addEventListener("close",()=>{this._close()}),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",e=>{this.__commitDate(e.detail.date),this._close()}),e.addEventListener("date-selected",e=>{this.__commitDate(e.detail.date)}),e.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0)}),e.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1)}),e.addEventListener("focused-date-changed",e=>{this._focusedDate=e.detail.value}),e.addEventListener("click",e=>e.stopPropagation())}__parseDate(e){if(!this.__effectiveI18n.parseDate)return;let t=this.__effectiveI18n.parseDate(e);if(t&&(t=so(`${t.year}-${t.month+1}-${t.day}`)),t&&!isNaN(t.getTime()))return t}__formatDate(e){if(this.__effectiveI18n.formatDate)return this.__effectiveI18n.formatDate(ss(e))}checkValidity(){let e=this._inputElementValue,t=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),i=!this._selectedDate||sr(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled),s=!0;return this.inputElement&&this.inputElement.checkValidity&&(s=this.inputElement.checkValidity()),t&&i&&s}_shouldSetFocus(e){return!this._shouldKeepFocusRing}_shouldKeepFocusOnClearMousedown(){return!!this.opened||super._shouldKeepFocusOnClearMousedown()}_shouldRemoveFocus(e){let{relatedTarget:t}=e;return!(!this.opened||null===t||t===document.body||this.contains(t)||this._overlayContent.contains(t))||!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive}__commitValueChange(){let e=this.__unparsableValue;this.__committedValue!==this.value?(this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this._requestValidation(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e}__commitDate(e){this.__keepCommittedValue=!0,this._selectedDate=e,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}_isNoInput(e,t,i,s,r,n){return!e||t&&(!n||r)||i&&r||!s.parseDate}_formatISO(e){return e instanceof Date?sl({year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}):""}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(e){e&&this.__ensureContent(),this.inputElement&&this.inputElement.setAttribute("aria-expanded",e)}_selectedDateChanged(e,t){void 0!==e&&void 0!==t&&(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(e,t){void 0!==e&&void 0!==t&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(e))}_valueChanged(e,t){let i=so(e);if(e&&!i){this.value=t;return}e?si(this._selectedDate,i)||(this._selectedDate=i,void 0!==t&&this._requestValidation()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)}__updateOverlayContent(e,t,i,s,r,n,a,o,l,d){e&&(e.i18n=t,e.label=i,e.minDate=s,e.maxDate=r,e.focusedDate=n,e.selectedDate=a,e.showWeekNumbers=o,e.isDateDisabled=l,e.enteredDate=d)}__updateOverlayContentTheme(e,t){e&&(t?e.setAttribute("theme",t):e.removeAttribute("theme"))}__updateOverlayContentFullScreen(e,t){e&&e.toggleAttribute("fullscreen",t)}_onOverlayEscapePress(e){e.stopPropagation(),this._focusedDate=this._selectedDate,this._applyInputValue(this._selectedDate),this._close()}_onOverlayOpened(){let e=this._overlayContent;e.reset();let t=this._getInitialPosition();e.initialPosition=t;let i=e.focusedDate||t;e.scrollToDate(i),this._ignoreFocusedDateChange=!0,e.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();let s=this.inputElement;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement());let r=this._noInput?e:this;this.__showOthers=((e,t=document.body,i="data-aria-hidden")=>{var s,r;let n,a,o,l,d,h,u,c=Array.from(Array.isArray(e)?e:[e]);return t&&c.push(...Array.from(t.querySelectorAll("[aria-live]"))),s="aria-hidden",r=Array.isArray(c)?c:[c],n=sO(t)?r.map(e=>{if(!sO(e))return sP(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 sP(e,"is not contained inside",t),null}).filter(e=>!!e):(sP(t,"is not a valid element"),[]),sS[i]||(sS[i]=new WeakMap),a=sS[i],o=[],l=new Set,d=new Set(n),h=e=>{if(!e||l.has(e))return;l.add(e);let t=e.assignedSlot;t&&h(t),h(e.parentNode||e.host)},n.forEach(h),(u=e=>{if(!e||d.has(e))return;let t=e.shadowRoot;(t?[...e.children,...t.children]:[...e.children]).forEach(e=>{if(!["template","script","style"].includes(e.localName))if(l.has(e))u(e);else{let t=e.getAttribute(s),r=null!==t&&"false"!==t,n=(sT.get(e)||0)+1,l=(a.get(e)||0)+1;sT.set(e,n),a.set(e,l),o.push(e),1===n&&r&&sD.set(e,!0),1===l&&e.setAttribute(i,"true"),r||e.setAttribute(s,"true")}})})(t),l.clear(),sA+=1,()=>{o.forEach(e=>{let t=sT.get(e)-1,r=a.get(e)-1;sT.set(e,t),a.set(e,r),t||(sD.has(e)?sD.delete(e):e.removeAttribute(s)),r||e.removeAttribute(i)}),(sA-=1)||(sT=new WeakMap,sT=new WeakMap,sD=new WeakMap,sS={})}})(r)}_getInitialPosition(){let e=so(this.initialPosition),t=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||sr(t,this._minDate,this._maxDate,this.isDateDisabled)?t:this._minDate||this._maxDate?sn(t,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.__effectiveI18n.parseDate){let e=this._inputElementValue||"",t=this.__parseDate(e);t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this.__commitParsedOrFocusedDate(),this.inputElement&&this.inputElement.selectionStart&&(this.inputElement.selectionStart=this.inputElement.selectionEnd),this.value||this._keyboardActive||this._requestValidation()}_onScroll(e){e.target!==window&&this._overlayContent.contains(e.target)||this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):""}_setSelectionRange(e,t){this.inputElement&&this.inputElement.setSelectionRange(e,t)}_onChange(e){e.stopPropagation()}_onClick(e){!e.composedPath().includes(this._overlayElement)&&(this._isClearButton(e)||this._onHostClick(e))}_onHostClick(e){(!this.autoOpenDisabled||this._noInput)&&(e.preventDefault(),this.open())}_onClearButtonClick(e){e.preventDefault(),this.__commitDate(null)}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&-1===["Tab","Escape"].indexOf(e.key)&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(e){e.composedPath().includes(this._overlayContent)||(this.opened?this.close():this.__commitParsedOrFocusedDate())}_onEscape(e){if(this.opened)return void this._onOverlayEscapePress(e);if(this.clearButtonVisible&&this.value&&!this.readonly){e.stopPropagation(),this._onClearButtonClick(e);return}""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open();let e=this.__parseDate(this._inputElementValue||"");e&&(this._ignoreFocusedDateChange=!0,si(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1),this.__setEnteredDate(e)}__setEnteredDate(e){e?si(this.__enteredDate,e)||(this.__enteredDate=e):this.__enteredDate=null}__computeMinOrMaxDate(e){return so(e)}};class sN extends sV(sk(tw(eX(e8(tm(ek)))))){static get is(){return"vaadin-date-picker"}static get styles(){return[sE,sI]}static get properties(){return{_positionTarget:{type:Object,sync:!0}}}get clearElement(){return this.$.clearButton}render(){return en`
1455
1470
  <div class="vaadin-date-picker-container">
1456
1471
  <div part="label">
1457
1472
  <slot name="label"></slot>
@@ -1500,12 +1515,12 @@
1500
1515
  >
1501
1516
  <slot name="overlay"></slot>
1502
1517
  </vaadin-date-picker-overlay>
1503
- `}ready(){super.ready(),this.addController(new iD(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e},{uniqueIdPrefix:"search-input"})),this.addController(new iS(this.inputElement,this._labelController)),this._tooltipController=new ts(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.shadowRoot.querySelector('[part="field-button toggle-button"]').addEventListener("mousedown",e=>e.preventDefault())}_onOpenedChanged(e){this.opened=e.detail.value}_onVaadinOverlayClose(e){let t=e.detail.sourceEvent;t&&t.composedPath().includes(this)&&!t.composedPath().includes(this._overlayElement)&&e.preventDefault()}_toggle(e){e.stopPropagation(),this.$.overlay.opened?this.close():this.open()}}eI(sV);let sN=class extends sV{};sN=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-date-picker")],sN);let sB=g`
1518
+ `}ready(){super.ready(),this.addController(new iS(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e},{uniqueIdPrefix:"search-input"})),this.addController(new iA(this.inputElement,this._labelController)),this._tooltipController=new ts(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.shadowRoot.querySelector('[part="field-button toggle-button"]').addEventListener("mousedown",e=>e.preventDefault())}_onOpenedChanged(e){this.opened=e.detail.value}_onVaadinOverlayClose(e){let t=e.detail.sourceEvent;t?.composedPath().includes(this)&&!t.composedPath().includes(this._overlayElement)&&e.preventDefault()}_toggle(e){e.stopPropagation(),this.$.overlay.opened?this.close():this.open()}}eT(sN);let sB=class extends sN{};sB=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-date-picker")],sB);let sz=g`
1504
1519
  :host([focused]) {
1505
1520
  outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
1506
1521
  outline-offset: calc(var(--vaadin-focus-ring-width) / -1);
1507
1522
  }
1508
- `,sz=e=>class extends e{static get properties(){return{index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return[...super.observedAttributes,"hidden"]}attributeChangedCallback(e,t,i){"hidden"===e&&null!==i?this.index=void 0:super.attributeChangedCallback(e,t,i)}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;let e=this._getHostDir();e&&this.setAttribute("dir",e)}_getHostDir(){return this._owner&&this._owner.$.overlay.getAttribute("dir")}requestContentUpdate(){if(!this.renderer||this.hidden)return;let e={index:this.index,item:this.item,focused:this.focused,selected:this.selected};this.renderer(this,this._owner,e)}__rendererOrItemChanged(e,t,i){void 0!==i&&void 0!==t&&(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()))}__updateLabel(e,t){t||(this.textContent=e)}},sF=g`
1523
+ `,sF=e=>class extends e{static get properties(){return{index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return[...super.observedAttributes,"hidden"]}attributeChangedCallback(e,t,i){"hidden"===e&&null!==i?this.index=void 0:super.attributeChangedCallback(e,t,i)}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;let e=this._getHostDir();e&&this.setAttribute("dir",e)}_getHostDir(){return this._owner&&this._owner.$.overlay.getAttribute("dir")}requestContentUpdate(){if(!this.renderer||this.hidden)return;let e={index:this.index,item:this.item,focused:this.focused,selected:this.selected};this.renderer(this,this._owner,e)}__rendererOrItemChanged(e,t,i){void 0!==i&&void 0!==t&&(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()))}__updateLabel(e,t){t||(this.textContent=e)}},sU=g`
1509
1524
  :host {
1510
1525
  align-items: center;
1511
1526
  border-radius: var(--vaadin-item-border-radius, var(--vaadin-radius-m));
@@ -1526,7 +1541,7 @@
1526
1541
  :host([disabled]) {
1527
1542
  cursor: var(--vaadin-disabled-cursor);
1528
1543
  opacity: 0.5;
1529
- pointer-events: none;
1544
+ pointer-events: var(--_vaadin-item-disabled-pointer-events, none);
1530
1545
  }
1531
1546
 
1532
1547
  :host([hidden]) {
@@ -1565,12 +1580,12 @@
1565
1580
  background: CanvasText;
1566
1581
  }
1567
1582
  }
1568
- `;class sU extends sz(ty(eK(e8(tv(ek))))){static get is(){return"vaadin-time-picker-item"}static get styles(){return[sF,sB]}render(){return en`
1583
+ `;class sH extends sF(tw(eK(e8(tm(ek))))){static get is(){return"vaadin-time-picker-item"}static get styles(){return[sU,sz]}render(){return en`
1569
1584
  <span part="checkmark" aria-hidden="true"></span>
1570
1585
  <div part="content">
1571
1586
  <slot></slot>
1572
1587
  </div>
1573
- `}}eI(sU);let sH=e=>class extends i8(e){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}_shouldCloseOnOutsideClick(e){let t=e.composedPath();return!t.includes(this.positionTarget)&&!t.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!t3(e.composedPath()[0])&&e.preventDefault()}_updateOverlayWidth(){this.style.setProperty(`--_${this.localName}-default-width`,`${this.positionTarget.offsetWidth}px`)}_setOverlayWidth(e,t){e&&t&&(this._updateOverlayWidth(),this._updatePosition())}},sj=g`
1588
+ `}}eT(sH);let sj=e=>class extends i6(e){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}_shouldCloseOnOutsideClick(e){let t=e.composedPath();return!t.includes(this.positionTarget)&&!t.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!t5(e.composedPath()[0])&&e.preventDefault()}_updateOverlayWidth(){this.style.setProperty(`--_${this.localName}-default-width`,`${this.positionTarget.offsetWidth}px`)}_setOverlayWidth(e,t){e&&t&&(this._updateOverlayWidth(),this._updatePosition())}},sY=g`
1574
1589
  :host {
1575
1590
  --vaadin-item-checkmark-display: block;
1576
1591
  }
@@ -1584,13 +1599,13 @@
1584
1599
  flex-direction: column;
1585
1600
  height: 100%;
1586
1601
  }
1587
- `;class sY extends sH(i2(eK(ty(e8(tv(ek)))))){static get is(){return"vaadin-time-picker-overlay"}static get styles(){return[iz,sj]}render(){return en`
1602
+ `;class sq extends sj(i3(eK(tw(e8(tm(ek)))))){static get is(){return"vaadin-time-picker-overlay"}static get styles(){return[iF,sY]}render(){return en`
1588
1603
  <div part="overlay" id="overlay">
1589
1604
  <div part="content" id="content">
1590
1605
  <slot></slot>
1591
1606
  </div>
1592
1607
  </div>
1593
- `}}eI(sY);let sq=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),sW=sq&&sq[1]>=8;class sK{constructor({createElements:e,updateElement:t,scrollTarget:i,scrollContainer:s,reorderElements:r,elementsContainer:n,__disableHeightPlaceholder:a}){this.isAttached=!0,this._vidxOffset=0,this.createElements=e,this.updateElement=t,this.scrollTarget=i,this.scrollContainer=s,this.reorderElements=r,this.elementsContainer=n||s,this.__disableHeightPlaceholder=a??!1,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,PREVENT_OVERSCROLL: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:e}])=>{let t=0===e.width&&0===e.height;!t&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=t}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("virtualizer-element-focused",e=>this.__onElementFocused(e)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()}))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(e=>e.__virtualizerPlaceholder)}scrollToIndex(e){if("number"!=typeof e||isNaN(e)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),e=this._clamp(e,0,this.size-1);let t=this.__getVisibleElements().length,i=Math.floor(e/this.size*this._virtualCount);this._virtualCount-i<t?(i=this._virtualCount-(this.size-e),this._vidxOffset=this._maxVirtualIndexOffset):i<t?e<1e3?(i=e,this._vidxOffset=0):(i=1e3,this._vidxOffset=e-i):this._vidxOffset=e-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==e&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(e)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=e)}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),ej(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}hostConnected(){this.scrollTarget.offsetParent&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition)}update(e=0,t=this.size-1){let i=[];this.__getVisibleElements().forEach(s=>{s.__virtualIndex>=e&&s.__virtualIndex<=t&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))}),this.__afterElementsUpdated(i)}_updateMetrics(e){ej();let t=0,i=0,s=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((e,s)=>{i+=this._physicalSizes[e];let r=this._physicalSizes[e];this._physicalSizes[e]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[e])),this._physicalSizes[e]!==r&&(this.__resizeObserver.unobserve(this._physicalItems[e]),this.__resizeObserver.observe(this._physicalItems[e],{box:"border-box"})),t+=this._physicalSizes[e],this._physicalAverageCount+=+!!this._physicalSizes[e]},e),this._physicalSize=this._physicalSize+t-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((r*s+t)/this._physicalAverageCount))}__getBorderBoxHeight(e){let t=getComputedStyle(e),i=parseFloat(t.height)||0;return"border-box"===t.boxSizing?i:i+(parseFloat(t.paddingBottom)||0)+(parseFloat(t.paddingTop)||0)+(parseFloat(t.borderBottomWidth)||0)+(parseFloat(t.borderTopWidth)||0)}__updateElement(e,t,i){e.__virtualizerPlaceholder&&(e.style.paddingTop="",e.style.opacity="",e.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(e.__lastUpdatedIndex!==t||i)&&(this.updateElement(e,t),e.__lastUpdatedIndex=t)}__afterElementsUpdated(e){this.__disableHeightPlaceholder||e.forEach(e=>{let t=e.offsetHeight;if(0===t)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=eH.debounce(this.__placeholderClearDebouncer,eB,()=>this._resizeHandler());else{this.__elementHeightQueue.push(t),this.__elementHeightQueue.shift();let e=this.__elementHeightQueue.filter(e=>void 0!==e);this.__placeholderHeight=Math.round(e.reduce((e,t)=>e+t,0)/e.length)}}),void 0===this.__pendingScrollToIndex||this.__hasPlaceholders()||this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(e){let t=this.__getVisibleElements().find(t=>t.__virtualIndex===e);return t?this.scrollTarget.getBoundingClientRect().top-t.getBoundingClientRect().top:void 0}__restoreScrollOffset(e,t){let i=this.__getIndexScrollOffset(e);void 0!==t&&void 0!==i&&(this._scrollTop+=t-i)}get size(){return this.__size}set size(e){let t,i;if(e===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel();let s=e>0&&this._scrollTop>0;s&&(t=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(t)),this.__size=e,this.__preventElementUpdates=s,this._itemsChanged({path:"items"}),ej(),s&&(t=Math.min(t,e-1),this.scrollToIndex(t),this.__restoreScrollOffset(t,i)),this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),ej(),this._debounce("_update",this._update,eF)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(e){this.scrollTarget.scrollTop=e}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){let e=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL="rtl"===e.direction,this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(e){let t=this.createElements(e),i=document.createDocumentFragment();return t.forEach(e=>{e.style.position="absolute",i.appendChild(e),this.__resizeObserver.observe(e,{box:"border-box"})}),this.elementsContainer.appendChild(i),t}_assignModels(e){let t=[];this._iterateItems((e,i)=>{let s=this._physicalItems[e];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),t.push(s))},e),this.__afterElementsUpdated(t)}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0}),this.__clientFull||super._isClientFull()}translate3d(e,t,i,s){s.style.transform=`translateY(${t})`}toggleScrollListener(){}__getFocusedElement(e=this.__getVisibleElements()){let t=document.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;for(;t&&!e.includes(t);)t=t.assignedSlot||t.parentNode||t.host;return t}__nextFocusableSiblingMissing(e,t){return t.indexOf(e)===t.length-1&&this.size>e.__virtualIndex+1}__previousFocusableSiblingMissing(e,t){return 0===t.indexOf(e)&&e.__virtualIndex>0}__onElementFocused(e){if(!this.reorderElements)return;let t=e.detail.element;if(!t)return;let i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(t,i)||this.__nextFocusableSiblingMissing(t,i))&&this.flush();let s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(t,s)?(this._scrollTop+=Math.ceil(t.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(t,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(t.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-this._scrollPosition);let e=this._scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){let t=e>=0,i=this._getReusables(!t);i.indexes.length&&(this._physicalTop=i.physicalTop,t?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}e&&(this.__fixInvalidItemPositioningDebouncer=eH.debounce(this.__fixInvalidItemPositioningDebouncer,eN.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning()),this.__overscrollDebouncer?.isActive()||(this.scrollTarget.style.overscrollBehavior="none"),this.__overscrollDebouncer=eH.debounce(this.__overscrollDebouncer,eN.after(this.timeouts.PREVENT_OVERSCROLL),()=>{this.scrollTarget.style.overscrollBehavior=null})),this.reorderElements&&(this.__scrollReorderDebouncer=eH.debounce(this.__scrollReorderDebouncer,eN.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),0===this._scrollPosition&&0!==this.firstVisibleIndex&&Math.abs(e)>0&&this.scrollToIndex(0)}_resizeHandler(){super._resizeHandler();let e=this.adjustedLastVisibleIndex===this.size-1,t=this._physicalTop-this._scrollPosition;if(e&&t>0){let e=Math.ceil(t/this._physicalAverage);this._virtualStart=Math.max(0,this._virtualStart-e),this._physicalStart=Math.max(0,this._physicalStart-e),super.scrollToIndex(this._virtualCount-1),this.scrollTarget.scrollTop=this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight}}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;let e=this._physicalTop>this._scrollTop,t=this._physicalBottom<this._scrollBottom,i=0===this.adjustedFirstVisibleIndex,s=this.adjustedLastVisibleIndex===this.size-1;if(e&&!i||t&&!s){let e=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(t?-1:1),this._scrollHandler(),this._ratio=e}}_increasePoolIfNeeded(e){if(this._physicalCount>2&&this._physicalAverage>0&&e>0){let t=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(e,Math.min(100,t)))}else super._increasePoolIfNeeded(e)}get _optPhysicalSize(){let e=super._optPhysicalSize;return e<=0||this.__hasPlaceholders()?e:e+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(0===this._physicalCount)return 0;let e=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),t=Math.max(...this._physicalSizes);return t>Math.min(...this._physicalSizes)?Math.max(0,t-e):0}_getScrollLineHeight(){let e=document.createElement("div");e.style.fontSize="initial",e.style.display="none",document.body.appendChild(e);let t=window.getComputedStyle(e).fontSize;return document.body.removeChild(e),t?window.parseInt(t):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(e=>!e.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;let e=this._virtualStart+(this._vidxOffset||0),t=this.__getVisibleElements(),i=this.__getFocusedElement(t)||t[0];if(!i)return;let s=i.__virtualIndex-e,r=t.indexOf(i)-s;if(r>0)for(let e=0;e<r;e++)this.elementsContainer.appendChild(t[e]);else if(r<0)for(let e=t.length+r;e<t.length;e++)this.elementsContainer.insertBefore(t[e],t[0]);if(ij){let{transform:e}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=e})}}_adjustVirtualIndexOffset(e){let t=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(e)>1e4){let e=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(e*t)}else{let e,i,s=this._vidxOffset,r=()=>{e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)};0===this._scrollTop?0!==s&&(r(),this._vidxOffset=0,super.scrollToIndex(0)):this.firstVisibleIndex<1e3&&this._vidxOffset>0&&(r(),this._vidxOffset-=Math.min(this._vidxOffset,100),super.scrollToIndex(this.firstVisibleIndex+(s-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?s!==t&&(r(),this._vidxOffset=t,super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-1e3&&this._vidxOffset<t&&(r(),this._vidxOffset+=Math.min(t-this._vidxOffset,100),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-s))),void 0!==e&&this.__restoreScrollOffset(e,i)}}}Object.setPrototypeOf(sK.prototype,{_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(val){val=this._clamp(val,0,this._maxVirtualStart),this._virtualStartVal=val},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(val){(val%=this._physicalCount)<0&&(val=this._physicalCount+val),this._physicalStartVal=val},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(val){this._physicalCountVal=val},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return!!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let e=this._firstVisibleIndexVal;if(null==e){let t=this._physicalTop+this._scrollOffset;e=this._iterateItems((e,i)=>{if((t+=this._getPhysicalSizeIncrement(e))>this._scrollPosition)return i})||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){let e=this._lastVisibleIndexVal;if(null==e){let t=this._physicalTop+this._scrollOffset;this._iterateItems((i,s)=>{t<this._scrollBottom&&(e=s),t+=this._getPhysicalSizeIncrement(i)}),this._lastVisibleIndexVal=e}return e},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){let e=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop)),t=e-this._scrollPosition,i=t>=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){let e=Math.round((t-=this._scrollOffset)/this._physicalAverage);this._virtualStart+=e,this._physicalStart+=e,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){let e=this._getReusables(i);i?(this._physicalTop=e.physicalTop,this._virtualStart+=e.indexes.length,this._physicalStart+=e.indexes.length):(this._virtualStart-=e.indexes.length,this._physicalStart-=e.indexes.length),this._update(e.indexes,i?null:e.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),eF)}},_getReusables(e){let t,i,s,r=[],n=this._hiddenContentSize*this._ratio,a=this._virtualStart,o=this._virtualEnd,l=this._physicalCount,d=this._physicalTop+this._scrollOffset,h=this._physicalBottom+this._scrollOffset,u=this._scrollPosition,c=this._scrollBottom;for(e?(t=this._physicalStart,i=u-d):(t=this._physicalEnd,i=h-c);i-=s=this._getPhysicalSizeIncrement(t),!(r.length>=l)&&!(i<=n);)if(e){if(o+r.length+1>=this._virtualCount||d+s>=u-this._scrollOffset)break;r.push(t),d+=s,t=(t+1)%l}else{if(a-r.length<=0||d+this._physicalSize-s<=c)break;r.push(t),d-=s,t=0===t?l-1:t-1}return{indexes:r,physicalTop:d-this._scrollOffset}},_update(e,t){if((!e||0!==e.length)&&0!==this._physicalCount){if(this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){let e=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(e)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(e){let t=this._clamp(this._physicalCount+e,3,this._virtualCount-this._virtualStart)-this._physicalCount,i=Math.round(.5*this._physicalCount);if(!(t<0)){if(t>0){let e=window.performance.now();[].push.apply(this._physicalItems,this._createPool(t));for(let e=0;e<t;e++)this._physicalSizes.push(0);this._physicalCount+=t,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=t),this._update(),this._templateCost=(window.performance.now()-e)/t,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)),ez):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),eF))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){let e=this._getReusables(!0);this._physicalTop=e.physicalTop,this._virtualStart+=e.indexes.length,this._physicalStart+=e.indexes.length,this._update(e.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(e){"items"===e.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,eB))},_iterateItems(e,t){let i,s,r,n;if(2==arguments.length&&t){for(n=0;n<t.length;n++)if(i=t[n],s=this._computeVidx(i),null!=(r=e.call(this,i,s)))return r}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(r=e.call(this,i,s)))return r;for(i=0;i<this._physicalStart;i++,s++)if(null!=(r=e.call(this,i,s)))return r}},_computeVidx(e){return e>=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_positionItems(){this._adjustScrollPosition();let e=this._physicalTop;this._iterateItems(t=>{this.translate3d(0,`${e}px`,0,this._physicalItems[t]),e+=this._physicalSizes[t]})},_getPhysicalSizeIncrement(e){return this._physicalSizes[e]},_adjustScrollPosition(){let e=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==e){this._physicalTop-=e;let t=this._scrollPosition;!sW&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize(e){let t=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=t,(e||0===this._scrollHeight||this._scrollPosition>=t-this._physicalSize||Math.abs(t-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${t}px`,this._scrollHeight=t)},scrollToIndex(e){if("number"!=typeof e||e<0||e>this.items.length-1||(ej(),0===this._physicalCount))return;e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=e-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let t=this._physicalStart,i=this._virtualStart,s=0,r=this._hiddenContentSize;for(;i<e&&s<=r;)s+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),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)},eB)},_isIndexRendered(e){return e>=this._virtualStart&&e<=this._virtualEnd},_getPhysicalIndex(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},_clamp:(e,t,i)=>Math.min(i,Math.max(t,e)),_debounce(e,t,i){var s;this._debouncers||(this._debouncers={}),this._debouncers[e]=eH.debounce(this._debouncers[e],i,t.bind(this)),s=this._debouncers[e],eU.add(s)}});class sG{constructor(e){this.__adapter=new sK(e)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(e){this.__adapter.size=e}scrollToIndex(e){this.__adapter.scrollToIndex(e)}update(e=0,t=this.size-1){this.__adapter.update(e,t)}flush(){this.__adapter.flush()}hostConnected(){this.__adapter.hostConnected()}}let sX=class{toString(){return""}},sZ=e=>class extends e{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){let e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map(e=>parseInt(e,10)).reduce((e,t)=>e+t)}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${tt++}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",e=>e.stopPropagation()),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(e){if(!this.__virtualizer||!(this.opened&&e>=0))return;let t=this._visibleItemsCount(),i=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),i=e-t+1):e>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));let s=[...this.children].find(e=>!e.hidden&&e.index===this.__virtualizer.lastVisibleIndex);if(!s||e!==s.index)return;let r=s.getBoundingClientRect(),n=this.getBoundingClientRect(),a=r.bottom-n.bottom+this._viewportTotalPaddingBottom;a>0&&(this.scrollTop+=a)}_isItemSelected(e,t,i){return!(e instanceof sX)&&(i&&void 0!==e&&void 0!==t?eJ(i,e)===eJ(i,t):e===t)}__initVirtualizer(){this.__virtualizer=new sG({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0,__disableHeightPlaceholder:!0})}__itemsChanged(e){e&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(e){e&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(e,t){(e||t)&&this.requestContentUpdate()}__focusedIndexChanged(e,t){e!==t&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e)}__rendererChanged(e,t){(e||t)&&this.requestContentUpdate()}__createElements(e){return[...Array(e)].map(()=>{let e=document.createElement(`${this.__hostTagName}-item`);return e.addEventListener("click",this.__boundOnItemClick),e.tabIndex="-1",e.style.width="100%",e})}_updateElement(e,t){let i=this.items[t],s=this.focusedIndex,r=this._isItemSelected(i,this.selectedItem,this.itemIdPath);e.setProperties({item:i,index:t,label:this.getItemLabel(i),selected:r,renderer:this.renderer,focused:!this.loading&&s===t}),"function"==typeof this.itemClassNameGenerator?e.className=this.itemClassNameGenerator(i):""!==e.className&&(e.className=""),e.id=`${this.__hostTagName}-item-${t}`,e.setAttribute("role",void 0!==t&&"option"),e.setAttribute("aria-selected",r.toString()),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),i instanceof sX&&this.__requestItemByIndex(t)}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{let t=0===this.scrollTop,i=this.scrollHeight-this.scrollTop-this.clientHeight<=1;t&&e.deltaY<0?e.preventDefault():i&&e.deltaY>0&&e.preventDefault()})}__requestItemByIndex(e){requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e}}))})}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}},sQ=g`
1608
+ `}}eT(sq);let sW=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),sK=sW&&sW[1]>=8;class sG{constructor({createElements:e,updateElement:t,scrollTarget:i,scrollContainer:s,reorderElements:r,elementsContainer:n,__disableHeightPlaceholder:a}){this.isAttached=!0,this._vidxOffset=0,this.createElements=e,this.updateElement=t,this.scrollTarget=i,this.scrollContainer=s,this.reorderElements=r,this.elementsContainer=n||s,this.__disableHeightPlaceholder=a??!1,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,PREVENT_OVERSCROLL: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:e}])=>{let t=0===e.width&&0===e.height;!t&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=t}).observe(this.scrollTarget),this.scrollTarget.addEventListener("virtualizer-element-focused",e=>this.__onElementFocused(e)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()}))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(e=>e.__virtualizerPlaceholder)}scrollToIndex(e){if("number"!=typeof e||isNaN(e)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),e=this._clamp(e,0,this.size-1);let t=this.__getVisibleElements().length,i=Math.floor(e/this.size*this._virtualCount);this._virtualCount-i<t?(i=this._virtualCount-(this.size-e),this._vidxOffset=this._maxVirtualIndexOffset):i<t?e<1e3?(i=e,this._vidxOffset=0):(i=1e3,this._vidxOffset=e-i):this._vidxOffset=e-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==e&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(e)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=e)}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),ej(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}hostConnected(){this.scrollTarget.offsetParent&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition)}update(e=0,t=this.size-1){let i=[];this.__getVisibleElements().forEach(s=>{s.__virtualIndex>=e&&s.__virtualIndex<=t&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))}),this.__afterElementsUpdated(i)}_updateMetrics(e){ej();let t=0,i=0,s=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((e,s)=>{i+=this._physicalSizes[e];let r=this._physicalSizes[e];this._physicalSizes[e]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[e])),this._physicalSizes[e]!==r&&(this.__resizeObserver.unobserve(this._physicalItems[e]),this.__resizeObserver.observe(this._physicalItems[e],{box:"border-box"})),t+=this._physicalSizes[e],this._physicalAverageCount+=+!!this._physicalSizes[e]},e),this._physicalSize=this._physicalSize+t-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((r*s+t)/this._physicalAverageCount))}__getBorderBoxHeight(e){let t=getComputedStyle(e),i=parseFloat(t.height)||0;return"border-box"===t.boxSizing?i:i+(parseFloat(t.paddingBottom)||0)+(parseFloat(t.paddingTop)||0)+(parseFloat(t.borderBottomWidth)||0)+(parseFloat(t.borderTopWidth)||0)}__updateElement(e,t,i){e.__virtualizerPlaceholder&&(e.style.paddingTop="",e.style.opacity="",e.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(e.__lastUpdatedIndex!==t||i)&&(this.updateElement(e,t),e.__lastUpdatedIndex=t)}__afterElementsUpdated(e){this.__disableHeightPlaceholder||e.forEach(e=>{let t=e.offsetHeight;if(0===t)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=eH.debounce(this.__placeholderClearDebouncer,eB,()=>this._resizeHandler());else{this.__elementHeightQueue.push(t),this.__elementHeightQueue.shift();let e=this.__elementHeightQueue.filter(e=>void 0!==e);this.__placeholderHeight=Math.round(e.reduce((e,t)=>e+t,0)/e.length)}}),void 0===this.__pendingScrollToIndex||this.__hasPlaceholders()||this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(e){let t=this.__getVisibleElements().find(t=>t.__virtualIndex===e);return t?this.scrollTarget.getBoundingClientRect().top-t.getBoundingClientRect().top:void 0}__restoreScrollOffset(e,t){let i=this.__getIndexScrollOffset(e);void 0!==t&&void 0!==i&&(this._scrollTop+=t-i)}get size(){return this.__size}set size(e){let t,i;if(e===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel();let s=e>0&&this._scrollTop>0;s&&(t=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(t)),this.__size=e,this.__preventElementUpdates=s,this._itemsChanged({path:"items"}),ej(),s&&(t=Math.min(t,e-1),this.scrollToIndex(t),this.__restoreScrollOffset(t,i)),this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),ej(),this._debounce("_update",this._update,eF)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(e){this.scrollTarget.scrollTop=e}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){let e=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL="rtl"===e.direction,this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight}setAttribute(){}_createPool(e){let t=this.createElements(e),i=document.createDocumentFragment();return t.forEach(e=>{e.style.position="absolute",i.appendChild(e),this.__resizeObserver.observe(e,{box:"border-box"})}),this.elementsContainer.appendChild(i),t}_assignModels(e){let t=[];this._iterateItems((e,i)=>{let s=this._physicalItems[e];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),t.push(s))},e),this.__afterElementsUpdated(t)}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0}),this.__clientFull||super._isClientFull()}translate3d(e,t,i,s){s.style.transform=`translateY(${t})`}toggleScrollListener(){}__getFocusedElement(e=this.__getVisibleElements()){let t=document.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;for(;t&&!e.includes(t);)t=t.assignedSlot||t.parentNode||t.host;return t}__nextFocusableSiblingMissing(e,t){return t.indexOf(e)===t.length-1&&this.size>e.__virtualIndex+1}__previousFocusableSiblingMissing(e,t){return 0===t.indexOf(e)&&e.__virtualIndex>0}__onElementFocused(e){if(!this.reorderElements)return;let t=e.detail.element;if(!t)return;let i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(t,i)||this.__nextFocusableSiblingMissing(t,i))&&this.flush();let s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(t,s)?(this._scrollTop+=Math.ceil(t.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(t,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(t.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-this._scrollPosition);let e=this._scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){let t=e>=0,i=this._getReusables(!t);i.indexes.length&&(this._physicalTop=i.physicalTop,t?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}e&&(this.__fixInvalidItemPositioningDebouncer=eH.debounce(this.__fixInvalidItemPositioningDebouncer,eN.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning()),this.__overscrollDebouncer?.isActive()||(this.scrollTarget.style.overscrollBehavior="none"),this.__overscrollDebouncer=eH.debounce(this.__overscrollDebouncer,eN.after(this.timeouts.PREVENT_OVERSCROLL),()=>{this.scrollTarget.style.overscrollBehavior=null})),this.reorderElements&&(this.__scrollReorderDebouncer=eH.debounce(this.__scrollReorderDebouncer,eN.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),0===this._scrollPosition&&0!==this.firstVisibleIndex&&Math.abs(e)>0&&this.scrollToIndex(0)}_resizeHandler(){super._resizeHandler();let e=this.adjustedLastVisibleIndex===this.size-1,t=this._physicalTop-this._scrollPosition;if(e&&t>0){let e=Math.ceil(t/this._physicalAverage);this._virtualStart=Math.max(0,this._virtualStart-e),this._physicalStart=Math.max(0,this._physicalStart-e),super.scrollToIndex(this._virtualCount-1),this.scrollTarget.scrollTop=this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight}}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;let e=this._physicalTop>this._scrollTop,t=this._physicalBottom<this._scrollBottom,i=0===this.adjustedFirstVisibleIndex,s=this.adjustedLastVisibleIndex===this.size-1;if(e&&!i||t&&!s){let e=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(t?-1:1),this._scrollHandler(),this._ratio=e}}_increasePoolIfNeeded(e){if(this._physicalCount>2&&this._physicalAverage>0&&e>0){let t=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(e,Math.min(100,t)))}else super._increasePoolIfNeeded(e)}get _optPhysicalSize(){let e=super._optPhysicalSize;return e<=0||this.__hasPlaceholders()?e:e+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(0===this._physicalCount)return 0;let e=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),t=Math.max(...this._physicalSizes);return t>Math.min(...this._physicalSizes)?Math.max(0,t-e):0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(e=>!e.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;let e=this._virtualStart+(this._vidxOffset||0),t=this.__getVisibleElements(),i=this.__getFocusedElement(t)||t[0];if(!i)return;let s=i.__virtualIndex-e,r=t.indexOf(i)-s;if(r>0)for(let e=0;e<r;e++)this.elementsContainer.appendChild(t[e]);else if(r<0)for(let e=t.length+r;e<t.length;e++)this.elementsContainer.insertBefore(t[e],t[0]);if(iY){let{transform:e}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=e})}}_adjustVirtualIndexOffset(e){let t=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(e)>1e4){let e=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(e*t)}else{let e,i,s=this._vidxOffset,r=()=>{e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)};0===this._scrollTop?0!==s&&(r(),this._vidxOffset=0,super.scrollToIndex(0)):this.firstVisibleIndex<1e3&&this._vidxOffset>0&&(r(),this._vidxOffset-=Math.min(this._vidxOffset,100),super.scrollToIndex(this.firstVisibleIndex+(s-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?s!==t&&(r(),this._vidxOffset=t,super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-1e3&&this._vidxOffset<t&&(r(),this._vidxOffset+=Math.min(t-this._vidxOffset,100),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-s))),void 0!==e&&this.__restoreScrollOffset(e,i)}}}Object.setPrototypeOf(sG.prototype,{_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(val){val=this._clamp(val,0,this._maxVirtualStart),this._virtualStartVal=val},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(val){(val%=this._physicalCount)<0&&(val=this._physicalCount+val),this._physicalStartVal=val},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(val){this._physicalCountVal=val},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return!!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let e=this._firstVisibleIndexVal;if(null==e){let t=this._physicalTop+this._scrollOffset;e=this._iterateItems((e,i)=>{if((t+=this._getPhysicalSizeIncrement(e))>this._scrollPosition)return i})||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){let e=this._lastVisibleIndexVal;if(null==e){let t=this._physicalTop+this._scrollOffset;this._iterateItems((i,s)=>{t<this._scrollBottom&&(e=s),t+=this._getPhysicalSizeIncrement(i)}),this._lastVisibleIndexVal=e}return e},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){let e=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop)),t=e-this._scrollPosition,i=t>=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){let e=Math.round((t-=this._scrollOffset)/this._physicalAverage);this._virtualStart+=e,this._physicalStart+=e,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){let e=this._getReusables(i);i?(this._physicalTop=e.physicalTop,this._virtualStart+=e.indexes.length,this._physicalStart+=e.indexes.length):(this._virtualStart-=e.indexes.length,this._physicalStart-=e.indexes.length),this._update(e.indexes,i?null:e.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),eF)}},_getReusables(e){let t,i,s,r=[],n=this._hiddenContentSize*this._ratio,a=this._virtualStart,o=this._virtualEnd,l=this._physicalCount,d=this._physicalTop+this._scrollOffset,h=this._physicalBottom+this._scrollOffset,u=this._scrollPosition,c=this._scrollBottom;for(e?(t=this._physicalStart,i=u-d):(t=this._physicalEnd,i=h-c);i-=s=this._getPhysicalSizeIncrement(t),!(r.length>=l)&&!(i<=n);)if(e){if(o+r.length+1>=this._virtualCount||d+s>=u-this._scrollOffset)break;r.push(t),d+=s,t=(t+1)%l}else{if(a-r.length<=0||d+this._physicalSize-s<=c)break;r.push(t),d-=s,t=0===t?l-1:t-1}return{indexes:r,physicalTop:d-this._scrollOffset}},_update(e,t){if((!e||0!==e.length)&&0!==this._physicalCount){if(this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){let e=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(e)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(e){let t=this._clamp(this._physicalCount+e,3,this._virtualCount-this._virtualStart)-this._physicalCount,i=Math.round(.5*this._physicalCount);if(!(t<0)){if(t>0){let e=window.performance.now();[].push.apply(this._physicalItems,this._createPool(t));for(let e=0;e<t;e++)this._physicalSizes.push(0);this._physicalCount+=t,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=t),this._update(),this._templateCost=(window.performance.now()-e)/t,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)),ez):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),eF))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){let e=this._getReusables(!0);this._physicalTop=e.physicalTop,this._virtualStart+=e.indexes.length,this._physicalStart+=e.indexes.length,this._update(e.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(e){"items"===e.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,eB))},_iterateItems(e,t){let i,s,r,n;if(2==arguments.length&&t){for(n=0;n<t.length;n++)if(i=t[n],s=this._computeVidx(i),null!=(r=e.call(this,i,s)))return r}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(r=e.call(this,i,s)))return r;for(i=0;i<this._physicalStart;i++,s++)if(null!=(r=e.call(this,i,s)))return r}},_computeVidx(e){return e>=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_positionItems(){this._adjustScrollPosition();let e=this._physicalTop;this._iterateItems(t=>{this.translate3d(0,`${e}px`,0,this._physicalItems[t]),e+=this._physicalSizes[t]})},_getPhysicalSizeIncrement(e){return this._physicalSizes[e]},_adjustScrollPosition(){let e=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==e){this._physicalTop-=e;let t=this._scrollPosition;!sK&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize(e){let t=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=t,(e||0===this._scrollHeight||this._scrollPosition>=t-this._physicalSize||Math.abs(t-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${t}px`,this._scrollHeight=t)},scrollToIndex(e){if("number"!=typeof e||e<0||e>this.items.length-1||(ej(),0===this._physicalCount))return;e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=e-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let t=this._physicalStart,i=this._virtualStart,s=0,r=this._hiddenContentSize;for(;i<e&&s<=r;)s+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),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)},eB)},_isIndexRendered(e){return e>=this._virtualStart&&e<=this._virtualEnd},_getPhysicalIndex(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},_clamp:(e,t,i)=>Math.min(i,Math.max(t,e)),_debounce(e,t,i){var s;this._debouncers||(this._debouncers={}),this._debouncers[e]=eH.debounce(this._debouncers[e],i,t.bind(this)),s=this._debouncers[e],eU.add(s)}});class sX{constructor(e){this.__adapter=new sG(e)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(e){this.__adapter.size=e}scrollToIndex(e){this.__adapter.scrollToIndex(e)}update(e=0,t=this.size-1){this.__adapter.update(e,t)}flush(){this.__adapter.flush()}hostConnected(){this.__adapter.hostConnected()}}let sZ=class{toString(){return""}},sQ=e=>class extends e{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){let e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map(e=>parseInt(e,10)).reduce((e,t)=>e+t)}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${tt++}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",e=>e.stopPropagation()),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(e,t=!1){if(!this.__virtualizer||!(this.opened&&e>=0))return;let i=[...this.children].find(t=>!t.hidden&&t.index===e);if(!t&&i){let e=i.getBoundingClientRect(),t=this.getBoundingClientRect();if(e.top>=t.top&&e.bottom+this._viewportTotalPaddingBottom<=t.bottom)return}let s=e;if(!t){let t=this._visibleItemsCount();e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),s=e-t+1):e>this.__virtualizer.firstVisibleIndex&&(s=this.__virtualizer.firstVisibleIndex)}this.__virtualizer.scrollToIndex(Math.max(0,s)),this.__virtualizer.flush();let r=[...this.children].find(t=>!t.hidden&&t.index===e);if(!r)return;if(t)return void r.scrollIntoView({block:"center"});let n=r.getBoundingClientRect(),a=this.getBoundingClientRect(),o=n.bottom+this._viewportTotalPaddingBottom;o>a.bottom?this.scrollTop+=o-a.bottom:n.top<a.top&&(this.scrollTop-=a.top-n.top)}_isItemSelected(e,t,i){return!(e instanceof sZ)&&(i&&void 0!==e&&void 0!==t?eJ(i,e)===eJ(i,t):e===t)}__initVirtualizer(){this.__virtualizer=new sX({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0,__disableHeightPlaceholder:!0})}__itemsChanged(e){e&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(e){if(e){this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate();return}let t=this.__virtualizer&&this.__virtualizer.__adapter;t&&t._scrollPosition>0&&(this.scrollTop=0,t._scrollPosition=0)}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(e,t){(e||t)&&this.requestContentUpdate()}__focusedIndexChanged(e,t){e!==t&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e)}__rendererChanged(e,t){(e||t)&&this.requestContentUpdate()}__createElements(e){return[...Array(e)].map(()=>{let e=document.createElement(`${this.__hostTagName}-item`);return e.addEventListener("click",this.__boundOnItemClick),e.tabIndex="-1",e.style.width="100%",e})}_updateElement(e,t){let i=this.items[t],s=this.focusedIndex,r=this._isItemSelected(i,this.selectedItem,this.itemIdPath);e.setProperties({item:i,index:t,label:this.getItemLabel(i),selected:r,renderer:this.renderer,focused:!this.loading&&s===t}),"function"==typeof this.itemClassNameGenerator?e.className=this.itemClassNameGenerator(i):""!==e.className&&(e.className=""),e.id=`${this.__hostTagName}-item-${t}`,e.setAttribute("role",void 0!==t&&"option"),e.setAttribute("aria-selected",r.toString()),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),i instanceof sZ&&this.__requestItemByIndex(t)}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{let t=0===this.scrollTop,i=this.scrollHeight-this.scrollTop-this.clientHeight<=1;t&&e.deltaY<0?e.preventDefault():i&&e.deltaY>0&&e.preventDefault()})}__requestItemByIndex(e){requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e}}))})}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}},sJ=g`
1594
1609
  :host {
1595
1610
  /* Fixes scrollbar disappearing when 'Show scroll bars: Always' enabled in Safari */
1596
1611
  box-shadow: 0 0 0 white;
@@ -1612,11 +1627,11 @@
1612
1627
  #selector > * {
1613
1628
  forced-color-adjust: auto;
1614
1629
  }
1615
- `;class sJ extends sZ(e8(ek)){static get is(){return"vaadin-time-picker-scroller"}static get styles(){return sQ}render(){return en`
1630
+ `;class s0 extends sQ(e8(ek)){static get is(){return"vaadin-time-picker-scroller"}static get styles(){return sJ}render(){return en`
1616
1631
  <div id="selector">
1617
1632
  <slot></slot>
1618
1633
  </div>
1619
- `}}eI(sJ);let s0=g`
1634
+ `}}eT(s0);let s1=g`
1620
1635
  :host([opened]) {
1621
1636
  pointer-events: auto;
1622
1637
  }
@@ -1638,7 +1653,7 @@
1638
1653
  direction: rtl;
1639
1654
  text-align: left;
1640
1655
  }
1641
- `,s1=e=>class extends tZ(ih(tX(t4(e)))){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},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"}}}constructor(){super(),this._scroller,this._closeOnBlurIsPrevented,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"}_inputElementChanged(e){super._inputElementChanged(e),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"))}firstUpdated(){super.firstUpdated(),this._initScroller()}ready(){super.ready(),this._initOverlay(),this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown),this.addController(new sL(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.opened=!1}_initOverlay(){let e=this.$.overlay;e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",e=>e.preventDefault()),e.addEventListener("opened-changed",e=>{this._overlayOpened=e.detail.value}),this._overlayElement=e}_initScroller(){let e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged),this._renderScroller(e),this._scroller=e}_renderScroller(e){e.setAttribute("slot","overlay"),e.setAttribute("tabindex","-1"),this.appendChild(e)}get _hasDropdownItems(){return!!(this._dropdownItems&&this._dropdownItems.length)}_overlayOpenedChanged(e,t){e?this._onOpened():t&&this._hasDropdownItems&&(this.close(),this._onOverlayClosed())}_focusedIndexChanged(e,t){void 0!==t&&this._updateActiveDescendant(e)}_isInputFocused(){return this.inputElement&&t5(this.inputElement)}_updateActiveDescendant(e){let t=this.inputElement;if(!t)return;let i=this._getItemElements().find(t=>t.index===e);i?t.setAttribute("aria-activedescendant",i.id):t.removeAttribute("aria-activedescendant")}_openedChanged(e,t){if(void 0===t)return;e?this._isInputFocused()||iY||!this.inputElement||this.inputElement.focus():(this.autoselect&&(this.__autoselectPending=!0),this._onClosed());let i=this.inputElement;i&&(i.setAttribute("aria-expanded",!!e),e?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus()}_onClearButtonClick(e){e.preventDefault(),this._onClearAction()}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open()}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open())}_onClick(e){this.autoselect&&this.inputElement&&this.__autoselectPending&&this.inputElement.selectionStart===this.inputElement.selectionEnd&&this.inputElement.select(),this.__autoselectPending=!1,this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e)}_onTouchend(e){this.clearElement&&e.composedPath()[0]===this.clearElement&&(e.preventDefault(),this._onClearAction())}_onKeyDown(e){super._onKeyDown(e),"ArrowDown"===e.key?(this._onArrowDown(),e.preventDefault()):"ArrowUp"===e.key&&(this._onArrowUp(),e.preventDefault())}_getItemLabel(e){return e?e.toString():""}_onArrowDown(){if(this.opened){let e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{let e=this._dropdownItems;e&&(this._focusedIndex=e.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){let e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange()}}_setSelectionRange(e,t){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,t)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){let e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e)}}_closeOrCommit(){this.opened?this.close():this._commitValue()}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){return!0}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this._onEscapeCancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this._onEscapeCancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_onEscapeCancel(){}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",e=>e.preventDefault()),e.addEventListener("click",()=>{iY&&!this._isInputFocused()&&document.activeElement.blur()}))}_onClearAction(){}_onOpened(){}_onClosed(){}_onOverlayClosed(){}_commitValue(){}_revertInputValue(){this._inputElementValue=this.value,this._clearSelectionRange()}_onInput(e){this.opened||this._isClearButton(e)||this.autoOpenDisabled||(this.opened=!0)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e)}_overlaySelectedItemChanged(e){e.stopPropagation(),e.detail.item instanceof sX||this.opened&&(this._focusedIndex=this._dropdownItems.indexOf(e.detail.item),this.close())}_setFocused(e){super._setFocused(e),e||(this.__autoselectPending=!1),e||this.readonly||this._closeOnBlurIsPrevented||this._handleFocusOut()}_handleFocusOut(){tJ?this._closeOrCommit():this.opened?this._overlayOpened||this.close():this._commitValue()}_shouldRemoveFocus(e){return(!e.relatedTarget||e.relatedTarget.localName!==`${this._tagNamePrefix}-item`)&&(e.relatedTarget!==this._overlayElement||(e.composedPath()[0].focus(),!1))}},s2=e=>class extends sx(e){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}};function s3(e){if(!e)return"";let t=(e=0,t="00")=>(t+e).substr((t+e).length-t.length),i=`${t(e.hours)}:${t(e.minutes)}`;return void 0!==e.seconds&&(i+=`:${t(e.seconds)}`),void 0!==e.milliseconds&&(i+=`.${t(e.milliseconds,"000")}`),i}let s5="(\\d|[0-5]\\d)",s4=RegExp(`^(\\d|[0-1]\\d|2[0-3])(?::${s5}(?::${s5}(?:\\.(\\d{1,3}))?)?)?$`,"u");function s8(e){let t=s4.exec(e);if(t){if(t[4])for(;t[4].length<3;)t[4]+="0";return{hours:t[1],minutes:t[2],seconds:t[3],milliseconds:t[4]}}}function s6(e,t){if(e){var i;let s,r=(s=null==(i=t)?60:parseFloat(i))%3600==0?1:s%60!=0&&s?s%1==0?3:s<1?4:void 0:2;e.hours=parseInt(e.hours),e.minutes=parseInt(e.minutes||0),e.seconds=r<3?void 0:parseInt(e.seconds||0),e.milliseconds=r<4?void 0:parseInt(e.milliseconds||0)}return e}let s7=Object.freeze({formatTime:s3,parseTime:s8}),s9="00:00:00.000",re="23:59:59.999",rt=e=>class extends s$(s7,s2(s1(sC(e)))){static get properties(){return{value:{type:String,notify:!0,value:"",sync:!0},min:{type:String,value:"",sync:!0},max:{type:String,value:"",sync:!0},step:{type:Number,sync:!0},_comboBoxValue:{type:String,sync:!0,observer:"__comboBoxValueChanged"},_inputContainer:{type:Object}}}static get observers(){return["_openedOrItemsChanged(opened, _dropdownItems)","_updateScroller(opened, _dropdownItems, _focusedIndex, _theme)","__updateAriaAttributes(_dropdownItems, opened, inputElement)","__updateDropdownItems(__effectiveI18n, min, max, step)"]}static get constraints(){return[...super.constraints,"min","max"]}get _tagNamePrefix(){return"vaadin-time-picker"}get clearElement(){return this.$.clearButton}get i18n(){return super.i18n}set i18n(e){super.i18n=e}get __unparsableValue(){return this._inputElementValue&&!this.__effectiveI18n.parseTime(this._inputElementValue)?this._inputElementValue:""}ready(){super.ready(),this.addController(new iD(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e},{uniqueIdPrefix:"search-input"})),this.addController(new iS(this.inputElement,this._labelController)),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._toggleElement=this.$.toggleButton,this._tooltipController=new ts(this),this._tooltipController.setShouldShow(e=>!e.opened),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}updated(e){super.updated(e),e.has("_comboBoxValue")&&this._dropdownItems&&(this._scroller.selectedItem=this._dropdownItems.find(e=>e.value===this._comboBoxValue))}checkValidity(){return!!(this.inputElement.checkValidity()&&(!this.value||this._timeAllowed(this.__effectiveI18n.parseTime(this.value)))&&(!this._comboBoxValue||this.__effectiveI18n.parseTime(this._comboBoxValue)))}_getItemLabel(e){return e?e.label:""}_updateScroller(e,t,i,s){e&&(this._scroller.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),this._scroller.setProperties({items:e?t:[],opened:e,focusedIndex:i,theme:s})}_openedOrItemsChanged(e,t){this._overlayOpened=e&&!!(t&&t.length)}_onClosed(){this._commitValue()}_onEscapeCancel(){this._inputElementValue=this._comboBoxValue,this._closeOrCommit()}_onClearAction(){this._comboBoxValue="",this._inputElementValue="",this.__commitValueChange()}_commitValue(){if(this._focusedIndex>-1){let e=this._dropdownItems[this._focusedIndex],t=this._getItemLabel(e);this._inputElementValue=t,this._comboBoxValue=t,this._focusedIndex=-1}else""===this._inputElementValue||void 0===this._inputElementValue?this._comboBoxValue="":this._comboBoxValue=this._inputElementValue;this.__commitValueChange(),this._clearSelectionRange()}_closeOrCommit(){this.opened?this.close():this._commitValue()}_revertInputValue(){this._inputElementValue=this._comboBoxValue,this._clearSelectionRange()}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this._requestValidation()}__validDayDivisor(e){return!e||86400%e==0||e<1&&e%1*1e3%1==0}_onKeyDown(e){if(super._onKeyDown(e),this.readonly||this.disabled||this._dropdownItems.length)return;let t=this.__validDayDivisor(this.step)&&this.step||60;40===e.keyCode?this.__onArrowPressWithStep(-t):38===e.keyCode&&this.__onArrowPressWithStep(t)}__onArrowPressWithStep(e){let t=this.__addStep(this.__getMsec(this.__memoValue),e,!0);this.__memoValue=t,this.__useMemo=!0,this._comboBoxValue=this.__effectiveI18n.formatTime(t),this.__useMemo=!1,this.__commitValueChange()}__commitValueChange(){let e=this.__unparsableValue;this.__committedValue!==this.value?(this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this._requestValidation(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e}__getMsec(e){let t=60*(e&&e.hours||0)*6e4;return t+=60*(e&&e.minutes||0)*1e3,t+=1e3*(e&&e.seconds||0),t+=e&&parseInt(e.milliseconds)||0}__getSec(e){let t=60*(e&&e.hours||0)*60;return t+=60*(e&&e.minutes||0),t+=e&&e.seconds||0,t+=e&&e.milliseconds/1e3||0}__addStep(e,t,i){0===e&&t<0&&(e=864e5);let s=1e3*t,r=e%s;s<0&&r&&i?e-=r:s>0&&r&&i?e-=r-s:e+=s;let n=Math.floor(e/1e3/60/60),a=Math.floor((e-=1e3*n*3600)/1e3/60),o=Math.floor((e-=1e3*a*60)/1e3);return e-=1e3*o,{hours:n<24?n:0,minutes:a,seconds:o,milliseconds:e}}__updateDropdownItems(e,t,i,s){let r=s6(s8(t||s9),s),n=this.__getSec(r),a=s6(s8(i||re),s),o=this.__getSec(a);if(this._dropdownItems=this.__generateDropdownList(n,o,s),s!==this.__oldStep){this.__oldStep=s;let e=s6(s8(this.value),s);this.__updateValue(e)}this.value&&(this._comboBoxValue=e.formatTime(e.parseTime(this.value)))}__updateAriaAttributes(e,t,i){void 0!==e&&void 0!==i&&(0===e.length?(i.removeAttribute("role"),i.removeAttribute("aria-expanded")):(i.setAttribute("role","combobox"),i.setAttribute("aria-expanded",!!t)))}__generateDropdownList(e,t,i){if(i<900||!this.__validDayDivisor(i))return[];let s=[];i||(i=3600);let r=-i+e;for(;r+i>=e&&r+i<=t;){let e=s6(this.__addStep(1e3*r,i),i);r+=i;let t=this.__effectiveI18n.formatTime(e);s.push({label:t,value:t})}return s}_valueChanged(e,t){let i=this.__memoValue=s8(e),s=s3(i)||"";this.__keepCommittedValue||(this.__committedValue=e,this.__committedUnparsableValue=""),""===e||null===e||i?e!==s?this.value=s:this.__keepInvalidInput?delete this.__keepInvalidInput:this.__updateInputValue(i):this.value=void 0===t?"":t,this._toggleHasValue(this._hasValue)}__comboBoxValueChanged(e,t){if(""===e&&void 0===t)return;let i=this.__useMemo?this.__memoValue:this.__effectiveI18n.parseTime(e),s=this.__effectiveI18n.formatTime(i)||"";i?e!==s?this._comboBoxValue=s:(this.__keepCommittedValue=!0,this.__updateValue(i),this.__keepCommittedValue=!1):(""!==this.value&&""!==e&&(this.__keepInvalidInput=!0),this.__keepCommittedValue=!0,this.value="",this.__keepCommittedValue=!1)}__updateValue(e){let t=s3(s6(e,this.step))||"";this.value=t,this.__updateInputValue(e)}__updateInputValue(e){let t=this.__effectiveI18n.formatTime(s6(e,this.step))||"";this._inputElementValue=t,this._comboBoxValue=t}_timeAllowed(e){let t=this.__effectiveI18n.parseTime(this.min||s9),i=this.__effectiveI18n.parseTime(this.max||re);return(!this.__getMsec(t)||this.__getMsec(e)>=this.__getMsec(t))&&(!this.__getMsec(i)||this.__getMsec(e)<=this.__getMsec(i))}_onClearButtonClick(e){e.stopPropagation(),super._onClearButtonClick(e),this.opened&&this._scroller.requestContentUpdate()}_onHostClick(e){let t=e.composedPath();(t.includes(this._labelNode)||t.includes(this._inputContainer))&&super._onHostClick(e)}_onChange(e){e.stopPropagation()}};class ri extends rt(ty(eX(e8(tv(ek))))){static get is(){return"vaadin-time-picker"}static get styles(){return[sk,s0]}render(){return en`
1656
+ `,s2=e=>class extends tQ(iu(tZ(t8(e)))){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},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"}}}constructor(){super(),this._scroller,this._closeOnBlurIsPrevented,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"}_inputElementChanged(e){super._inputElementChanged(e),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"))}firstUpdated(){super.firstUpdated(),this._initScroller()}ready(){super.ready(),this._initOverlay(),this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown),this.addController(new sM(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.opened=!1}_initOverlay(){let e=this.$.overlay;e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",e=>e.preventDefault()),e.addEventListener("opened-changed",e=>{this._overlayOpened=e.detail.value}),this._overlayElement=e}_initScroller(){let e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged),this._renderScroller(e),this._scroller=e}_renderScroller(e){e.setAttribute("slot","overlay"),e.setAttribute("tabindex","-1"),this.appendChild(e)}get _hasDropdownItems(){return!!(this._dropdownItems&&this._dropdownItems.length)}_overlayOpenedChanged(e,t){e?this._onOpened():t&&this._hasDropdownItems&&(this.close(),this._onOverlayClosed())}_focusedIndexChanged(e,t){void 0!==t&&this._updateActiveDescendant(e)}_isInputFocused(){return this.inputElement&&t4(this.inputElement)}_updateActiveDescendant(e){let t=this.inputElement;if(!t)return;let i=this._getItemElements().find(t=>t.index===e);i?t.setAttribute("aria-activedescendant",i.id):t.removeAttribute("aria-activedescendant")}_openedChanged(e,t){if(void 0===t)return;e?this._isInputFocused()||iq||!this.inputElement||this.inputElement.focus():(this.autoselect&&(this.__autoselectPending=!0),this._onClosed());let i=this.inputElement;i&&(i.setAttribute("aria-expanded",!!e),e?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus()}_onClearButtonClick(e){e.preventDefault(),this._onClearAction()}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open()}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open())}_onClick(e){this.autoselect&&this.inputElement&&this.__autoselectPending&&this.inputElement.selectionStart===this.inputElement.selectionEnd&&this.inputElement.select(),this.__autoselectPending=!1,this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e)}_onTouchend(e){this.clearElement&&e.composedPath()[0]===this.clearElement&&(e.preventDefault(),this._onClearAction())}_onKeyDown(e){super._onKeyDown(e),"ArrowDown"===e.key?(this._onArrowDown(),e.preventDefault()):"ArrowUp"===e.key&&(this._onArrowUp(),e.preventDefault())}_getItemLabel(e){return e?e.toString():""}_onArrowDown(){if(this.opened){let e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{let e=this._dropdownItems;e&&(this._focusedIndex=e.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){let e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange()}}_setSelectionRange(e,t){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,t)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){let e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e)}}_closeOrCommit(){this.opened?this.close():this._commitValue()}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){return!0}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this._onEscapeCancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this._onEscapeCancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_onEscapeCancel(){}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",e=>e.preventDefault()),e.addEventListener("click",()=>{iq&&!this._isInputFocused()&&document.activeElement.blur()}))}_onClearAction(){}_onOpened(){}_onClosed(){}_onOverlayClosed(){}_commitValue(){}_revertInputValue(){this._inputElementValue=this.value,this._clearSelectionRange()}_onInput(e){this.opened||this._isClearButton(e)||this.autoOpenDisabled||(this.opened=!0)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e,t=!1){this._scroller&&this._scroller.scrollIntoView(e,t)}_overlaySelectedItemChanged(e){e.stopPropagation(),e.detail.item instanceof sZ||this.opened&&(this._focusedIndex=this._dropdownItems.indexOf(e.detail.item),this.close())}_setFocused(e){super._setFocused(e),e||(this.__autoselectPending=!1),e||this.readonly||this._closeOnBlurIsPrevented||this._handleFocusOut()}_handleFocusOut(){t0?this._closeOrCommit():this.opened?this._overlayOpened||this.close():this._commitValue()}_shouldRemoveFocus(e){return(!e.relatedTarget||e.relatedTarget.localName!==`${this._tagNamePrefix}-item`)&&(e.relatedTarget!==this._overlayElement||(e.composedPath()[0].focus(),!1))}},s3=e=>class extends sC(e){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}};function s5(e){if(!e)return"";let t=(e=0,t="00")=>(t+e).substr((t+e).length-t.length),i=`${t(e.hours)}:${t(e.minutes)}`;return void 0!==e.seconds&&(i+=`:${t(e.seconds)}`),void 0!==e.milliseconds&&(i+=`.${t(e.milliseconds,"000")}`),i}let s4="(\\d|[0-5]\\d)",s8=RegExp(`^(\\d|[0-1]\\d|2[0-3])(?::${s4}(?::${s4}(?:\\.(\\d{1,3}))?)?)?$`,"u");function s6(e){let t=s8.exec(e);if(t){if(t[4])for(;t[4].length<3;)t[4]+="0";return{hours:t[1],minutes:t[2],seconds:t[3],milliseconds:t[4]}}}function s7(e,t){if(e){var i;let s,r=(s=null==(i=t)?60:parseFloat(i))%3600==0?1:s%60!=0&&s?s%1==0?3:s<1?4:void 0:2;e.hours=parseInt(e.hours),e.minutes=parseInt(e.minutes||0),e.seconds=r<3?void 0:parseInt(e.seconds||0),e.milliseconds=r<4?void 0:parseInt(e.milliseconds||0)}return e}let s9=Object.freeze({formatTime:s5,parseTime:s6}),re="00:00:00.000",rt="23:59:59.999",ri=e=>class extends sL(s3(s2(sk(e)))){static get properties(){return{value:{type:String,notify:!0,value:"",sync:!0},min:{type:String,value:"",sync:!0},max:{type:String,value:"",sync:!0},step:{type:Number,sync:!0},_comboBoxValue:{type:String,sync:!0,observer:"__comboBoxValueChanged"},_inputContainer:{type:Object}}}static get observers(){return["_openedOrItemsChanged(opened, _dropdownItems)","_updateScroller(opened, _dropdownItems, _focusedIndex, _theme)","__updateAriaAttributes(_dropdownItems, opened, inputElement)","__updateDropdownItems(__effectiveI18n, min, max, step)"]}static get defaultI18n(){return s9}static get constraints(){return[...super.constraints,"min","max"]}get _tagNamePrefix(){return"vaadin-time-picker"}get clearElement(){return this.$.clearButton}get i18n(){return super.i18n}set i18n(e){super.i18n=e}get __unparsableValue(){return this._inputElementValue&&!this.__effectiveI18n.parseTime(this._inputElementValue)?this._inputElementValue:""}ready(){super.ready(),this.addController(new iS(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e},{uniqueIdPrefix:"search-input"})),this.addController(new iA(this.inputElement,this._labelController)),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._toggleElement=this.$.toggleButton,this._tooltipController=new ts(this),this._tooltipController.setShouldShow(e=>!e.opened),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}updated(e){super.updated(e),e.has("_comboBoxValue")&&this._dropdownItems&&(this._scroller.selectedItem=this._dropdownItems.find(e=>e.value===this._comboBoxValue))}checkValidity(){return!!(this.inputElement.checkValidity()&&(!this.value||this._timeAllowed(this.__effectiveI18n.parseTime(this.value)))&&(!this._comboBoxValue||this.__effectiveI18n.parseTime(this._comboBoxValue)))}_getItemLabel(e){return e?e.label:""}_updateScroller(e,t,i,s){e&&(this._scroller.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),this._scroller.setProperties({items:e?t:[],opened:e,focusedIndex:i,theme:s})}_openedOrItemsChanged(e,t){this._overlayOpened=e&&!!t?.length}_onClosed(){this._commitValue()}_onEscapeCancel(){this._inputElementValue=this._comboBoxValue,this._closeOrCommit()}_onClearAction(){this._comboBoxValue="",this._inputElementValue="",this.__commitValueChange()}_commitValue(){if(this._focusedIndex>-1){let e=this._dropdownItems[this._focusedIndex],t=this._getItemLabel(e);this._inputElementValue=t,this._comboBoxValue=t,this._focusedIndex=-1}else""===this._inputElementValue||void 0===this._inputElementValue?this._comboBoxValue="":this._comboBoxValue=this._inputElementValue;this.__commitValueChange(),this._clearSelectionRange()}_closeOrCommit(){this.opened?this.close():this._commitValue()}_revertInputValue(){this._inputElementValue=this._comboBoxValue,this._clearSelectionRange()}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this._requestValidation()}__validDayDivisor(e){return!e||86400%e==0||e<1&&e%1*1e3%1==0}_onKeyDown(e){if(super._onKeyDown(e),this.readonly||this.disabled||this._dropdownItems.length)return;let t=this.__validDayDivisor(this.step)&&this.step||60;40===e.keyCode?this.__onArrowPressWithStep(-t):38===e.keyCode&&this.__onArrowPressWithStep(t)}__onArrowPressWithStep(e){let t=this.__addStep(this.__getMsec(this.__memoValue),e,!0);this.__memoValue=t,this.__useMemo=!0,this._comboBoxValue=this.__effectiveI18n.formatTime(t),this.__useMemo=!1,this.__commitValueChange()}__commitValueChange(){let e=this.__unparsableValue;this.__committedValue!==this.value?(this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this._requestValidation(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e}__getMsec(e){let t=60*(e?.hours||0)*6e4;return t+=60*(e?.minutes||0)*1e3,t+=1e3*(e?.seconds||0),t+=parseInt(e?.milliseconds)||0}__getSec(e){let t=60*(e?.hours||0)*60;return t+=60*(e?.minutes||0),t+=e?.seconds||0,t+=(e?.milliseconds||0)/1e3}__addStep(e,t,i){0===e&&t<0&&(e=864e5);let s=1e3*t,r=e%s;s<0&&r&&i?e-=r:s>0&&r&&i?e-=r-s:e+=s;let n=Math.floor(e/1e3/60/60),a=Math.floor((e-=1e3*n*3600)/1e3/60),o=Math.floor((e-=1e3*a*60)/1e3);return e-=1e3*o,{hours:n<24?n:0,minutes:a,seconds:o,milliseconds:e}}__updateDropdownItems(e,t,i,s){let r=s7(s6(t||re),s),n=this.__getSec(r),a=s7(s6(i||rt),s),o=this.__getSec(a);if(this._dropdownItems=this.__generateDropdownList(n,o,s),s!==this.__oldStep){this.__oldStep=s;let e=s7(s6(this.value),s);this.__updateValue(e)}this.value&&(this._comboBoxValue=e.formatTime(e.parseTime(this.value)))}__updateAriaAttributes(e,t,i){void 0!==e&&void 0!==i&&(0===e.length?(i.removeAttribute("role"),i.removeAttribute("aria-expanded")):(i.setAttribute("role","combobox"),i.setAttribute("aria-expanded",!!t)))}__generateDropdownList(e,t,i){if(i<900||!this.__validDayDivisor(i))return[];let s=[];i||(i=3600);let r=-i+e;for(;r+i>=e&&r+i<=t;){let e=s7(this.__addStep(1e3*r,i),i);r+=i;let t=this.__effectiveI18n.formatTime(e);s.push({label:t,value:t})}return s}_valueChanged(e,t){let i=this.__memoValue=s6(e),s=s5(i)||"";this.__keepCommittedValue||(this.__committedValue=e,this.__committedUnparsableValue=""),""===e||null===e||i?e!==s?this.value=s:this.__keepInvalidInput?delete this.__keepInvalidInput:this.__updateInputValue(i):this.value=t??"",this._toggleHasValue(this._hasValue)}__comboBoxValueChanged(e,t){if(""===e&&void 0===t)return;let i=this.__useMemo?this.__memoValue:this.__effectiveI18n.parseTime(e),s=this.__effectiveI18n.formatTime(i)||"";i?e!==s?this._comboBoxValue=s:(this.__keepCommittedValue=!0,this.__updateValue(i),this.__keepCommittedValue=!1):(""!==this.value&&""!==e&&(this.__keepInvalidInput=!0),this.__keepCommittedValue=!0,this.value="",this.__keepCommittedValue=!1)}__updateValue(e){let t=s5(s7(e,this.step))||"";this.value=t,this.__updateInputValue(e)}__updateInputValue(e){let t=this.__effectiveI18n.formatTime(s7(e,this.step))||"";this._inputElementValue=t,this._comboBoxValue=t}_timeAllowed(e){let t=this.__effectiveI18n.parseTime(this.min||re),i=this.__effectiveI18n.parseTime(this.max||rt);return(!this.__getMsec(t)||this.__getMsec(e)>=this.__getMsec(t))&&(!this.__getMsec(i)||this.__getMsec(e)<=this.__getMsec(i))}_onClearButtonClick(e){e.stopPropagation(),super._onClearButtonClick(e),this.opened&&this._scroller.requestContentUpdate()}_onHostClick(e){let t=e.composedPath();(t.includes(this._labelNode)||t.includes(this._inputContainer))&&super._onHostClick(e)}_onChange(e){e.stopPropagation()}};class rs extends ri(tw(eX(e8(tm(ek))))){static get is(){return"vaadin-time-picker"}static get styles(){return[sE,s1]}render(){return en`
1642
1657
  <div class="vaadin-time-picker-container">
1643
1658
  <div part="label">
1644
1659
  <slot name="label"></slot>
@@ -1681,7 +1696,7 @@
1681
1696
  >
1682
1697
  <slot name="overlay"></slot>
1683
1698
  </vaadin-time-picker-overlay>
1684
- `}}eI(ri);let rs=g`
1699
+ `}}eT(rs);let rr=g`
1685
1700
  .vaadin-date-time-picker-container {
1686
1701
  width: calc(var(--vaadin-field-default-width, 12em) * 2 + var(--vaadin-date-time-picker-gap, var(--vaadin-gap-s)));
1687
1702
  }
@@ -1700,7 +1715,7 @@
1700
1715
  min-width: 0;
1701
1716
  flex: 1 1.65 auto;
1702
1717
  }
1703
- `,rr=Object.keys(sM),rn=Object.keys(s7),ra={...sM,...s7};class ro extends ti{constructor(e,t){super(e,`${t}-picker`,`vaadin-${t}-picker`,{initializer:(e,i)=>{i[`__${t}Picker`]=e}})}}let rl=e=>class extends s$(ra,iI(t4(tX(e)))){static get properties(){return{name:{type:String},value:{type:String,notify:!0,value:"",observer:"__valueChanged",sync:!0},min:{type:String,observer:"__minChanged",sync:!0},max:{type:String,observer:"__maxChanged",sync:!0},__minDateTime:{type:Date,value:"",sync:!0},__maxDateTime:{type:Date,value:"",sync:!0},datePlaceholder:{type:String,sync:!0},timePlaceholder:{type:String,sync:!0},step:{type:Number,sync:!0},initialPosition:{type:String,sync:!0},showWeekNumbers:{type:Boolean,value:!1,sync:!0},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},autofocus:{type:Boolean},__selectedDateTime:{type:Date,sync:!0},__datePicker:{type:Object,sync:!0,observer:"__datePickerChanged"},__timePicker:{type:Object,sync:!0,observer:"__timePickerChanged"}}}static get observers(){return["__selectedDateTimeChanged(__selectedDateTime)","__datePlaceholderChanged(datePlaceholder, __datePicker)","__timePlaceholderChanged(timePlaceholder, __timePicker)","__stepChanged(step, __timePicker)","__initialPositionChanged(initialPosition, __datePicker)","__showWeekNumbersChanged(showWeekNumbers, __datePicker)","__requiredChanged(required, __datePicker, __timePicker)","__invalidChanged(invalid, __datePicker, __timePicker)","__disabledChanged(disabled, __datePicker, __timePicker)","__readonlyChanged(readonly, __datePicker, __timePicker)","__i18nChanged(__effectiveI18n, __datePicker, __timePicker)","__autoOpenDisabledChanged(autoOpenDisabled, __datePicker, __timePicker)","__themeChanged(_theme, __datePicker, __timePicker)","__pickersChanged(__datePicker, __timePicker)","__labelOrAccessibleNameChanged(label, accessibleName, __effectiveI18n, __datePicker, __timePicker)"]}constructor(){super(),this.__defaultDateMinMaxValue=void 0,this.__defaultTimeMinValue="00:00:00.000",this.__defaultTimeMaxValue="23:59:59.999",this.__onGlobalClick=this.__onGlobalClick.bind(this),this.__changeEventHandler=this.__changeEventHandler.bind(this),this.__valueChangedEventHandler=this.__valueChangedEventHandler.bind(this),this.__openedChangedEventHandler=this.__openedChangedEventHandler.bind(this)}get i18n(){return super.i18n}set i18n(e){super.i18n=e}get __pickers(){return[this.__datePicker,this.__timePicker]}get __filledPickers(){return this.__pickers.filter(e=>e.value||e.__unparsableValue)}get __formattedValue(){let e=this.__pickers.map(e=>e.value);return e.every(Boolean)?e.join("T"):""}get __unparsableValue(){return this.__filledPickers.length>0&&!this.__pickers.every(e=>e.value)?this.__pickers.map(e=>e.value||e.__unparsableValue).join("T"):""}ready(){super.ready(),this._datePickerController=new ro(this,"date"),this.addController(this._datePickerController),this._timePickerController=new ro(this,"time"),this.addController(this._timePickerController),this.autofocus&&!this.disabled&&window.requestAnimationFrame(()=>this.focus()),this.setAttribute("role","group"),this._tooltipController=new ts(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setShouldShow(e=>e.__datePicker&&!e.__datePicker.opened&&e.__timePicker&&!e.__timePicker.opened),this.ariaTarget=this}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.__onGlobalClick,!0)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.__onGlobalClick,!0)}focus(e){this.__datePicker&&this.__datePicker.focus(e)}__onGlobalClick(e){!(this.__datePicker.opened||this.__timePicker.opened)||e.composedPath().every(e=>![this.__datePicker,this.__datePicker.$.overlay,this.__timePicker,this.__timePicker.$.overlay].includes(e))&&(this.__outsideClickInProgress=!0,setTimeout(()=>{this.__outsideClickInProgress=!1}))}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.__commitPendingValueChange()}_shouldRemoveFocus(e){let t=e.relatedTarget;return!(this.__datePicker.opened||this.__timePicker.opened||this.__datePicker.contains(t)||this.__timePicker.contains(t))}__syncI18n(e,t,i){let s={};i.forEach(e=>{t&&t.hasOwnProperty(e)&&(s[e]=t[e])}),e.i18n=s}__changeEventHandler(e){e.stopPropagation();let t=this.invalid,i=this.__filledPickers;(!(1===i.length&&i[0].checkValidity())||t)&&this.__hasPendingValueChange&&this.__commitPendingValueChange()}__openedChangedEventHandler(){let e=this.__datePicker.opened||this.__timePicker.opened;this.style.pointerEvents=e?"auto":"",!e&&this.__outsideClickInProgress&&this.__commitPendingValueChange()}__addInputListeners(e){e.addEventListener("change",this.__changeEventHandler),e.addEventListener("unparsable-change",this.__changeEventHandler),e.addEventListener("value-changed",this.__valueChangedEventHandler),e.addEventListener("opened-changed",this.__openedChangedEventHandler)}__removeInputListeners(e){e.removeEventListener("change",this.__changeEventHandler),e.removeEventListener("unparsable-change",this.__changeEventHandler),e.removeEventListener("value-changed",this.__valueChangedEventHandler),e.removeEventListener("opened-changed",this.__openedChangedEventHandler)}__isDefaultPicker(e,t){let i=this[`_${t}PickerController`];return i&&e===i.defaultNode}__datePickerChanged(e,t){e&&(t&&(this.__removeInputListeners(t),t.remove()),this.__addInputListeners(e),this.__isDefaultPicker(e,"date")||(this.datePlaceholder=e.placeholder,this.initialPosition=e.initialPosition,this.showWeekNumbers=e.showWeekNumbers),e.min=this.__formatDateISO(this.__minDateTime,this.__defaultDateMinMaxValue),e.max=this.__formatDateISO(this.__maxDateTime,this.__defaultDateMinMaxValue),e.manualValidation=!0)}__timePickerChanged(e,t){e&&(t&&(this.__removeInputListeners(t),t.remove()),this.__addInputListeners(e),this.__isDefaultPicker(e,"time")||(this.timePlaceholder=e.placeholder,this.step=e.step),this.__updateTimePickerMinMax(),e.manualValidation=!0)}__updateTimePickerMinMax(){if(this.__timePicker&&this.__datePicker){let e=this.__parseDate(this.__datePicker.value),t=st(this.__minDateTime,this.__maxDateTime,se);this.__minDateTime&&st(e,this.__minDateTime,se)||t?this.__timePicker.min=this.__dateToIsoTimeString(this.__minDateTime):this.__timePicker.min=this.__defaultTimeMinValue,this.__maxDateTime&&st(e,this.__maxDateTime,se)||t?this.__timePicker.max=this.__dateToIsoTimeString(this.__maxDateTime):this.__timePicker.max=this.__defaultTimeMaxValue}}__i18nChanged(e,t,i){t&&this.__isDefaultPicker(t,"date")&&this.__syncI18n(t,e,rr),i&&this.__isDefaultPicker(i,"time")&&this.__syncI18n(i,e,rn)}__labelOrAccessibleNameChanged(e,t,i,s,r){let n=t||e||"";s&&(s.accessibleName=`${n} ${i.dateLabel||""}`.trim()),r&&(r.accessibleName=`${n} ${i.timeLabel||""}`.trim())}__datePlaceholderChanged(e,t){t&&(t.placeholder=e)}__timePlaceholderChanged(e,t){t&&(t.placeholder=e)}__stepChanged(e,t){t&&t.step!==e&&(t.step=e)}__initialPositionChanged(e,t){t&&(t.initialPosition=e)}__showWeekNumbersChanged(e,t){t&&(t.showWeekNumbers=e)}__invalidChanged(e,t,i){t&&(t.invalid=e),i&&(i.invalid=e)}__requiredChanged(e,t,i){t&&(t.required=e),i&&(i.required=e),this.__oldRequired&&!e&&this._requestValidation(),this.__oldRequired=e}__disabledChanged(e,t,i){t&&(t.disabled=e),i&&(i.disabled=e)}__readonlyChanged(e,t,i){t&&(t.readonly=e),i&&(i.readonly=e)}__parseDate(e){let t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(e);if(!t)return;let i=new Date(Date.UTC(0,0));return i.setUTCFullYear(parseInt(t[1],10)),i.setUTCMonth(parseInt(t[2],10)-1),i.setUTCDate(parseInt(t[3],10)),i}__formatDateISO(e,t){return e?e instanceof Date?so({year:e.getUTCFullYear(),month:e.getUTCMonth(),day:e.getUTCDate()}):"":t}__parseDateTime(e){let[t,i]=e.split("T");if(!(t&&i))return;let s=this.__parseDate(t);if(!s)return;let r=s8(i);if(r)return s.setUTCHours(parseInt(r.hours)),s.setUTCMinutes(parseInt(r.minutes||0)),s.setUTCSeconds(parseInt(r.seconds||0)),s.setUTCMilliseconds(parseInt(r.milliseconds||0)),s}__formatDateTime(e){if(!e)return"";let t=this.__formatDateISO(e,""),i=this.__dateToIsoTimeString(e);return`${t}T${i}`}__dateToIsoTimeString(e){return s3(s6({hours:e.getUTCHours(),minutes:e.getUTCMinutes(),seconds:e.getUTCSeconds(),milliseconds:e.getUTCMilliseconds()},this.step))}checkValidity(){let e=this.__pickers.some(e=>!e.checkValidity()),t=1===this.__filledPickers.length,i=this.required&&this.__pickers.some(e=>!e.value);return!e&&!i&&!t}__commitPendingValueChange(){this._requestValidation(),this.__committedValue!==this.value?this.dispatchEvent(new CustomEvent("change",{bubbles:!0})):this.__committedUnparsableValue!==this.__unparsableValue&&this.dispatchEvent(new CustomEvent("unparsable-change")),this.__committedValue=this.value,this.__committedUnparsableValue=this.__unparsableValue}get __hasPendingValueChange(){return this.__committedValue!==this.value||this.__committedUnparsableValue!==this.__unparsableValue}__dateTimeEquals(e,t){return!!st(e,t,se)&&e.getUTCHours()===t.getUTCHours()&&e.getUTCMinutes()===t.getUTCMinutes()&&e.getUTCSeconds()===t.getUTCSeconds()&&e.getUTCMilliseconds()===t.getUTCMilliseconds()}__handleDateTimeChange(e,t,i,s){if(!i){this[e]="",this[t]="";return}let r=this.__parseDateTime(i);if(!r){this[e]=s;return}this.__dateTimeEquals(this[t],r)||(this[t]=r)}__valueChanged(e,t){this.__handleDateTimeChange("value","__selectedDateTime",e,t),this.__keepCommittedValue||(this.__committedValue=e,this.__committedUnparsableValue=""),this.toggleAttribute("has-value",!!e),this.__updateTimePickerMinMax()}__dispatchChange(){this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__minChanged(e,t){this.__handleDateTimeChange("min","__minDateTime",e,t),this.__datePicker&&(this.__datePicker.min=this.__formatDateISO(this.__minDateTime,this.__defaultDateMinMaxValue)),this.__updateTimePickerMinMax(),this.__datePicker&&this.__timePicker&&this.value&&this._requestValidation()}__maxChanged(e,t){this.__handleDateTimeChange("max","__maxDateTime",e,t),this.__datePicker&&(this.__datePicker.max=this.__formatDateISO(this.__maxDateTime,this.__defaultDateMinMaxValue)),this.__updateTimePickerMinMax(),this.__datePicker&&this.__timePicker&&this.value&&this._requestValidation()}__selectedDateTimeChanged(e){let t=this.__formatDateTime(e);if(this.value!==t&&(this.value=t),this.__datePicker&&this.__datePicker.$&&!this.__ignoreInputValueChange){this.__ignoreInputValueChange=!0;let[e,t]=this.value.split("T");this.__datePicker.value=e||"",this.__timePicker.value=t||"",this.__ignoreInputValueChange=!1}}__valueChangedEventHandler(){this.__ignoreInputValueChange||(this.__ignoreInputValueChange=!0,this.__keepCommittedValue=!0,this.__updateTimePickerMinMax(),this.value=this.__formattedValue,this.__keepCommittedValue=!1,this.__ignoreInputValueChange=!1)}__autoOpenDisabledChanged(e,t,i){t&&(t.autoOpenDisabled=e),i&&(i.autoOpenDisabled=e)}__themeChanged(e,t,i){t&&i&&[t,i].forEach(t=>{e?t.setAttribute("theme",e):t.removeAttribute("theme")})}__pickersChanged(e,t){!e||!t||this.__isDefaultPicker(e,"date")===this.__isDefaultPicker(t,"time")&&(e.value?this.__valueChangedEventHandler():this.value&&(this.__selectedDateTimeChanged(this.__selectedDateTime),(this.min&&this.__minDateTime||this.max&&this.__maxDateTime)&&this._requestValidation()))}};class rd extends rl(ty(eX(e8(tv(ek))))){static get is(){return"vaadin-date-time-picker"}static get styles(){return[sk,rs]}render(){return en`
1718
+ `,rn=Object.keys(sR),ra=Object.keys(s9),ro={...sR,...s9};class rl extends ti{constructor(e,t){super(e,`${t}-picker`,`vaadin-${t}-picker`,{initializer:(e,i)=>{i[`__${t}Picker`]=e}})}}let rd=e=>class extends sL(iD(t8(tZ(e)))){static get properties(){return{name:{type:String},value:{type:String,notify:!0,value:"",observer:"__valueChanged",sync:!0},min:{type:String,observer:"__minChanged",sync:!0},max:{type:String,observer:"__maxChanged",sync:!0},__minDateTime:{type:Date,value:"",sync:!0},__maxDateTime:{type:Date,value:"",sync:!0},datePlaceholder:{type:String,sync:!0},timePlaceholder:{type:String,sync:!0},step:{type:Number,sync:!0},initialPosition:{type:String,sync:!0},showWeekNumbers:{type:Boolean,value:!1,sync:!0},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},autofocus:{type:Boolean},__selectedDateTime:{type:Date,sync:!0},__datePicker:{type:Object,sync:!0,observer:"__datePickerChanged"},__timePicker:{type:Object,sync:!0,observer:"__timePickerChanged"}}}static get observers(){return["__selectedDateTimeChanged(__selectedDateTime)","__datePlaceholderChanged(datePlaceholder, __datePicker)","__timePlaceholderChanged(timePlaceholder, __timePicker)","__stepChanged(step, __timePicker)","__initialPositionChanged(initialPosition, __datePicker)","__showWeekNumbersChanged(showWeekNumbers, __datePicker)","__requiredChanged(required, __datePicker, __timePicker)","__invalidChanged(invalid, __datePicker, __timePicker)","__disabledChanged(disabled, __datePicker, __timePicker)","__readonlyChanged(readonly, __datePicker, __timePicker)","__i18nChanged(__effectiveI18n, __datePicker, __timePicker)","__autoOpenDisabledChanged(autoOpenDisabled, __datePicker, __timePicker)","__themeChanged(_theme, __datePicker, __timePicker)","__pickersChanged(__datePicker, __timePicker)","__labelOrAccessibleNameChanged(label, accessibleName, __effectiveI18n, __datePicker, __timePicker)"]}static get defaultI18n(){return ro}constructor(){super(),this.__defaultDateMinMaxValue=void 0,this.__defaultTimeMinValue="00:00:00.000",this.__defaultTimeMaxValue="23:59:59.999",this.__onGlobalClick=this.__onGlobalClick.bind(this),this.__changeEventHandler=this.__changeEventHandler.bind(this),this.__valueChangedEventHandler=this.__valueChangedEventHandler.bind(this),this.__openedChangedEventHandler=this.__openedChangedEventHandler.bind(this)}get i18n(){return super.i18n}set i18n(e){super.i18n=e}get __pickers(){return[this.__datePicker,this.__timePicker]}get __filledPickers(){return this.__pickers.filter(e=>e.value||e.__unparsableValue)}get __formattedValue(){let e=this.__pickers.map(e=>e.value);return e.every(Boolean)?e.join("T"):""}get __unparsableValue(){return this.__filledPickers.length>0&&!this.__pickers.every(e=>e.value)?this.__pickers.map(e=>e.value||e.__unparsableValue).join("T"):""}ready(){super.ready(),this._datePickerController=new rl(this,"date"),this.addController(this._datePickerController),this._timePickerController=new rl(this,"time"),this.addController(this._timePickerController),this.autofocus&&!this.disabled&&window.requestAnimationFrame(()=>this.focus()),this.setAttribute("role","group"),this._tooltipController=new ts(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setShouldShow(e=>e.__datePicker&&!e.__datePicker.opened&&e.__timePicker&&!e.__timePicker.opened),this.ariaTarget=this}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.__onGlobalClick,!0)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.__onGlobalClick,!0)}focus(e){this.__datePicker&&this.__datePicker.focus(e)}__onGlobalClick(e){!(this.__datePicker.opened||this.__timePicker.opened)||e.composedPath().every(e=>![this.__datePicker,this.__datePicker.$.overlay,this.__timePicker,this.__timePicker.$.overlay].includes(e))&&(this.__outsideClickInProgress=!0,setTimeout(()=>{this.__outsideClickInProgress=!1}))}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.__commitPendingValueChange()}_shouldRemoveFocus(e){let t=e.relatedTarget;return!(this.__datePicker.opened||this.__timePicker.opened||this.__datePicker.contains(t)||this.__timePicker.contains(t))}__syncI18n(e,t,i){let s={};i.forEach(e=>{t?.hasOwnProperty(e)&&(s[e]=t[e])}),e.i18n=s}__changeEventHandler(e){e.stopPropagation();let t=this.invalid,i=this.__filledPickers;(!(1===i.length&&i[0].checkValidity())||t)&&this.__hasPendingValueChange&&this.__commitPendingValueChange()}__openedChangedEventHandler(){let e=this.__datePicker.opened||this.__timePicker.opened;this.style.pointerEvents=e?"auto":"",!e&&this.__outsideClickInProgress&&this.__commitPendingValueChange()}__addInputListeners(e){e.addEventListener("change",this.__changeEventHandler),e.addEventListener("unparsable-change",this.__changeEventHandler),e.addEventListener("value-changed",this.__valueChangedEventHandler),e.addEventListener("opened-changed",this.__openedChangedEventHandler)}__removeInputListeners(e){e.removeEventListener("change",this.__changeEventHandler),e.removeEventListener("unparsable-change",this.__changeEventHandler),e.removeEventListener("value-changed",this.__valueChangedEventHandler),e.removeEventListener("opened-changed",this.__openedChangedEventHandler)}__isDefaultPicker(e,t){let i=this[`_${t}PickerController`];return i&&e===i.defaultNode}__datePickerChanged(e,t){e&&(t&&(this.__removeInputListeners(t),t.remove()),this.__addInputListeners(e),this.__isDefaultPicker(e,"date")||(this.datePlaceholder=e.placeholder,this.initialPosition=e.initialPosition,this.showWeekNumbers=e.showWeekNumbers),e.min=this.__formatDateISO(this.__minDateTime,this.__defaultDateMinMaxValue),e.max=this.__formatDateISO(this.__maxDateTime,this.__defaultDateMinMaxValue),e.manualValidation=!0)}__timePickerChanged(e,t){e&&(t&&(this.__removeInputListeners(t),t.remove()),this.__addInputListeners(e),this.__isDefaultPicker(e,"time")||(this.timePlaceholder=e.placeholder,this.step=e.step),this.__updateTimePickerMinMax(),e.manualValidation=!0)}__updateTimePickerMinMax(){if(this.__timePicker&&this.__datePicker){let e=this.__parseDate(this.__datePicker.value),t=si(this.__minDateTime,this.__maxDateTime,st);this.__minDateTime&&si(e,this.__minDateTime,st)||t?this.__timePicker.min=this.__dateToIsoTimeString(this.__minDateTime):this.__timePicker.min=this.__defaultTimeMinValue,this.__maxDateTime&&si(e,this.__maxDateTime,st)||t?this.__timePicker.max=this.__dateToIsoTimeString(this.__maxDateTime):this.__timePicker.max=this.__defaultTimeMaxValue}}__i18nChanged(e,t,i){t&&this.__isDefaultPicker(t,"date")&&this.__syncI18n(t,e,rn),i&&this.__isDefaultPicker(i,"time")&&this.__syncI18n(i,e,ra)}__labelOrAccessibleNameChanged(e,t,i,s,r){let n=t||e||"";s&&(s.accessibleName=`${n} ${i.dateLabel||""}`.trim()),r&&(r.accessibleName=`${n} ${i.timeLabel||""}`.trim())}__datePlaceholderChanged(e,t){t&&(t.placeholder=e)}__timePlaceholderChanged(e,t){t&&(t.placeholder=e)}__stepChanged(e,t){t&&t.step!==e&&(t.step=e)}__initialPositionChanged(e,t){t&&(t.initialPosition=e)}__showWeekNumbersChanged(e,t){t&&(t.showWeekNumbers=e)}__invalidChanged(e,t,i){t&&(t.invalid=e),i&&(i.invalid=e)}__requiredChanged(e,t,i){t&&(t.required=e),i&&(i.required=e),this.__oldRequired&&!e&&this._requestValidation(),this.__oldRequired=e}__disabledChanged(e,t,i){t&&(t.disabled=e),i&&(i.disabled=e)}__readonlyChanged(e,t,i){t&&(t.readonly=e),i&&(i.readonly=e)}__parseDate(e){let t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(e);if(!t)return;let i=new Date(Date.UTC(0,0));return i.setUTCFullYear(parseInt(t[1],10)),i.setUTCMonth(parseInt(t[2],10)-1),i.setUTCDate(parseInt(t[3],10)),i}__formatDateISO(e,t){return e?e instanceof Date?sl({year:e.getUTCFullYear(),month:e.getUTCMonth(),day:e.getUTCDate()}):"":t}__parseDateTime(e){let[t,i]=e.split("T");if(!(t&&i))return;let s=this.__parseDate(t);if(!s)return;let r=s6(i);if(r)return s.setUTCHours(parseInt(r.hours)),s.setUTCMinutes(parseInt(r.minutes||0)),s.setUTCSeconds(parseInt(r.seconds||0)),s.setUTCMilliseconds(parseInt(r.milliseconds||0)),s}__formatDateTime(e){if(!e)return"";let t=this.__formatDateISO(e,""),i=this.__dateToIsoTimeString(e);return`${t}T${i}`}__dateToIsoTimeString(e){return s5(s7({hours:e.getUTCHours(),minutes:e.getUTCMinutes(),seconds:e.getUTCSeconds(),milliseconds:e.getUTCMilliseconds()},this.step))}checkValidity(){let e=this.__pickers.some(e=>!e.checkValidity()),t=1===this.__filledPickers.length,i=this.required&&this.__pickers.some(e=>!e.value);return!e&&!i&&!t}__commitPendingValueChange(){this._requestValidation(),this.__committedValue!==this.value?this.dispatchEvent(new CustomEvent("change",{bubbles:!0})):this.__committedUnparsableValue!==this.__unparsableValue&&this.dispatchEvent(new CustomEvent("unparsable-change")),this.__committedValue=this.value,this.__committedUnparsableValue=this.__unparsableValue}get __hasPendingValueChange(){return this.__committedValue!==this.value||this.__committedUnparsableValue!==this.__unparsableValue}__dateTimeEquals(e,t){return!!si(e,t,st)&&e.getUTCHours()===t.getUTCHours()&&e.getUTCMinutes()===t.getUTCMinutes()&&e.getUTCSeconds()===t.getUTCSeconds()&&e.getUTCMilliseconds()===t.getUTCMilliseconds()}__handleDateTimeChange(e,t,i,s){if(!i){this[e]="",this[t]="";return}let r=this.__parseDateTime(i);if(!r){this[e]=s;return}this.__dateTimeEquals(this[t],r)||(this[t]=r)}__valueChanged(e,t){this.__handleDateTimeChange("value","__selectedDateTime",e,t),this.__keepCommittedValue||(this.__committedValue=e,this.__committedUnparsableValue=""),this.toggleAttribute("has-value",!!e),this.__updateTimePickerMinMax()}__dispatchChange(){this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__minChanged(e,t){this.__handleDateTimeChange("min","__minDateTime",e,t),this.__datePicker&&(this.__datePicker.min=this.__formatDateISO(this.__minDateTime,this.__defaultDateMinMaxValue)),this.__updateTimePickerMinMax(),this.__datePicker&&this.__timePicker&&this.value&&this._requestValidation()}__maxChanged(e,t){this.__handleDateTimeChange("max","__maxDateTime",e,t),this.__datePicker&&(this.__datePicker.max=this.__formatDateISO(this.__maxDateTime,this.__defaultDateMinMaxValue)),this.__updateTimePickerMinMax(),this.__datePicker&&this.__timePicker&&this.value&&this._requestValidation()}__selectedDateTimeChanged(e){let t=this.__formatDateTime(e);if(this.value!==t&&(this.value=t),this.__datePicker&&this.__datePicker.$&&!this.__ignoreInputValueChange){this.__ignoreInputValueChange=!0;let[e,t]=this.value.split("T");this.__datePicker.value=e||"",this.__timePicker.value=t||"",this.__ignoreInputValueChange=!1}}__valueChangedEventHandler(){this.__ignoreInputValueChange||(this.__ignoreInputValueChange=!0,this.__keepCommittedValue=!0,this.__updateTimePickerMinMax(),this.value=this.__formattedValue,this.__keepCommittedValue=!1,this.__ignoreInputValueChange=!1)}__autoOpenDisabledChanged(e,t,i){t&&(t.autoOpenDisabled=e),i&&(i.autoOpenDisabled=e)}__themeChanged(e,t,i){t&&i&&[t,i].forEach(t=>{e?t.setAttribute("theme",e):t.removeAttribute("theme")})}__pickersChanged(e,t){!e||!t||this.__isDefaultPicker(e,"date")===this.__isDefaultPicker(t,"time")&&(e.value?this.__valueChangedEventHandler():this.value&&(this.__selectedDateTimeChanged(this.__selectedDateTime),(this.min&&this.__minDateTime||this.max&&this.__maxDateTime)&&this._requestValidation()))}};class rh extends rd(tw(eX(e8(tm(ek))))){static get is(){return"vaadin-date-time-picker"}static get styles(){return[sE,rr]}render(){return en`
1704
1719
  <div class="vaadin-date-time-picker-container">
1705
1720
  <div part="label" @click="${this.focus}">
1706
1721
  <slot name="label"></slot>
@@ -1722,7 +1737,7 @@
1722
1737
  </div>
1723
1738
 
1724
1739
  <slot name="tooltip"></slot>
1725
- `}}eI(rd);let rh=class extends rd{static getLocalizedISOString(e){return e&&new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString().slice(0,16)}};rh=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-date-time-picker")],rh);let ru=[iz,g`
1740
+ `}}eT(rh);let ru=class extends rh{static getLocalizedISOString(e){return e&&new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString().slice(0,16)}};ru=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-date-time-picker")],ru);let rc=[iF,g`
1726
1741
  /* Optical centering */
1727
1742
  :host::before,
1728
1743
  :host::after {
@@ -1737,6 +1752,8 @@
1737
1752
 
1738
1753
  :host {
1739
1754
  cursor: default;
1755
+ --_overflow-indicator-height: var(--vaadin-dialog-overflow-indicator-height, 1px);
1756
+ --_overflow-indicator-color: var(--vaadin-dialog-overflow-indicator-color, var(--vaadin-border-color-secondary));
1740
1757
  }
1741
1758
 
1742
1759
  [part='overlay']:focus-visible {
@@ -1829,6 +1846,38 @@
1829
1846
  :host(:not([has-footer])) [part='footer'] {
1830
1847
  display: none !important;
1831
1848
  }
1849
+
1850
+ [part='header'],
1851
+ [part='footer'] {
1852
+ position: relative;
1853
+
1854
+ &::after {
1855
+ content: '';
1856
+ opacity: 0;
1857
+ position: absolute;
1858
+ pointer-events: none;
1859
+ height: var(--_overflow-indicator-height);
1860
+ top: 100%;
1861
+ inset-inline: 0;
1862
+ background: linear-gradient(
1863
+ var(--_overflow-indicator-dir, to bottom),
1864
+ var(--_overflow-indicator-color),
1865
+ var(--_overflow-indicator-color) 1px,
1866
+ transparent
1867
+ );
1868
+ }
1869
+ }
1870
+
1871
+ [part='footer']::after {
1872
+ top: auto;
1873
+ bottom: 100%;
1874
+ --_overflow-indicator-dir: to top;
1875
+ }
1876
+
1877
+ :host([overflow~='top']) [part='header']::after,
1878
+ :host([overflow~='bottom']) [part='footer']::after {
1879
+ opacity: 1;
1880
+ }
1832
1881
  `,g`
1833
1882
  [part='overlay'] {
1834
1883
  position: relative;
@@ -1942,7 +1991,7 @@
1942
1991
  left: -4px;
1943
1992
  cursor: nwse-resize;
1944
1993
  }
1945
- `],rc=e=>class extends i2(e){static get properties(){return{headerTitle:{type:String},headerRenderer:{type:Object},footerRenderer:{type:Object},keepInViewport:{type:Boolean,reflectToAttribute:!0}}}static get observers(){return["_headerFooterRendererChange(headerRenderer, footerRenderer, opened)","_headerTitleChanged(headerTitle, opened)"]}get _contentRoot(){return this.owner}get _rendererRoot(){if(!this.__savedRoot){let e=document.createElement("vaadin-dialog-content");e.style.display="contents",this.owner.appendChild(e),this.__savedRoot=e}return this.__savedRoot}ready(){super.ready(),this.__resizeObserver=new ResizeObserver(()=>{requestAnimationFrame(()=>{this.__adjustPosition(),this.__updateOverflow()})}),this.__resizeObserver.observe(this.$.resizerContainer),this.$.content.addEventListener("scroll",()=>{this.__updateOverflow()}),this.shadowRoot.addEventListener("slotchange",()=>{this.__updateOverflow()});let e=this.shadowRoot.querySelector('slot[name="header-content"]');this.__headerSlotObserver=new te(e,({currentNodes:e})=>{i1(this,"has-header",e.length>0),this.__updateOverflow()});let t=this.shadowRoot.querySelector('slot[name="footer"]');this.__footerSlotObserver=new te(t,({currentNodes:e})=>{i1(this,"has-footer",e.length>0),this.__updateOverflow()}),this.__handleWindowResize=this.__handleWindowResize.bind(this)}updated(e){super.updated(e),(e.has("opened")||e.has("keepInViewport"))&&(this.opened&&this.keepInViewport?window.addEventListener("resize",this.__handleWindowResize):window.removeEventListener("resize",this.__handleWindowResize))}__createContainer(e){let t=document.createElement("vaadin-dialog-content");return t.setAttribute("slot",e),t}__clearContainer(e){e.innerHTML="",delete e._$litPart$}__initContainer(e,t){return e?this.__clearContainer(e):(e=this.__createContainer(t),this.owner.appendChild(e)),e}_headerFooterRendererChange(e,t,i){let s=this.__oldHeaderRenderer!==e;this.__oldHeaderRenderer=e;let r=this.__oldFooterRenderer!==t;this.__oldFooterRenderer=t;let n=this._oldOpenedFooterHeader!==i;this._oldOpenedFooterHeader=i,s&&(e?this.headerContainer=this.__initContainer(this.headerContainer,"header-content"):this.headerContainer&&(this.headerContainer.remove(),this.headerContainer=null)),r&&(t?this.footerContainer=this.__initContainer(this.footerContainer,"footer"):this.footerContainer&&(this.footerContainer.remove(),this.footerContainer=null)),(e&&(s||n)||t&&(r||n))&&i&&this.requestContentUpdate()}_headerTitleChanged(e,t){i1(this,"has-title",!!e),t&&(e||this._oldHeaderTitle)&&this.requestContentUpdate(),this._oldHeaderTitle=e}_headerTitleRenderer(){this.headerTitle?(this.headerTitleElement||(this.headerTitleElement=document.createElement("h2"),this.headerTitleElement.setAttribute("slot","title"),this.headerTitleElement.classList.add("draggable")),this.owner.appendChild(this.headerTitleElement),this.headerTitleElement.textContent=this.headerTitle):this.headerTitleElement&&(this.headerTitleElement.remove(),this.headerTitleElement=null)}requestContentUpdate(){super.requestContentUpdate(),this.headerContainer&&this.headerRenderer&&this.headerRenderer.call(this.owner,this.headerContainer,this.owner),this.footerContainer&&this.footerRenderer&&this.footerRenderer.call(this.owner,this.footerContainer,this.owner),this._headerTitleRenderer(),this.__updateOverflow()}getBounds(){let e=this.$.overlay.getBoundingClientRect(),t=this.getBoundingClientRect(),i=e.top-t.top,s=e.left-t.left;return{top:i,left:s,width:e.width,height:e.height}}setBounds(e,t=!0){super.setBounds(e,t),this.__adjustPosition()}__updateOverflow(){let e="",t=this.$.content;t.scrollTop>0&&(e+=" top"),t.scrollTop<t.scrollHeight-t.clientHeight&&(e+=" bottom");let i=e.trim();i.length>0&&this.getAttribute("overflow")!==i?i1(this,"overflow",i):0===i.length&&this.hasAttribute("overflow")&&i1(this,"overflow",null)}__handleWindowResize(){this.__adjustPosition()}__adjustPosition(){if(!this.opened||!this.keepInViewport)return;let e=getComputedStyle(this.$.overlay);if("absolute"!==e.position)return;let t=this.getBoundingClientRect(),i=this.getBounds(),s=parseFloat(e.width)||i.width,r=parseFloat(e.height)||i.height,n=t.right-t.left-s,a=t.bottom-t.top-r;if(i.left>n||i.top>a){let e=Math.max(0,Math.min(i.left,n)),t=Math.max(0,Math.min(i.top,a));Object.assign(this.$.overlay.style,{left:`${e}px`,top:`${t}px`})}}};class rp extends rc(eK(ty(e8(tv(ek))))){static get is(){return"vaadin-dialog-overlay"}static get styles(){return ru}get _focusTrapRoot(){return this.owner}render(){return en`
1994
+ `];class rp{constructor(e){this.host=e}hostConnected(){if(!this.__initialized){this.__initialized=!0;let{host:e}=this;this.__resizeObserver=new ResizeObserver(()=>this.__updateState()),this.__resizeObserver.observe(e.$.resizerContainer),e.$.content.addEventListener("scroll",()=>this.__updateState(!0)),e.shadowRoot.addEventListener("slotchange",()=>this.__updateState(!0))}}update(){this.__updateState(!0)}__updateState(e=!1){cancelAnimationFrame(this.__updateRaf),e?this.__writeState(this.__readState()):this.__updateRaf=requestAnimationFrame(()=>this.__writeState(this.__readState()))}__readState(){let e=this.host.$.content,t="";return e.scrollTop>0&&(t+=" top"),e.scrollTop<e.scrollHeight-e.clientHeight&&(t+=" bottom"),t.trim()}__writeState(e){let{host:t}=this;e.length>0?i2(t,"overflow",e):i2(t,"overflow",null)}}let r_=e=>class extends i3(e){static get properties(){return{headerTitle:{type:String},headerRenderer:{type:Object},footerRenderer:{type:Object},keepInViewport:{type:Boolean,reflectToAttribute:!0}}}static get observers(){return["_headerFooterRendererChange(headerRenderer, footerRenderer, opened)","_headerTitleChanged(headerTitle, opened)"]}get _contentRoot(){return this.owner}get _rendererRoot(){if(!this.__savedRoot){let e=document.createElement("vaadin-dialog-content");e.style.display="contents",this.owner.appendChild(e),this.__savedRoot=e}return this.__savedRoot}ready(){super.ready(),this.__overflowController=new rp(this),this.addController(this.__overflowController),this.__resizeObserver=new ResizeObserver(()=>{requestAnimationFrame(()=>{this.__adjustPosition()})}),this.__resizeObserver.observe(this.$.resizerContainer);let e=this.shadowRoot.querySelector('slot[name="header-content"]');this.__headerSlotObserver=new te(e,({currentNodes:e})=>{i2(this,"has-header",e.length>0),this.__overflowController.update()});let t=this.shadowRoot.querySelector('slot[name="footer"]');this.__footerSlotObserver=new te(t,({currentNodes:e})=>{i2(this,"has-footer",e.length>0),this.__overflowController.update()}),this.__handleWindowResize=this.__handleWindowResize.bind(this)}updated(e){super.updated(e),(e.has("opened")||e.has("keepInViewport"))&&(this.opened&&this.keepInViewport?window.addEventListener("resize",this.__handleWindowResize):window.removeEventListener("resize",this.__handleWindowResize))}__createContainer(e){let t=document.createElement("vaadin-dialog-content");return t.setAttribute("slot",e),t}__clearContainer(e){e.innerHTML="",delete e._$litPart$}__initContainer(e,t){return e?this.__clearContainer(e):(e=this.__createContainer(t),this.owner.appendChild(e)),e}_headerFooterRendererChange(e,t,i){let s=this.__oldHeaderRenderer!==e;this.__oldHeaderRenderer=e;let r=this.__oldFooterRenderer!==t;this.__oldFooterRenderer=t;let n=this._oldOpenedFooterHeader!==i;this._oldOpenedFooterHeader=i,s&&(e?this.headerContainer=this.__initContainer(this.headerContainer,"header-content"):this.headerContainer&&(this.headerContainer.remove(),this.headerContainer=null)),r&&(t?this.footerContainer=this.__initContainer(this.footerContainer,"footer"):this.footerContainer&&(this.footerContainer.remove(),this.footerContainer=null)),(e&&(s||n)||t&&(r||n))&&i&&this.requestContentUpdate()}_headerTitleChanged(e,t){i2(this,"has-title",!!e),t&&(e||this._oldHeaderTitle)&&this.requestContentUpdate(),this._oldHeaderTitle=e}_headerTitleRenderer(){this.headerTitle?(this.headerTitleElement||(this.headerTitleElement=document.createElement("h2"),this.headerTitleElement.setAttribute("slot","title"),this.headerTitleElement.classList.add("draggable")),this.owner.appendChild(this.headerTitleElement),this.headerTitleElement.textContent=this.headerTitle):this.headerTitleElement&&(this.headerTitleElement.remove(),this.headerTitleElement=null)}requestContentUpdate(){super.requestContentUpdate(),this.headerContainer&&this.headerRenderer&&this.headerRenderer.call(this.owner,this.headerContainer,this.owner),this.footerContainer&&this.footerRenderer&&this.footerRenderer.call(this.owner,this.footerContainer,this.owner),this._headerTitleRenderer(),this.__overflowController?.update()}getBounds(){let e=this.$.overlay.getBoundingClientRect(),t=this.getBoundingClientRect(),i=e.top-t.top,s=e.left-t.left;return{top:i,left:s,width:e.width,height:e.height}}setBounds(e,t=!0){super.setBounds(e,t),this.__adjustPosition()}__handleWindowResize(){this.__adjustPosition()}__adjustPosition(){if(!this.opened||!this.keepInViewport)return;let e=getComputedStyle(this.$.overlay);if("absolute"!==e.position)return;let t=this.getBoundingClientRect(),i=this.getBounds(),s=parseFloat(e.width)||i.width,r=parseFloat(e.height)||i.height,n=t.right-t.left-s,a=t.bottom-t.top-r;if(i.left>n||i.top>a){let e=Math.max(0,Math.min(i.left,n)),t=Math.max(0,Math.min(i.top,a));Object.assign(this.$.overlay.style,{left:`${e}px`,top:`${t}px`})}}};class rv extends r_(eK(tw(e8(tm(ek))))){static get is(){return"vaadin-dialog-overlay"}static get styles(){return rc}get _focusTrapRoot(){return this.owner}render(){return en`
1946
1995
  <div id="backdrop" part="backdrop" ?hidden="${!this.withBackdrop}"></div>
1947
1996
  <div part="overlay" id="overlay">
1948
1997
  <section id="resizerContainer" class="resizer-container">
@@ -1954,7 +2003,7 @@
1954
2003
  <footer part="footer"><slot name="footer"></slot></footer>
1955
2004
  </section>
1956
2005
  </div>
1957
- `}}eI(rp);let r_=e=>class extends e{static get properties(){return{opened:{type:Boolean,reflectToAttribute:!0,value:!1,notify:!0,sync:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},modeless:{type:Boolean,value:!1},noFocusTrap:{type:Boolean,value:!1},top:{type:String},left:{type:String},overlayRole:{type:String},keepInViewport:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["__positionChanged(top, left)"]}ready(){super.ready();let e=this.$.overlay;e.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),e.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),e.addEventListener("vaadin-overlay-closed",this.__handleOverlayClosed.bind(this)),this._overlayElement=e,this.hasAttribute("role")||(this.role="dialog"),this.setAttribute("tabindex","0")}updated(e){super.updated(e),e.has("overlayRole")&&(this.role=this.overlayRole||"dialog"),e.has("modeless")&&(this.modeless?this.removeAttribute("aria-modal"):this.setAttribute("aria-modal","true"))}__handleOverlayClosed(){this.dispatchEvent(new CustomEvent("closed"))}connectedCallback(){super.connectedCallback(),this.__restoreOpened&&(this.opened=!0)}disconnectedCallback(){super.disconnectedCallback(),setTimeout(()=>{this.isConnected||(this.__restoreOpened=this.opened,this.opened=!1)})}_onOverlayOpened(e){!1===e.detail.value&&(this.opened=!1)}_handleOutsideClick(e){this.noCloseOnOutsideClick&&e.preventDefault()}_handleEscPress(e){this.noCloseOnEsc&&e.preventDefault()}_bringOverlayToFront(){this.modeless&&this._overlayElement.bringToFront()}__positionChanged(e,t){requestAnimationFrame(()=>this.$.overlay.setBounds({top:e,left:t}))}__sizeChanged(e,t){requestAnimationFrame(()=>this.$.overlay.setBounds({width:e,height:t},!1))}};function rv(e){return e.touches?e.touches[0]:e}function rm(e){return e.clientX>=0&&e.clientX<=window.innerWidth&&e.clientY>=0&&e.clientY<=window.innerHeight}let rf=e=>class extends e{static get properties(){return{draggable:{type:Boolean,value:!1,reflectToAttribute:!0},_touchDevice:{type:Boolean,value:iY},__dragHandleClassName:{type:String}}}ready(){super.ready(),this._originalBounds={},this._originalMouseCoords={},this._startDrag=this._startDrag.bind(this),this._drag=this._drag.bind(this),this._stopDrag=this._stopDrag.bind(this),this.$.overlay.$.overlay.addEventListener("mousedown",this._startDrag),this.$.overlay.$.overlay.addEventListener("touchstart",this._startDrag)}_startDrag(e){if(("touchstart"!==e.type||!(e.touches.length>1))&&!e.defaultPrevented&&this.draggable&&(0===e.button||e.touches)){let t=this.$.overlay.$.resizerContainer,i=e.target===t,s=e.offsetX>t.clientWidth||e.offsetY>t.clientHeight,r=e.target===this.$.overlay.$.content,n=e.composedPath().some((e,t)=>{if(!e.classList)return!1;let i=e.classList.contains(this.__dragHandleClassName||"draggable"),s=e.classList.contains("draggable-leaf-only"),r=0===t;return s&&r||i&&(!s||r)});if(i&&!s||r||n){e.preventDefault(),this._originalBounds=this.$.overlay.getBounds();let t=rv(e);this._originalMouseCoords={top:t.pageY,left:t.pageX},window.addEventListener("mouseup",this._stopDrag),window.addEventListener("touchend",this._stopDrag),window.addEventListener("mousemove",this._drag),window.addEventListener("touchmove",this._drag);let{top:i,left:s,width:r,height:n}=this._originalBounds;"absolute"!==this.$.overlay.$.overlay.style.position&&(this.top=i,this.left=s),this.dispatchEvent(new CustomEvent("drag-start",{detail:{width:r,height:n,top:i,left:s}}))}}}_drag(e){let t=rv(e);if(rm(t)){let e=this._originalBounds.top+(t.pageY-this._originalMouseCoords.top),i=this._originalBounds.left+(t.pageX-this._originalMouseCoords.left);if(this.keepInViewport){let{width:t,height:s}=this._originalBounds,r=this.$.overlay.getBoundingClientRect(),n=r.right-r.left-t,a=r.bottom-r.top-s;i=Math.max(0,Math.min(i,n)),e=Math.max(0,Math.min(e,a))}this.top=e,this.left=i}}_stopDrag(){this.dispatchEvent(new CustomEvent("dragged",{detail:{top:this.top,left:this.left}})),window.removeEventListener("mouseup",this._stopDrag),window.removeEventListener("touchend",this._stopDrag),window.removeEventListener("mousemove",this._drag),window.removeEventListener("touchmove",this._drag)}},rg=e=>class extends e{static get properties(){return{renderer:{type:Object},headerTitle:{type:String},headerRenderer:{type:Object},footerRenderer:{type:Object}}}requestContentUpdate(){this._overlayElement&&this._overlayElement.requestContentUpdate()}},rb=e=>class extends e{static get properties(){return{resizable:{type:Boolean,value:!1,reflectToAttribute:!0}}}ready(){super.ready(),this._originalBounds={},this._originalMouseCoords={},this._resizeListeners={start:{},resize:{},stop:{}},this._addResizeListeners()}_addResizeListeners(){["n","e","s","w","nw","ne","se","sw"].forEach(e=>{let t=document.createElement("div");this._resizeListeners.start[e]=t=>this._startResize(t,e),this._resizeListeners.resize[e]=t=>this._resize(t,e),this._resizeListeners.stop[e]=()=>this._stopResize(e),1===e.length&&t.classList.add("edge"),t.classList.add("resizer"),t.classList.add(e),t.addEventListener("mousedown",this._resizeListeners.start[e]),t.addEventListener("touchstart",this._resizeListeners.start[e]),this.$.overlay.$.resizerContainer.appendChild(t)})}_startResize(e,t){if(("touchstart"!==e.type||!(e.touches.length>1))&&(0===e.button||e.touches)){e.preventDefault(),this._originalBounds=this.$.overlay.getBounds();let i=rv(e);this._originalMouseCoords={top:i.pageY,left:i.pageX},window.addEventListener("mousemove",this._resizeListeners.resize[t]),window.addEventListener("touchmove",this._resizeListeners.resize[t]),window.addEventListener("mouseup",this._resizeListeners.stop[t]),window.addEventListener("touchend",this._resizeListeners.stop[t]),this.$.overlay.setBounds(this._originalBounds),this.$.overlay.setAttribute("has-bounds-set","");let{width:s,height:r,top:n,left:a}=this._originalBounds;this.dispatchEvent(new CustomEvent("resize-start",{detail:{width:s,height:r,top:n,left:a}}))}}_resize(e,t){let i=rv(e);rm(i)&&t.split("").forEach(e=>{switch(e){case"n":{let e=this._originalBounds.height-(i.pageY-this._originalMouseCoords.top),t=this._originalBounds.top+(i.pageY-this._originalMouseCoords.top);e>40&&(this.top=t,this.height=e);break}case"e":{let e=this._originalBounds.width+(i.pageX-this._originalMouseCoords.left);e>40&&(this.width=e);break}case"s":{let e=this._originalBounds.height+(i.pageY-this._originalMouseCoords.top);e>40&&(this.height=e);break}case"w":{let e=this._originalBounds.width-(i.pageX-this._originalMouseCoords.left),t=this._originalBounds.left+(i.pageX-this._originalMouseCoords.left);e>40&&(this.left=t,this.width=e)}}})}_stopResize(e){window.removeEventListener("mousemove",this._resizeListeners.resize[e]),window.removeEventListener("touchmove",this._resizeListeners.resize[e]),window.removeEventListener("mouseup",this._resizeListeners.stop[e]),window.removeEventListener("touchend",this._resizeListeners.stop[e]),this.dispatchEvent(new CustomEvent("resize",{detail:this._getResizeDimensions()}))}_getResizeDimensions(){let{width:e,height:t,top:i,left:s}=getComputedStyle(this.$.overlay.$.overlay);return{width:e,height:t,top:i,left:s}}},ry=e=>class extends e{static get properties(){return{width:{type:String},height:{type:String}}}static get observers(){return["__sizeChanged(width, height)"]}__sizeChanged(e,t){requestAnimationFrame(()=>this.$.overlay.setBounds({width:e,height:t},!1))}};class rw extends ry(rf(rb(rg(r_(tm(eX(e8(ek)))))))){static get is(){return"vaadin-dialog"}static get styles(){return g`
2006
+ `}}eT(rv);let rm=e=>class extends e{static get properties(){return{opened:{type:Boolean,reflectToAttribute:!0,value:!1,notify:!0,sync:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},modeless:{type:Boolean,value:!1},noFocusTrap:{type:Boolean,value:!1},top:{type:String},left:{type:String},overlayRole:{type:String},keepInViewport:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["__positionChanged(top, left)"]}ready(){super.ready();let e=this.$.overlay;e.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),e.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),e.addEventListener("vaadin-overlay-closed",this.__handleOverlayClosed.bind(this)),this._overlayElement=e,this.hasAttribute("role")||(this.role="dialog"),this.setAttribute("tabindex","0")}updated(e){super.updated(e),e.has("overlayRole")&&(this.role=this.overlayRole||"dialog"),e.has("modeless")&&(this.modeless?this.removeAttribute("aria-modal"):this.setAttribute("aria-modal","true"))}__handleOverlayClosed(){this.dispatchEvent(new CustomEvent("closed"))}connectedCallback(){super.connectedCallback(),this.__restoreOpened&&(this.opened=!0)}disconnectedCallback(){super.disconnectedCallback(),setTimeout(()=>{this.isConnected||(this.__restoreOpened=this.opened,this.opened=!1)})}_onOverlayOpened(e){!1===e.detail.value&&(this.opened=!1)}_handleOutsideClick(e){this.noCloseOnOutsideClick&&e.preventDefault()}_handleEscPress(e){this.noCloseOnEsc&&e.preventDefault()}_bringOverlayToFront(){this.modeless&&this._overlayElement.bringToFront()}__positionChanged(e,t){requestAnimationFrame(()=>this.$.overlay.setBounds({top:e,left:t}))}__sizeChanged(e,t){requestAnimationFrame(()=>this.$.overlay.setBounds({width:e,height:t},!1))}};function rf(e){return e.touches?e.touches[0]:e}function rg(e){return e.clientX>=0&&e.clientX<=window.innerWidth&&e.clientY>=0&&e.clientY<=window.innerHeight}let rb=e=>class extends e{static get properties(){return{draggable:{type:Boolean,value:!1,reflectToAttribute:!0},_touchDevice:{type:Boolean,value:iq},__dragHandleClassName:{type:String}}}ready(){super.ready(),this._originalBounds={},this._originalMouseCoords={},this._startDrag=this._startDrag.bind(this),this._drag=this._drag.bind(this),this._stopDrag=this._stopDrag.bind(this),this.$.overlay.$.overlay.addEventListener("mousedown",this._startDrag),this.$.overlay.$.overlay.addEventListener("touchstart",this._startDrag)}_startDrag(e){if(("touchstart"!==e.type||!(e.touches.length>1))&&!e.defaultPrevented&&this.draggable&&(0===e.button||e.touches)){let t=this.$.overlay.$.resizerContainer,i=e.target===t,s=e.offsetX>t.clientWidth||e.offsetY>t.clientHeight,r=e.target===this.$.overlay.$.content,n=e.composedPath().some((e,t)=>{if(!e.classList)return!1;let i=e.classList.contains(this.__dragHandleClassName||"draggable"),s=e.classList.contains("draggable-leaf-only"),r=0===t;return s&&r||i&&(!s||r)});if(i&&!s||r||n){e.preventDefault(),this._originalBounds=this.$.overlay.getBounds();let t=rf(e);this._originalMouseCoords={top:t.pageY,left:t.pageX},window.addEventListener("mouseup",this._stopDrag),window.addEventListener("touchend",this._stopDrag),window.addEventListener("mousemove",this._drag),window.addEventListener("touchmove",this._drag);let{top:i,left:s,width:r,height:n}=this._originalBounds;"absolute"!==this.$.overlay.$.overlay.style.position&&(this.top=i,this.left=s),this.dispatchEvent(new CustomEvent("drag-start",{detail:{width:r,height:n,top:i,left:s}}))}}}_drag(e){let t=rf(e);if(rg(t)){let e=this._originalBounds.top+(t.pageY-this._originalMouseCoords.top),i=this._originalBounds.left+(t.pageX-this._originalMouseCoords.left);if(this.keepInViewport){let{width:t,height:s}=this._originalBounds,r=this.$.overlay.getBoundingClientRect(),n=r.right-r.left-t,a=r.bottom-r.top-s;i=Math.max(0,Math.min(i,n)),e=Math.max(0,Math.min(e,a))}this.top=e,this.left=i}}_stopDrag(){this.dispatchEvent(new CustomEvent("dragged",{detail:{top:this.top,left:this.left}})),window.removeEventListener("mouseup",this._stopDrag),window.removeEventListener("touchend",this._stopDrag),window.removeEventListener("mousemove",this._drag),window.removeEventListener("touchmove",this._drag)}},ry=e=>class extends e{static get properties(){return{renderer:{type:Object},headerTitle:{type:String},headerRenderer:{type:Object},footerRenderer:{type:Object}}}requestContentUpdate(){this._overlayElement&&this._overlayElement.requestContentUpdate()}},rw=e=>class extends e{static get properties(){return{resizable:{type:Boolean,value:!1,reflectToAttribute:!0}}}ready(){super.ready(),this._originalBounds={},this._originalMouseCoords={},this._resizeListeners={start:{},resize:{},stop:{}},this._addResizeListeners()}_addResizeListeners(){["n","e","s","w","nw","ne","se","sw"].forEach(e=>{let t=document.createElement("div");this._resizeListeners.start[e]=t=>this._startResize(t,e),this._resizeListeners.resize[e]=t=>this._resize(t,e),this._resizeListeners.stop[e]=()=>this._stopResize(e),1===e.length&&t.classList.add("edge"),t.classList.add("resizer"),t.classList.add(e),t.addEventListener("mousedown",this._resizeListeners.start[e]),t.addEventListener("touchstart",this._resizeListeners.start[e]),this.$.overlay.$.resizerContainer.appendChild(t)})}_startResize(e,t){if(("touchstart"!==e.type||!(e.touches.length>1))&&(0===e.button||e.touches)){e.preventDefault(),this._originalBounds=this.$.overlay.getBounds();let i=rf(e);this._originalMouseCoords={top:i.pageY,left:i.pageX},window.addEventListener("mousemove",this._resizeListeners.resize[t]),window.addEventListener("touchmove",this._resizeListeners.resize[t]),window.addEventListener("mouseup",this._resizeListeners.stop[t]),window.addEventListener("touchend",this._resizeListeners.stop[t]),this.$.overlay.setBounds(this._originalBounds),this.$.overlay.setAttribute("has-bounds-set","");let{width:s,height:r,top:n,left:a}=this._originalBounds;this.dispatchEvent(new CustomEvent("resize-start",{detail:{width:s,height:r,top:n,left:a}}))}}_resize(e,t){let i=rf(e);rg(i)&&t.split("").forEach(e=>{switch(e){case"n":{let e=this._originalBounds.height-(i.pageY-this._originalMouseCoords.top),t=this._originalBounds.top+(i.pageY-this._originalMouseCoords.top);e>40&&(this.top=t,this.height=e);break}case"e":{let e=this._originalBounds.width+(i.pageX-this._originalMouseCoords.left);e>40&&(this.width=e);break}case"s":{let e=this._originalBounds.height+(i.pageY-this._originalMouseCoords.top);e>40&&(this.height=e);break}case"w":{let e=this._originalBounds.width-(i.pageX-this._originalMouseCoords.left),t=this._originalBounds.left+(i.pageX-this._originalMouseCoords.left);e>40&&(this.left=t,this.width=e)}}})}_stopResize(e){window.removeEventListener("mousemove",this._resizeListeners.resize[e]),window.removeEventListener("touchmove",this._resizeListeners.resize[e]),window.removeEventListener("mouseup",this._resizeListeners.stop[e]),window.removeEventListener("touchend",this._resizeListeners.stop[e]),this.dispatchEvent(new CustomEvent("resize",{detail:this._getResizeDimensions()}))}_getResizeDimensions(){let{width:e,height:t,top:i,left:s}=getComputedStyle(this.$.overlay.$.overlay);return{width:e,height:t,top:i,left:s}}},rx=e=>class extends e{static get properties(){return{width:{type:String},height:{type:String}}}static get observers(){return["__sizeChanged(width, height)"]}__sizeChanged(e,t){requestAnimationFrame(()=>this.$.overlay.setBounds({width:e,height:t},!1))}};class rC extends rx(rb(rw(ry(rm(tf(eX(e8(ek)))))))){static get is(){return"vaadin-dialog"}static get styles(){return g`
1958
2007
  :host([opened]),
1959
2008
  :host([opening]),
1960
2009
  :host([closing]) {
@@ -1997,7 +2046,7 @@
1997
2046
  <slot name="footer" slot="footer"></slot>
1998
2047
  <slot></slot>
1999
2048
  </vaadin-dialog-overlay>
2000
- `}updated(e){super.updated(e),e.has("headerTitle")&&(this.ariaLabel=this.headerTitle)}}eI(rw);let rx=e=>(...t)=>({_$litDirective$:e,values:t});class rC{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}let{I:rk}={M:F,P:U,A:H,C:1,L:eu,R:e_,D:G,V:ep,I:ev,H:em,N:eg,U:eb,B:ef,F:ey},rE=(e,t)=>{let i=e._$AN;if(void 0===i)return!1;for(let e of i)e._$AO?.(t,!1),rE(e,t);return!0},rT=e=>{let t,i;do{if(void 0===(t=e._$AM))break;(i=t._$AN).delete(e),e=t}while(0===i?.size)},rI=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(void 0===i)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),rA(t)}};function rD(e){void 0!==this._$AN?(rT(this),this._$AM=e,rI(this)):this._$AM=e}function rS(e,t=!1,i=0){let s=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(t)if(Array.isArray(s))for(let e=i;e<s.length;e++)rE(s[e],!1),rT(s[e]);else null!=s&&(rE(s,!1),rT(s));else rE(this,e)}let rA=e=>{2==e.type&&(e._$AP??=rS,e._$AQ??=rD)};class rO extends rC{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),rI(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(rE(this,e),rT(this))}setValue(e){if(void 0===this._$Ct.strings)this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}let rP=Symbol("valueNotInitialized");class r$ extends rO{constructor(e){if(super(e),6!==e.type)throw Error(`\`${this.constructor.name}\` must be bound to an element.`);this.previousValue=rP}render(e,t){return eo}update(e,[t,i]){return this.hasChanged(i)&&(this.host=e.options&&e.options.host,this.element=e.element,this.renderer=t,this.previousValue===rP?this.addRenderer():this.runRenderer(),this.previousValue=Array.isArray(i)?[...i]:i),eo}reconnected(){this.addRenderer()}disconnected(){this.removeRenderer()}addRenderer(){throw Error("The `addRenderer` method must be implemented.")}runRenderer(){throw Error("The `runRenderer` method must be implemented.")}removeRenderer(){throw Error("The `removeRenderer` method must be implemented.")}renderRenderer(e,...t){ex(this.renderer.call(this.host,...t),e,{host:this.host})}hasChanged(e){return Array.isArray(e)?!Array.isArray(this.previousValue)||this.previousValue.length!==e.length||e.some((e,t)=>e!==this.previousValue[t]):this.previousValue!==e}}let rL=Symbol("contentUpdateDebouncer");class rM extends r${get rendererProperty(){throw Error("The `rendererProperty` getter must be implemented.")}addRenderer(){this.element[this.rendererProperty]=(e,t)=>{this.renderRenderer(e,t)}}runRenderer(){this.element[rL]=eH.debounce(this.element[rL],eF,()=>{this.element.requestContentUpdate()})}removeRenderer(){this.element[this.rendererProperty]=null,delete this.element[rL]}}let rR=rx(class extends rM{get rendererProperty(){return"renderer"}}),rV=rx(class extends rM{get rendererProperty(){return"headerRenderer"}}),rN=rx(class extends rM{get rendererProperty(){return"footerRenderer"}}),rB=class extends rw{static get styles(){return[rw.styles,g`
2049
+ `}updated(e){super.updated(e),e.has("headerTitle")&&(this.ariaLabel=this.headerTitle)}}eT(rC);let rk=e=>(...t)=>({_$litDirective$:e,values:t});class rE{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}let{I:rI}={M:F,P:U,A:H,C:1,L:eu,R:e_,D:G,V:ep,I:ev,H:em,N:eg,U:eb,B:ef,F:ey},rT=(e,t)=>{let i=e._$AN;if(void 0===i)return!1;for(let e of i)e._$AO?.(t,!1),rT(e,t);return!0},rD=e=>{let t,i;do{if(void 0===(t=e._$AM))break;(i=t._$AN).delete(e),e=t}while(0===i?.size)},rS=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(void 0===i)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),rP(t)}};function rA(e){void 0!==this._$AN?(rD(this),this._$AM=e,rS(this)):this._$AM=e}function rO(e,t=!1,i=0){let s=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(t)if(Array.isArray(s))for(let e=i;e<s.length;e++)rT(s[e],!1),rD(s[e]);else null!=s&&(rT(s,!1),rD(s));else rT(this,e)}let rP=e=>{2==e.type&&(e._$AP??=rO,e._$AQ??=rA)};class r$ extends rE{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),rS(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(rT(this,e),rD(this))}setValue(e){if(void 0===this._$Ct.strings)this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}let rL=Symbol("valueNotInitialized");class rM extends r${constructor(e){if(super(e),6!==e.type)throw Error(`\`${this.constructor.name}\` must be bound to an element.`);this.previousValue=rL}render(e,t){return eo}update(e,[t,i]){return this.hasChanged(i)&&(this.host=e.options&&e.options.host,this.element=e.element,this.renderer=t,this.previousValue===rL?this.addRenderer():this.runRenderer(),this.previousValue=Array.isArray(i)?[...i]:i),eo}reconnected(){this.addRenderer()}disconnected(){this.removeRenderer()}addRenderer(){throw Error("The `addRenderer` method must be implemented.")}runRenderer(){throw Error("The `runRenderer` method must be implemented.")}removeRenderer(){throw Error("The `removeRenderer` method must be implemented.")}renderRenderer(e,...t){ex(this.renderer.call(this.host,...t),e,{host:this.host})}hasChanged(e){return Array.isArray(e)?!Array.isArray(this.previousValue)||this.previousValue.length!==e.length||e.some((e,t)=>e!==this.previousValue[t]):this.previousValue!==e}}let rR=Symbol("contentUpdateDebouncer");class rV extends rM{get rendererProperty(){throw Error("The `rendererProperty` getter must be implemented.")}addRenderer(){this.element[this.rendererProperty]=(e,t)=>{this.renderRenderer(e,t)}}runRenderer(){this.element[rR]=eH.debounce(this.element[rR],eF,()=>{this.element.requestContentUpdate()})}removeRenderer(){this.element[this.rendererProperty]=null,delete this.element[rR]}}let rN=rk(class extends rV{get rendererProperty(){return"renderer"}}),rB=rk(class extends rV{get rendererProperty(){return"headerRenderer"}}),rz=rk(class extends rV{get rendererProperty(){return"footerRenderer"}}),rF=class extends rC{static get styles(){return[rC.styles,g`
2001
2050
  ::part(header),
2002
2051
  ::part(content) {
2003
2052
  background-color: var(--lumo-contrast-5pct);
@@ -2009,7 +2058,7 @@
2009
2058
  ::part(content) {
2010
2059
  padding: 0 var(--lumo-space-l);
2011
2060
  }
2012
- `]}open(){this.setAttribute("opened","true")}close(){this.toggleAttribute("opened",!1)}};rB=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-dialog")],rB);let rz=g`
2061
+ `]}open(){this.setAttribute("opened","true")}close(){this.toggleAttribute("opened",!1)}};rF=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-dialog")],rF);let rU=g`
2013
2062
  :host([step-buttons-visible]) ::slotted(input) {
2014
2063
  text-align: center;
2015
2064
  }
@@ -2029,7 +2078,7 @@
2029
2078
  :host([readonly]) [part$='button'] {
2030
2079
  pointer-events: none;
2031
2080
  }
2032
- `,rF=e=>class extends sC(e){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String,reflectToAttribute:!0},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.value&&e.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),e.value=""),this.value&&(e.value=this.value))}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this._requestValidation()}_onInput(e){super._onInput(e),this.invalid&&this._requestValidation()}_valueChanged(e,t){super._valueChanged(e,t),void 0!==t&&this.invalid&&this._requestValidation()}},rU=e=>class extends rF(e){static get properties(){return{min:{type:Number},max:{type:Number},step:{type:Number},stepButtonsVisible:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_stepChanged(step, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"min","max"]}static get constraints(){return[...super.constraints,"min","max","step"]}constructor(){super(),this._setType("number"),this.__onWheel=this.__onWheel.bind(this)}get slotStyles(){let e=this.localName;return[`
2081
+ `,rH=e=>class extends sk(e){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String,reflectToAttribute:!0},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.value&&e.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),e.value=""),this.value&&(e.value=this.value))}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this._requestValidation()}_onInput(e){super._onInput(e),this.invalid&&this._requestValidation()}_valueChanged(e,t){super._valueChanged(e,t),void 0!==t&&this.invalid&&this._requestValidation()}},rj=e=>class extends rH(e){static get properties(){return{min:{type:Number},max:{type:Number},step:{type:Number},stepButtonsVisible:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_stepChanged(step, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"min","max"]}static get constraints(){return[...super.constraints,"min","max","step"]}constructor(){super(),this._setType("number"),this.__onWheel=this.__onWheel.bind(this)}get slotStyles(){let e=this.localName;return[`
2033
2082
  ${e} input[type="number"]::-webkit-outer-spin-button,
2034
2083
  ${e} input[type="number"]::-webkit-inner-spin-button {
2035
2084
  appearance: none;
@@ -2047,7 +2096,7 @@
2047
2096
  ${e}[dir='rtl']:not([step-buttons-visible]) input[type="number"]::placeholder {
2048
2097
  text-align: left;
2049
2098
  }
2050
- `]}get clearElement(){return this.$.clearButton}get __hasUnparsableValue(){return"NaN"===this._inputElementValue}ready(){super.ready(),this.addController(new iD(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new iS(this.inputElement,this._labelController)),this._tooltipController=new ts(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement)}checkValidity(){return this.inputElement?this.inputElement.checkValidity():!this.invalid}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("wheel",this.__onWheel)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("wheel",this.__onWheel)}__onWheel(e){this.hasAttribute("focused")&&e.preventDefault()}_onDecreaseButtonTouchend(e){e.cancelable&&(e.preventDefault(),this.__blurActiveElement(),this._decreaseValue())}_onIncreaseButtonTouchend(e){e.cancelable&&(e.preventDefault(),this.__blurActiveElement(),this._increaseValue())}__blurActiveElement(){let e=t0();e&&e!==this.inputElement&&e.blur()}_onDecreaseButtonClick(){this._decreaseValue()}_onIncreaseButtonClick(){this._increaseValue()}_decreaseValue(){this._incrementValue(-1)}_increaseValue(){this._incrementValue(1)}_incrementValue(e){if(this.disabled||this.readonly)return;let t=this.step||1,i=parseFloat(this.value);this.value?i<this.min?(e=0,i=this.min):i>this.max&&(e=0,i=this.max):0===this.min&&e<0||0===this.max&&e>0||0===this.max&&0===this.min?(e=0,i=0):(null==this.max||this.max>=0)&&(null==this.min||this.min<=0)?i=0:this.min>0?(i=this.min,this.max<0&&e<0&&(i=this.max),e=0):this.max<0&&(i=this.max,e<0?e=0:this._getIncrement(1,i-t)>this.max?i-=2*t:i-=t);let s=this._getIncrement(e,i);(!this.value||0===e||this._incrementIsInsideTheLimits(e,i))&&(this.inputElement.value=String(parseFloat(s)),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.__commitValueChange())}_getIncrement(e,t){let i=this.step||1,s=this.min||0,r=Math.max(this._getMultiplier(t),this._getMultiplier(i),this._getMultiplier(s));i*=r,t=Math.round(t*r),s*=r;let n=(t-s)%i;return e>0?(t-n+i)/r:e<0?(t-(n||i))/r:t/r}_getDecimalCount(e){let t=String(e),i=t.indexOf(".");return -1===i?1:t.length-i-1}_getMultiplier(e){if(!isNaN(e))return 10**this._getDecimalCount(e)}_incrementIsInsideTheLimits(e,t){return e<0?null==this.min||this._getIncrement(e,t)>=this.min:e>0?null==this.max||this._getIncrement(e,t)<=this.max:this._getIncrement(e,t)<=this.max&&this._getIncrement(e,t)>=this.min}_isButtonEnabled(e){let t=e*(this.step||1),i=parseFloat(this.value);return!this.value||!this.disabled&&this._incrementIsInsideTheLimits(t,i)}_stepChanged(e,t){t&&(t.step=e||"any")}_valueChanged(e,t){e&&isNaN(parseFloat(e))?this.value="":"string"!=typeof this.value&&(this.value=String(this.value)),super._valueChanged(this.value,t),this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValueStatus=!1)}_onKeyDown(e){"ArrowUp"===e.key?(e.preventDefault(),this._increaseValue()):"ArrowDown"===e.key&&(e.preventDefault(),this._decreaseValue()),super._onKeyDown(e)}_onInput(e){this.__keepCommittedValue=!0,super._onInput(e),this.__keepCommittedValue=!1}_onChange(e){e.stopPropagation()}_onClearAction(e){super._onClearAction(e),this.__commitValueChange()}_setFocused(e){super._setFocused(e),e||this.__commitValueChange()}_onEnter(e){super._onEnter(e),this.__commitValueChange()}__commitValueChange(){this.__committedValue!==this.value?(this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValueStatus!==this.__hasUnparsableValue&&(this._requestValidation(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValueStatus=this.__hasUnparsableValue}get _inputElementValue(){return this.inputElement&&this.inputElement.validity.badInput?"NaN":super._inputElementValue}set _inputElementValue(e){super._inputElementValue=e}};class rH extends rU(ty(eX(e8(tv(ek))))){static get is(){return"vaadin-number-field"}static get styles(){return[sk,rz]}render(){return en`
2099
+ `]}get clearElement(){return this.$.clearButton}get __hasUnparsableValue(){return"NaN"===this._inputElementValue}ready(){super.ready(),this.addController(new iS(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new iA(this.inputElement,this._labelController)),this._tooltipController=new ts(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement)}checkValidity(){return this.inputElement?this.inputElement.checkValidity():!this.invalid}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("wheel",this.__onWheel)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("wheel",this.__onWheel)}__onWheel(e){this.hasAttribute("focused")&&e.preventDefault()}_onDecreaseButtonTouchend(e){e.cancelable&&(e.preventDefault(),this.__blurActiveElement(),this._decreaseValue())}_onIncreaseButtonTouchend(e){e.cancelable&&(e.preventDefault(),this.__blurActiveElement(),this._increaseValue())}__blurActiveElement(){let e=t1();e&&e!==this.inputElement&&e.blur()}_onDecreaseButtonClick(){this._decreaseValue()}_onIncreaseButtonClick(){this._increaseValue()}_decreaseValue(){this._incrementValue(-1)}_increaseValue(){this._incrementValue(1)}_incrementValue(e){if(this.disabled||this.readonly)return;let t=this.step||1,i=parseFloat(this.value);this.value?i<this.min?(e=0,i=this.min):i>this.max&&(e=0,i=this.max):0===this.min&&e<0||0===this.max&&e>0||0===this.max&&0===this.min?(e=0,i=0):(null==this.max||this.max>=0)&&(null==this.min||this.min<=0)?i=0:this.min>0?(i=this.min,this.max<0&&e<0&&(i=this.max),e=0):this.max<0&&(i=this.max,e<0?e=0:this._getIncrement(1,i-t)>this.max?i-=2*t:i-=t);let s=this._getIncrement(e,i);(!this.value||0===e||this._incrementIsInsideTheLimits(e,i))&&(this.inputElement.value=String(parseFloat(s)),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.__commitValueChange())}_getIncrement(e,t){let i=this.step||1,s=this.min||0,r=Math.max(this._getMultiplier(t),this._getMultiplier(i),this._getMultiplier(s));i*=r,t=Math.round(t*r),s*=r;let n=(t-s)%i;return e>0?(t-n+i)/r:e<0?(t-(n||i))/r:t/r}_getDecimalCount(e){let t=String(e),i=t.indexOf(".");return -1===i?1:t.length-i-1}_getMultiplier(e){if(!isNaN(e))return 10**this._getDecimalCount(e)}_incrementIsInsideTheLimits(e,t){return e<0?null==this.min||this._getIncrement(e,t)>=this.min:e>0?null==this.max||this._getIncrement(e,t)<=this.max:this._getIncrement(e,t)<=this.max&&this._getIncrement(e,t)>=this.min}_isButtonEnabled(e){let t=e*(this.step||1),i=parseFloat(this.value);return!this.value||!this.disabled&&this._incrementIsInsideTheLimits(t,i)}_stepChanged(e,t){t&&(t.step=e||"any")}_valueChanged(e,t){e&&isNaN(parseFloat(e))?this.value="":"string"!=typeof this.value&&(this.value=String(this.value)),super._valueChanged(this.value,t),this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValueStatus=!1)}_onKeyDown(e){"ArrowUp"===e.key?(e.preventDefault(),this._increaseValue()):"ArrowDown"===e.key&&(e.preventDefault(),this._decreaseValue()),super._onKeyDown(e)}_onInput(e){this.__keepCommittedValue=!0,super._onInput(e),this.__keepCommittedValue=!1}_onChange(e){e.stopPropagation()}_onClearAction(e){super._onClearAction(e),this.__commitValueChange()}_setFocused(e){super._setFocused(e),e||this.__commitValueChange()}_onEnter(e){super._onEnter(e),this.__commitValueChange()}__commitValueChange(){this.__committedValue!==this.value?(this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValueStatus!==this.__hasUnparsableValue&&(this._requestValidation(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValueStatus=this.__hasUnparsableValue}get _inputElementValue(){return this.inputElement&&this.inputElement.validity.badInput?"NaN":super._inputElementValue}set _inputElementValue(e){super._inputElementValue=e}};class rY extends rj(tw(eX(e8(tm(ek))))){static get is(){return"vaadin-number-field"}static get styles(){return[sE,rU]}render(){return en`
2051
2100
  <div class="vaadin-field-container">
2052
2101
  <div part="label">
2053
2102
  <slot name="label"></slot>
@@ -2095,7 +2144,7 @@
2095
2144
 
2096
2145
  <slot name="tooltip"></slot>
2097
2146
  </div>
2098
- `}}eI(rH);let rj=class extends rH{_onEnter(e){return this.dispatchEvent(new CustomEvent("submit",{bubbles:!0,composed:!0})),super._onEnter(e)}};rj=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-number-field")],rj);let rY=g`
2147
+ `}}eT(rY);let rq=class extends rY{_onEnter(e){return this.dispatchEvent(new CustomEvent("submit",{bubbles:!0,composed:!0})),super._onEnter(e)}};rq=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-number-field")],rq);let rW=g`
2099
2148
  [part='radio'] {
2100
2149
  border-radius: 50%;
2101
2150
  color: var(--vaadin-radio-button-dot-color, var(--_color));
@@ -2107,24 +2156,24 @@
2107
2156
  border-radius: 50%;
2108
2157
  filter: var(--vaadin-radio-button-dot-color, var(--_filter));
2109
2158
  }
2110
- `,rq=[ii,it("radio","radio-button"),rY],rW=e=>class extends il(iE(iu(ia(tQ(e))))){static get properties(){return{name:{type:String,value:""}}}static get delegateAttrs(){return[...super.delegateAttrs,"name"]}constructor(){super(),this._setType("radio"),this.value="on",this.tabindex=0}get slotStyles(){let e=this.localName;return[`
2159
+ `,rK=[is,ii("radio","radio-button"),rW],rG=e=>class extends id(iI(ic(io(tJ(e))))){static get properties(){return{name:{type:String,value:""}}}static get delegateAttrs(){return[...super.delegateAttrs,"name"]}constructor(){super(),this._setType("radio"),this.value="on",this.tabindex=0}get slotStyles(){let e=this.localName;return[`
2111
2160
  ${e} > input[slot='input'] {
2112
2161
  opacity: 0;
2113
2162
  }
2114
- `]}ready(){super.ready(),this.addController(new iD(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new iS(this.inputElement,this._labelController))}};class rK extends rW(eX(ty(e8(tv(ek))))){static get is(){return"vaadin-radio-button"}static get styles(){return rq}render(){return en`
2163
+ `]}ready(){super.ready(),this.addController(new iS(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new iA(this.inputElement,this._labelController))}};class rX extends rG(eX(tw(e8(tm(ek))))){static get is(){return"vaadin-radio-button"}static get styles(){return rK}render(){return en`
2115
2164
  <div class="vaadin-radio-button-container">
2116
2165
  <div part="radio" aria-hidden="true"></div>
2117
2166
  <slot name="input"></slot>
2118
2167
  <slot name="label"></slot>
2119
2168
  </div>
2120
- `}}eI(rK);let rG=[ii,i$,g`
2169
+ `}}eT(rX);let rZ=[is,iL,g`
2121
2170
  :host([readonly]) ::slotted(vaadin-radio-button) {
2122
2171
  --vaadin-radio-button-background: transparent;
2123
2172
  --vaadin-radio-button-border-color: var(--vaadin-border-color);
2124
2173
  --vaadin-radio-button-marker-color: var(--vaadin-text-color);
2125
2174
  --_border-style: dashed;
2126
2175
  }
2127
- `],rX=e=>class extends iI(t4(tX(tZ(e)))){static get properties(){return{name:{type:String,observer:"__nameChanged",sync:!0},value:{type:String,notify:!0,value:"",sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0,observer:"__readonlyChanged"},_fieldName:{type:String}}}constructor(){super(),this.__registerRadioButton=this.__registerRadioButton.bind(this),this.__unregisterRadioButton=this.__unregisterRadioButton.bind(this),this.__onRadioButtonCheckedChange=this.__onRadioButtonCheckedChange.bind(this),this._tooltipController=new ts(this),this._tooltipController.addEventListener("tooltip-changed",e=>{let t=e.detail.node;if(t&&t.isConnected){let e=this.__radioButtons.map(e=>e.inputElement);this._tooltipController.setAriaTarget(e)}else this._tooltipController.setAriaTarget([])})}get __radioButtons(){return this.__filterRadioButtons([...this.children])}get __selectedRadioButton(){return this.__radioButtons.find(e=>e.checked)}get isHorizontalRTL(){return this.__isRTL&&"vertical"!==this._theme}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","radiogroup"),this._fieldName=`${this.localName}-${tt++}`;let e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new te(e,({addedNodes:e,removedNodes:t})=>{this.__filterRadioButtons(e).reverse().forEach(this.__registerRadioButton),this.__filterRadioButtons(t).forEach(this.__unregisterRadioButton);let i=this.__radioButtons.map(e=>e.inputElement);this._tooltipController.setAriaTarget(i)}),this.addController(this._tooltipController)}__filterRadioButtons(e){return e.filter(e=>e.nodeType===Node.ELEMENT_NODE&&"vaadin-radio-button"===e.localName)}_onKeyDown(e){super._onKeyDown(e);let t=e.composedPath().find(e=>e.nodeType===Node.ELEMENT_NODE&&"vaadin-radio-button"===e.localName);["ArrowLeft","ArrowUp"].includes(e.key)&&(e.preventDefault(),this.__selectNextRadioButton(t)),["ArrowRight","ArrowDown"].includes(e.key)&&(e.preventDefault(),this.__selectPrevRadioButton(t))}_invalidChanged(e){super._invalidChanged(e),e?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")}__nameChanged(e){this.__radioButtons.forEach(t=>{t.name=e||this._fieldName})}__selectNextRadioButton(e){let t=this.__radioButtons.indexOf(e);this.__selectIncRadioButton(t,this.isHorizontalRTL?1:-1)}__selectPrevRadioButton(e){let t=this.__radioButtons.indexOf(e);this.__selectIncRadioButton(t,this.isHorizontalRTL?-1:1)}__selectIncRadioButton(e,t){let i=(this.__radioButtons.length+e+t)%this.__radioButtons.length,s=this.__radioButtons[i];s.disabled?this.__selectIncRadioButton(i,t):(s.focusElement.focus(),s.focusElement.click())}__registerRadioButton(e){e.name=this.name||this._fieldName,e.addEventListener("checked-changed",this.__onRadioButtonCheckedChange),(this.disabled||this.readonly)&&(e.disabled=!0),e.checked&&this.__selectRadioButton(e)}__unregisterRadioButton(e){e.removeEventListener("checked-changed",this.__onRadioButtonCheckedChange),e.value===this.value&&this.__selectRadioButton(null)}__onRadioButtonCheckedChange(e){e.target.checked&&this.__selectRadioButton(e.target)}__valueChanged(e,t){if(void 0!==t||""!==e){if(e){let t=this.__radioButtons.find(t=>t.value===e);t?(this.__selectRadioButton(t),this.toggleAttribute("has-value",!0)):console.warn(`The radio button with the value "${e}" was not found.`)}else this.__selectRadioButton(null),this.removeAttribute("has-value");void 0!==t&&this._requestValidation()}}__readonlyChanged(e,t){(e||void 0!==t)&&t!==e&&this.__updateRadioButtonsDisabledProperty()}_disabledChanged(e,t){super._disabledChanged(e,t),(e||void 0!==t)&&t!==e&&this.__updateRadioButtonsDisabledProperty()}_shouldRemoveFocus(e){return!this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this._requestValidation()}__selectRadioButton(e){e?this.value=e.value:this.value="",this.__radioButtons.forEach(t=>{t.checked=t===e}),this.readonly&&this.__updateRadioButtonsDisabledProperty()}__updateRadioButtonsDisabledProperty(){this.__radioButtons.forEach(e=>{this.readonly?e.disabled=e!==this.__selectedRadioButton:e.disabled=this.disabled})}};class rZ extends rX(eX(ty(e8(tv(ek))))){static get is(){return"vaadin-radio-group"}static get styles(){return rG}render(){return en`
2176
+ `],rQ=e=>class extends iD(t8(tZ(tQ(e)))){static get properties(){return{name:{type:String,observer:"__nameChanged",sync:!0},value:{type:String,notify:!0,value:"",sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0,observer:"__readonlyChanged"},_fieldName:{type:String}}}constructor(){super(),this.__registerRadioButton=this.__registerRadioButton.bind(this),this.__unregisterRadioButton=this.__unregisterRadioButton.bind(this),this.__onRadioButtonCheckedChange=this.__onRadioButtonCheckedChange.bind(this),this._tooltipController=new ts(this),this._tooltipController.addEventListener("tooltip-changed",e=>{let t=e.detail.node;if(t?.isConnected){let e=this.__radioButtons.map(e=>e.inputElement);this._tooltipController.setAriaTarget(e)}else this._tooltipController.setAriaTarget([])})}get __radioButtons(){return this.__filterRadioButtons([...this.children])}get __selectedRadioButton(){return this.__radioButtons.find(e=>e.checked)}get isHorizontalRTL(){return this.__isRTL&&"vertical"!==this._theme}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","radiogroup"),this._fieldName=`${this.localName}-${tt++}`;let e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new te(e,({addedNodes:e,removedNodes:t})=>{this.__filterRadioButtons(e).reverse().forEach(this.__registerRadioButton),this.__filterRadioButtons(t).forEach(this.__unregisterRadioButton);let i=this.__radioButtons.map(e=>e.inputElement);this._tooltipController.setAriaTarget(i)}),this.addController(this._tooltipController)}__filterRadioButtons(e){return e.filter(e=>e.nodeType===Node.ELEMENT_NODE&&"vaadin-radio-button"===e.localName)}_onKeyDown(e){super._onKeyDown(e);let t=e.composedPath().find(e=>e.nodeType===Node.ELEMENT_NODE&&"vaadin-radio-button"===e.localName);["ArrowLeft","ArrowUp"].includes(e.key)&&(e.preventDefault(),this.__selectNextRadioButton(t)),["ArrowRight","ArrowDown"].includes(e.key)&&(e.preventDefault(),this.__selectPrevRadioButton(t))}_invalidChanged(e){super._invalidChanged(e),e?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")}__nameChanged(e){this.__radioButtons.forEach(t=>{t.name=e||this._fieldName})}__selectNextRadioButton(e){let t=this.__radioButtons.indexOf(e);this.__selectIncRadioButton(t,this.isHorizontalRTL?1:-1)}__selectPrevRadioButton(e){let t=this.__radioButtons.indexOf(e);this.__selectIncRadioButton(t,this.isHorizontalRTL?-1:1)}__selectIncRadioButton(e,t){let i=(this.__radioButtons.length+e+t)%this.__radioButtons.length,s=this.__radioButtons[i];s.disabled?this.__selectIncRadioButton(i,t):(s.focusElement.focus(),s.focusElement.click())}__registerRadioButton(e){e.name=this.name||this._fieldName,e.addEventListener("checked-changed",this.__onRadioButtonCheckedChange),(this.disabled||this.readonly)&&(e.disabled=!0),e.checked&&this.__selectRadioButton(e)}__unregisterRadioButton(e){e.removeEventListener("checked-changed",this.__onRadioButtonCheckedChange),e.value===this.value&&this.__selectRadioButton(null)}__onRadioButtonCheckedChange(e){e.target.checked&&this.__selectRadioButton(e.target)}__valueChanged(e,t){if(void 0!==t||""!==e){if(e){let t=this.__radioButtons.find(t=>t.value===e);t?(this.__selectRadioButton(t),this.toggleAttribute("has-value",!0)):console.warn(`The radio button with the value "${e}" was not found.`)}else this.__selectRadioButton(null),this.removeAttribute("has-value");void 0!==t&&this._requestValidation()}}__readonlyChanged(e,t){(e||void 0!==t)&&t!==e&&this.__updateRadioButtonsDisabledProperty()}_disabledChanged(e,t){super._disabledChanged(e,t),(e||void 0!==t)&&t!==e&&this.__updateRadioButtonsDisabledProperty()}_shouldRemoveFocus(e){return!this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this._requestValidation()}__selectRadioButton(e){e?this.value=e.value:this.value="",this.__radioButtons.forEach(t=>{t.checked=t===e}),this.readonly&&this.__updateRadioButtonsDisabledProperty()}__updateRadioButtonsDisabledProperty(){this.__radioButtons.forEach(e=>{this.readonly?e.disabled=e!==this.__selectedRadioButton:e.disabled=this.disabled})}};class rJ extends rQ(eX(tw(e8(tm(ek))))){static get is(){return"vaadin-radio-group"}static get styles(){return rZ}render(){return en`
2128
2177
  <div class="vaadin-group-field-container">
2129
2178
  <div part="label">
2130
2179
  <slot name="label"></slot>
@@ -2145,12 +2194,12 @@
2145
2194
  </div>
2146
2195
 
2147
2196
  <slot name="tooltip"></slot>
2148
- `}}eI(rZ);let rQ=class extends rZ{};rQ=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-radio-group")],rQ);let rJ=e=>class extends tQ(t4(e)){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged",sync:!0},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return void 0!==this._value?this._value:this.textContent.trim()}set value(e){this._value=e}ready(){super.ready();let e=this.getAttribute("value");null!==e&&(this.value=e)}focus(e){this.disabled||super.focus(e)}_shouldSetActive(e){return!this.disabled&&!("keydown"===e.type&&e.defaultPrevented)}_selectedChanged(e){this.setAttribute("aria-selected",e)}_disabledChanged(e){super._disabledChanged(e),e&&(this.selected=!1,this.blur())}_onKeyDown(e){super._onKeyDown(e),this._activeKeys.includes(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this.click())}};class r0 extends rJ(ty(eK(e8(tv(ek))))){static get is(){return"vaadin-select-item"}static get styles(){return sF}static get properties(){return{role:{type:String,value:"option",reflectToAttribute:!0}}}render(){return en`
2197
+ `}}eT(rJ);let r0=class extends rJ{};r0=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-radio-group")],r0);let r1=e=>class extends tJ(t8(e)){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged",sync:!0},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return this._value??this.textContent.trim()}set value(e){this._value=e}ready(){super.ready();let e=this.getAttribute("value");null!==e&&(this.value=e),this.__shouldAllowFocusWhenDisabled()&&this.style.setProperty("--_vaadin-item-disabled-pointer-events","auto")}focus(e){(!this.disabled||this.__shouldAllowFocusWhenDisabled())&&super.focus(e)}_shouldSetActive(e){return!this.disabled&&!("keydown"===e.type&&e.defaultPrevented)}_selectedChanged(e){this.setAttribute("aria-selected",e)}_disabledChanged(e){super._disabledChanged(e),e&&(this.selected=!1,this.__shouldAllowFocusWhenDisabled()||this.blur())}_onKeyDown(e){super._onKeyDown(e),this._activeKeys.includes(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this.click())}__shouldAllowFocusWhenDisabled(){return!1}};class r2 extends r1(tw(eK(e8(tm(ek))))){static get is(){return"vaadin-select-item"}static get styles(){return sU}static get properties(){return{role:{type:String,value:"option",reflectToAttribute:!0}}}render(){return en`
2149
2198
  <span part="checkmark" aria-hidden="true"></span>
2150
2199
  <div part="content">
2151
2200
  <slot></slot>
2152
2201
  </div>
2153
- `}}eI(r0);let r1=e=>class extends tZ(e){get focused(){return(this._getItems()||[]).find(t5)}get _vertical(){return!0}get _tabNavigation(){return!1}focus(e){let t=this._getFocusableIndex();t>=0&&this._focus(t,e)}_getFocusableIndex(){let e=this._getItems();return Array.isArray(e)?this._getAvailableIndex(e,0,null,e=>!t2(e)):-1}_getItems(){return Array.from(this.children)}_onKeyDown(e){let t,i;if(super._onKeyDown(e),e.metaKey||e.ctrlKey)return;let{key:s,shiftKey:r}=e,n=this._getItems()||[],a=n.indexOf(this.focused),o=this._vertical||"rtl"!==this.getAttribute("dir")?1:-1;this.__isPrevKeyPressed(s,r)?(i=-o,t=a-o):this.__isNextKeyPressed(s,r)?(i=o,t=a+o):"Home"===s?(i=1,t=0):"End"===s&&(i=-1,t=n.length-1),t=this._getAvailableIndex(n,t,i,e=>!t2(e)),this._tabNavigation&&"Tab"===s&&(t>a&&e.shiftKey||t<a&&!e.shiftKey||t===a)||t>=0&&(e.preventDefault(),this._focus(t,{focusVisible:!0},!0))}__isPrevKeyPressed(e,t){return this._vertical?"ArrowUp"===e:"ArrowLeft"===e||this._tabNavigation&&"Tab"===e&&t}__isNextKeyPressed(e,t){return this._vertical?"ArrowDown"===e:"ArrowRight"===e||this._tabNavigation&&"Tab"===e&&!t}_focus(e,t,i=!1){let s=this._getItems();this._focusItem(s[e],t,i)}_focusItem(e,t){e&&e.focus(t)}_getAvailableIndex(e,t,i,s){let r=e.length,n=t;for(let t=0;"number"==typeof n&&t<r;t+=1,n+=i||1){n<0?n=r-1:n>=r&&(n=0);let t=e[n];if(this._isItemFocusable(t)&&this.__isMatchingItem(t,s))return n}return -1}__isMatchingItem(e,t){return"function"!=typeof t||t(e)}_isItemFocusable(e){return!e.hasAttribute("disabled")}},r2=e=>class extends r1(e){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0,sync:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return"horizontal"!==this.orientation}focus(e){this._observer&&this._observer.flush();let t=Array.isArray(this.items)?this.items:[],i=this._getAvailableIndex(t,0,null,e=>0===e.tabIndex&&!t2(e));i>=0?this._focus(i,e):super.focus(e)}ready(){super.ready(),this.addEventListener("click",e=>this._onClick(e));let e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new te(e,()=>{this._setItems(this._filterItems([...this.children]))})}_getItems(){return this.items}_enhanceItems(e,t,i,s){if(!s&&e){this.setAttribute("aria-orientation",t||"vertical"),e.forEach(e=>{t?e.setAttribute("orientation",t):e.removeAttribute("orientation")}),this._setFocusable(i<0||!i?0:i);let s=e[i];e.forEach(e=>{e.selected=e===s}),s&&!s.disabled&&this._scrollToItem(i)}}_filterItems(e){return e.filter(e=>e._hasVaadinItemMixin)}_onClick(e){let t;if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;let i=this._filterItems(e.composedPath())[0];i&&!i.disabled&&(t=this.items.indexOf(i))>=0&&(this.selected=t)}_searchKey(e,t){this._searchReset=eH.debounce(this._searchReset,eN.after(500),()=>{this._searchBuf=""}),this._searchBuf+=t.toLowerCase(),this.items.some(e=>this.__isMatchingKey(e))||(this._searchBuf=t.toLowerCase());let i=1===this._searchBuf.length?e+1:e;return this._getAvailableIndex(this.items,i,1,e=>this.__isMatchingKey(e)&&"none"!==getComputedStyle(e).display)}__isMatchingKey(e){return e.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(e){if(e.metaKey||e.ctrlKey)return;let t=e.key,i=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(t)&&1===t.length){let e=this._searchKey(i,t);e>=0&&this._focus(e);return}super._onKeyDown(e)}_setFocusable(e){e=this._getAvailableIndex(this.items,e,1);let t=this.items[e];this.items.forEach(e=>{e.tabIndex=e===t?0:-1})}_focus(e,t){this.items.forEach((t,i)=>{t.focused=i===e}),this._setFocusable(e),this._scrollToItem(e),super._focus(e,t)}_scrollToItem(e){let t=this.items[e];if(!t)return;let i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],s=this._scrollerElement.getBoundingClientRect(),r=(this.items[e+1]||t).getBoundingClientRect(),n=(this.items[e-1]||t).getBoundingClientRect(),a=0;!this._isRTL&&r[i[1]]>=s[i[1]]||this._isRTL&&r[i[1]]<=s[i[1]]?a=r[i[1]]-s[i[1]]:(!this._isRTL&&n[i[0]]<=s[i[0]]||this._isRTL&&n[i[0]]>=s[i[0]])&&(a=n[i[0]]-s[i[0]]),this._scroll(a)}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else{var t;let i=this.getAttribute("dir")||"ltr",s=function(e,t){let{scrollLeft:i}=e;return"rtl"!==t?i:e.scrollWidth-e.clientWidth+i}(this._scrollerElement,i)+e;t=this._scrollerElement,"rtl"!==i?t.scrollLeft=s:t.scrollLeft=t.clientWidth-t.scrollWidth+s}}},r3=g`
2202
+ `}}eT(r2);let r3=e=>class extends tQ(e){get focused(){return(this._getItems()||[]).find(t4)}get _vertical(){return!0}get _tabNavigation(){return!1}focus(e){let t=this._getFocusableIndex();t>=0&&this._focus(t,e)}_getFocusableIndex(){let e=this._getItems();return Array.isArray(e)?this._getAvailableIndex(e,0,null,e=>!t3(e)):-1}_getItems(){return Array.from(this.children)}_onKeyDown(e){let t,i;if(super._onKeyDown(e),e.metaKey||e.ctrlKey)return;let{key:s,shiftKey:r}=e,n=this._getItems()||[],a=n.indexOf(this.focused),o=this._vertical||"rtl"!==this.getAttribute("dir")?1:-1;this.__isPrevKeyPressed(s,r)?(i=-o,t=a-o):this.__isNextKeyPressed(s,r)?(i=o,t=a+o):"Home"===s?(i=1,t=0):"End"===s&&(i=-1,t=n.length-1),t=this._getAvailableIndex(n,t,i,e=>!t3(e)),this._tabNavigation&&"Tab"===s&&(t>a&&e.shiftKey||t<a&&!e.shiftKey||t===a)||t>=0&&(e.preventDefault(),this._focus(t,{focusVisible:!0,preventScroll:!0},!0))}__isPrevKeyPressed(e,t){return this._vertical?"ArrowUp"===e:"ArrowLeft"===e||this._tabNavigation&&"Tab"===e&&t}__isNextKeyPressed(e,t){return this._vertical?"ArrowDown"===e:"ArrowRight"===e||this._tabNavigation&&"Tab"===e&&!t}_focus(e,t,i=!1){let s=this._getItems();this._focusItem(s[e],t,i)}_focusItem(e,t){e&&e.focus(t)}_getAvailableIndex(e,t,i,s){let r=e.length,n=t;for(let t=0;"number"==typeof n&&t<r;t+=1,n+=i||1){n<0?n=r-1:n>=r&&(n=0);let t=e[n];if(this._isItemFocusable(t)&&this.__isMatchingItem(t,s))return n}return -1}__isMatchingItem(e,t){return"function"!=typeof t||t(e)}_isItemFocusable(e){return!e.hasAttribute("disabled")}},r5=e=>class extends r3(e){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0,sync:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return"horizontal"!==this.orientation}focus(e){this._observer&&this._observer.flush();let t=Array.isArray(this.items)?this.items:[],i=this._getAvailableIndex(t,0,null,e=>0===e.tabIndex&&!t3(e));i>=0?this._focus(i,e):super.focus(e)}ready(){super.ready(),this.addEventListener("click",e=>this._onClick(e));let e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new te(e,()=>{this._setItems(this._filterItems([...this.children]))})}_getItems(){return this.items}_enhanceItems(e,t,i,s){if(!s&&e){this.setAttribute("aria-orientation",t||"vertical"),e.forEach(e=>{t?e.setAttribute("orientation",t):e.removeAttribute("orientation")}),this._setFocusable(i<0||!i?0:i);let s=e[i];e.forEach(e=>{e.selected=e===s}),s&&!s.disabled&&this._scrollToItem(i)}}_filterItems(e){return e.filter(e=>e._hasVaadinItemMixin)}_onClick(e){let t;if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;let i=this._filterItems(e.composedPath())[0];i&&!i.disabled&&(t=this.items.indexOf(i))>=0&&(this.selected=t)}_searchKey(e,t){this._searchReset=eH.debounce(this._searchReset,eN.after(500),()=>{this._searchBuf=""}),this._searchBuf+=t.toLowerCase(),this.items.some(e=>this.__isMatchingKey(e))||(this._searchBuf=t.toLowerCase());let i=1===this._searchBuf.length?e+1:e;return this._getAvailableIndex(this.items,i,1,e=>this.__isMatchingKey(e)&&"none"!==getComputedStyle(e).display)}__isMatchingKey(e){return e.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(e){if(e.metaKey||e.ctrlKey)return;let t=e.key,i=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(t)&&1===t.length){let e=this._searchKey(i,t);e>=0&&this._focus(e);return}super._onKeyDown(e)}_setFocusable(e){e=this._getAvailableIndex(this.items,e,1);let t=this.items[e];this.items.forEach(e=>{e.tabIndex=e===t?0:-1})}_focus(e,t){this.items.forEach((t,i)=>{t.focused=i===e}),this._setFocusable(e),this._scrollToItem(e),super._focus(e,t??{preventScroll:!0})}_scrollToItem(e){let t=this._getItems()[e];t&&t.scrollIntoView({block:"nearest",inline:"nearest"})}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else{var t;let i=this.getAttribute("dir")||"ltr",s=function(e,t){let{scrollLeft:i}=e;return"rtl"!==t?i:e.scrollWidth-e.clientWidth+i}(this._scrollerElement,i)+e;t=this._scrollerElement,"rtl"!==i?t.scrollLeft=s:t.scrollLeft=t.clientWidth-t.scrollWidth+s}}_isItemFocusable(e){return e.disabled&&e.__shouldAllowFocusWhenDisabled?e.__shouldAllowFocusWhenDisabled():super._isItemFocusable(e)}},r4=g`
2154
2203
  :host {
2155
2204
  --vaadin-item-checkmark-display: block;
2156
2205
  display: flex;
@@ -2172,11 +2221,11 @@
2172
2221
  margin: 4px 8px;
2173
2222
  margin-inline-start: calc(var(--vaadin-icon-size, 1lh) + var(--vaadin-item-gap, var(--vaadin-gap-s)) + 8px);
2174
2223
  }
2175
- `;class r5 extends r2(ty(eK(e8(tv(ek))))){static get is(){return"vaadin-select-list-box"}static get styles(){return r3}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}render(){return en`
2224
+ `;class r8 extends r5(tw(eK(e8(tm(ek))))){static get is(){return"vaadin-select-list-box"}static get styles(){return r4}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}render(){return en`
2176
2225
  <div part="items">
2177
2226
  <slot></slot>
2178
2227
  </div>
2179
- `}ready(){super.ready(),this.setAttribute("role","listbox")}}eI(r5);let r4=g`
2228
+ `}ready(){super.ready(),this.setAttribute("role","listbox")}}eT(r8);let r6=g`
2180
2229
  :host {
2181
2230
  align-items: flex-start;
2182
2231
  justify-content: flex-start;
@@ -2193,14 +2242,14 @@
2193
2242
  [part='backdrop'] {
2194
2243
  background: transparent;
2195
2244
  }
2196
- `,r8=e=>class extends i8(i2(eK(e))){static get observers(){return["_updateOverlayWidth(opened, positionTarget)"]}ready(){super.ready(),this.restoreFocusOnClose=!0}get _contentRoot(){return this._rendererRoot}get _rendererRoot(){if(!this.__savedRoot){let e=document.createElement("div");e.setAttribute("slot","overlay"),this.owner.appendChild(e),this.__savedRoot=e}return this.__savedRoot}_shouldCloseOnOutsideClick(e){return!0}_mouseDownListener(e){super._mouseDownListener(e),e.preventDefault()}_getMenuElement(){return Array.from(this._rendererRoot.children).find(e=>"style"!==e.localName)}_updateOverlayWidth(e,t){e&&t&&this.style.setProperty("--_vaadin-select-overlay-default-width",`${t.offsetWidth}px`)}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){let e=this._getMenuElement();this.owner._assignMenuElement(e)}}};class r6 extends r8(ty(e8(tv(ek)))){static get is(){return"vaadin-select-overlay"}static get styles(){return[iz,r4]}render(){return en`
2245
+ `,r7=e=>class extends i6(i3(eK(e))){static get observers(){return["_updateOverlayWidth(opened, positionTarget)"]}ready(){super.ready(),this.restoreFocusOnClose=!0}get _contentRoot(){return this._rendererRoot}get _rendererRoot(){if(!this.__savedRoot){let e=document.createElement("div");e.setAttribute("slot","overlay"),this.owner.appendChild(e),this.__savedRoot=e}return this.__savedRoot}_shouldCloseOnOutsideClick(e){return!0}_mouseDownListener(e){super._mouseDownListener(e),e.preventDefault()}_getMenuElement(){return Array.from(this._rendererRoot.children).find(e=>"style"!==e.localName)}_updateOverlayWidth(e,t){e&&t&&this.style.setProperty("--_vaadin-select-overlay-default-width",`${t.offsetWidth}px`)}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){let e=this._getMenuElement();this.owner._assignMenuElement(e)}}};class r9 extends r7(tw(e8(tm(ek)))){static get is(){return"vaadin-select-overlay"}static get styles(){return[iF,r6]}render(){return en`
2197
2246
  <div id="backdrop" part="backdrop" ?hidden="${!this.withBackdrop}"></div>
2198
2247
  <div part="overlay" id="overlay">
2199
2248
  <div part="content" id="content">
2200
2249
  <slot></slot>
2201
2250
  </div>
2202
2251
  </div>
2203
- `}updated(e){super.updated(e),e.has("renderer")&&this.requestContentUpdate()}}eI(r6);let r7=g`
2252
+ `}updated(e){super.updated(e),e.has("renderer")&&this.requestContentUpdate()}}eT(r9);let ne=g`
2204
2253
  :host {
2205
2254
  min-height: 1lh;
2206
2255
  outline: none;
@@ -2228,13 +2277,13 @@
2228
2277
  :host([disabled]) {
2229
2278
  pointer-events: none;
2230
2279
  }
2231
- `;class r9 extends t7(ty(e8(tv(ek)))){static get is(){return"vaadin-select-value-button"}static get styles(){return r7}render(){return en`
2280
+ `;class nt extends t9(tw(e8(tm(ek)))){static get is(){return"vaadin-select-value-button"}static get styles(){return ne}render(){return en`
2232
2281
  <div class="vaadin-button-container">
2233
2282
  <span part="label">
2234
2283
  <slot></slot>
2235
2284
  </span>
2236
2285
  </div>
2237
- `}}eI(r9);let ne=g`
2286
+ `}}eT(nt);let ni=g`
2238
2287
  .sr-only {
2239
2288
  border: 0 !important;
2240
2289
  clip: rect(1px, 1px, 1px, 1px) !important;
@@ -2247,7 +2296,7 @@
2247
2296
  width: 1px !important;
2248
2297
  white-space: nowrap !important;
2249
2298
  }
2250
- `,nt=g`
2299
+ `,ns=g`
2251
2300
  :host {
2252
2301
  position: relative;
2253
2302
  }
@@ -2320,7 +2369,7 @@
2320
2369
  :host([theme~='align-right']) ::slotted([slot='value']) {
2321
2370
  justify-content: right;
2322
2371
  }
2323
- `;class ni extends ti{constructor(e){super(e,"value","vaadin-select-value-button",{initializer:(e,t)=>{t._setFocusElement(e),t.ariaTarget=e,t.stateTarget=e,e.setAttribute("aria-haspopup","listbox")}})}}let ns=e=>class extends ia(id(tZ(iI(e)))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged",sync:!0},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder, focusElement)"]}constructor(){super(),this._itemId=`value-${this.localName}-${tt++}`,this._srLabelController=new ik(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._overlayElement=this.$.overlay,this._valueButtonController=new ni(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new sg(this._phoneMediaQuery,e=>{this._phone=e})),this._tooltipController=new ts(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}updated(e){super.updated(e),e.has("_phone")&&this.toggleAttribute("phone",this._phone)}requestContentUpdate(){this._overlayElement&&this._overlayElement.requestContentUpdate()}_requiredChanged(e){super._requiredChanged(e),!1===e&&this._requestValidation()}__itemsChanged(e,t){(e||t)&&this.requestContentUpdate()}_assignMenuElement(e){e&&e!==this.__lastMenuElement&&(this._menuElement=e,this.__initMenuItems(e),e.addEventListener("items-changed",()=>{this.__initMenuItems(e)}),e.addEventListener("selected-changed",()=>this.__updateValueButton()),e.addEventListener("keydown",e=>this._onKeyDownInside(e),!0),e.addEventListener("click",e=>{let t=e.composedPath().find(e=>e._hasVaadinItemMixin);this.__dispatchChangePending=!!(t&&void 0!==t.value&&t.value!==this.value),this.opened=!1},!0),this.__lastMenuElement=e),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items)}__initMenuItems(e){e.items&&(this._items=e.items)}_valueChanged(e,t){this.toggleAttribute("has-value",!!e),void 0===t||this.__dispatchChangePending||this._requestValidation()}_onClick(e){this.disabled||(e.preventDefault(),this.opened=!this.readonly)}_onEscape(e){this.opened&&(e.stopPropagation(),this.opened=!1)}_onToggleMouseDown(e){e.preventDefault(),this.opened||this.focusElement.focus()}_onKeyDown(e){if(super._onKeyDown(e),!e.altKey&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&e.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened){if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(e.key))e.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(e.key)&&1===e.key.length){let t=this._menuElement.selected,i=this._menuElement._searchKey(void 0!==t?t:-1,e.key);i>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=i)}}}_onKeyDownInside(e){"Tab"===e.key&&(this.focusElement.setAttribute("tabindex","-1"),this._overlayElement.restoreFocusOnClose=!1,this.opened=!1,setTimeout(()=>{this.focusElement.setAttribute("tabindex","0"),this._overlayElement.restoreFocusOnClose=!0}))}_openedChanged(e,t){if(e){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1);let e=this.hasAttribute("focus-ring");this._openedWithFocusRing=e,e&&this.removeAttribute("focus-ring")}else t&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),this.__dispatchChangePending||this._keyboardActive||this._requestValidation())}_updateAriaExpanded(e,t){t&&t.setAttribute("aria-expanded",e?"true":"false")}_updateAriaLive(e){this.focusElement&&(e?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(e){let t,i=e.getAttribute("label");(t=i?this.__createItemElement({label:i}):e.cloneNode(!0))._sourceItem=e,this.__appendValueItemElement(t,this.focusElement),t.selected=!0}__createItemElement(e){let t=document.createElement(e.component||"vaadin-select-item");return e.label&&(t.textContent=e.label),e.value&&(t.value=e.value),e.disabled&&(t.disabled=e.disabled),e.className&&(t.className=e.className),t}__appendValueItemElement(e,t){t.appendChild(e),e.removeAttribute("tabindex"),e.removeAttribute("aria-selected"),e.removeAttribute("role"),e.removeAttribute("focused"),e.removeAttribute("focus-ring"),e.removeAttribute("active"),e.setAttribute("id",this._itemId)}_accessibleNameChanged(e){this._srLabelController.setLabel(e),this._setCustomAriaLabelledBy(e?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(e){this._setCustomAriaLabelledBy(e)}_setCustomAriaLabelledBy(e){let t=this._getLabelIdWithItemId(e);this._fieldAriaController.setLabelId(t,!0)}_getLabelIdWithItemId(e){let t=this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:"";return e?`${e} ${t}`.trim():null}__updateValueButton(){let e=this.focusElement;if(!e)return;e.innerHTML="";let t=this._items?this._items[this._menuElement.selected]:void 0;if(e.removeAttribute("placeholder"),this._hasContent(t))this.__attachSelectedItem(t);else if(this.placeholder){let t=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(t,e),e.setAttribute("placeholder","")}!this._valueChanging&&t&&(this._selectedChanging=!0,this.value=t.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),im(e,"aria-labelledby",t||this.placeholder?{newId:this._itemId}:{oldId:this._itemId}),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(e){if(!e)return!1;let t=!!(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()),i=e.childElementCount>0;return t||i}_updateSelectedItem(e,t,i){if(t){let i=null==e?e:e.toString();this._menuElement.selected=t.reduce((e,t,s)=>void 0===e&&t.value===i?s:e,void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}else i&&this.__updateValueButton()}_shouldRemoveFocus(e){return!this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this._requestValidation()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(e,t){if(!this.items||0===this.items.length){e.textContent="";return}let i=e.firstElementChild;i||(i=document.createElement("vaadin-select-list-box"),e.appendChild(i)),i.textContent="",this.items.forEach(e=>{i.appendChild(this.__createItemElement(e))})}__dispatchChange(){this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}};class nr extends ns(eX(ty(e8(tv(ek))))){static get is(){return"vaadin-select"}static get styles(){return[sk,ne,nt]}render(){return en`
2372
+ `;class nr extends ti{constructor(e){super(e,"value","vaadin-select-value-button",{initializer:(e,t)=>{t._setFocusElement(e),t.ariaTarget=e,t.stateTarget=e,e.setAttribute("aria-haspopup","listbox")}})}}let nn=e=>class extends io(ih(tQ(iD(e)))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged",sync:!0},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder, focusElement)"]}constructor(){super(),this._itemId=`value-${this.localName}-${tt++}`,this._srLabelController=new iE(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._overlayElement=this.$.overlay,this._valueButtonController=new nr(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new sb(this._phoneMediaQuery,e=>{this._phone=e})),this._tooltipController=new ts(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}updated(e){super.updated(e),e.has("_phone")&&this.toggleAttribute("phone",this._phone)}requestContentUpdate(){this._overlayElement&&this._overlayElement.requestContentUpdate()}_requiredChanged(e){super._requiredChanged(e),!1===e&&this._requestValidation()}__itemsChanged(e,t){(e||t)&&this.requestContentUpdate()}_assignMenuElement(e){e&&e!==this.__lastMenuElement&&(this._menuElement=e,this.__initMenuItems(e),e.addEventListener("items-changed",()=>{this.__initMenuItems(e)}),e.addEventListener("selected-changed",()=>this.__updateValueButton()),e.addEventListener("keydown",e=>this._onKeyDownInside(e),!0),e.addEventListener("click",e=>{let t=e.composedPath().find(e=>e._hasVaadinItemMixin);this.__dispatchChangePending=t?.value!==void 0&&t.value!==this.value,this.opened=!1},!0),this.__lastMenuElement=e),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items)}__initMenuItems(e){e.items&&(this._items=e.items)}_valueChanged(e,t){this.toggleAttribute("has-value",!!e),void 0===t||this.__dispatchChangePending||this._requestValidation()}_onClick(e){this.disabled||(e.preventDefault(),this.opened=!this.readonly)}_onEscape(e){this.opened&&(e.stopPropagation(),this.opened=!1)}_onToggleMouseDown(e){e.preventDefault(),this.opened||this.focusElement.focus()}_onKeyDown(e){if(super._onKeyDown(e),!e.altKey&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&e.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened){if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(e.key))e.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(e.key)&&1===e.key.length){let t=this._menuElement.selected,i=this._menuElement._searchKey(t??-1,e.key);i>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=i)}}}_onKeyDownInside(e){"Tab"===e.key&&(this.focusElement.setAttribute("tabindex","-1"),this._overlayElement.restoreFocusOnClose=!1,this.opened=!1,setTimeout(()=>{this.focusElement.setAttribute("tabindex","0"),this._overlayElement.restoreFocusOnClose=!0}))}_openedChanged(e,t){if(e){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1);let e=this.hasAttribute("focus-ring");this._openedWithFocusRing=e,e&&this.removeAttribute("focus-ring")}else t&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),this.__dispatchChangePending||this._keyboardActive||this._requestValidation())}_updateAriaExpanded(e,t){t&&t.setAttribute("aria-expanded",e?"true":"false")}_updateAriaLive(e){this.focusElement&&(e?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(e){let t,i=e.getAttribute("label");(t=i?this.__createItemElement({label:i}):e.cloneNode(!0))._sourceItem=e,this.__appendValueItemElement(t,this.focusElement),t.selected=!0}__createItemElement(e){let t=document.createElement(e.component||"vaadin-select-item");return e.label&&(t.textContent=e.label),e.value&&(t.value=e.value),e.disabled&&(t.disabled=e.disabled),e.className&&(t.className=e.className),t}__appendValueItemElement(e,t){t.appendChild(e),e.removeAttribute("tabindex"),e.removeAttribute("aria-selected"),e.removeAttribute("role"),e.removeAttribute("focused"),e.removeAttribute("focus-ring"),e.removeAttribute("active"),e.setAttribute("id",this._itemId)}_accessibleNameChanged(e){this._srLabelController.setLabel(e),this._setCustomAriaLabelledBy(e?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(e){this._setCustomAriaLabelledBy(e)}_setCustomAriaLabelledBy(e){let t=this._getLabelIdWithItemId(e);this._fieldAriaController.setLabelId(t,!0)}_getLabelIdWithItemId(e){let t=this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:"";return e?`${e} ${t}`.trim():null}__updateValueButton(){let e=this.focusElement;if(!e)return;e.innerHTML="";let t=this._items?this._items[this._menuElement.selected]:void 0;if(e.removeAttribute("placeholder"),this._hasContent(t))this.__attachSelectedItem(t);else if(this.placeholder){let t=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(t,e),e.setAttribute("placeholder","")}!this._valueChanging&&t&&(this._selectedChanging=!0,this.value=t.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),ig(e,"aria-labelledby",t||this.placeholder?{newId:this._itemId}:{oldId:this._itemId}),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(e){if(!e)return!1;let t=!!(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()),i=e.childElementCount>0;return t||i}_updateSelectedItem(e,t,i){if(t){let i=null==e?e:e.toString();this._menuElement.selected=t.reduce((e,t,s)=>void 0===e&&t.value===i?s:e,void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}else i&&this.__updateValueButton()}_shouldRemoveFocus(e){return!this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this._requestValidation()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(e,t){if(!this.items||0===this.items.length){e.textContent="";return}let i=e.firstElementChild;i||(i=document.createElement("vaadin-select-list-box"),e.appendChild(i)),i.textContent="",this.items.forEach(e=>{i.appendChild(this.__createItemElement(e))})}__dispatchChange(){this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}};class na extends nn(eX(tw(e8(tm(ek))))){static get is(){return"vaadin-select"}static get styles(){return[sE,ni,ns]}render(){return en`
2324
2373
  <div class="vaadin-select-container">
2325
2374
  <div part="label" @click="${this._onClick}">
2326
2375
  <slot name="label"></slot>
@@ -2375,7 +2424,7 @@
2375
2424
  <div class="sr-only">
2376
2425
  <slot name="sr-label"></slot>
2377
2426
  </div>
2378
- `}_onOpenedChanged(e){this.opened=e.detail.value}_onOverlayOpen(){this._menuElement&&this._menuElement.focus({focusVisible:tJ})}}eI(nr),rx(class extends r${addRenderer(){this.element.renderer=(e,t)=>{this.renderRenderer(e,t)}}runRenderer(){this.element.requestContentUpdate()}removeRenderer(){this.element.renderer=null}});let nn=class extends nr{};nn=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-select")],nn);let na=g`
2427
+ `}_onOpenedChanged(e){this.opened=e.detail.value}_onOverlayOpen(){this._menuElement&&this._menuElement.focus({focusVisible:t0})}}eT(na),rk(class extends rM{addRenderer(){this.element.renderer=(e,t)=>{this.renderRenderer(e,t)}}runRenderer(){this.element.requestContentUpdate()}removeRenderer(){this.element.renderer=null}});let no=class extends na{};no=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-select")],no);let nl=g`
2379
2428
  :host {
2380
2429
  display: inline-flex;
2381
2430
  align-items: center;
@@ -2489,10 +2538,10 @@
2489
2538
  background: CanvasText;
2490
2539
  }
2491
2540
  }
2492
- `;class no extends ty(e8(tv(ek))){static get is(){return"vaadin-multi-select-combo-box-chip"}static get styles(){return na}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0,sync:!0},readonly:{type:Boolean,reflectToAttribute:!0,sync:!0},label:{type:String,sync:!0},item:{type:Object}}}render(){return en`
2541
+ `;class nd extends tw(e8(tm(ek))){static get is(){return"vaadin-multi-select-combo-box-chip"}static get styles(){return nl}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0,sync:!0},readonly:{type:Boolean,reflectToAttribute:!0,sync:!0},label:{type:String,sync:!0},item:{type:Object}}}render(){return en`
2493
2542
  <div part="label">${this.label}</div>
2494
2543
  <div part="remove-button" @click="${this._onRemoveClick}"></div>
2495
- `}_onRemoveClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}))}}eI(no),eI(class extends iB{static get is(){return"vaadin-multi-select-combo-box-container"}static get styles(){return[super.styles,g`
2544
+ `}_onRemoveClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}))}}eT(nd),eT(class extends iz{static get is(){return"vaadin-multi-select-combo-box-container"}static get styles(){return[super.styles,g`
2496
2545
  #wrapper {
2497
2546
  display: flex;
2498
2547
  width: 100%;
@@ -2510,12 +2559,12 @@
2510
2559
  <slot></slot>
2511
2560
  </div>
2512
2561
  <slot name="suffix"></slot>
2513
- `}});class nl extends sz(ty(eK(e8(tv(ek))))){static get is(){return"vaadin-multi-select-combo-box-item"}static get styles(){return[sF,sB]}render(){return en`
2562
+ `}});class nh extends sF(tw(eK(e8(tm(ek))))){static get is(){return"vaadin-multi-select-combo-box-item"}static get styles(){return[sU,sz]}render(){return en`
2514
2563
  <span part="checkmark" aria-hidden="true"></span>
2515
2564
  <div part="content">
2516
2565
  <slot></slot>
2517
2566
  </div>
2518
- `}}eI(nl);let nd=[[g`
2567
+ `}}eT(nh);let nu=[[g`
2519
2568
  @keyframes fade-in {
2520
2569
  0% {
2521
2570
  opacity: 0;
@@ -2585,16 +2634,16 @@
2585
2634
  var(--_vaadin-multi-select-combo-box-overlay-default-width, auto)
2586
2635
  );
2587
2636
  }
2588
- `];class nh extends sH(i2(eK(ty(e8(tv(ek)))))){static get is(){return"vaadin-multi-select-combo-box-overlay"}static get styles(){return[iz,nd]}render(){return en`
2637
+ `];class nc extends sj(i3(eK(tw(e8(tm(ek)))))){static get is(){return"vaadin-multi-select-combo-box-overlay"}static get styles(){return[iF,nu]}render(){return en`
2589
2638
  <div part="overlay" id="overlay">
2590
2639
  <div part="loader"></div>
2591
2640
  <div part="content" id="content"><slot></slot></div>
2592
2641
  </div>
2593
- `}}eI(nh);class nu extends sZ(e8(ek)){static get is(){return"vaadin-multi-select-combo-box-scroller"}static get styles(){return sQ}render(){return en`
2642
+ `}}eT(nc);class np extends sQ(e8(ek)){static get is(){return"vaadin-multi-select-combo-box-scroller"}static get styles(){return sJ}render(){return en`
2594
2643
  <div id="selector">
2595
2644
  <slot></slot>
2596
2645
  </div>
2597
- `}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(e,t,i){return!(e instanceof sX)&&!this.owner.readonly&&this.owner._findIndex(e,this.owner.selectedItems,i)>-1}_updateElement(e,t){super._updateElement(e,t),e.toggleAttribute("readonly",this.owner.readonly)}}eI(nu);let nc=[g`
2646
+ `}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(e,t,i){return!(e instanceof sZ)&&!this.owner.readonly&&this.owner._findIndex(e,this.owner.selectedItems,i)>-1}_updateElement(e,t){super._updateElement(e,t),e.toggleAttribute("readonly",this.owner.readonly)}}eT(np);let n_=[g`
2598
2647
  :host([opened]) {
2599
2648
  pointer-events: auto;
2600
2649
  }
@@ -2656,12 +2705,12 @@
2656
2705
  :host([auto-expand-horizontally]) {
2657
2706
  --vaadin-field-default-width: auto;
2658
2707
  }
2659
- `];class np{context;pageSize;items=[];pendingRequests={};#c={};#p=0;#_=0;constructor(e,t,i,s,r){this.context=e,this.pageSize=t,this.size=i,this.parentCache=s,this.parentCacheIndex=r,this.#_=i||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.#c)}get isLoading(){return Object.keys(this.pendingRequests).length>0||this.subCaches.some(e=>e.isLoading)}get flatSize(){return this.#_}get size(){return this.#p}set size(e){if(this.#p!==e){if(this.#p=e,void 0!==this.context.placeholder){this.items.length=e||0;for(let t=0;t<e||0;t++)this.items[t]||=this.context.placeholder}this.items.length>e&&(this.items.length=e||0),Object.keys(this.pendingRequests).forEach(e=>{parseInt(e)*this.pageSize>=this.size&&delete this.pendingRequests[e]})}}recalculateFlatSize(){this.#_=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce((e,t)=>(t.recalculateFlatSize(),e+t.flatSize),0):0}setPage(e,t){let i=e*this.pageSize;t.forEach((e,t)=>{let s=i+t;(void 0===this.size||s<this.size)&&(this.items[s]=e)})}getSubCache(e){return this.#c[e]}removeSubCache(e){delete this.#c[e]}removeSubCaches(){this.#c={}}createSubCache(e){let t=new np(this.context,this.pageSize,0,this,e);return this.#c[e]=t,t}getFlatIndex(e){let t=Math.max(0,Math.min(this.size-1,e));return this.subCaches.reduce((e,i)=>t>i.parentCacheIndex?e+i.flatSize:e,t)}}class n_ extends EventTarget{host;dataProvider;dataProviderParams;pageSize;isExpanded;getItemId;rootCache;placeholder;isPlaceholder;constructor(e,{size:t,pageSize:i,isExpanded:s,getItemId:r,isPlaceholder:n,placeholder:a,dataProvider:o,dataProviderParams:l}){super(),this.host=e,this.pageSize=i,this.getItemId=r,this.isExpanded=s,this.placeholder=a,this.isPlaceholder=n,this.dataProvider=o,this.dataProviderParams=l,this.rootCache=this.#v(t)}get flatSize(){return this.rootCache.flatSize}get #m(){return{isExpanded:this.isExpanded,placeholder:this.placeholder}}isLoading(){return this.rootCache.isLoading}setPageSize(e){this.pageSize=e,this.clearCache()}setDataProvider(e){this.dataProvider=e,this.clearCache()}recalculateFlatSize(){this.rootCache.recalculateFlatSize()}clearCache(){this.rootCache=this.#v(this.rootCache.size)}getFlatIndexContext(e){return function e(t,i,s=0){let r=i;for(let i of t.subCaches){let t=i.parentCacheIndex;if(r<=t)break;if(r<=t+i.flatSize)return e(i,r-t-1,s+1);r-=i.flatSize}return{cache:t,item:t.items[r],index:r,page:Math.floor(r/t.pageSize),level:s}}(this.rootCache,e)}getItemContext(e){return function e({getItemId:t},i,s,r=0,n=0){for(let e=0;e<i.items.length;e++){let a=i.items[e];if(a&&t(a)===t(s))return{cache:i,level:r,item:a,index:e,page:Math.floor(e/i.pageSize),subCache:i.getSubCache(e),flatIndex:n+i.getFlatIndex(e)}}for(let a of i.subCaches){let o=n+i.getFlatIndex(a.parentCacheIndex),l=e({getItemId:t},a,s,r+1,o+1);if(l)return l}}({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return function e(t,[i,...s],r=0){i===1/0&&(i=t.size-1);let n=t.getFlatIndex(i),a=t.getSubCache(i);return a&&a.flatSize>0&&s.length?e(a,s,r+n+1):r+n}(this.rootCache,e)}ensureFlatIndexLoaded(e){let{cache:t,page:i,item:s}=this.getFlatIndexContext(e);this.#f(s)||this.#g(t,i)}ensureFlatIndexHierarchy(e){let{cache:t,item:i,index:s}=this.getFlatIndexContext(e);if(this.#f(i)&&this.isExpanded(i)&&!t.getSubCache(s)){let e=t.createSubCache(s);this.#g(e,0)}}loadFirstPage(){this.#g(this.rootCache,0)}_shouldLoadCachePage(e,t){return!0}#v(e){return new np(this.#m,this.pageSize,e)}#g(e,t){if(!this.dataProvider||e.pendingRequests[t]||!this._shouldLoadCachePage(e,t))return;let i={page:t,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(i={...i,...this.dataProviderParams()});let s=(r,n)=>{e.pendingRequests[t]===s&&(void 0!==n?e.size=n:i.parentItem&&(e.size=r.length),e.setPage(t,r),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete e.pendingRequests[t],this.dispatchEvent(new CustomEvent("page-loaded")))};e.pendingRequests[t]=s,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(i,s)}#f(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}}let nv=e=>class extends e{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}}}static get observers(){return["_dataProviderFilterChanged(filter)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderInitialized=!1,this.__previousDataProviderFilter,this.__dataProviderController=new n_(this,{placeholder:new sX,isPlaceholder:e=>e instanceof sX,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",e=>{if(!this._shouldFetchData())return;let t=e.detail.index;void 0!==t&&this.__dataProviderController.ensureFlatIndexLoaded(t)}),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(e){if(void 0===this.__previousDataProviderFilter&&""===e){this.__previousDataProviderFilter=e;return}this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1)}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(e){this._shouldFetchData()&&e&&(this._forceNextRequest||void 0===this.size?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){let{rootCache:e}=this.__dataProviderController;e.items=[...e.items],this.__synchronizeControllerState(),this.opened||this._isInputFocused()||this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(e){let{rootCache:t}=this.__dataProviderController;t.size!==e&&(t.size=e,t.items=[...t.items],this.__synchronizeControllerState())}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){let{rootCache:t}=this.__dataProviderController;t.items!==e&&(t.items=e,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){let{rootCache:e}=this.__dataProviderController;this.size=e.size,this.filteredItems=e.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(e,t){if(Math.floor(e)!==e||e<1)throw this.pageSize=t,Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache()}_dataProviderChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.dataProvider=t}),this.__dataProviderController.setDataProvider(e),this.clearCache()}_ensureItemsOrDataProvider(e){if(void 0!==this.items&&void 0!==this.dataProvider)throw e(),Error("Using `items` and `dataProvider` together is not supported")}};function nm(e,t){return e.findIndex(e=>!(e instanceof sX)&&t(e))}let nf=e=>class extends s1(e){static get properties(){return{items:{type:Array,sync:!0,observer:"_itemsChanged"},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},itemLabelGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0}}}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter),e.has("itemLabelGenerator")&&this.requestContentUpdate()}_onInput(e){let t=this._inputElementValue,i={};this.filter===t?this._filterChanged(this.filter):i.filter=t,this.opened||this._isClearButton(e)||this.autoOpenDisabled||(i.opened=!0),this.setProperties(i)}_getItemLabel(e){if("function"==typeof this.itemLabelGenerator&&e)return this.itemLabelGenerator(e)||"";let t=e&&this.itemLabelPath?eJ(this.itemLabelPath,e):void 0;return null==t&&(t=e?e.toString():""),t}_getItemValue(e){let t=e&&this.itemValuePath?eJ(this.itemValuePath,e):void 0;return void 0===t&&(t=e?e.toString():""),t}_itemLabelPathChanged(e){"string"!=typeof e&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems)}_itemsChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.items=t}),e?this.filteredItems=e.slice(0):t&&(this.filteredItems=null)}_filteredItemsChanged(e){this._setDropdownItems(e)}_setDropdownItems(){}_filterItems(e,t){return e?e.filter(e=>(t=t?t.toString().toLowerCase():"",this._getItemLabel(e).toString().toLowerCase().indexOf(t)>-1)):e}__getItemIndexByValue(e,t){return e&&null!=t?nm(e,e=>this._getItemValue(e)===t):-1}__getItemIndexByLabel(e,t){return e&&t?nm(e,e=>this._getItemLabel(e).toString().toLowerCase()===t.toString().toLowerCase()):-1}},ng=new ResizeObserver(e=>{setTimeout(()=>{e.forEach(e=>{e.target.isConnected&&(e.target.resizables?e.target.resizables.forEach(t=>{t._onResize(e.contentRect)}):e.target._onResize(e.contentRect))})})}),nb=eQ(e=>class extends e{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),ng.observe(this),this._observeParent){let e=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;e.resizables||(e.resizables=new Set,ng.observe(e)),e.resizables.add(this),this.__parent=e}}disconnectedCallback(){super.disconnectedCallback(),ng.unobserve(this);let e=this.__parent;if(this._observeParent&&e){let t=e.resizables;t&&(t.delete(this),0===t.size&&ng.unobserve(e)),this.__parent=null}}_onResize(e){}}),ny={cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"},nw=e=>class extends s$(ny,nv(nf(sC(nb(e))))){static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},itemClassNameGenerator:{type:Object,sync:!0},itemIdPath:{type:String,sync:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},selectedItems:{type:Array,value:()=>[],notify:!0,sync:!0},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,observer:"_placeholderChanged",reflectToAttribute:!0,sync:!0},renderer:{type:Function,sync:!0},selectedItemsOnTop:{type:Boolean,value:!1,sync:!0},value:{type:String},_overflowItems:{type:Array,value:()=>[],sync:!0},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String,sync:!0},_topGroup:{type:Array,observer:"_topGroupChanged",sync:!0},_inputField:{type:Object}}}static get observers(){return["_selectedItemsChanged(selectedItems)","__openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateScroller(opened, _dropdownItems, _focusedIndex, _theme)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get i18n(){return super.i18n}set i18n(e){super.i18n=e}get slotStyles(){let e=this.localName;return[...super.slotStyles,`
2708
+ `];class nv{context;pageSize;items=[];pendingRequests={};#c={};#p=0;#_=0;constructor(e,t,i,s,r){this.context=e,this.pageSize=t,this.size=i,this.parentCache=s,this.parentCacheIndex=r,this.#_=i||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.#c)}get isLoading(){return Object.keys(this.pendingRequests).length>0||this.subCaches.some(e=>e.isLoading)}get flatSize(){return this.#_}get size(){return this.#p}set size(e){if(this.#p!==e){if(this.#p=e,void 0!==this.context.placeholder){this.items.length=e||0;for(let t=0;t<e||0;t++)this.items[t]||=this.context.placeholder}this.items.length>e&&(this.items.length=e||0),Object.keys(this.pendingRequests).forEach(e=>{parseInt(e)*this.pageSize>=this.size&&delete this.pendingRequests[e]})}}recalculateFlatSize(){this.#_=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce((e,t)=>(t.recalculateFlatSize(),e+t.flatSize),0):0}setPage(e,t){let i=e*this.pageSize;t.forEach((e,t)=>{let s=i+t;(void 0===this.size||s<this.size)&&(this.items[s]=e)})}getSubCache(e){return this.#c[e]}removeSubCache(e){delete this.#c[e]}removeSubCaches(){this.#c={}}createSubCache(e){let t=new nv(this.context,this.pageSize,0,this,e);return this.#c[e]=t,t}getFlatIndex(e){let t=Math.max(0,Math.min(this.size-1,e));return this.subCaches.reduce((e,i)=>t>i.parentCacheIndex?e+i.flatSize:e,t)}}class nm extends EventTarget{host;dataProvider;dataProviderParams;pageSize;isExpanded;getItemId;rootCache;placeholder;isPlaceholder;constructor(e,{size:t,pageSize:i,isExpanded:s,getItemId:r,isPlaceholder:n,placeholder:a,dataProvider:o,dataProviderParams:l}){super(),this.host=e,this.pageSize=i,this.getItemId=r,this.isExpanded=s,this.placeholder=a,this.isPlaceholder=n,this.dataProvider=o,this.dataProviderParams=l,this.rootCache=this.#v(t)}get flatSize(){return this.rootCache.flatSize}get #m(){return{isExpanded:this.isExpanded,placeholder:this.placeholder}}isLoading(){return this.rootCache.isLoading}setPageSize(e){this.pageSize=e,this.clearCache()}setDataProvider(e){this.dataProvider=e,this.clearCache()}recalculateFlatSize(){this.rootCache.recalculateFlatSize()}clearCache(){this.rootCache=this.#v(this.rootCache.size)}getFlatIndexContext(e){return function e(t,i,s=0){let r=i;for(let i of t.subCaches){let t=i.parentCacheIndex;if(r<=t)break;if(r<=t+i.flatSize)return e(i,r-t-1,s+1);r-=i.flatSize}return{cache:t,item:t.items[r],index:r,page:Math.floor(r/t.pageSize),level:s}}(this.rootCache,e)}getItemContext(e){return function e({getItemId:t},i,s,r=0,n=0){for(let e=0;e<i.items.length;e++){let a=i.items[e];if(a&&t(a)===t(s))return{cache:i,level:r,item:a,index:e,page:Math.floor(e/i.pageSize),subCache:i.getSubCache(e),flatIndex:n+i.getFlatIndex(e)}}for(let a of i.subCaches){let o=n+i.getFlatIndex(a.parentCacheIndex),l=e({getItemId:t},a,s,r+1,o+1);if(l)return l}}({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return function e(t,[i,...s],r=0){i===1/0&&(i=t.size-1);let n=t.getFlatIndex(i),a=t.getSubCache(i);return a?.flatSize>0&&s.length?e(a,s,r+n+1):r+n}(this.rootCache,e)}ensureFlatIndexLoaded(e){let{cache:t,page:i,item:s}=this.getFlatIndexContext(e);this.#f(s)||this.#g(t,i)}ensureFlatIndexHierarchy(e){let{cache:t,item:i,index:s}=this.getFlatIndexContext(e);if(this.#f(i)&&this.isExpanded(i)&&!t.getSubCache(s)){let e=t.createSubCache(s);this.#g(e,0)}}loadFirstPage(){this.#g(this.rootCache,0)}_shouldLoadCachePage(e,t){return!0}#v(e){return new nv(this.#m,this.pageSize,e)}#g(e,t){if(!this.dataProvider||e.pendingRequests[t]||!this._shouldLoadCachePage(e,t))return;let i={page:t,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(i={...i,...this.dataProviderParams()});let s=(r,n)=>{e.pendingRequests[t]===s&&(void 0!==n?e.size=n:i.parentItem&&(e.size=r.length),e.setPage(t,r),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete e.pendingRequests[t],this.dispatchEvent(new CustomEvent("page-loaded")))};e.pendingRequests[t]=s,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(i,s)}#f(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}}let nf=e=>class extends e{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}}}static get observers(){return["_dataProviderFilterChanged(filter)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderInitialized=!1,this.__previousDataProviderFilter,this.__dataProviderController=new nm(this,{placeholder:new sZ,isPlaceholder:e=>e instanceof sZ,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",e=>{if(!this._shouldFetchData())return;let t=e.detail.index;void 0!==t&&this.__dataProviderController.ensureFlatIndexLoaded(t)}),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(e){if(void 0===this.__previousDataProviderFilter&&""===e){this.__previousDataProviderFilter=e;return}this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1)}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(e){this._shouldFetchData()&&e&&(this._forceNextRequest||void 0===this.size?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){let{rootCache:e}=this.__dataProviderController;e.items=[...e.items],this.__synchronizeControllerState(),this.opened||this._isInputFocused()||this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(e){let{rootCache:t}=this.__dataProviderController;t.size!==e&&(t.size=e,t.items=[...t.items],this.__synchronizeControllerState())}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){let{rootCache:t}=this.__dataProviderController;t.items!==e&&(t.items=e,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){let{rootCache:e}=this.__dataProviderController;this.size=e.size,this.filteredItems=e.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(e,t){if(Math.floor(e)!==e||e<1)throw this.pageSize=t,Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache()}_dataProviderChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.dataProvider=t}),this.__dataProviderController.setDataProvider(e),this.clearCache()}_ensureItemsOrDataProvider(e){if(void 0!==this.items&&void 0!==this.dataProvider)throw e(),Error("Using `items` and `dataProvider` together is not supported")}},ng=e=>class extends e{static get observers(){return["__clearPendingFocusOnFilter(filter)"]}__focusIndex(e){if(!("number"!=typeof e||Number.isNaN(e))&&!(e<0)){if(!this._overlayOpened||!this._dropdownItems||0===this._dropdownItems.length){this.__pendingFocusIndex=e;return}if(!(e>=this._dropdownItems.length)){if(this._focusedIndex=e,this._scrollIntoView(e,!0),this.loading){this.__pendingFocusIndex=e;return}delete this.__pendingFocusIndex,requestAnimationFrame(()=>{this.isConnected&&this._updateActiveDescendant(e)})}}}__focusPendingIndexIfNeeded(){void 0===this.__pendingFocusIndex||this.loading||this.__focusIndex(this.__pendingFocusIndex)}__clearPendingFocusOnFilter(){delete this.__pendingFocusIndex}_onOpened(){super._onOpened(),this.__focusPendingIndexIfNeeded()}__onDataProviderPageLoaded(){super.__onDataProviderPageLoaded(),this.__focusPendingIndexIfNeeded()}};function nb(e,t){return e.findIndex(e=>!(e instanceof sZ)&&t(e))}let ny=e=>class extends s2(e){static get properties(){return{items:{type:Array,sync:!0,observer:"_itemsChanged"},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},itemLabelGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0}}}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter),e.has("itemLabelGenerator")&&this.requestContentUpdate()}_onInput(e){let t=this._inputElementValue,i={};this.filter===t?this._filterChanged(this.filter):i.filter=t,this.opened||this._isClearButton(e)||this.autoOpenDisabled||(i.opened=!0),this.setProperties(i)}_getItemLabel(e){if("function"==typeof this.itemLabelGenerator&&e)return this.itemLabelGenerator(e)||"";let t=e&&this.itemLabelPath?eJ(this.itemLabelPath,e):void 0;return null==t&&(t=e?e.toString():""),t}_getItemValue(e){let t=e&&this.itemValuePath?eJ(this.itemValuePath,e):void 0;return void 0===t&&(t=e?e.toString():""),t}_itemLabelPathChanged(e){"string"!=typeof e&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems)}_itemsChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.items=t}),e?this.filteredItems=e.slice(0):t&&(this.filteredItems=null)}_filteredItemsChanged(e){this._setDropdownItems(e)}_setDropdownItems(){}_filterItems(e,t){return e?e.filter(e=>(t=t?t.toString().toLowerCase():"",this._getItemLabel(e).toString().toLowerCase().indexOf(t)>-1)):e}__getItemIndexByValue(e,t){return e&&null!=t?nb(e,e=>this._getItemValue(e)===t):-1}__getItemIndexByLabel(e,t){return e&&t?nb(e,e=>this._getItemLabel(e).toString().toLowerCase()===t.toString().toLowerCase()):-1}},nw=new ResizeObserver(e=>{setTimeout(()=>{e.forEach(e=>{e.target.isConnected&&(e.target.resizables?e.target.resizables.forEach(t=>{t._onResize(e.contentRect)}):e.target._onResize(e.contentRect))})})}),nx=eQ(e=>class extends e{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),nw.observe(this),this._observeParent){let e=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;e.resizables||(e.resizables=new Set,nw.observe(e)),e.resizables.add(this),this.__parent=e}}disconnectedCallback(){super.disconnectedCallback(),nw.unobserve(this);let e=this.__parent;if(this._observeParent&&e){let t=e.resizables;t&&(t.delete(this),0===t.size&&nw.unobserve(e)),this.__parent=null}}_onResize(e){}}),nC={cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"},nk=e=>class extends sL(ng(nf(ny(sk(nx(e)))))){static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},collapseChips:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},itemClassNameGenerator:{type:Object,sync:!0},itemIdPath:{type:String,sync:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},selectedItems:{type:Array,value:()=>[],notify:!0,sync:!0},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,observer:"_placeholderChanged",reflectToAttribute:!0,sync:!0},renderer:{type:Function,sync:!0},selectedItemsOnTop:{type:Boolean,value:!1,sync:!0},value:{type:String},_overflowItems:{type:Array,value:()=>[],sync:!0},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String,sync:!0},_topGroup:{type:Array,observer:"_topGroupChanged",sync:!0},_inputField:{type:Object}}}static get observers(){return["_selectedItemsChanged(selectedItems)","__openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateScroller(opened, _dropdownItems, _focusedIndex, _theme)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}static get defaultI18n(){return nC}get i18n(){return super.i18n}set i18n(e){super.i18n=e}get slotStyles(){let e=this.localName;return[...super.slotStyles,`
2660
2709
  ${e}[has-value] input::placeholder {
2661
2710
  color: transparent !important;
2662
2711
  forced-color-adjust: none;
2663
2712
  }
2664
- `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}ready(){super.ready(),this.addController(new iD(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new iS(this.inputElement,this._labelController)),this._tooltipController=new ts(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this._toggleElement=this.$.toggleButton,this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new ti(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:e=>{e.addEventListener("mousedown",e=>this._preventBlur(e)),this._overflow=e}}),this.addController(this._overflowController)}updated(e){super.updated(e),["loading","itemIdPath","itemClassNameGenerator","renderer"].forEach(t=>{e.has(t)&&(this._scroller[t]=this[t])}),e.has("selectedItems")&&this.opened&&this.$.overlay._updateOverlayWidth(),["autoExpandHorizontally","autoExpandVertically","disabled","readonly","clearButtonVisible","itemClassNameGenerator"].some(t=>e.has(t))&&this.__updateChips(),e.has("readonly")&&(this._setDropdownItems(this.filteredItems),this.dataProvider&&this.clearCache())}checkValidity(){return!this.required||!!this.readonly||this._hasValue}open(){this.disabled||this.readonly&&0===this.selectedItems.length||(this.opened=!0)}clear(){this.__updateSelection([]),iy(this.__effectiveI18n.cleared)}__syncTopGroup(){this._topGroup=this.selectedItemsOnTop?[...this.selectedItems]:[]}clearCache(){this.readonly||(super.clearCache(),this.__syncTopGroup())}_itemsChanged(e,t){super._itemsChanged(e,t),this.__syncTopGroup()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate()}))}_onClearAction(){this.clear()}_onClosed(){this._ignoreCommitValue=!0,(!this.loading||this.allowCustomValue)&&this._commitValue()}__updateScroller(e,t,i,s){e&&(this._scroller.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),this._scroller.setProperties({items:e?t:[],opened:e,focusedIndex:i,theme:s})}__openedOrItemsChanged(e,t,i,s){this._overlayOpened=e&&(s||i||!!(t&&t.length))}_closeOrCommit(){this.opened?this.close():this._commitValue()}_commitValue(){this._lastFilter=this.filter,this._ignoreCommitValue?(this._inputElementValue="",this._focusedIndex=-1,this._ignoreCommitValue=!1):this.__commitUserInput(),this.keepFilter&&this.opened||(this.filter="")}__commitUserInput(){if(this._focusedIndex>-1){let e=this._dropdownItems[this._focusedIndex];this.__selectItem(e)}else if(this._inputElementValue){let e=[...this._dropdownItems],t=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!t){let e=this._inputElementValue;this._lastCustomValue=e,this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:e,composed:!0,bubbles:!0}))}else this.allowCustomValue||this.opened||!t?this._inputElementValue="":this.__selectItem(t)}}_setFocused(e){e||(this._ignoreCommitValue=!0),super._setFocused(e),!e&&document.hasFocus()&&(this._focusedChipIndex=-1,this._requestValidation()),e||!this.readonly||this._closeOnBlurIsPrevented||this.close()}_onResize(){this.__updateChips()}_delegateAttribute(e,t){if(this.stateTarget){if("required"===e)return void this._delegateAttribute("aria-required",!!t&&"true");super._delegateAttribute(e,t)}}_placeholderChanged(e){let t=this.__tmpA11yPlaceholder;t!==e&&(this.__savedPlaceholder=e,t&&(this.placeholder=t))}_selectedItemsChanged(e){if(this._toggleHasValue(this._hasValue),this._hasValue){let t=this._mergeItemLabels(e);void 0===this.__tmpA11yPlaceholder&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=t,this.placeholder=t}else void 0!==this.__tmpA11yPlaceholder&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate()}_topGroupChanged(e){e&&this._setDropdownItems(this.filteredItems)}_hasValidInputValue(){let e=this._focusedIndex<0&&""!==this._inputElementValue;return this.allowCustomValue||!e}_shouldFetchData(){return!this.readonly&&super._shouldFetchData()}_setDropdownItems(e){if(this.readonly)return void this.__setDropdownItems(this.selectedItems);if(this.filter||!this.selectedItemsOnTop)return void this.__setDropdownItems(e);if(e&&e.length&&this._topGroup&&this._topGroup.length){let t=e.filter(e=>-1===this._findIndex(e,this._topGroup,this.itemIdPath));this.__setDropdownItems(this._topGroup.concat(t));return}this.__setDropdownItems(e)}__setDropdownItems(e){let t=this._dropdownItems;this._dropdownItems=e;let i=t?t[this._focusedIndex]:null,s=this.__getItemIndexByValue(e,this._getItemValue(i));s>-1?this._focusedIndex=s:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter)}_mergeItemLabels(e){return e.map(e=>this._getItemLabel(e)).join(", ")}_findIndex(e,t,i){if(i&&e){for(let s=0;s<t.length;s++)if(t[s]&&t[s][i]===e[i])return s;return -1}return t.indexOf(e)}__clearInternalValue(e=!1){!this.keepFilter||e?(this.filter="",this._inputElementValue=""):this._inputElementValue=this.filter}__announceItem(e,t,i){let s=this.__effectiveI18n.total.replace("{count}",i||0);iy(`${e} ${this.__effectiveI18n[t?"selected":"deselected"]} ${s}`)}__removeItem(e){let t=[...this.selectedItems];t.splice(t.indexOf(e),1),this.__updateSelection(t);let i=this._getItemLabel(e);this.__announceItem(i,!1,t.length)}__selectItem(e){let t=[...this.selectedItems],i=this._findIndex(e,t,this.itemIdPath),s=this._getItemLabel(e),r=!1;if(-1!==i){let e=this._lastFilter;if(e&&e.toLowerCase()===s.toLowerCase())return void this.__clearInternalValue();t.splice(i,1)}else t.push(e),r=!0;this.__updateSelection(t),this.__clearInternalValue(),this.__announceItem(s,r,t.length)}__updateSelection(e){this.selectedItems=e,this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(e,t,i){e?(!i||this.__needToSyncTopGroup())&&(this._topGroup=[...t]):this._topGroup=[]}__needToSyncTopGroup(){return!!this.itemIdPath&&this._topGroup&&this._topGroup.some(e=>{let t=this.selectedItems[this._findIndex(e,this.selectedItems,this.itemIdPath)];return t&&e!==t})}__createChip(e){let t=document.createElement("vaadin-multi-select-combo-box-chip");t.setAttribute("slot","chip"),t.item=e,t.disabled=this.disabled,t.readonly=this.readonly;let i=this._getItemLabel(e);return t.label=i,t.setAttribute("title",i),"function"==typeof this.itemClassNameGenerator&&(t.className=this.itemClassNameGenerator(e)),t.addEventListener("item-removed",e=>this._onItemRemoved(e)),t.addEventListener("mousedown",e=>this._preventBlur(e)),t}__getWrapperWidth(){return this._inputField.$.wrapper.clientWidth}__getOverflowWidth(){let e=this._overflow;e.style.visibility="hidden",e.removeAttribute("hidden");let t=e.getAttribute("count");e.setAttribute("count","99");let i=getComputedStyle(e),s=e.clientWidth+parseInt(i.marginInlineStart);return e.setAttribute("count",t),e.setAttribute("hidden",""),e.style.visibility="",s}__updateChips(){if(!this._inputField||!this.inputElement)return;if(this._chips.forEach(e=>{e.remove()}),0===this.selectedItems.length){this._overflowItems=[];return}if(this.autoExpandVertically){this.selectedItems.forEach(e=>{this.appendChild(this.__createChip(e))}),this._overflowItems=[];return}let e=parseInt(getComputedStyle(this.inputElement).flexBasis);this.autoExpandHorizontally?this._overflowItems=this.__updateChipsHorizontalExpand(this.selectedItems,e):this._overflowItems=this.__updateChipsDefault(this.selectedItems,e)}__updateChipsHorizontalExpand(e,t){let i=e.map(e=>{let t=this.__createChip(e);return this.appendChild(t),t});if(this.__getWrapperWidth()-this.$.chips.clientWidth>=t)return[];let s=this.__getOverflowWidth(),r=i.length;for(;r>1&&(i[r-=1].remove(),!(this.__getWrapperWidth()-this.$.chips.clientWidth>=t+s)););if(1===r){let e=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width")),r=this.__getWrapperWidth()-t-s;i[0].style.maxWidth=`${Math.max(e,r)}px`}return e.slice(r)}__updateChipsDefault(e,t){let i=this.__getWrapperWidth()-t;e.length>1&&(i-=this.__getOverflowWidth());let s=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));for(let t=e.length-1,r=null;t>=0;t--){let n=this.__createChip(e[t]);if(this.insertBefore(n,r),this.$.chips.clientWidth>i&&(i<s||null!==r))return n.remove(),e.slice(0,t+1);n.style.maxWidth=`${i}px`,r=n}return[]}__updateOverflowChip(e,t,i,s){if(e){let r=t.length;e.label=`${r}`,e.setAttribute("count",`${r}`),e.setAttribute("title",this._mergeItemLabels(t)),e.toggleAttribute("hidden",0===r),e.disabled=i,e.readonly=s}}_onClearButtonClick(e){e.stopPropagation(),super._onClearButtonClick(e),this.opened&&this.requestContentUpdate()}_onChange(e){e.stopPropagation()}_onEscape(e){if(this.readonly){e.stopPropagation(),this.opened&&this.close();return}this.clearButtonVisible&&!this.opened&&this.selectedItems&&this.selectedItems.length&&(e.stopPropagation(),this.selectedItems=[]),super._onEscape(e)}_onEscapeCancel(){this._closeOrCommit()}_onEnter(e){if(this.opened){if(e.preventDefault(),e.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){let e=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(e)}return}super._onEnter(e)}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_onKeyDown(e){super._onKeyDown(e);let t=this._chips;if(!this.readonly&&t.length>0)switch(e.key){case"Backspace":this._onBackSpace(t);break;case"ArrowLeft":this._onArrowLeft(t,e);break;case"ArrowRight":this._onArrowRight(t,e);break;default:this._focusedChipIndex=-1}}_onArrowLeft(e,t){let i;if(0!==this.inputElement.selectionStart)return;let s=this._focusedChipIndex;-1!==s&&t.preventDefault(),this.__isRTL?s===e.length-1?i=-1:s>-1&&(i=s+1):-1===s?i=e.length-1:s>0&&(i=s-1),void 0!==i&&(this._focusedChipIndex=i)}_onArrowRight(e,t){let i;if(0!==this.inputElement.selectionStart)return;let s=this._focusedChipIndex;-1!==s&&t.preventDefault(),this.__isRTL?-1===s?i=e.length-1:s>0&&(i=s-1):s===e.length-1?i=-1:s>-1&&(i=s+1),void 0!==i&&(this._focusedChipIndex=i)}_onBackSpace(e){if(0!==this.inputElement.selectionStart)return;let t=this._focusedChipIndex;-1===t?this._focusedChipIndex=e.length-1:(this.__removeItem(e[t].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(e,t){if(e>-1||t>-1){let t=this._chips;if(t.forEach((t,i)=>{t.toggleAttribute("focused",i===e)}),e>-1){let i=t[e].item,s=this._getItemLabel(i);iy(`${s} ${this.__effectiveI18n.focused}`)}}}_overlaySelectedItemChanged(e){e.stopPropagation(),this.readonly||e.detail.item instanceof sX||this.opened&&(this._lastFilter=this._inputElementValue,this.__selectItem(e.detail.item))}_onItemRemoved(e){this.__removeItem(e.detail.item)}_preventBlur(e){e.preventDefault()}};class nx extends nw(ty(eX(e8(tv(ek))))){static get is(){return"vaadin-multi-select-combo-box"}static get styles(){return[sk,nc]}render(){return en`
2713
+ `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}ready(){super.ready(),this.addController(new iS(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new iA(this.inputElement,this._labelController)),this._tooltipController=new ts(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this._toggleElement=this.$.toggleButton,this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new ti(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:e=>{e.addEventListener("mousedown",e=>this._preventBlur(e)),this._overflow=e}}),this.addController(this._overflowController)}updated(e){super.updated(e),["loading","itemIdPath","itemClassNameGenerator","renderer"].forEach(t=>{e.has(t)&&(this._scroller[t]=this[t])}),e.has("selectedItems")&&this.opened&&this.$.overlay._updateOverlayWidth(),["autoExpandHorizontally","autoExpandVertically","collapseChips","disabled","readonly","clearButtonVisible","itemClassNameGenerator"].some(t=>e.has(t))&&this.__updateChips(),e.has("readonly")&&(this._setDropdownItems(this.filteredItems),this.dataProvider&&this.clearCache())}checkValidity(){return!this.required||!!this.readonly||this._hasValue}open(){this.disabled||this.readonly&&0===this.selectedItems.length||(this.opened=!0)}clear(){this.__updateSelection([]),iw(this.__effectiveI18n.cleared)}__syncTopGroup(){this._topGroup=this.selectedItemsOnTop?[...this.selectedItems]:[]}clearCache(){this.readonly||(super.clearCache(),this.__syncTopGroup())}_itemsChanged(e,t){super._itemsChanged(e,t),this.__syncTopGroup()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate()}))}_onClearAction(){this.clear()}_onClosed(){this._ignoreCommitValue=!0,(!this.loading||this.allowCustomValue)&&this._commitValue()}__updateScroller(e,t,i,s){e&&(this._scroller.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),this._scroller.setProperties({items:e?t:[],opened:e,focusedIndex:i,theme:s})}__openedOrItemsChanged(e,t,i,s){this._overlayOpened=e&&(s||i||!!t?.length)}_closeOrCommit(){this.opened?this.close():this._commitValue()}_commitValue(){this._lastFilter=this.filter,this._ignoreCommitValue?(this._inputElementValue="",this._focusedIndex=-1,this._ignoreCommitValue=!1):this.__commitUserInput(),this.keepFilter&&this.opened||(this.filter="")}__commitUserInput(){if(this._focusedIndex>-1){let e=this._dropdownItems[this._focusedIndex];this.__selectItem(e)}else if(this._inputElementValue){let e=[...this._dropdownItems],t=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!t){let e=this._inputElementValue;this._lastCustomValue=e,this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:e,composed:!0,bubbles:!0}))}else this.allowCustomValue||this.opened||!t?this._inputElementValue="":this.__selectItem(t)}}_setFocused(e){e||(this._ignoreCommitValue=!0),super._setFocused(e),!e&&document.hasFocus()&&(this._focusedChipIndex=-1,this._requestValidation()),e||!this.readonly||this._closeOnBlurIsPrevented||this.close()}_onResize(){this.__updateChips()}_delegateAttribute(e,t){if(this.stateTarget){if("required"===e)return void this._delegateAttribute("aria-required",!!t&&"true");super._delegateAttribute(e,t)}}_placeholderChanged(e){let t=this.__tmpA11yPlaceholder;t!==e&&(this.__savedPlaceholder=e,t&&(this.placeholder=t))}_selectedItemsChanged(e){if(this._toggleHasValue(this._hasValue),this._hasValue){let t=this._mergeItemLabels(e);void 0===this.__tmpA11yPlaceholder&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=t,this.placeholder=t}else void 0!==this.__tmpA11yPlaceholder&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate()}_topGroupChanged(e){e&&this._setDropdownItems(this.filteredItems)}_hasValidInputValue(){let e=this._focusedIndex<0&&""!==this._inputElementValue;return this.allowCustomValue||!e}_shouldFetchData(){return!this.readonly&&super._shouldFetchData()}_setDropdownItems(e){if(this.readonly)return void this.__setDropdownItems(this.selectedItems);if(this.filter||!this.selectedItemsOnTop)return void this.__setDropdownItems(e);if(e?.length&&this._topGroup?.length){let t=e.filter(e=>-1===this._findIndex(e,this._topGroup,this.itemIdPath));this.__setDropdownItems(this._topGroup.concat(t));return}this.__setDropdownItems(e)}__setDropdownItems(e){let t=this._dropdownItems;this._dropdownItems=e;let i=t?t[this._focusedIndex]:null;if(t&&t[this._focusedIndex]instanceof sZ&&e[this._focusedIndex]instanceof sZ)return;let s=this.__getItemIndexByValue(e,this._getItemValue(i));s>-1?this._focusedIndex=s:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter)}_mergeItemLabels(e){return e.map(e=>this._getItemLabel(e)).join(", ")}_findIndex(e,t,i){if(i&&e){for(let s=0;s<t.length;s++)if(t[s]&&t[s][i]===e[i])return s;return -1}return t.indexOf(e)}__clearInternalValue(e=!1){!this.keepFilter||e?(this.filter="",this._inputElementValue=""):this._inputElementValue=this.filter}__announceItem(e,t,i){let s=this.__effectiveI18n.total.replace("{count}",i||0);iw(`${e} ${this.__effectiveI18n[t?"selected":"deselected"]} ${s}`)}__removeItem(e){let t=[...this.selectedItems];t.splice(t.indexOf(e),1),this.__updateSelection(t);let i=this._getItemLabel(e);this.__announceItem(i,!1,t.length)}__selectItem(e){let t=[...this.selectedItems],i=this._findIndex(e,t,this.itemIdPath),s=this._getItemLabel(e),r=!1;if(-1!==i){let e=this._lastFilter;if(e?.toLowerCase()===s.toLowerCase())return void this.__clearInternalValue();t.splice(i,1)}else t.push(e),r=!0;this.__updateSelection(t),this.__clearInternalValue(),this.__announceItem(s,r,t.length)}__updateSelection(e){this.selectedItems=e,this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(e,t,i){e?(!i||this.__needToSyncTopGroup())&&(this._topGroup=[...t]):this._topGroup=[]}__needToSyncTopGroup(){return!!this.itemIdPath&&this._topGroup&&this._topGroup.some(e=>{let t=this.selectedItems[this._findIndex(e,this.selectedItems,this.itemIdPath)];return t&&e!==t})}__createChip(e){let t=document.createElement("vaadin-multi-select-combo-box-chip");t.setAttribute("slot","chip"),t.item=e,t.disabled=this.disabled,t.readonly=this.readonly;let i=this._getItemLabel(e);return t.label=i,t.setAttribute("title",i),"function"==typeof this.itemClassNameGenerator&&(t.className=this.itemClassNameGenerator(e)),t.addEventListener("item-removed",e=>this._onItemRemoved(e)),t.addEventListener("mousedown",e=>this._preventBlur(e)),t}__getWrapperWidth(){return this._inputField.$.wrapper.clientWidth}__getOverflowWidth(){let e=this._overflow;e.style.visibility="hidden",e.removeAttribute("hidden");let t=e.getAttribute("count");e.setAttribute("count","99");let i=getComputedStyle(e),s=e.clientWidth+parseInt(i.marginInlineStart);return e.setAttribute("count",t),e.setAttribute("hidden",""),e.style.visibility="",s}__updateChips(){if(!this._inputField||!this.inputElement)return;if(this._chips.forEach(e=>{e.remove()}),0===this.selectedItems.length){this._overflowItems=[];return}if(this.autoExpandVertically){this.selectedItems.forEach(e=>{this.appendChild(this.__createChip(e))}),this._overflowItems=[];return}let e=parseInt(getComputedStyle(this.inputElement).flexBasis);this.collapseChips?this._overflowItems=this.__updateChipsCollapsed(this.selectedItems,e):this.autoExpandHorizontally?this._overflowItems=this.__updateChipsHorizontalExpand(this.selectedItems,e):this._overflowItems=this.__updateChipsDefault(this.selectedItems,e)}__renderAllChips(e,t){return{chips:e.map(e=>{let t=this.__createChip(e);return this.appendChild(t),t}),allChipsFit:this.__getWrapperWidth()-this.$.chips.clientWidth>=t}}__updateChipsCollapsed(e,t){let{chips:i,allChipsFit:s}=this.__renderAllChips(e,t);return s?[]:(i.forEach(e=>e.remove()),e.slice())}__updateChipsHorizontalExpand(e,t){let{chips:i,allChipsFit:s}=this.__renderAllChips(e,t);if(s)return[];let r=this.__getOverflowWidth(),n=i.length;for(;n>1&&(i[n-=1].remove(),!(this.__getWrapperWidth()-this.$.chips.clientWidth>=t+r)););if(1===n){let e=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width")),s=this.__getWrapperWidth()-t-r;i[0].style.maxWidth=`${Math.max(e,s)}px`}return e.slice(n)}__updateChipsDefault(e,t){let i=this.__getWrapperWidth()-t;e.length>1&&(i-=this.__getOverflowWidth());let s=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));for(let t=e.length-1,r=null;t>=0;t--){let n=this.__createChip(e[t]);if(this.insertBefore(n,r),this.$.chips.clientWidth>i&&(i<s||null!==r))return n.remove(),e.slice(0,t+1);n.style.maxWidth=`${i}px`,r=n}return[]}__updateOverflowChip(e,t,i,s){if(e){let r=t.length;e.label=`${r}`,e.setAttribute("count",`${r}`),e.setAttribute("title",this._mergeItemLabels(t)),e.toggleAttribute("hidden",0===r),e.disabled=i,e.readonly=s}}_onClearButtonClick(e){e.stopPropagation(),super._onClearButtonClick(e),this.opened&&this.requestContentUpdate()}_onChange(e){e.stopPropagation()}_onEscape(e){if(this.readonly){e.stopPropagation(),this.opened&&this.close();return}this.clearButtonVisible&&!this.opened&&this.selectedItems&&this.selectedItems.length&&(e.stopPropagation(),this._onClearAction()),super._onEscape(e)}_onEscapeCancel(){this._closeOrCommit()}_onEnter(e){if(this.opened){if(e.preventDefault(),e.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){let e=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(e)}return}super._onEnter(e)}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_onKeyDown(e){super._onKeyDown(e);let t=this._chips;if(!this.readonly&&t.length>0)switch(e.key){case"Backspace":this._onBackSpace(t);break;case"ArrowLeft":this._onArrowLeft(t,e);break;case"ArrowRight":this._onArrowRight(t,e);break;default:this._focusedChipIndex=-1}}_onArrowLeft(e,t){let i;if(0!==this.inputElement.selectionStart)return;let s=this._focusedChipIndex;-1!==s&&t.preventDefault(),this.__isRTL?s===e.length-1?i=-1:s>-1&&(i=s+1):-1===s?i=e.length-1:s>0&&(i=s-1),void 0!==i&&(this._focusedChipIndex=i)}_onArrowRight(e,t){let i;if(0!==this.inputElement.selectionStart)return;let s=this._focusedChipIndex;-1!==s&&t.preventDefault(),this.__isRTL?-1===s?i=e.length-1:s>0&&(i=s-1):s===e.length-1?i=-1:s>-1&&(i=s+1),void 0!==i&&(this._focusedChipIndex=i)}_onBackSpace(e){if(0!==this.inputElement.selectionStart)return;let t=this._focusedChipIndex;-1===t?this._focusedChipIndex=e.length-1:(this.__removeItem(e[t].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(e,t){if(e>-1||t>-1){let t=this._chips;if(t.forEach((t,i)=>{t.toggleAttribute("focused",i===e)}),e>-1){let i=t[e].item,s=this._getItemLabel(i);iw(`${s} ${this.__effectiveI18n.focused}`)}}}_overlaySelectedItemChanged(e){e.stopPropagation(),this.readonly||e.detail.item instanceof sZ||this.opened&&(this._lastFilter=this._inputElementValue,this.__selectItem(e.detail.item))}_onItemRemoved(e){this.__removeItem(e.detail.item)}_preventBlur(e){e.preventDefault()}};class nE extends nk(tw(eX(e8(tm(ek))))){static get is(){return"vaadin-multi-select-combo-box"}static get styles(){return[sE,n_]}render(){return en`
2665
2714
  <div class="vaadin-multi-select-combo-box-container">
2666
2715
  <div part="label">
2667
2716
  <slot name="label"></slot>
@@ -2709,12 +2758,12 @@
2709
2758
  >
2710
2759
  <slot name="overlay"></slot>
2711
2760
  </vaadin-multi-select-combo-box-overlay>
2712
- `}}eI(nx);let nC=class extends nx{};nC=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-multi-select-combo-box")],nC);let nk=class extends ri{};function nE(e,t,i){return e?t(e):i?.(e)}nk=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-time-picker")],nk);var nT=a(954);(i=n||(n={})).BUTTON="button",i.BUTTON_TOGGLE="button-toggle",i.BUTTON_MOMENTARY="button-momentary",i.CHECKBOX="checkbox",i.CHECKBOX_LIST="checkbox-list",i.COLOUR="color",i.DATE="date",i.DATETIME="datetime-local",i.EMAIL="email",i.JSON="json",i.JSON_OBJECT="json-object",i.MONTH="month",i.NUMBER="number",i.BIG_INT="big-int",i.PASSWORD="password",i.RADIO="radio",i.SWITCH="switch",i.RANGE="range",i.TELEPHONE="tel",i.TEXT="text",i.TEXTAREA="textarea",i.TIME="time",i.URL="url",i.WEEK="week",i.SELECT="select",i.LIST="list",i.CRON="cron",i.DURATION="duration",i.DURATION_TIME="duration-time",i.DURATION_PERIOD="duration-period";var nI=["MO","TU","WE","TH","FR","SA","SU"],nD=function(){function e(e,t){if(0===t)throw Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return e.fromStr=function(t){return new e(nI.indexOf(t))},e.prototype.nth=function(t){return this.n===t?this:new e(this.weekday,t)},e.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},e.prototype.toString=function(){var e=nI[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},e.prototype.getJsWeekday=function(){return 6===this.weekday?0:this.weekday+1},e}(),nS=function(e){return null!=e},nA=function(e){return"number"==typeof e},nO=function(e){return"string"==typeof e&&nI.includes(e)},nP=Array.isArray,n$=function(e,t){void 0===t&&(t=e),1==arguments.length&&(t=e,e=0);for(var i=[],s=e;s<t;s++)i.push(s);return i},nL=function(e,t){var i=0,s=[];if(nP(e))for(;i<t;i++)s[i]=[].concat(e);else for(;i<t;i++)s[i]=e;return s};function nM(e,t,i){void 0===i&&(i=" ");var s=String(e);return(t|=0,s.length>t)?String(s):((t-=s.length)>i.length&&(i+=nL(i,t/i.length)),i.slice(0,t)+String(s))}var nR=function(e,t,i){var s=e.split(t);return i?s.slice(0,i).concat([s.slice(i).join(t)]):s},nV=function(e,t){var i=e%t;return i*t<0?i+t:i},nN=function(e,t){return{div:Math.floor(e/t),mod:nV(e,t)}},nB=function(e){return!nS(e)||0===e.length},nz=function(e){return!nB(e)},nF=function(e,t){return nz(e)&&-1!==e.indexOf(t)},nU=function(e,t,i,s,r,n){return void 0===s&&(s=0),void 0===r&&(r=0),void 0===n&&(n=0),new Date(Date.UTC(e,t-1,i,s,r,n))},nH=[31,28,31,30,31,30,31,31,30,31,30,31],nj=nU(1970,1,1),nY=[6,0,1,2,3,4,5],nq=function(e){return e%4==0&&e%100!=0||e%400==0},nW=function(e){return e instanceof Date},nK=function(e){return nW(e)&&!isNaN(e.getTime())},nG=function(e){var t,i;return t=e,i=nj,Math.round((t.getTime()-i.getTime())/864e5)},nX=function(e){return new Date(nj.getTime()+864e5*e)},nZ=function(e){var t=e.getUTCMonth();return 1===t&&nq(e.getUTCFullYear())?29:nH[t]},nQ=function(e){return nY[e.getUTCDay()]},nJ=function(e,t){var i=nU(e,t+1,1);return[nQ(i),nZ(i)]},n0=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},n1=function(e){return new Date(e.getTime())},n2=function(e){for(var t=[],i=0;i<e.length;i++)t.push(n1(e[i]));return t},n3=function(e){e.sort(function(e,t){return e.getTime()-t.getTime()})},n5=function(e,t){void 0===t&&(t=!0);var i=new Date(e);return[nM(i.getUTCFullYear().toString(),4,"0"),nM(i.getUTCMonth()+1,2,"0"),nM(i.getUTCDate(),2,"0"),"T",nM(i.getUTCHours(),2,"0"),nM(i.getUTCMinutes(),2,"0"),nM(i.getUTCSeconds(),2,"0"),t?"Z":""].join("")},n4=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/.exec(e);if(!t)throw Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[5],10)||0,parseInt(t[6],10)||0,parseInt(t[7],10)||0))},n8=function(e,t){return e.toLocaleString("sv-SE",{timeZone:t}).replace(" ","T")+"Z"},n6=function(e,t){var i=new Date(n8(e,Intl.DateTimeFormat().resolvedOptions().timeZone)),s=new Date(n8(e,null!=t?t:"UTC")).getTime()-i.getTime();return new Date(e.getTime()-s)},n7=function(){function e(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,"between"===e?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):"before"===e?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):"after"===e&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return e.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,i=this.maxDate&&e>this.maxDate;if("between"===this.method){if(t)return!0;if(i)return!1}else if("before"===this.method){if(i)return!1}else if("after"===this.method)return!!t||(this.add(e),!1);return this.add(e)},e.prototype.add=function(e){return this._result.push(e),!0},e.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;default:return e.length?e[e.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}(),n9=function(e,t){return(n9=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};function ae(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n9(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var at=function(){return(at=Object.assign||function(e){for(var t,i=1,s=arguments.length;i<s;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function ai(e,t,i){if(i||2==arguments.length)for(var s,r=0,n=t.length;r<n;r++)!s&&r in t||(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var as=function(e){function t(t,i,s){var r=e.call(this,t,i)||this;return r.iterator=s,r}return ae(t,e),t.prototype.add=function(e){return!!this.iterator(e,this._result.length)&&(this._result.push(e),!0)},t}(n7);let ar={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}};var an=function(e,t){return -1!==e.indexOf(t)},aa=function(e){return e.toString()},ao=function(e,t,i){return"".concat(t," ").concat(i,", ").concat(e)},al=function(){function e(e,t,i,s){if(void 0===t&&(t=aa),void 0===i&&(i=ar),void 0===s&&(s=ao),this.text=[],this.language=i||ar,this.gettext=t,this.dateFormatter=s,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var r=[].concat(this.options.bymonthday),n=[].concat(this.options.bynmonthday);r.sort(function(e,t){return e-t}),n.sort(function(e,t){return t-e}),this.bymonthday=r.concat(n),this.bymonthday.length||(this.bymonthday=null)}if(nS(this.origOptions.byweekday)){var a=nP(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],o=String(a);this.byweekday={allWeeks:a.filter(function(e){return!e.n}),someWeeks:a.filter(function(e){return!!e.n}),isWeekdays:-1!==o.indexOf("MO")&&-1!==o.indexOf("TU")&&-1!==o.indexOf("WE")&&-1!==o.indexOf("TH")&&-1!==o.indexOf("FR")&&-1===o.indexOf("SA")&&-1===o.indexOf("SU"),isEveryDay:-1!==o.indexOf("MO")&&-1!==o.indexOf("TU")&&-1!==o.indexOf("WE")&&-1!==o.indexOf("TH")&&-1!==o.indexOf("FR")&&-1!==o.indexOf("SA")&&-1!==o.indexOf("SU")};var l=function(e,t){return e.weekday-t.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return e.isFullyConvertible=function(t){if(!(t.options.freq in e.IMPLEMENTED)||t.origOptions.until&&t.origOptions.count)return!1;for(var i in t.origOptions){if(an(["dtstart","tzid","wkst","freq"],i))break;if(!an(e.IMPLEMENTED[t.options.freq],i))return!1}return!0},e.prototype.isFullyConvertible=function(){return e.isFullyConvertible(this.rrule)},e.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in e.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[aG.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var i=this.options.until;this.add(this.dateFormatter(i.getUTCFullYear(),this.language.monthNames[i.getUTCMonth()],i.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(t(this.plural(this.options.count)?"times":"time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},e.prototype.HOURLY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(e(this.plural(this.options.interval)?"hours":"hour"))},e.prototype.MINUTELY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(e(this.plural(this.options.interval)?"minutes":"minute"))},e.prototype.DAILY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(e(this.plural(this.options.interval)?"weekdays":"weekday")):this.add(e(this.plural(this.options.interval)?"days":"day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},e.prototype.WEEKLY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()).add(e(this.plural(this.options.interval)?"weeks":"week")),this.byweekday&&this.byweekday.isWeekdays?1===this.options.interval?this.add(e(this.plural(this.options.interval)?"weekdays":"weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(e(this.plural(this.options.interval)?"days":"day")):(1===this.options.interval&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},e.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(e(this.plural(this.options.interval)?"months":"month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},e.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(e(this.plural(this.options.interval)?"years":"year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(e(this.plural(this.options.byweekno.length)?"weeks":"week")).add(this.list(this.options.byweekno,void 0,e("and")))},e.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},e.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},e.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},e.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},e.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,i=this.gettext;if(-1===e)return i("last");var s=Math.abs(e);switch(s){case 1:case 21:case 31:t=s+i("st");break;case 2:case 22:t=s+i("nd");break;case 3:case 23:t=s+i("rd");break;default:t=s+i("th")}return e<0?t+" "+i("last"):t},e.prototype.monthtext=function(e){return this.language.monthNames[e-1]},e.prototype.weekdaytext=function(e){var t=nA(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},e.prototype.plural=function(e){return e%100!=1},e.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},e.prototype.list=function(e,t,i,s){var r=this;void 0===s&&(s=","),nP(e)||(e=[e]),t=t||function(e){return e.toString()};var n=function(e){return t&&t.call(r,e)};if(!i)return e.map(n).join(s+" ");for(var a=e.map(n),o=s,l="",d=0;d<a.length;d++)0!==d&&(d===a.length-1?l+=" "+i+" ":l+=o+" "),l+=a[d];return l},e}(),ad=function(){function e(e){this.done=!0,this.rules=e}return e.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},e.prototype.isDone=function(){return this.done&&null===this.symbol},e.prototype.nextSymbol=function(){this.symbol=null,this.value=null;do{if(this.done)return!1;for(var e in t=null,this.rules){var t,i,s=this.rules[e].exec(this.text);s&&(null===t||s[0].length>t[0].length)&&(t=s,i=e)}if(null!=t&&(this.text=this.text.substr(t[0].length),""===this.text&&(this.done=!0)),null==t){this.done=!0,this.symbol=null,this.value=null;return}}while("SKIP"===i);return this.symbol=i,this.value=t,!0},e.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},e.prototype.acceptNumber=function(){return this.accept("number")},e.prototype.expect=function(e){if(this.accept(e))return!0;throw Error("expected "+e+" but found "+this.symbol)},e}();function ah(e,t){void 0===t&&(t=ar);var i={},s=new ad(t.tokens);if(!s.start(e))return null;return function(){s.expect("every");var e=s.acceptNumber();if(e&&(i.interval=parseInt(e[0],10)),s.isDone())throw Error("Unexpected end");switch(s.symbol){case"day(s)":i.freq=aG.DAILY,s.nextSymbol()&&(n(),d());break;case"weekday(s)":i.freq=aG.WEEKLY,i.byweekday=[aG.MO,aG.TU,aG.WE,aG.TH,aG.FR],s.nextSymbol(),n(),d();break;case"week(s)":i.freq=aG.WEEKLY,s.nextSymbol()&&(r(),n(),d());break;case"hour(s)":i.freq=aG.HOURLY,s.nextSymbol()&&(r(),d());break;case"minute(s)":i.freq=aG.MINUTELY,s.nextSymbol()&&(r(),d());break;case"month(s)":i.freq=aG.MONTHLY,s.nextSymbol()&&(r(),d());break;case"year(s)":i.freq=aG.YEARLY,s.nextSymbol()&&(r(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":if(i.freq=aG.WEEKLY,i.byweekday=[aG[s.symbol.substr(0,2).toUpperCase()]],!s.nextSymbol())return;for(;s.accept("comma");){if(s.isDone())throw Error("Unexpected end");var t=o();if(!t)throw Error("Unexpected symbol "+s.symbol+", expected weekday");i.byweekday.push(aG[t]),s.nextSymbol()}n(),function(){s.accept("on"),s.accept("the");var e=l();if(e)for(i.bymonthday=[e],s.nextSymbol();s.accept("comma");){if(!(e=l()))throw Error("Unexpected symbol "+s.symbol+"; expected monthday");i.bymonthday.push(e),s.nextSymbol()}}(),d();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(i.freq=aG.YEARLY,i.bymonth=[a()],!s.nextSymbol())return;for(;s.accept("comma");){if(s.isDone())throw Error("Unexpected end");var h=a();if(!h)throw Error("Unexpected symbol "+s.symbol+", expected month");i.bymonth.push(h),s.nextSymbol()}r(),d();break;default:throw Error("Unknown symbol")}}(),i;function r(){var e=s.accept("on"),t=s.accept("the");if(e||t)do{var r=l(),n=o(),d=a();if(r)n?(s.nextSymbol(),i.byweekday||(i.byweekday=[]),i.byweekday.push(aG[n].nth(r))):(i.bymonthday||(i.bymonthday=[]),i.bymonthday.push(r),s.accept("day(s)"));else if(n)s.nextSymbol(),i.byweekday||(i.byweekday=[]),i.byweekday.push(aG[n]);else if("weekday(s)"===s.symbol)s.nextSymbol(),i.byweekday||(i.byweekday=[aG.MO,aG.TU,aG.WE,aG.TH,aG.FR]);else if("week(s)"===s.symbol){s.nextSymbol();var h=s.acceptNumber();if(!h)throw Error("Unexpected symbol "+s.symbol+", expected week number");for(i.byweekno=[parseInt(h[0],10)];s.accept("comma");){if(!(h=s.acceptNumber()))throw Error("Unexpected symbol "+s.symbol+"; expected monthday");i.byweekno.push(parseInt(h[0],10))}}else{if(!d)return;s.nextSymbol(),i.bymonth||(i.bymonth=[]),i.bymonth.push(d)}}while(s.accept("comma")||s.accept("the")||s.accept("on"))}function n(){if(s.accept("at"))do{var e=s.acceptNumber();if(!e)throw Error("Unexpected symbol "+s.symbol+", expected hour");for(i.byhour=[parseInt(e[0],10)];s.accept("comma");){if(!(e=s.acceptNumber()))throw Error("Unexpected symbol "+s.symbol+"; expected hour");i.byhour.push(parseInt(e[0],10))}}while(s.accept("comma")||s.accept("at"))}function a(){switch(s.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function o(){switch(s.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return s.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(s.symbol){case"last":return s.nextSymbol(),-1;case"first":return s.nextSymbol(),1;case"second":return s.nextSymbol(),s.accept("last")?-2:2;case"third":return s.nextSymbol(),s.accept("last")?-3:3;case"nth":var e=parseInt(s.value[1],10);if(e<-366||e>366)throw Error("Nth out of range: "+e);return s.nextSymbol(),s.accept("last")?-e:e;default:return!1}}function d(){if("until"===s.symbol){var e=Date.parse(s.text);if(!e)throw Error("Cannot parse until date:"+s.text);i.until=new Date(e)}else s.accept("for")&&(i.count=parseInt(s.value[0],10),s.expect("number"))}}function au(e){return e<l.HOURLY}(s=l||(l={}))[s.YEARLY=0]="YEARLY",s[s.MONTHLY=1]="MONTHLY",s[s.WEEKLY=2]="WEEKLY",s[s.DAILY=3]="DAILY",s[s.HOURLY=4]="HOURLY",s[s.MINUTELY=5]="MINUTELY",s[s.SECONDLY=6]="SECONDLY";var ac=["count","until","interval","byweekday","bymonthday","bymonth"];al.IMPLEMENTED=[],al.IMPLEMENTED[l.HOURLY]=ac,al.IMPLEMENTED[l.MINUTELY]=ac,al.IMPLEMENTED[l.DAILY]=["byhour"].concat(ac),al.IMPLEMENTED[l.WEEKLY]=ac,al.IMPLEMENTED[l.MONTHLY]=ac,al.IMPLEMENTED[l.YEARLY]=["byweekno","byyearday"].concat(ac);var ap=al.isFullyConvertible,a_=function(){function e(e,t,i,s){this.hour=e,this.minute=t,this.second=i,this.millisecond=s||0}return e.prototype.getHours=function(){return this.hour},e.prototype.getMinutes=function(){return this.minute},e.prototype.getSeconds=function(){return this.second},e.prototype.getMilliseconds=function(){return this.millisecond},e.prototype.getTime=function(){return(60*this.hour*60+60*this.minute+this.second)*1e3+this.millisecond},e}(),av=function(e){function t(t,i,s,r,n,a,o){var l=e.call(this,r,n,a,o)||this;return l.year=t,l.month=i,l.day=s,l}return ae(t,e),t.fromDate=function(e){return new this(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.valueOf()%1e3)},t.prototype.getWeekday=function(){return nQ(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(e){this.year+=e},t.prototype.addMonths=function(e){if(this.month+=e,this.month>12){var t=Math.floor(this.month/12),i=nV(this.month,12);this.month=i,this.year+=t,0===this.month&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(e,t){t>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-t))+7*e:this.day+=-(this.getWeekday()-t)+7*e,this.fixDay()},t.prototype.addDaily=function(e){this.day+=e,this.fixDay()},t.prototype.addHours=function(e,t,i){for(t&&(this.hour+=Math.floor((23-this.hour)/e)*e);;){this.hour+=e;var s=nN(this.hour,24),r=s.div,n=s.mod;if(r&&(this.hour=n,this.addDaily(r)),nB(i)||nF(i,this.hour))break}},t.prototype.addMinutes=function(e,t,i,s){for(t&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/e)*e);;){this.minute+=e;var r=nN(this.minute,60),n=r.div,a=r.mod;if(n&&(this.minute=a,this.addHours(n,!1,i)),(nB(i)||nF(i,this.hour))&&(nB(s)||nF(s,this.minute)))break}},t.prototype.addSeconds=function(e,t,i,s,r){for(t&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/e)*e);;){this.second+=e;var n=nN(this.second,60),a=n.div,o=n.mod;if(a&&(this.second=o,this.addMinutes(a,!1,i,s)),(nB(i)||nF(i,this.hour))&&(nB(s)||nF(s,this.minute))&&(nB(r)||nF(r,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var e=nJ(this.year,this.month-1)[1];if(!(this.day<=e))for(;this.day>e;){if(this.day-=e,++this.month,13===this.month&&(this.month=1,++this.year,this.year>9999))return;e=nJ(this.year,this.month-1)[1]}}},t.prototype.add=function(e,t){var i=e.freq,s=e.interval,r=e.wkst,n=e.byhour,a=e.byminute,o=e.bysecond;switch(i){case l.YEARLY:return this.addYears(s);case l.MONTHLY:return this.addMonths(s);case l.WEEKLY:return this.addWeekly(s,r);case l.DAILY:return this.addDaily(s);case l.HOURLY:return this.addHours(s,t,n);case l.MINUTELY:return this.addMinutes(s,t,n,a);case l.SECONDLY:return this.addSeconds(s,t,n,a,o)}},t}(a_);function am(e){for(var t=[],i=Object.keys(e),s=0;s<i.length;s++){var r=i[s];nF(aK,r)||t.push(r),nW(e[r])&&!nK(e[r])&&t.push(r)}if(t.length)throw Error("Invalid options: "+t.join(", "));return at({},e)}function af(e){var t=e.split("\n").map(ab).filter(function(e){return null!==e});return at(at({},t[0]),t[1])}function ag(e){var t={},i=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!i)return t;var s=i[1],r=i[2];return s&&(t.tzid=s),t.dtstart=n4(r),t}function ab(e){if(!(e=e.replace(/^\s+|\s+$/,"")).length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return ay(e);var i=t[1];switch(i.toUpperCase()){case"RRULE":case"EXRULE":return ay(e);case"DTSTART":return ag(e);default:throw Error("Unsupported RFC prop ".concat(i," in ").concat(e))}}function ay(e){var t=ag(e.replace(/^RRULE:/i,""));return e.replace(/^(?:RRULE|EXRULE):/i,"").split(";").forEach(function(i){var s=i.split("="),r=s[0],n=s[1];switch(r.toUpperCase()){case"FREQ":t.freq=l[n.toUpperCase()];break;case"WKST":t.wkst=aq[n.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var a,o=-1!==(a=n).indexOf(",")?a.split(",").map(aw):aw(a);t[r.toLowerCase()]=o;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=n.split(",").map(function(e){if(2===e.length)return aq[e];var t=e.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!t||t.length<3)throw SyntaxError("Invalid weekday string: ".concat(e));var i=Number(t[1]);return new nD(aq[t[2]].weekday,i)});break;case"DTSTART":case"TZID":var d=ag(e);t.tzid=d.tzid,t.dtstart=d.dtstart;break;case"UNTIL":t.until=n4(n);break;case"BYEASTER":t.byeaster=Number(n);break;default:throw Error("Unknown RRULE property '"+r+"'")}}),t}function aw(e){return/^[+-]?\d+$/.test(e)?Number(e):e}var ax=function(){function e(e,t){if(isNaN(e.getTime()))throw RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||"UTC"===this.tzid.toUpperCase()},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var e=n5(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:n6(this.date,this.tzid)},e}();function aC(e){for(var t=[],i="",s=Object.keys(e),r=Object.keys(aW),n=0;n<s.length;n++)if("tzid"!==s[n]&&nF(r,s[n])){var a,o,l=s[n].toUpperCase(),d=e[s[n]],h="";if(!(!nS(d)||nP(d)&&!d.length)){switch(l){case"FREQ":h=aG.FREQUENCIES[e.freq];break;case"WKST":h=nA(d)?new nD(d).toString():d.toString();break;case"BYWEEKDAY":l="BYDAY",h=(nP(d)?d:[d]).map(function(e){return e instanceof nD?e:nP(e)?new nD(e[0],e[1]):new nD(e)}).toString();break;case"DTSTART":a=d,o=e.tzid,i=a?"DTSTART"+new ax(new Date(a),o).toString():"";break;case"UNTIL":h=n5(d,!e.tzid);break;default:if(nP(d)){for(var u=[],c=0;c<d.length;c++)u[c]=String(d[c]);h=u.toString()}else h=String(d)}h&&t.push([l,h])}}var p=t.map(function(e){var t=e[0],i=e[1];return"".concat(t,"=").concat(i.toString())}).join(";"),_="";return""!==p&&(_="RRULE:".concat(p)),[i,_].filter(function(e){return!!e}).join("\n")}var ak=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(e,t,i){t&&(t=t instanceof Date?n1(t):n2(t)),"all"===e?this.all=t:(i._value=t,this[e].push(i))},e.prototype._cacheGet=function(e,t){var i=!1,s=t?Object.keys(t):[],r=this[e];if("all"===e)i=this.all;else if(nP(r))for(var n=0;n<r.length;n++){var a=r[n];if(!(s.length&&function(e){for(var i=0;i<s.length;i++){var r=s[i];if(!function(e,t){return Array.isArray(e)?!!Array.isArray(t)&&e.length===t.length&&e.every(function(e,i){return e.getTime()===t[i].getTime()}):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}(t[r],e[r]))return!0}return!1}(a))){i=a._value;break}}if(!i&&this.all){for(var o=new n7(e,t),n=0;n<this.all.length&&o.accept(this.all[n]);n++);i=o.getValue(),this._cacheAdd(e,i,t)}return nP(i)?n2(i):i instanceof Date?n1(i):i},e}(),aE=ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai([],nL(1,31),!0),nL(2,28),!0),nL(3,31),!0),nL(4,30),!0),nL(5,31),!0),nL(6,30),!0),nL(7,31),!0),nL(8,31),!0),nL(9,30),!0),nL(10,31),!0),nL(11,30),!0),nL(12,31),!0),nL(1,7),!0),aT=ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai([],nL(1,31),!0),nL(2,29),!0),nL(3,31),!0),nL(4,30),!0),nL(5,31),!0),nL(6,30),!0),nL(7,31),!0),nL(8,31),!0),nL(9,30),!0),nL(10,31),!0),nL(11,30),!0),nL(12,31),!0),nL(1,7),!0),aI=n$(1,29),aD=n$(1,30),aS=n$(1,31),aA=n$(1,32),aO=ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai([],aA,!0),aD,!0),aA,!0),aS,!0),aA,!0),aS,!0),aA,!0),aA,!0),aS,!0),aA,!0),aS,!0),aA,!0),aA.slice(0,7),!0),aP=ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai([],aA,!0),aI,!0),aA,!0),aS,!0),aA,!0),aS,!0),aA,!0),aA,!0),aS,!0),aA,!0),aS,!0),aA,!0),aA.slice(0,7),!0),a$=n$(-28,0),aL=n$(-29,0),aM=n$(-30,0),aR=n$(-31,0),aV=ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai([],aR,!0),aL,!0),aR,!0),aM,!0),aR,!0),aM,!0),aR,!0),aR,!0),aM,!0),aR,!0),aM,!0),aR,!0),aR.slice(0,7),!0),aN=ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai([],aR,!0),a$,!0),aR,!0),aM,!0),aR,!0),aM,!0),aR,!0),aR,!0),aM,!0),aR,!0),aM,!0),aR,!0),aR.slice(0,7),!0),aB=[0,31,60,91,121,152,182,213,244,274,305,335,366],az=[0,31,59,90,120,151,181,212,243,273,304,334,365],aF=function(){for(var e=[],t=0;t<55;t++)e=e.concat(n$(7));return e}(),aU=function(){function e(e){this.options=e}return e.prototype.rebuild=function(e,t){var i,s,r,n,a,o,l,d,h,u,c=this.options;if(e!==this.lastyear&&(this.yearinfo=function(e,t){var i,s,r,n,a,o=nU(e,1,1),l=nq(e)?366:365,d=nq(e+1)?366:365,h=nG(o),u=nQ(o),c=at(at({yearlen:l,nextyearlen:d,yearordinal:h,yearweekday:u},(s=nq(i=e)?366:365,r=nQ(nU(i,1,1)),365===s?{mmask:aE,mdaymask:aP,nmdaymask:aN,wdaymask:aF.slice(r),mrange:az}:{mmask:aT,mdaymask:aO,nmdaymask:aV,wdaymask:aF.slice(r),mrange:aB})),{wnomask:null});if(nB(t.byweekno))return c;c.wnomask=nL(0,l+7);var p=n=nV(7-u+t.wkst,7);p>=4?(p=0,a=c.yearlen+nV(u-t.wkst,7)):a=l-p;for(var _=Math.floor(Math.floor(a/7)+nV(a,7)/4),v=0;v<t.byweekno.length;v++){var m=t.byweekno[v];if(m<0&&(m+=_+1),m>0&&m<=_){var f=void 0;m>1?(f=p+(m-1)*7,p!==n&&(f-=7-n)):f=p;for(var g=0;g<7&&(c.wnomask[f]=1,f++,c.wdaymask[f]!==t.wkst);g++);}}if(nF(t.byweekno,1)){var f=p+7*_;if(p!==n&&(f-=7-n),f<l)for(var v=0;v<7&&(c.wnomask[f]=1,f+=1,c.wdaymask[f]!==t.wkst);v++);}if(p){var b=void 0;if(nF(t.byweekno,-1))b=-1;else{var y=nQ(nU(e-1,1,1)),w=nV(7-y.valueOf()+t.wkst,7),x=nq(e-1)?366:365,C=void 0;w>=4?(w=0,C=x+nV(y-t.wkst,7)):C=l-p,b=Math.floor(52+nV(C,7)/4)}if(nF(t.byweekno,b))for(var f=0;f<p;f++)c.wnomask[f]=1}return c}(e,c)),nz(c.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var p=this.yearinfo,_=p.yearlen,v=p.mrange,m=p.wdaymask;this.monthinfo=function(e,t,i,s,r,n){var a={lastyear:e,lastmonth:t,nwdaymask:[]},o=[];if(n.freq===aG.YEARLY)if(nB(n.bymonth))o=[[0,i]];else for(var l=0;l<n.bymonth.length;l++)t=n.bymonth[l],o.push(s.slice(t-1,t+1));else n.freq===aG.MONTHLY&&(o=[s.slice(t-1,t+1)]);if(nB(o))return a;a.nwdaymask=nL(0,i);for(var l=0;l<o.length;l++)for(var d=o[l],h=d[0],u=d[1]-1,c=0;c<n.bynweekday.length;c++){var p=void 0,_=n.bynweekday[c],v=_[0],m=_[1];m<0?(p=u+(m+1)*7,p-=nV(r[p]-v,7)):(p=h+(m-1)*7,p+=nV(7-r[p]+v,7)),h<=p&&p<=u&&(a.nwdaymask[p]=1)}return a}(e,t,_,v,m,c)}nS(c.byeaster)&&(this.eastermask=(void 0===(i=c.byeaster)&&(i=0),s=e%19,r=Math.floor(e/100),n=e%100,a=Math.floor(r/4),o=Math.floor((r+8)/25),l=Math.floor((r-o+1)/3),d=Math.floor(19*s+r-a-l+15)%30,h=Math.floor(32+r%4*2+2*Math.floor(n/4)-d-n%4)%7,u=Math.floor((s+11*d+22*h)/451),[Math.ceil((Date.UTC(e,Math.floor((d+h-7*u+114)/31)-1,(d+h-7*u+114)%31+1+i)-Date.UTC(e,0,1))/864e5)]))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),e.prototype.ydayset=function(){return[n$(this.yearlen),0,this.yearlen]},e.prototype.mdayset=function(e,t){for(var i=this.mrange[t-1],s=this.mrange[t],r=nL(null,this.yearlen),n=i;n<s;n++)r[n]=n;return[r,i,s]},e.prototype.wdayset=function(e,t,i){for(var s=nL(null,this.yearlen+7),r=nG(nU(e,t,i))-this.yearordinal,n=r,a=0;a<7&&(s[r]=r,++r,this.wdaymask[r]!==this.options.wkst);a++);return[s,n,r]},e.prototype.ddayset=function(e,t,i){var s=nL(null,this.yearlen),r=nG(nU(e,t,i))-this.yearordinal;return s[r]=r,[s,r,r+1]},e.prototype.htimeset=function(e,t,i,s){var r=this,n=[];return this.options.byminute.forEach(function(t){n=n.concat(r.mtimeset(e,t,i,s))}),n3(n),n},e.prototype.mtimeset=function(e,t,i,s){var r=this.options.bysecond.map(function(i){return new a_(e,t,i,s)});return n3(r),r},e.prototype.stimeset=function(e,t,i,s){return[new a_(e,t,i,s)]},e.prototype.getdayset=function(e){switch(e){case l.YEARLY:return this.ydayset.bind(this);case l.MONTHLY:return this.mdayset.bind(this);case l.WEEKLY:return this.wdayset.bind(this);case l.DAILY:default:return this.ddayset.bind(this)}},e.prototype.gettimeset=function(e){switch(e){case l.HOURLY:return this.htimeset.bind(this);case l.MINUTELY:return this.mtimeset.bind(this);case l.SECONDLY:return this.stimeset.bind(this)}},e}();function aH(e,t){var i=t.dtstart,s=t.freq,r=t.interval,n=t.until,a=t.bysetpos,o=t.count;if(0===o||0===r)return aY(e);var l=av.fromDate(i),d=new aU(t);d.rebuild(l.year,l.month);for(var h=function(e,t,i){var s=i.freq,r=i.byhour,n=i.byminute,a=i.bysecond;if(au(s)){var o=i.dtstart.getTime()%1e3;if(!au(i.freq))return[];var l=[];return i.byhour.forEach(function(e){i.byminute.forEach(function(t){i.bysecond.forEach(function(i){l.push(new a_(e,t,i,o))})})}),l}return s>=aG.HOURLY&&nz(r)&&!nF(r,t.hour)||s>=aG.MINUTELY&&nz(n)&&!nF(n,t.minute)||s>=aG.SECONDLY&&nz(a)&&!nF(a,t.second)?[]:e.gettimeset(s)(t.hour,t.minute,t.second,t.millisecond)}(d,l,t);;){var u=d.getdayset(s)(l.year,l.month,l.day),c=u[0],p=u[1],_=u[2],v=function(e,t,i,s,r){for(var n=!1,a=t;a<i;a++){var o=e[a];(n=function(e,t,i){var s=i.bymonth,r=i.byweekno,n=i.byweekday,a=i.byeaster,o=i.bymonthday,l=i.bynmonthday,d=i.byyearday;return nz(s)&&!nF(s,e.mmask[t])||nz(r)&&!e.wnomask[t]||nz(n)&&!nF(n,e.wdaymask[t])||nz(e.nwdaymask)&&!e.nwdaymask[t]||null!==a&&!nF(e.eastermask,t)||(nz(o)||nz(l))&&!nF(o,e.mdaymask[t])&&!nF(l,e.nmdaymask[t])||nz(d)&&(t<e.yearlen&&!nF(d,t+1)&&!nF(d,-e.yearlen+t)||t>=e.yearlen&&!nF(d,t+1-e.yearlen)&&!nF(d,-e.nextyearlen+t-e.yearlen))}(s,o,r))&&(e[o]=null)}return n}(c,p,_,d,t);if(nz(a))for(var m=function(e,t,i,s,r,n){for(var a=[],o=0;o<e.length;o++){var l=void 0,d=void 0,h=e[o];h<0?(l=Math.floor(h/t.length),d=nV(h,t.length)):(l=Math.floor((h-1)/t.length),d=nV(h-1,t.length));for(var u=[],c=i;c<s;c++){var p=n[c];nS(p)&&u.push(p)}var _=void 0;_=l<0?u.slice(l)[0]:u[l];var v=t[d],m=n0(nX(r.yearordinal+_),v);nF(a,m)||a.push(m)}return n3(a),a}(a,h,p,_,d,c),f=0;f<m.length;f++){var g=m[f];if(n&&g>n)return aY(e);if(g>=i){var b=aj(g,t);if(!e.accept(b)||o&&!--o)return aY(e)}}else for(var f=p;f<_;f++){var y=c[f];if(nS(y))for(var w=nX(d.yearordinal+y),x=0;x<h.length;x++){var g=n0(w,h[x]);if(n&&g>n)return aY(e);if(g>=i){var b=aj(g,t);if(!e.accept(b)||o&&!--o)return aY(e)}}}if(0===t.interval||(l.add(t,v),l.year>9999))return aY(e);au(s)||(h=d.gettimeset(s)(l.hour,l.minute,l.second,0)),d.rebuild(l.year,l.month)}}function aj(e,t){return new ax(e,t.tzid).rezonedDate()}function aY(e){return e.getValue()}var aq={MO:new nD(0),TU:new nD(1),WE:new nD(2),TH:new nD(3),FR:new nD(4),SA:new nD(5),SU:new nD(6)},aW={freq:l.YEARLY,dtstart:null,interval:1,wkst:aq.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},aK=Object.keys(aW),aG=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this._cache=t?null:new ak,this.origOptions=am(e);var i=function(e){var t=at(at({},aW),am(e));if(nS(t.byeaster)&&(t.freq=aG.YEARLY),!(nS(t.freq)&&aG.FREQUENCIES[t.freq]))throw Error("Invalid frequency: ".concat(t.freq," ").concat(e.freq));if(t.dtstart||(t.dtstart=new Date(new Date().setMilliseconds(0))),nS(t.wkst)?nA(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=aG.MO.weekday,nS(t.bysetpos)){nA(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var i=0;i<t.bysetpos.length;i++){var s=t.bysetpos[i];if(0===s||!(s>=-366&&s<=366))throw Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(t.byweekno||nz(t.byweekno)||nz(t.byyearday)||t.bymonthday||nz(t.bymonthday)||nS(t.byweekday)||nS(t.byeaster)))switch(t.freq){case aG.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case aG.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case aG.WEEKLY:t.byweekday=[nQ(t.dtstart)]}if(nS(t.bymonth)&&!nP(t.bymonth)&&(t.bymonth=[t.bymonth]),nS(t.byyearday)&&!nP(t.byyearday)&&nA(t.byyearday)&&(t.byyearday=[t.byyearday]),nS(t.bymonthday))if(nP(t.bymonthday)){for(var r=[],n=[],i=0;i<t.bymonthday.length;i++){var s=t.bymonthday[i];s>0?r.push(s):s<0&&n.push(s)}t.bymonthday=r,t.bynmonthday=n}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);else t.bymonthday=[],t.bynmonthday=[];if(nS(t.byweekno)&&!nP(t.byweekno)&&(t.byweekno=[t.byweekno]),nS(t.byweekday))if(nA(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(nO(t.byweekday))t.byweekday=[nD.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof nD)!t.byweekday.n||t.freq>aG.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{for(var a=[],o=[],i=0;i<t.byweekday.length;i++){var l=t.byweekday[i];if(nA(l)){a.push(l);continue}if(nO(l)){a.push(nD.fromStr(l).weekday);continue}!l.n||t.freq>aG.MONTHLY?a.push(l.weekday):o.push([l.weekday,l.n])}t.byweekday=nz(a)?a:null,t.bynweekday=nz(o)?o:null}else t.bynweekday=null;return nS(t.byhour)?nA(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<aG.HOURLY?[t.dtstart.getUTCHours()]:null,nS(t.byminute)?nA(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<aG.MINUTELY?[t.dtstart.getUTCMinutes()]:null,nS(t.bysecond)?nA(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<aG.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}(e).parsedOptions;this.options=i}return e.parseText=function(e,t){return ah(e,t)},e.fromText=function(e,t){var i;return void 0===(i=t)&&(i=ar),new aG(ah(e,i)||void 0)},e.fromString=function(t){return new e(e.parseString(t)||void 0)},e.prototype._iter=function(e){return aH(e,this.options)},e.prototype._cacheGet=function(e,t){return!!this._cache&&this._cache._cacheGet(e,t)},e.prototype._cacheAdd=function(e,t,i){if(this._cache)return this._cache._cacheAdd(e,t,i)},e.prototype.all=function(e){if(e)return this._iter(new as("all",{},e));var t=this._cacheGet("all");return!1===t&&(t=this._iter(new n7("all",{})),this._cacheAdd("all",t)),t},e.prototype.between=function(e,t,i,s){if(void 0===i&&(i=!1),!nK(e)||!nK(t))throw Error("Invalid date passed in to RRule.between");var r={before:t,after:e,inc:i};if(s)return this._iter(new as("between",r,s));var n=this._cacheGet("between",r);return!1===n&&(n=this._iter(new n7("between",r)),this._cacheAdd("between",n,r)),n},e.prototype.before=function(e,t){if(void 0===t&&(t=!1),!nK(e))throw Error("Invalid date passed in to RRule.before");var i={dt:e,inc:t},s=this._cacheGet("before",i);return!1===s&&(s=this._iter(new n7("before",i)),this._cacheAdd("before",s,i)),s},e.prototype.after=function(e,t){if(void 0===t&&(t=!1),!nK(e))throw Error("Invalid date passed in to RRule.after");var i={dt:e,inc:t},s=this._cacheGet("after",i);return!1===s&&(s=this._iter(new n7("after",i)),this._cacheAdd("after",s,i)),s},e.prototype.count=function(){return this.all().length},e.prototype.toString=function(){return aC(this.origOptions)},e.prototype.toText=function(e,t,i){return new al(this,e,t,i).toString()},e.prototype.isFullyConvertibleToText=function(){return ap(this)},e.prototype.clone=function(){return new e(this.origOptions)},e.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],e.YEARLY=l.YEARLY,e.MONTHLY=l.MONTHLY,e.WEEKLY=l.WEEKLY,e.DAILY=l.DAILY,e.HOURLY=l.HOURLY,e.MINUTELY=l.MINUTELY,e.SECONDLY=l.SECONDLY,e.MO=aq.MO,e.TU=aq.TU,e.WE=aq.WE,e.TH=aq.TH,e.FR=aq.FR,e.SA=aq.SA,e.SU=aq.SU,e.parseString=af,e.optionsToString=aC,e}(),aX={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function aZ(e,t){return void 0===t&&(t={}),function(e,t){var i,s,r,n,a,o,l,d=(i=[],s=[],r=[],n=[],o=(a=ag(e)).dtstart,l=a.tzid,(function(e,t){if(void 0===t&&(t=!1),!(e=e&&e.trim()))throw Error("Invalid empty string");if(!t)return e.split(/\s/);for(var i=e.split("\n"),s=0;s<i.length;){var r=i[s]=i[s].replace(/\s+$/g,"");r?s>0&&" "===r[0]?(i[s-1]+=r.slice(1),i.splice(s,1)):s+=1:i.splice(s,1)}return i})(e,t.unfold).forEach(function(e){if(e){var t,a=function(e){var t=function(e){if(-1===e.indexOf(":"))return{name:"RRULE",value:e};var t=nR(e,":",1);return{name:t[0],value:t[1]}}(e),i=t.name,s=t.value,r=i.split(";");if(!r)throw Error("empty property name");return{name:r[0].toUpperCase(),parms:r.slice(1),value:s}}(e),o=a.name,d=a.parms,h=a.value;switch(o.toUpperCase()){case"RRULE":if(d.length)throw Error("unsupported RRULE parm: ".concat(d.join(",")));i.push(af(e));break;case"RDATE":var u=(null!=(t=/RDATE(?:;TZID=([^:=]+))?/i.exec(e))?t:[])[1];u&&!l&&(l=u),s=s.concat(aJ(h,d));break;case"EXRULE":if(d.length)throw Error("unsupported EXRULE parm: ".concat(d.join(",")));r.push(af(h));break;case"EXDATE":n=n.concat(aJ(h,d));break;case"DTSTART":break;default:throw Error("unsupported property: "+o)}}}),{dtstart:o,tzid:l,rrulevals:i,rdatevals:s,exrulevals:r,exdatevals:n}),h=d.rrulevals,u=d.rdatevals,c=d.exrulevals,p=d.exdatevals,_=d.dtstart,v=d.tzid,m=!1===t.cache;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||h.length>1||u.length||c.length||p.length){var f=new a1(m);return f.dtstart(_),f.tzid(v||void 0),h.forEach(function(e){f.rrule(new aG(aQ(e,_,v),m))}),u.forEach(function(e){f.rdate(e)}),c.forEach(function(e){f.exrule(new aG(aQ(e,_,v),m))}),p.forEach(function(e){f.exdate(e)}),t.compatible&&t.dtstart&&f.rdate(_),f}var g=h[0]||{};return new aG(aQ(g,g.dtstart||t.dtstart||_,g.tzid||t.tzid||v),m)}(e,function(e){var t=[],i=Object.keys(e),s=Object.keys(aX);if(i.forEach(function(e){nF(s,e)||t.push(e)}),t.length)throw Error("Invalid options: "+t.join(", "));return at(at({},aX),e)}(t))}function aQ(e,t,i){return at(at({},e),{dtstart:t,tzid:i})}function aJ(e,t){return t.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw Error("unsupported RDATE/EXDATE parm: "+e)}),e.split(",").map(function(e){return n4(e)})}function a0(e){var t=this;return function(i){if(void 0!==i&&(t["_".concat(e)]=i),void 0!==t["_".concat(e)])return t["_".concat(e)];for(var s=0;s<t._rrule.length;s++){var r=t._rrule[s].origOptions[e];if(r)return r}}}var a1=function(e){function t(t){void 0===t&&(t=!1);var i=e.call(this,{},t)||this;return i.dtstart=a0.apply(i,["dtstart"]),i.tzid=a0.apply(i,["tzid"]),i._rrule=[],i._rdate=[],i._exrule=[],i._exdate=[],i}return ae(t,e),t.prototype._iter=function(e){return function(e,t,i,s,r,n){var a={},o=e.accept;function l(e,t){i.forEach(function(i){i.between(e,t,!0).forEach(function(e){a[Number(e)]=!0})})}r.forEach(function(e){a[Number(new ax(e,n).rezonedDate())]=!0}),e.accept=function(e){var t=Number(e);return isNaN(t)?o.call(this,e):!!a[t]||(l(new Date(t-1),new Date(t+1)),!!a[t])||(a[t]=!0,o.call(this,e))},"between"===e.method&&(l(e.args.after,e.args.before),e.accept=function(e){var t=Number(e);return!!a[t]||(a[t]=!0,o.call(this,e))});for(var d=0;d<s.length;d++){var h=new ax(s[d],n).rezonedDate();if(!e.accept(new Date(h.getTime())))break}t.forEach(function(t){aH(e,t.options)});var u=e._result;switch(n3(u),e.method){case"all":case"between":return u;case"before":return u.length&&u[u.length-1]||null;default:return u.length&&u[0]||null}}(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){a2(e,this._rrule)},t.prototype.exrule=function(e){a2(e,this._exrule)},t.prototype.rdate=function(e){a3(e,this._rdate)},t.prototype.exdate=function(e){a3(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(e){return aZ(e.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(e){return aZ(e.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(e){return new Date(e.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(e){return new Date(e.getTime())})},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(aC({dtstart:this._dtstart}))),this._rrule.forEach(function(t){e=e.concat(t.toString().split("\n"))}),this._exrule.forEach(function(t){e=e.concat(t.toString().split("\n").map(function(e){return e.replace(/^RRULE:/,"EXRULE:")}).filter(function(e){return!/^DTSTART/.test(e)}))}),this._rdate.length&&e.push(a5("RDATE",this._rdate,this.tzid())),this._exdate.length&&e.push(a5("EXDATE",this._exdate,this.tzid())),e},t.prototype.toString=function(){return this.valueOf().join("\n")},t.prototype.clone=function(){var e=new t(!!this._cache);return this._rrule.forEach(function(t){return e.rrule(t.clone())}),this._exrule.forEach(function(t){return e.exrule(t.clone())}),this._rdate.forEach(function(t){return e.rdate(new Date(t.getTime()))}),this._exdate.forEach(function(t){return e.exdate(new Date(t.getTime()))}),e},t}(aG);function a2(e,t){if(!(e instanceof aG))throw TypeError(String(e)+" is not RRule instance");nF(t.map(String),String(e))||t.push(e)}function a3(e,t){if(!(e instanceof Date))throw TypeError(String(e)+" is not Date instance");nF(t.map(Number),Number(e))||(t.push(e),n3(t))}function a5(e,t,i){var s=!i||"UTC"===i.toUpperCase(),r=s?"".concat(e,":"):"".concat(e,";TZID=").concat(i,":"),n=t.map(function(e){return n5(e.valueOf(),s)}).join(",");return"".concat(r).concat(n)}let a4={YEARLY:"rrule.frequency.YEARLY",MONTHLY:"rrule.frequency.MONTHLY",WEEKLY:"rrule.frequency.WEEKLY",DAILY:"rrule.frequency.DAILY",HOURLY:"rrule.frequency.HOURLY",MINUTELY:"rrule.frequency.MINUTELY",SECONDLY:"rrule.frequency.SECONDLY"},a8=["bymonth","byweekno","byyearday","bymonthday","byweekday","byhour","byminute","bysecond"],a6={SECONDLY:["byweekno"],MINUTELY:["byweekno"],HOURLY:["byweekno"],DAILY:["byweekno","byyearday"],WEEKLY:["byweekno","byyearday","bymonthday"],MONTHLY:["byweekno","byyearday"],YEARLY:[]},a7=["bymonth","byweekno","byyearday","byhour","byminute","bysecond"],a9={SECONDLY:["bymonthday","byweekday",...a7,...a6.SECONDLY],MINUTELY:["bymonthday","byweekday",...a7,...a6.MINUTELY],HOURLY:["bymonthday","byweekday",...a7,...a6.HOURLY],DAILY:["bymonthday","byweekday",...a7,...a6.DAILY],WEEKLY:["bymonthday",...a7,...a6.WEEKLY],MONTHLY:["byweekday",...a7,...a6.MONTHLY],YEARLY:["bymonthday","byweekday",...a7,...a6.YEARLY]},oe={MO:"monday",TU:"tuesday",WE:"wednesday",TH:"thursday",FR:"friday",SA:"saturday",SU:"sunday"},ot={1:"january",2:"february",3:"march",4:"april",5:"may",6:"june",7:"july",8:"august",9:"september",10:"october",11:"november",12:"december"};(r=d||(d={})).default="default",r.period="period",r.recurrence="recurrence";let oi={never:"never",until:"schedule.ends.until",count:"schedule.ends.count"};var os=a(416),or=a.n(os),on=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};function oa(e,t){return Array.from({length:t-e+1},(t,i)=>e+i)}let oo=oa(-53,53).filter(Boolean),ol=oa(-366,366).filter(Boolean),od=oa(-31,31).filter(Boolean),oh=oa(1,24),ou=oa(1,60);class oc extends CustomEvent{constructor(e){super(oc.NAME,{detail:{value:e},bubbles:!0,composed:!0})}}oc.NAME="or-scheduler-changed";class op extends CustomEvent{constructor(){super(op.NAME,{bubbles:!0,composed:!0})}}op.NAME="or-scheduler-removed";let o_=class extends(0,h.translate)(h.i18next)(ek){constructor(){super(...arguments),this.defaultEventTypeLabel="default",this.disableNegativeByPartValues=!1,this.disabledFrequencies=[],this.disabledRRuleParts=[],this.disabledByPartCombinations=a6,this.header="scheduleActivity",this.isAllDay=!0,this.open=!1,this.removable=!1,this.schedule=this.defaultSchedule,this.timezoneOffset=0,this._count=1,this._ends="never",this._eventType=d.default,this._until=or()().toDate()}get _scheduleWithOffset(){return this._applyTimezoneOffset(this.schedule,this.timezoneOffset)}set _scheduleWithOffset(e){this.schedule=this._applyTimezoneOffset(e,-this.timezoneOffset)}get _timeLabel(){if(this._eventType===d.default)return en`<or-translate value="${this.defaultEventTypeLabel}" .options="${this._getDefaultMessageOptions()}"></or-translate>`;if(this._scheduleWithOffset){let e=this._scheduleWithOffset;if(e.recurrence){let t=or()(e.end).diff(e.start,"days"),i={start:or()(e.start).format("HH:mm"),end:or()(e.end).format("HH:mm")},s=en``;this.isAllDay&&t>0?s=en`<or-translate value="forDays" .options="${{days:t,count:t}}"></or-translate>`:t>0?s=en`<or-translate value="fromToDays" .options="${Object.assign(Object.assign({},i),{days:t,count:t})}"></or-translate>`:0===t&&(s=en`<or-translate value="fromTo" .options="${i}"></or-translate>`);let r=en`<span>&nbsp;${s}</span>`,n=Object.values(ot).map(h.i18next.t),a=Object.values(oe).map(h.i18next.t),o=[a.pop(),...a],l=this._rrule.toText(e=>h.i18next.t(`rrule.${e}`),{dayNames:o,monthNames:n,tokens:{}});return en`<span class="time-label"><span>${l}</span>${r}</span>`}let t=this.isAllDay?"DD-MM-YYYY":"DD-MM-YYYY HH:mm";return en`<or-translate value="activeFromTo" .options="${{start:or()(e.start).format(t),end:or()(e.end).format(t)}}"></or-translate>`}}connectedCallback(){var e,t,i;super.connectedCallback();let s=this._applyTimezoneOffset(null!=(e=this.schedule)?e:this.defaultSchedule,this.timezoneOffset);if((null==s?void 0:s.start)&&(null==s?void 0:s.start)){let e=or()(null==s?void 0:s.start),t=or()(null==s?void 0:s.end);this.isAllDay=e.isSame(e.clone().startOf("day"))&&t.isSame(t.clone().endOf("day"))}if(null==(t=this.schedule)?void 0:t.recurrence){let e=aG.fromString(this.schedule.recurrence).origOptions;e.until?this._until=or()(e.until).toDate():e.count&&(this._count=e.count)}!this.schedule||nT.Util.objectsEqual(this.schedule,this.defaultSchedule)?this._eventType=d.default:this._eventType=(null==(i=this.schedule)?void 0:i.recurrence)?d.recurrence:d.period}shouldUpdate(e){var t,i,s,r,n,a,o;return this.schedule&&!this.schedule.end&&(null==(t=this.defaultSchedule)?void 0:t.end)&&(this.schedule=Object.assign(Object.assign({},this.schedule),{end:this.defaultSchedule.end})),e.has("schedule")&&((null==(i=this._scheduleWithOffset)?void 0:i.recurrence)?this._rrule=aG.fromString(this._scheduleWithOffset.recurrence):this._eventType===d.default&&(null==(s=this.defaultSchedule)?void 0:s.recurrence)&&(this._rrule=aG.fromString(this.defaultSchedule.recurrence))),e.has("_rrule")&&this._rrule&&(this._byRRuleParts=a8.filter(e=>{var t;return!(null==(t=this.disabledByPartCombinations[l[this._rrule.options.freq]])?void 0:t.includes(e))}).filter(e=>!this.disabledRRuleParts.includes(e)),this._ends=(null==(n=null==(r=this._rrule)?void 0:r.origOptions)?void 0:n.until)&&"until"||(null==(o=null==(a=this._rrule)?void 0:a.origOptions)?void 0:o.count)&&"count"||"never"),super.shouldUpdate(e)}_setAllDay(){let e=this._scheduleWithOffset;if(this.isAllDay&&this._eventType!==d.default){let t=or()(null==e?void 0:e.start).startOf("day").valueOf(),i=or()(null==e?void 0:e.end).endOf("day").valueOf();this._scheduleWithOffset=Object.assign(Object.assign({},e),{start:t,end:i})}}_getRRule(e=this._rrule){var t,i,s;return null==(s=null==(i=null==(t=null==e?void 0:e.toString())?void 0:t.split("RRULE:"))?void 0:i[1])?void 0:s.replace(/(UNTIL=\d+T\d+)Z/,"$1")}_setRRuleValue(e,t){var i;let s=null==(i=this._rrule)?void 0:i.origOptions,r=this._scheduleWithOffset;if("interval"===t||"freq"===t||t.startsWith("by"))if("byweekday"===t)s.byweekday=e.map(e=>aG[e]);else if("freq"===t){for(let e of a8)delete s[e];s[t]=e}else s[t]=e;else if("start"===t&&s){let[t,i,n]=e.split("-").map(Number);s.dtstart=or()(r.start).set({year:t,month:i-1,date:n}).toDate(),r.start=s.dtstart.getTime()}else if("end"===t){let[t,i,s]=e.split("-").map(Number);r.end=or()(r.end).set({year:t,month:i-1,date:s}).toDate().getTime()}else if("start-time"===t){let[t,i]=e.split(":");s?s.dtstart=or()(r.start).set({hour:t,minute:i,second:0,millisecond:0}).toDate():s=new aG({dtstart:or()(r.start).set({hour:t,minute:i,second:0,millisecond:0}).toDate()}).origOptions,r.start=or()(s.dtstart).toDate().getTime()}else if("end-time"===t){let[t,i]=e.split(":");r.end=or()(r.end).set({hour:t,minute:i,second:0,millisecond:0}).toDate().getTime()}else switch(t){case"all-day":this.isAllDay=e;break;case"recurrence-ends":"until"===e?(s.until=this._until,delete s.count):("count"===e?s.count=this._count:delete s.count,delete s.until),this._ends=e;break;case"until":this._until=new Date(e),s.until=this._until;break;case"count":this._count=e,s.count=this._count}this._eventType===d.recurrence?(this._rrule=new aG(s),this._scheduleWithOffset=Object.assign(Object.assign({},r),{recurrence:this._getRRule()})):this._scheduleWithOffset=Object.assign({},r)}_setCalendarEventType(e){var t,i,s,r,n,a,o,l,h,u;let c=e.target.value;this._eventType=c;let p=or()().startOf("day");if(c===d.default){this.schedule={start:null!=(i=null==(t=this.defaultSchedule)?void 0:t.start)?i:p.valueOf()-this.timezoneOffset,end:null!=(r=null==(s=this.defaultSchedule)?void 0:s.end)?r:p.endOf("day").valueOf()-this.timezoneOffset};let e=null==(n=this.defaultSchedule)?void 0:n.recurrence;this._rrule=e?aG.fromString(e):void 0;return}let _={start:null!=(o=null==(a=this._scheduleWithOffset)?void 0:a.start)?o:p.valueOf(),end:null!=(h=null==(l=this._scheduleWithOffset)?void 0:l.end)?h:p.endOf("day").valueOf()};c===d.period?this._scheduleWithOffset=_:this._scheduleWithOffset=Object.assign(Object.assign({},_),{recurrence:null!=(u=this._getRRule())?u:"FREQ=DAILY"})}_applyTimezoneOffset(e,t){if(e){let{start:i,end:s,recurrence:r}=Object.assign({},e);if(r&&aG.fromString(r).origOptions.until){let e=aG.fromString(r).origOptions;e.until=new Date(Number(e.until)+t),r=this._getRRule(new aG(e))}return{start:null!=i?i+t:i,end:null!=s?s+t:s,recurrence:r}}}_getDefaultMessageOptions(){var e,t;return{date:or().utc(null==(e=this.defaultSchedule)?void 0:e.start).format("YYYY-MM-DD"),time:or().utc(null==(t=this.defaultSchedule)?void 0:t.start).format("HH:mm")}}render(){return en`
2761
+ `}}eT(nE);let nI=class extends nE{};nI=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-multi-select-combo-box")],nI);let nT=class extends rs{};function nD(e,t,i){return e?t(e):i?.(e)}nT=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([u("or-vaadin-time-picker")],nT);var nS=a(954);(i=n||(n={})).BUTTON="button",i.BUTTON_TOGGLE="button-toggle",i.BUTTON_MOMENTARY="button-momentary",i.CHECKBOX="checkbox",i.CHECKBOX_LIST="checkbox-list",i.COLOUR="color",i.DATE="date",i.DATETIME="datetime-local",i.EMAIL="email",i.JSON="json",i.JSON_OBJECT="json-object",i.MONTH="month",i.NUMBER="number",i.BIG_INT="big-int",i.PASSWORD="password",i.RADIO="radio",i.SWITCH="switch",i.RANGE="range",i.TELEPHONE="tel",i.TEXT="text",i.TEXTAREA="textarea",i.TIME="time",i.URL="url",i.WEEK="week",i.SELECT="select",i.LIST="list",i.CRON="cron",i.DURATION="duration",i.DURATION_TIME="duration-time",i.DURATION_PERIOD="duration-period";var nA=["MO","TU","WE","TH","FR","SA","SU"],nO=function(){function e(e,t){if(0===t)throw Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return e.fromStr=function(t){return new e(nA.indexOf(t))},e.prototype.nth=function(t){return this.n===t?this:new e(this.weekday,t)},e.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},e.prototype.toString=function(){var e=nA[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},e.prototype.getJsWeekday=function(){return 6===this.weekday?0:this.weekday+1},e}(),nP=function(e){return null!=e},n$=function(e){return"number"==typeof e},nL=function(e){return"string"==typeof e&&nA.includes(e)},nM=Array.isArray,nR=function(e,t){void 0===t&&(t=e),1==arguments.length&&(t=e,e=0);for(var i=[],s=e;s<t;s++)i.push(s);return i},nV=function(e,t){var i=0,s=[];if(nM(e))for(;i<t;i++)s[i]=[].concat(e);else for(;i<t;i++)s[i]=e;return s};function nN(e,t,i){void 0===i&&(i=" ");var s=String(e);return(t|=0,s.length>t)?String(s):((t-=s.length)>i.length&&(i+=nV(i,t/i.length)),i.slice(0,t)+String(s))}var nB=function(e,t,i){var s=e.split(t);return i?s.slice(0,i).concat([s.slice(i).join(t)]):s},nz=function(e,t){var i=e%t;return i*t<0?i+t:i},nF=function(e,t){return{div:Math.floor(e/t),mod:nz(e,t)}},nU=function(e){return!nP(e)||0===e.length},nH=function(e){return!nU(e)},nj=function(e,t){return nH(e)&&-1!==e.indexOf(t)},nY=function(e,t,i,s,r,n){return void 0===s&&(s=0),void 0===r&&(r=0),void 0===n&&(n=0),new Date(Date.UTC(e,t-1,i,s,r,n))},nq=[31,28,31,30,31,30,31,31,30,31,30,31],nW=nY(1970,1,1),nK=[6,0,1,2,3,4,5],nG=function(e){return e%4==0&&e%100!=0||e%400==0},nX=function(e){return e instanceof Date},nZ=function(e){return nX(e)&&!isNaN(e.getTime())},nQ=function(e){var t,i;return t=e,i=nW,Math.round((t.getTime()-i.getTime())/864e5)},nJ=function(e){return new Date(nW.getTime()+864e5*e)},n0=function(e){var t=e.getUTCMonth();return 1===t&&nG(e.getUTCFullYear())?29:nq[t]},n1=function(e){return nK[e.getUTCDay()]},n2=function(e,t){var i=nY(e,t+1,1);return[n1(i),n0(i)]},n3=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},n5=function(e){return new Date(e.getTime())},n4=function(e){for(var t=[],i=0;i<e.length;i++)t.push(n5(e[i]));return t},n8=function(e){e.sort(function(e,t){return e.getTime()-t.getTime()})},n6=function(e,t){void 0===t&&(t=!0);var i=new Date(e);return[nN(i.getUTCFullYear().toString(),4,"0"),nN(i.getUTCMonth()+1,2,"0"),nN(i.getUTCDate(),2,"0"),"T",nN(i.getUTCHours(),2,"0"),nN(i.getUTCMinutes(),2,"0"),nN(i.getUTCSeconds(),2,"0"),t?"Z":""].join("")},n7=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/.exec(e);if(!t)throw Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[5],10)||0,parseInt(t[6],10)||0,parseInt(t[7],10)||0))},n9=function(e,t){return e.toLocaleString("sv-SE",{timeZone:t}).replace(" ","T")+"Z"},ae=function(e,t){var i=new Date(n9(e,Intl.DateTimeFormat().resolvedOptions().timeZone)),s=new Date(n9(e,null!=t?t:"UTC")).getTime()-i.getTime();return new Date(e.getTime()-s)},at=function(){function e(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,"between"===e?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):"before"===e?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):"after"===e&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return e.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,i=this.maxDate&&e>this.maxDate;if("between"===this.method){if(t)return!0;if(i)return!1}else if("before"===this.method){if(i)return!1}else if("after"===this.method)return!!t||(this.add(e),!1);return this.add(e)},e.prototype.add=function(e){return this._result.push(e),!0},e.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;default:return e.length?e[e.length-1]:null}},e.prototype.clone=function(){return new e(this.method,this.args)},e}(),ai=function(e,t){return(ai=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};function as(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}ai(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var ar=function(){return(ar=Object.assign||function(e){for(var t,i=1,s=arguments.length;i<s;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function an(e,t,i){if(i||2==arguments.length)for(var s,r=0,n=t.length;r<n;r++)!s&&r in t||(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var aa=function(e){function t(t,i,s){var r=e.call(this,t,i)||this;return r.iterator=s,r}return as(t,e),t.prototype.add=function(e){return!!this.iterator(e,this._result.length)&&(this._result.push(e),!0)},t}(at);let ao={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}};var al=function(e,t){return -1!==e.indexOf(t)},ad=function(e){return e.toString()},ah=function(e,t,i){return"".concat(t," ").concat(i,", ").concat(e)},au=function(){function e(e,t,i,s){if(void 0===t&&(t=ad),void 0===i&&(i=ao),void 0===s&&(s=ah),this.text=[],this.language=i||ao,this.gettext=t,this.dateFormatter=s,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var r=[].concat(this.options.bymonthday),n=[].concat(this.options.bynmonthday);r.sort(function(e,t){return e-t}),n.sort(function(e,t){return t-e}),this.bymonthday=r.concat(n),this.bymonthday.length||(this.bymonthday=null)}if(nP(this.origOptions.byweekday)){var a=nM(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],o=String(a);this.byweekday={allWeeks:a.filter(function(e){return!e.n}),someWeeks:a.filter(function(e){return!!e.n}),isWeekdays:-1!==o.indexOf("MO")&&-1!==o.indexOf("TU")&&-1!==o.indexOf("WE")&&-1!==o.indexOf("TH")&&-1!==o.indexOf("FR")&&-1===o.indexOf("SA")&&-1===o.indexOf("SU"),isEveryDay:-1!==o.indexOf("MO")&&-1!==o.indexOf("TU")&&-1!==o.indexOf("WE")&&-1!==o.indexOf("TH")&&-1!==o.indexOf("FR")&&-1!==o.indexOf("SA")&&-1!==o.indexOf("SU")};var l=function(e,t){return e.weekday-t.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return e.isFullyConvertible=function(t){if(!(t.options.freq in e.IMPLEMENTED)||t.origOptions.until&&t.origOptions.count)return!1;for(var i in t.origOptions){if(al(["dtstart","tzid","wkst","freq"],i))break;if(!al(e.IMPLEMENTED[t.options.freq],i))return!1}return!0},e.prototype.isFullyConvertible=function(){return e.isFullyConvertible(this.rrule)},e.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in e.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[aQ.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var i=this.options.until;this.add(this.dateFormatter(i.getUTCFullYear(),this.language.monthNames[i.getUTCMonth()],i.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(t(this.plural(this.options.count)?"times":"time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},e.prototype.HOURLY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(e(this.plural(this.options.interval)?"hours":"hour"))},e.prototype.MINUTELY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(e(this.plural(this.options.interval)?"minutes":"minute"))},e.prototype.DAILY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(e(this.plural(this.options.interval)?"weekdays":"weekday")):this.add(e(this.plural(this.options.interval)?"days":"day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},e.prototype.WEEKLY=function(){var e=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()).add(e(this.plural(this.options.interval)?"weeks":"week")),this.byweekday&&this.byweekday.isWeekdays?1===this.options.interval?this.add(e(this.plural(this.options.interval)?"weekdays":"weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(e(this.plural(this.options.interval)?"days":"day")):(1===this.options.interval&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},e.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(e(this.plural(this.options.interval)?"months":"month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},e.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(e(this.plural(this.options.interval)?"years":"year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(e(this.plural(this.options.byweekno.length)?"weeks":"week")).add(this.list(this.options.byweekno,void 0,e("and")))},e.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},e.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},e.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},e.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},e.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,i=this.gettext;if(-1===e)return i("last");var s=Math.abs(e);switch(s){case 1:case 21:case 31:t=s+i("st");break;case 2:case 22:t=s+i("nd");break;case 3:case 23:t=s+i("rd");break;default:t=s+i("th")}return e<0?t+" "+i("last"):t},e.prototype.monthtext=function(e){return this.language.monthNames[e-1]},e.prototype.weekdaytext=function(e){var t=n$(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},e.prototype.plural=function(e){return e%100!=1},e.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},e.prototype.list=function(e,t,i,s){var r=this;void 0===s&&(s=","),nM(e)||(e=[e]),t=t||function(e){return e.toString()};var n=function(e){return t&&t.call(r,e)};if(!i)return e.map(n).join(s+" ");for(var a=e.map(n),o=s,l="",d=0;d<a.length;d++)0!==d&&(d===a.length-1?l+=" "+i+" ":l+=o+" "),l+=a[d];return l},e}(),ac=function(){function e(e){this.done=!0,this.rules=e}return e.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},e.prototype.isDone=function(){return this.done&&null===this.symbol},e.prototype.nextSymbol=function(){this.symbol=null,this.value=null;do{if(this.done)return!1;for(var e in t=null,this.rules){var t,i,s=this.rules[e].exec(this.text);s&&(null===t||s[0].length>t[0].length)&&(t=s,i=e)}if(null!=t&&(this.text=this.text.substr(t[0].length),""===this.text&&(this.done=!0)),null==t){this.done=!0,this.symbol=null,this.value=null;return}}while("SKIP"===i);return this.symbol=i,this.value=t,!0},e.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},e.prototype.acceptNumber=function(){return this.accept("number")},e.prototype.expect=function(e){if(this.accept(e))return!0;throw Error("expected "+e+" but found "+this.symbol)},e}();function ap(e,t){void 0===t&&(t=ao);var i={},s=new ac(t.tokens);if(!s.start(e))return null;return function(){s.expect("every");var e=s.acceptNumber();if(e&&(i.interval=parseInt(e[0],10)),s.isDone())throw Error("Unexpected end");switch(s.symbol){case"day(s)":i.freq=aQ.DAILY,s.nextSymbol()&&(n(),d());break;case"weekday(s)":i.freq=aQ.WEEKLY,i.byweekday=[aQ.MO,aQ.TU,aQ.WE,aQ.TH,aQ.FR],s.nextSymbol(),n(),d();break;case"week(s)":i.freq=aQ.WEEKLY,s.nextSymbol()&&(r(),n(),d());break;case"hour(s)":i.freq=aQ.HOURLY,s.nextSymbol()&&(r(),d());break;case"minute(s)":i.freq=aQ.MINUTELY,s.nextSymbol()&&(r(),d());break;case"month(s)":i.freq=aQ.MONTHLY,s.nextSymbol()&&(r(),d());break;case"year(s)":i.freq=aQ.YEARLY,s.nextSymbol()&&(r(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":if(i.freq=aQ.WEEKLY,i.byweekday=[aQ[s.symbol.substr(0,2).toUpperCase()]],!s.nextSymbol())return;for(;s.accept("comma");){if(s.isDone())throw Error("Unexpected end");var t=o();if(!t)throw Error("Unexpected symbol "+s.symbol+", expected weekday");i.byweekday.push(aQ[t]),s.nextSymbol()}n(),function(){s.accept("on"),s.accept("the");var e=l();if(e)for(i.bymonthday=[e],s.nextSymbol();s.accept("comma");){if(!(e=l()))throw Error("Unexpected symbol "+s.symbol+"; expected monthday");i.bymonthday.push(e),s.nextSymbol()}}(),d();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(i.freq=aQ.YEARLY,i.bymonth=[a()],!s.nextSymbol())return;for(;s.accept("comma");){if(s.isDone())throw Error("Unexpected end");var h=a();if(!h)throw Error("Unexpected symbol "+s.symbol+", expected month");i.bymonth.push(h),s.nextSymbol()}r(),d();break;default:throw Error("Unknown symbol")}}(),i;function r(){var e=s.accept("on"),t=s.accept("the");if(e||t)do{var r=l(),n=o(),d=a();if(r)n?(s.nextSymbol(),i.byweekday||(i.byweekday=[]),i.byweekday.push(aQ[n].nth(r))):(i.bymonthday||(i.bymonthday=[]),i.bymonthday.push(r),s.accept("day(s)"));else if(n)s.nextSymbol(),i.byweekday||(i.byweekday=[]),i.byweekday.push(aQ[n]);else if("weekday(s)"===s.symbol)s.nextSymbol(),i.byweekday||(i.byweekday=[aQ.MO,aQ.TU,aQ.WE,aQ.TH,aQ.FR]);else if("week(s)"===s.symbol){s.nextSymbol();var h=s.acceptNumber();if(!h)throw Error("Unexpected symbol "+s.symbol+", expected week number");for(i.byweekno=[parseInt(h[0],10)];s.accept("comma");){if(!(h=s.acceptNumber()))throw Error("Unexpected symbol "+s.symbol+"; expected monthday");i.byweekno.push(parseInt(h[0],10))}}else{if(!d)return;s.nextSymbol(),i.bymonth||(i.bymonth=[]),i.bymonth.push(d)}}while(s.accept("comma")||s.accept("the")||s.accept("on"))}function n(){if(s.accept("at"))do{var e=s.acceptNumber();if(!e)throw Error("Unexpected symbol "+s.symbol+", expected hour");for(i.byhour=[parseInt(e[0],10)];s.accept("comma");){if(!(e=s.acceptNumber()))throw Error("Unexpected symbol "+s.symbol+"; expected hour");i.byhour.push(parseInt(e[0],10))}}while(s.accept("comma")||s.accept("at"))}function a(){switch(s.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function o(){switch(s.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return s.symbol.substr(0,2).toUpperCase();default:return!1}}function l(){switch(s.symbol){case"last":return s.nextSymbol(),-1;case"first":return s.nextSymbol(),1;case"second":return s.nextSymbol(),s.accept("last")?-2:2;case"third":return s.nextSymbol(),s.accept("last")?-3:3;case"nth":var e=parseInt(s.value[1],10);if(e<-366||e>366)throw Error("Nth out of range: "+e);return s.nextSymbol(),s.accept("last")?-e:e;default:return!1}}function d(){if("until"===s.symbol){var e=Date.parse(s.text);if(!e)throw Error("Cannot parse until date:"+s.text);i.until=new Date(e)}else s.accept("for")&&(i.count=parseInt(s.value[0],10),s.expect("number"))}}function a_(e){return e<l.HOURLY}(s=l||(l={}))[s.YEARLY=0]="YEARLY",s[s.MONTHLY=1]="MONTHLY",s[s.WEEKLY=2]="WEEKLY",s[s.DAILY=3]="DAILY",s[s.HOURLY=4]="HOURLY",s[s.MINUTELY=5]="MINUTELY",s[s.SECONDLY=6]="SECONDLY";var av=["count","until","interval","byweekday","bymonthday","bymonth"];au.IMPLEMENTED=[],au.IMPLEMENTED[l.HOURLY]=av,au.IMPLEMENTED[l.MINUTELY]=av,au.IMPLEMENTED[l.DAILY]=["byhour"].concat(av),au.IMPLEMENTED[l.WEEKLY]=av,au.IMPLEMENTED[l.MONTHLY]=av,au.IMPLEMENTED[l.YEARLY]=["byweekno","byyearday"].concat(av);var am=au.isFullyConvertible,af=function(){function e(e,t,i,s){this.hour=e,this.minute=t,this.second=i,this.millisecond=s||0}return e.prototype.getHours=function(){return this.hour},e.prototype.getMinutes=function(){return this.minute},e.prototype.getSeconds=function(){return this.second},e.prototype.getMilliseconds=function(){return this.millisecond},e.prototype.getTime=function(){return(60*this.hour*60+60*this.minute+this.second)*1e3+this.millisecond},e}(),ag=function(e){function t(t,i,s,r,n,a,o){var l=e.call(this,r,n,a,o)||this;return l.year=t,l.month=i,l.day=s,l}return as(t,e),t.fromDate=function(e){return new this(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.valueOf()%1e3)},t.prototype.getWeekday=function(){return n1(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(e){this.year+=e},t.prototype.addMonths=function(e){if(this.month+=e,this.month>12){var t=Math.floor(this.month/12),i=nz(this.month,12);this.month=i,this.year+=t,0===this.month&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(e,t){t>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-t))+7*e:this.day+=-(this.getWeekday()-t)+7*e,this.fixDay()},t.prototype.addDaily=function(e){this.day+=e,this.fixDay()},t.prototype.addHours=function(e,t,i){for(t&&(this.hour+=Math.floor((23-this.hour)/e)*e);;){this.hour+=e;var s=nF(this.hour,24),r=s.div,n=s.mod;if(r&&(this.hour=n,this.addDaily(r)),nU(i)||nj(i,this.hour))break}},t.prototype.addMinutes=function(e,t,i,s){for(t&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/e)*e);;){this.minute+=e;var r=nF(this.minute,60),n=r.div,a=r.mod;if(n&&(this.minute=a,this.addHours(n,!1,i)),(nU(i)||nj(i,this.hour))&&(nU(s)||nj(s,this.minute)))break}},t.prototype.addSeconds=function(e,t,i,s,r){for(t&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/e)*e);;){this.second+=e;var n=nF(this.second,60),a=n.div,o=n.mod;if(a&&(this.second=o,this.addMinutes(a,!1,i,s)),(nU(i)||nj(i,this.hour))&&(nU(s)||nj(s,this.minute))&&(nU(r)||nj(r,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var e=n2(this.year,this.month-1)[1];if(!(this.day<=e))for(;this.day>e;){if(this.day-=e,++this.month,13===this.month&&(this.month=1,++this.year,this.year>9999))return;e=n2(this.year,this.month-1)[1]}}},t.prototype.add=function(e,t){var i=e.freq,s=e.interval,r=e.wkst,n=e.byhour,a=e.byminute,o=e.bysecond;switch(i){case l.YEARLY:return this.addYears(s);case l.MONTHLY:return this.addMonths(s);case l.WEEKLY:return this.addWeekly(s,r);case l.DAILY:return this.addDaily(s);case l.HOURLY:return this.addHours(s,t,n);case l.MINUTELY:return this.addMinutes(s,t,n,a);case l.SECONDLY:return this.addSeconds(s,t,n,a,o)}},t}(af);function ab(e){for(var t=[],i=Object.keys(e),s=0;s<i.length;s++){var r=i[s];nj(aZ,r)||t.push(r),nX(e[r])&&!nZ(e[r])&&t.push(r)}if(t.length)throw Error("Invalid options: "+t.join(", "));return ar({},e)}function ay(e){var t=e.split("\n").map(ax).filter(function(e){return null!==e});return ar(ar({},t[0]),t[1])}function aw(e){var t={},i=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!i)return t;var s=i[1],r=i[2];return s&&(t.tzid=s),t.dtstart=n7(r),t}function ax(e){if(!(e=e.replace(/^\s+|\s+$/,"")).length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return aC(e);var i=t[1];switch(i.toUpperCase()){case"RRULE":case"EXRULE":return aC(e);case"DTSTART":return aw(e);default:throw Error("Unsupported RFC prop ".concat(i," in ").concat(e))}}function aC(e){var t=aw(e.replace(/^RRULE:/i,""));return e.replace(/^(?:RRULE|EXRULE):/i,"").split(";").forEach(function(i){var s=i.split("="),r=s[0],n=s[1];switch(r.toUpperCase()){case"FREQ":t.freq=l[n.toUpperCase()];break;case"WKST":t.wkst=aG[n.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var a,o=-1!==(a=n).indexOf(",")?a.split(",").map(ak):ak(a);t[r.toLowerCase()]=o;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=n.split(",").map(function(e){if(2===e.length)return aG[e];var t=e.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!t||t.length<3)throw SyntaxError("Invalid weekday string: ".concat(e));var i=Number(t[1]);return new nO(aG[t[2]].weekday,i)});break;case"DTSTART":case"TZID":var d=aw(e);t.tzid=d.tzid,t.dtstart=d.dtstart;break;case"UNTIL":t.until=n7(n);break;case"BYEASTER":t.byeaster=Number(n);break;default:throw Error("Unknown RRULE property '"+r+"'")}}),t}function ak(e){return/^[+-]?\d+$/.test(e)?Number(e):e}var aE=function(){function e(e,t){if(isNaN(e.getTime()))throw RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||"UTC"===this.tzid.toUpperCase()},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var e=n6(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:ae(this.date,this.tzid)},e}();function aI(e){for(var t=[],i="",s=Object.keys(e),r=Object.keys(aX),n=0;n<s.length;n++)if("tzid"!==s[n]&&nj(r,s[n])){var a,o,l=s[n].toUpperCase(),d=e[s[n]],h="";if(!(!nP(d)||nM(d)&&!d.length)){switch(l){case"FREQ":h=aQ.FREQUENCIES[e.freq];break;case"WKST":h=n$(d)?new nO(d).toString():d.toString();break;case"BYWEEKDAY":l="BYDAY",h=(nM(d)?d:[d]).map(function(e){return e instanceof nO?e:nM(e)?new nO(e[0],e[1]):new nO(e)}).toString();break;case"DTSTART":a=d,o=e.tzid,i=a?"DTSTART"+new aE(new Date(a),o).toString():"";break;case"UNTIL":h=n6(d,!e.tzid);break;default:if(nM(d)){for(var u=[],c=0;c<d.length;c++)u[c]=String(d[c]);h=u.toString()}else h=String(d)}h&&t.push([l,h])}}var p=t.map(function(e){var t=e[0],i=e[1];return"".concat(t,"=").concat(i.toString())}).join(";"),_="";return""!==p&&(_="RRULE:".concat(p)),[i,_].filter(function(e){return!!e}).join("\n")}var aT=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(e,t,i){t&&(t=t instanceof Date?n5(t):n4(t)),"all"===e?this.all=t:(i._value=t,this[e].push(i))},e.prototype._cacheGet=function(e,t){var i=!1,s=t?Object.keys(t):[],r=this[e];if("all"===e)i=this.all;else if(nM(r))for(var n=0;n<r.length;n++){var a=r[n];if(!(s.length&&function(e){for(var i=0;i<s.length;i++){var r=s[i];if(!function(e,t){return Array.isArray(e)?!!Array.isArray(t)&&e.length===t.length&&e.every(function(e,i){return e.getTime()===t[i].getTime()}):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}(t[r],e[r]))return!0}return!1}(a))){i=a._value;break}}if(!i&&this.all){for(var o=new at(e,t),n=0;n<this.all.length&&o.accept(this.all[n]);n++);i=o.getValue(),this._cacheAdd(e,i,t)}return nM(i)?n4(i):i instanceof Date?n5(i):i},e}(),aD=an(an(an(an(an(an(an(an(an(an(an(an(an([],nV(1,31),!0),nV(2,28),!0),nV(3,31),!0),nV(4,30),!0),nV(5,31),!0),nV(6,30),!0),nV(7,31),!0),nV(8,31),!0),nV(9,30),!0),nV(10,31),!0),nV(11,30),!0),nV(12,31),!0),nV(1,7),!0),aS=an(an(an(an(an(an(an(an(an(an(an(an(an([],nV(1,31),!0),nV(2,29),!0),nV(3,31),!0),nV(4,30),!0),nV(5,31),!0),nV(6,30),!0),nV(7,31),!0),nV(8,31),!0),nV(9,30),!0),nV(10,31),!0),nV(11,30),!0),nV(12,31),!0),nV(1,7),!0),aA=nR(1,29),aO=nR(1,30),aP=nR(1,31),a$=nR(1,32),aL=an(an(an(an(an(an(an(an(an(an(an(an(an([],a$,!0),aO,!0),a$,!0),aP,!0),a$,!0),aP,!0),a$,!0),a$,!0),aP,!0),a$,!0),aP,!0),a$,!0),a$.slice(0,7),!0),aM=an(an(an(an(an(an(an(an(an(an(an(an(an([],a$,!0),aA,!0),a$,!0),aP,!0),a$,!0),aP,!0),a$,!0),a$,!0),aP,!0),a$,!0),aP,!0),a$,!0),a$.slice(0,7),!0),aR=nR(-28,0),aV=nR(-29,0),aN=nR(-30,0),aB=nR(-31,0),az=an(an(an(an(an(an(an(an(an(an(an(an(an([],aB,!0),aV,!0),aB,!0),aN,!0),aB,!0),aN,!0),aB,!0),aB,!0),aN,!0),aB,!0),aN,!0),aB,!0),aB.slice(0,7),!0),aF=an(an(an(an(an(an(an(an(an(an(an(an(an([],aB,!0),aR,!0),aB,!0),aN,!0),aB,!0),aN,!0),aB,!0),aB,!0),aN,!0),aB,!0),aN,!0),aB,!0),aB.slice(0,7),!0),aU=[0,31,60,91,121,152,182,213,244,274,305,335,366],aH=[0,31,59,90,120,151,181,212,243,273,304,334,365],aj=function(){for(var e=[],t=0;t<55;t++)e=e.concat(nR(7));return e}(),aY=function(){function e(e){this.options=e}return e.prototype.rebuild=function(e,t){var i,s,r,n,a,o,l,d,h,u,c=this.options;if(e!==this.lastyear&&(this.yearinfo=function(e,t){var i,s,r,n,a,o=nY(e,1,1),l=nG(e)?366:365,d=nG(e+1)?366:365,h=nQ(o),u=n1(o),c=ar(ar({yearlen:l,nextyearlen:d,yearordinal:h,yearweekday:u},(s=nG(i=e)?366:365,r=n1(nY(i,1,1)),365===s?{mmask:aD,mdaymask:aM,nmdaymask:aF,wdaymask:aj.slice(r),mrange:aH}:{mmask:aS,mdaymask:aL,nmdaymask:az,wdaymask:aj.slice(r),mrange:aU})),{wnomask:null});if(nU(t.byweekno))return c;c.wnomask=nV(0,l+7);var p=n=nz(7-u+t.wkst,7);p>=4?(p=0,a=c.yearlen+nz(u-t.wkst,7)):a=l-p;for(var _=Math.floor(Math.floor(a/7)+nz(a,7)/4),v=0;v<t.byweekno.length;v++){var m=t.byweekno[v];if(m<0&&(m+=_+1),m>0&&m<=_){var f=void 0;m>1?(f=p+(m-1)*7,p!==n&&(f-=7-n)):f=p;for(var g=0;g<7&&(c.wnomask[f]=1,f++,c.wdaymask[f]!==t.wkst);g++);}}if(nj(t.byweekno,1)){var f=p+7*_;if(p!==n&&(f-=7-n),f<l)for(var v=0;v<7&&(c.wnomask[f]=1,f+=1,c.wdaymask[f]!==t.wkst);v++);}if(p){var b=void 0;if(nj(t.byweekno,-1))b=-1;else{var y=n1(nY(e-1,1,1)),w=nz(7-y.valueOf()+t.wkst,7),x=nG(e-1)?366:365,C=void 0;w>=4?(w=0,C=x+nz(y-t.wkst,7)):C=l-p,b=Math.floor(52+nz(C,7)/4)}if(nj(t.byweekno,b))for(var f=0;f<p;f++)c.wnomask[f]=1}return c}(e,c)),nH(c.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var p=this.yearinfo,_=p.yearlen,v=p.mrange,m=p.wdaymask;this.monthinfo=function(e,t,i,s,r,n){var a={lastyear:e,lastmonth:t,nwdaymask:[]},o=[];if(n.freq===aQ.YEARLY)if(nU(n.bymonth))o=[[0,i]];else for(var l=0;l<n.bymonth.length;l++)t=n.bymonth[l],o.push(s.slice(t-1,t+1));else n.freq===aQ.MONTHLY&&(o=[s.slice(t-1,t+1)]);if(nU(o))return a;a.nwdaymask=nV(0,i);for(var l=0;l<o.length;l++)for(var d=o[l],h=d[0],u=d[1]-1,c=0;c<n.bynweekday.length;c++){var p=void 0,_=n.bynweekday[c],v=_[0],m=_[1];m<0?(p=u+(m+1)*7,p-=nz(r[p]-v,7)):(p=h+(m-1)*7,p+=nz(7-r[p]+v,7)),h<=p&&p<=u&&(a.nwdaymask[p]=1)}return a}(e,t,_,v,m,c)}nP(c.byeaster)&&(this.eastermask=(void 0===(i=c.byeaster)&&(i=0),s=e%19,r=Math.floor(e/100),n=e%100,a=Math.floor(r/4),o=Math.floor((r+8)/25),l=Math.floor((r-o+1)/3),d=Math.floor(19*s+r-a-l+15)%30,h=Math.floor(32+r%4*2+2*Math.floor(n/4)-d-n%4)%7,u=Math.floor((s+11*d+22*h)/451),[Math.ceil((Date.UTC(e,Math.floor((d+h-7*u+114)/31)-1,(d+h-7*u+114)%31+1+i)-Date.UTC(e,0,1))/864e5)]))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),e.prototype.ydayset=function(){return[nR(this.yearlen),0,this.yearlen]},e.prototype.mdayset=function(e,t){for(var i=this.mrange[t-1],s=this.mrange[t],r=nV(null,this.yearlen),n=i;n<s;n++)r[n]=n;return[r,i,s]},e.prototype.wdayset=function(e,t,i){for(var s=nV(null,this.yearlen+7),r=nQ(nY(e,t,i))-this.yearordinal,n=r,a=0;a<7&&(s[r]=r,++r,this.wdaymask[r]!==this.options.wkst);a++);return[s,n,r]},e.prototype.ddayset=function(e,t,i){var s=nV(null,this.yearlen),r=nQ(nY(e,t,i))-this.yearordinal;return s[r]=r,[s,r,r+1]},e.prototype.htimeset=function(e,t,i,s){var r=this,n=[];return this.options.byminute.forEach(function(t){n=n.concat(r.mtimeset(e,t,i,s))}),n8(n),n},e.prototype.mtimeset=function(e,t,i,s){var r=this.options.bysecond.map(function(i){return new af(e,t,i,s)});return n8(r),r},e.prototype.stimeset=function(e,t,i,s){return[new af(e,t,i,s)]},e.prototype.getdayset=function(e){switch(e){case l.YEARLY:return this.ydayset.bind(this);case l.MONTHLY:return this.mdayset.bind(this);case l.WEEKLY:return this.wdayset.bind(this);case l.DAILY:default:return this.ddayset.bind(this)}},e.prototype.gettimeset=function(e){switch(e){case l.HOURLY:return this.htimeset.bind(this);case l.MINUTELY:return this.mtimeset.bind(this);case l.SECONDLY:return this.stimeset.bind(this)}},e}();function aq(e,t){var i=t.dtstart,s=t.freq,r=t.interval,n=t.until,a=t.bysetpos,o=t.count;if(0===o||0===r)return aK(e);var l=ag.fromDate(i),d=new aY(t);d.rebuild(l.year,l.month);for(var h=function(e,t,i){var s=i.freq,r=i.byhour,n=i.byminute,a=i.bysecond;if(a_(s)){var o=i.dtstart.getTime()%1e3;if(!a_(i.freq))return[];var l=[];return i.byhour.forEach(function(e){i.byminute.forEach(function(t){i.bysecond.forEach(function(i){l.push(new af(e,t,i,o))})})}),l}return s>=aQ.HOURLY&&nH(r)&&!nj(r,t.hour)||s>=aQ.MINUTELY&&nH(n)&&!nj(n,t.minute)||s>=aQ.SECONDLY&&nH(a)&&!nj(a,t.second)?[]:e.gettimeset(s)(t.hour,t.minute,t.second,t.millisecond)}(d,l,t);;){var u=d.getdayset(s)(l.year,l.month,l.day),c=u[0],p=u[1],_=u[2],v=function(e,t,i,s,r){for(var n=!1,a=t;a<i;a++){var o=e[a];(n=function(e,t,i){var s=i.bymonth,r=i.byweekno,n=i.byweekday,a=i.byeaster,o=i.bymonthday,l=i.bynmonthday,d=i.byyearday;return nH(s)&&!nj(s,e.mmask[t])||nH(r)&&!e.wnomask[t]||nH(n)&&!nj(n,e.wdaymask[t])||nH(e.nwdaymask)&&!e.nwdaymask[t]||null!==a&&!nj(e.eastermask,t)||(nH(o)||nH(l))&&!nj(o,e.mdaymask[t])&&!nj(l,e.nmdaymask[t])||nH(d)&&(t<e.yearlen&&!nj(d,t+1)&&!nj(d,-e.yearlen+t)||t>=e.yearlen&&!nj(d,t+1-e.yearlen)&&!nj(d,-e.nextyearlen+t-e.yearlen))}(s,o,r))&&(e[o]=null)}return n}(c,p,_,d,t);if(nH(a))for(var m=function(e,t,i,s,r,n){for(var a=[],o=0;o<e.length;o++){var l=void 0,d=void 0,h=e[o];h<0?(l=Math.floor(h/t.length),d=nz(h,t.length)):(l=Math.floor((h-1)/t.length),d=nz(h-1,t.length));for(var u=[],c=i;c<s;c++){var p=n[c];nP(p)&&u.push(p)}var _=void 0;_=l<0?u.slice(l)[0]:u[l];var v=t[d],m=n3(nJ(r.yearordinal+_),v);nj(a,m)||a.push(m)}return n8(a),a}(a,h,p,_,d,c),f=0;f<m.length;f++){var g=m[f];if(n&&g>n)return aK(e);if(g>=i){var b=aW(g,t);if(!e.accept(b)||o&&!--o)return aK(e)}}else for(var f=p;f<_;f++){var y=c[f];if(nP(y))for(var w=nJ(d.yearordinal+y),x=0;x<h.length;x++){var g=n3(w,h[x]);if(n&&g>n)return aK(e);if(g>=i){var b=aW(g,t);if(!e.accept(b)||o&&!--o)return aK(e)}}}if(0===t.interval||(l.add(t,v),l.year>9999))return aK(e);a_(s)||(h=d.gettimeset(s)(l.hour,l.minute,l.second,0)),d.rebuild(l.year,l.month)}}function aW(e,t){return new aE(e,t.tzid).rezonedDate()}function aK(e){return e.getValue()}var aG={MO:new nO(0),TU:new nO(1),WE:new nO(2),TH:new nO(3),FR:new nO(4),SA:new nO(5),SU:new nO(6)},aX={freq:l.YEARLY,dtstart:null,interval:1,wkst:aG.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},aZ=Object.keys(aX),aQ=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this._cache=t?null:new aT,this.origOptions=ab(e);var i=function(e){var t=ar(ar({},aX),ab(e));if(nP(t.byeaster)&&(t.freq=aQ.YEARLY),!(nP(t.freq)&&aQ.FREQUENCIES[t.freq]))throw Error("Invalid frequency: ".concat(t.freq," ").concat(e.freq));if(t.dtstart||(t.dtstart=new Date(new Date().setMilliseconds(0))),nP(t.wkst)?n$(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=aQ.MO.weekday,nP(t.bysetpos)){n$(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var i=0;i<t.bysetpos.length;i++){var s=t.bysetpos[i];if(0===s||!(s>=-366&&s<=366))throw Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(t.byweekno||nH(t.byweekno)||nH(t.byyearday)||t.bymonthday||nH(t.bymonthday)||nP(t.byweekday)||nP(t.byeaster)))switch(t.freq){case aQ.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case aQ.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case aQ.WEEKLY:t.byweekday=[n1(t.dtstart)]}if(nP(t.bymonth)&&!nM(t.bymonth)&&(t.bymonth=[t.bymonth]),nP(t.byyearday)&&!nM(t.byyearday)&&n$(t.byyearday)&&(t.byyearday=[t.byyearday]),nP(t.bymonthday))if(nM(t.bymonthday)){for(var r=[],n=[],i=0;i<t.bymonthday.length;i++){var s=t.bymonthday[i];s>0?r.push(s):s<0&&n.push(s)}t.bymonthday=r,t.bynmonthday=n}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);else t.bymonthday=[],t.bynmonthday=[];if(nP(t.byweekno)&&!nM(t.byweekno)&&(t.byweekno=[t.byweekno]),nP(t.byweekday))if(n$(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(nL(t.byweekday))t.byweekday=[nO.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof nO)!t.byweekday.n||t.freq>aQ.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{for(var a=[],o=[],i=0;i<t.byweekday.length;i++){var l=t.byweekday[i];if(n$(l)){a.push(l);continue}if(nL(l)){a.push(nO.fromStr(l).weekday);continue}!l.n||t.freq>aQ.MONTHLY?a.push(l.weekday):o.push([l.weekday,l.n])}t.byweekday=nH(a)?a:null,t.bynweekday=nH(o)?o:null}else t.bynweekday=null;return nP(t.byhour)?n$(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<aQ.HOURLY?[t.dtstart.getUTCHours()]:null,nP(t.byminute)?n$(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<aQ.MINUTELY?[t.dtstart.getUTCMinutes()]:null,nP(t.bysecond)?n$(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<aQ.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}(e).parsedOptions;this.options=i}return e.parseText=function(e,t){return ap(e,t)},e.fromText=function(e,t){var i;return void 0===(i=t)&&(i=ao),new aQ(ap(e,i)||void 0)},e.fromString=function(t){return new e(e.parseString(t)||void 0)},e.prototype._iter=function(e){return aq(e,this.options)},e.prototype._cacheGet=function(e,t){return!!this._cache&&this._cache._cacheGet(e,t)},e.prototype._cacheAdd=function(e,t,i){if(this._cache)return this._cache._cacheAdd(e,t,i)},e.prototype.all=function(e){if(e)return this._iter(new aa("all",{},e));var t=this._cacheGet("all");return!1===t&&(t=this._iter(new at("all",{})),this._cacheAdd("all",t)),t},e.prototype.between=function(e,t,i,s){if(void 0===i&&(i=!1),!nZ(e)||!nZ(t))throw Error("Invalid date passed in to RRule.between");var r={before:t,after:e,inc:i};if(s)return this._iter(new aa("between",r,s));var n=this._cacheGet("between",r);return!1===n&&(n=this._iter(new at("between",r)),this._cacheAdd("between",n,r)),n},e.prototype.before=function(e,t){if(void 0===t&&(t=!1),!nZ(e))throw Error("Invalid date passed in to RRule.before");var i={dt:e,inc:t},s=this._cacheGet("before",i);return!1===s&&(s=this._iter(new at("before",i)),this._cacheAdd("before",s,i)),s},e.prototype.after=function(e,t){if(void 0===t&&(t=!1),!nZ(e))throw Error("Invalid date passed in to RRule.after");var i={dt:e,inc:t},s=this._cacheGet("after",i);return!1===s&&(s=this._iter(new at("after",i)),this._cacheAdd("after",s,i)),s},e.prototype.count=function(){return this.all().length},e.prototype.toString=function(){return aI(this.origOptions)},e.prototype.toText=function(e,t,i){return new au(this,e,t,i).toString()},e.prototype.isFullyConvertibleToText=function(){return am(this)},e.prototype.clone=function(){return new e(this.origOptions)},e.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],e.YEARLY=l.YEARLY,e.MONTHLY=l.MONTHLY,e.WEEKLY=l.WEEKLY,e.DAILY=l.DAILY,e.HOURLY=l.HOURLY,e.MINUTELY=l.MINUTELY,e.SECONDLY=l.SECONDLY,e.MO=aG.MO,e.TU=aG.TU,e.WE=aG.WE,e.TH=aG.TH,e.FR=aG.FR,e.SA=aG.SA,e.SU=aG.SU,e.parseString=ay,e.optionsToString=aI,e}(),aJ={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function a0(e,t){return void 0===t&&(t={}),function(e,t){var i,s,r,n,a,o,l,d=(i=[],s=[],r=[],n=[],o=(a=aw(e)).dtstart,l=a.tzid,(function(e,t){if(void 0===t&&(t=!1),!(e=e&&e.trim()))throw Error("Invalid empty string");if(!t)return e.split(/\s/);for(var i=e.split("\n"),s=0;s<i.length;){var r=i[s]=i[s].replace(/\s+$/g,"");r?s>0&&" "===r[0]?(i[s-1]+=r.slice(1),i.splice(s,1)):s+=1:i.splice(s,1)}return i})(e,t.unfold).forEach(function(e){if(e){var t,a=function(e){var t=function(e){if(-1===e.indexOf(":"))return{name:"RRULE",value:e};var t=nB(e,":",1);return{name:t[0],value:t[1]}}(e),i=t.name,s=t.value,r=i.split(";");if(!r)throw Error("empty property name");return{name:r[0].toUpperCase(),parms:r.slice(1),value:s}}(e),o=a.name,d=a.parms,h=a.value;switch(o.toUpperCase()){case"RRULE":if(d.length)throw Error("unsupported RRULE parm: ".concat(d.join(",")));i.push(ay(e));break;case"RDATE":var u=(null!=(t=/RDATE(?:;TZID=([^:=]+))?/i.exec(e))?t:[])[1];u&&!l&&(l=u),s=s.concat(a2(h,d));break;case"EXRULE":if(d.length)throw Error("unsupported EXRULE parm: ".concat(d.join(",")));r.push(ay(h));break;case"EXDATE":n=n.concat(a2(h,d));break;case"DTSTART":break;default:throw Error("unsupported property: "+o)}}}),{dtstart:o,tzid:l,rrulevals:i,rdatevals:s,exrulevals:r,exdatevals:n}),h=d.rrulevals,u=d.rdatevals,c=d.exrulevals,p=d.exdatevals,_=d.dtstart,v=d.tzid,m=!1===t.cache;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||h.length>1||u.length||c.length||p.length){var f=new a5(m);return f.dtstart(_),f.tzid(v||void 0),h.forEach(function(e){f.rrule(new aQ(a1(e,_,v),m))}),u.forEach(function(e){f.rdate(e)}),c.forEach(function(e){f.exrule(new aQ(a1(e,_,v),m))}),p.forEach(function(e){f.exdate(e)}),t.compatible&&t.dtstart&&f.rdate(_),f}var g=h[0]||{};return new aQ(a1(g,g.dtstart||t.dtstart||_,g.tzid||t.tzid||v),m)}(e,function(e){var t=[],i=Object.keys(e),s=Object.keys(aJ);if(i.forEach(function(e){nj(s,e)||t.push(e)}),t.length)throw Error("Invalid options: "+t.join(", "));return ar(ar({},aJ),e)}(t))}function a1(e,t,i){return ar(ar({},e),{dtstart:t,tzid:i})}function a2(e,t){return t.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw Error("unsupported RDATE/EXDATE parm: "+e)}),e.split(",").map(function(e){return n7(e)})}function a3(e){var t=this;return function(i){if(void 0!==i&&(t["_".concat(e)]=i),void 0!==t["_".concat(e)])return t["_".concat(e)];for(var s=0;s<t._rrule.length;s++){var r=t._rrule[s].origOptions[e];if(r)return r}}}var a5=function(e){function t(t){void 0===t&&(t=!1);var i=e.call(this,{},t)||this;return i.dtstart=a3.apply(i,["dtstart"]),i.tzid=a3.apply(i,["tzid"]),i._rrule=[],i._rdate=[],i._exrule=[],i._exdate=[],i}return as(t,e),t.prototype._iter=function(e){return function(e,t,i,s,r,n){var a={},o=e.accept;function l(e,t){i.forEach(function(i){i.between(e,t,!0).forEach(function(e){a[Number(e)]=!0})})}r.forEach(function(e){a[Number(new aE(e,n).rezonedDate())]=!0}),e.accept=function(e){var t=Number(e);return isNaN(t)?o.call(this,e):!!a[t]||(l(new Date(t-1),new Date(t+1)),!!a[t])||(a[t]=!0,o.call(this,e))},"between"===e.method&&(l(e.args.after,e.args.before),e.accept=function(e){var t=Number(e);return!!a[t]||(a[t]=!0,o.call(this,e))});for(var d=0;d<s.length;d++){var h=new aE(s[d],n).rezonedDate();if(!e.accept(new Date(h.getTime())))break}t.forEach(function(t){aq(e,t.options)});var u=e._result;switch(n8(u),e.method){case"all":case"between":return u;case"before":return u.length&&u[u.length-1]||null;default:return u.length&&u[0]||null}}(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){a4(e,this._rrule)},t.prototype.exrule=function(e){a4(e,this._exrule)},t.prototype.rdate=function(e){a8(e,this._rdate)},t.prototype.exdate=function(e){a8(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(e){return a0(e.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(e){return a0(e.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(e){return new Date(e.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(e){return new Date(e.getTime())})},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(aI({dtstart:this._dtstart}))),this._rrule.forEach(function(t){e=e.concat(t.toString().split("\n"))}),this._exrule.forEach(function(t){e=e.concat(t.toString().split("\n").map(function(e){return e.replace(/^RRULE:/,"EXRULE:")}).filter(function(e){return!/^DTSTART/.test(e)}))}),this._rdate.length&&e.push(a6("RDATE",this._rdate,this.tzid())),this._exdate.length&&e.push(a6("EXDATE",this._exdate,this.tzid())),e},t.prototype.toString=function(){return this.valueOf().join("\n")},t.prototype.clone=function(){var e=new t(!!this._cache);return this._rrule.forEach(function(t){return e.rrule(t.clone())}),this._exrule.forEach(function(t){return e.exrule(t.clone())}),this._rdate.forEach(function(t){return e.rdate(new Date(t.getTime()))}),this._exdate.forEach(function(t){return e.exdate(new Date(t.getTime()))}),e},t}(aQ);function a4(e,t){if(!(e instanceof aQ))throw TypeError(String(e)+" is not RRule instance");nj(t.map(String),String(e))||t.push(e)}function a8(e,t){if(!(e instanceof Date))throw TypeError(String(e)+" is not Date instance");nj(t.map(Number),Number(e))||(t.push(e),n8(t))}function a6(e,t,i){var s=!i||"UTC"===i.toUpperCase(),r=s?"".concat(e,":"):"".concat(e,";TZID=").concat(i,":"),n=t.map(function(e){return n6(e.valueOf(),s)}).join(",");return"".concat(r).concat(n)}let a7={YEARLY:"rrule.frequency.YEARLY",MONTHLY:"rrule.frequency.MONTHLY",WEEKLY:"rrule.frequency.WEEKLY",DAILY:"rrule.frequency.DAILY",HOURLY:"rrule.frequency.HOURLY",MINUTELY:"rrule.frequency.MINUTELY",SECONDLY:"rrule.frequency.SECONDLY"},a9=["bymonth","byweekno","byyearday","bymonthday","byweekday","byhour","byminute","bysecond"],oe={SECONDLY:["byweekno"],MINUTELY:["byweekno"],HOURLY:["byweekno"],DAILY:["byweekno","byyearday"],WEEKLY:["byweekno","byyearday","bymonthday"],MONTHLY:["byweekno","byyearday"],YEARLY:[]},ot=["bymonth","byweekno","byyearday","byhour","byminute","bysecond"],oi={SECONDLY:["bymonthday","byweekday",...ot,...oe.SECONDLY],MINUTELY:["bymonthday","byweekday",...ot,...oe.MINUTELY],HOURLY:["bymonthday","byweekday",...ot,...oe.HOURLY],DAILY:["bymonthday","byweekday",...ot,...oe.DAILY],WEEKLY:["bymonthday",...ot,...oe.WEEKLY],MONTHLY:["byweekday",...ot,...oe.MONTHLY],YEARLY:["bymonthday","byweekday",...ot,...oe.YEARLY]},os={MO:"monday",TU:"tuesday",WE:"wednesday",TH:"thursday",FR:"friday",SA:"saturday",SU:"sunday"},or={1:"january",2:"february",3:"march",4:"april",5:"may",6:"june",7:"july",8:"august",9:"september",10:"october",11:"november",12:"december"};(r=d||(d={})).default="default",r.period="period",r.recurrence="recurrence";let on={never:"never",until:"schedule.ends.until",count:"schedule.ends.count"};var oa=a(416),oo=a.n(oa),ol=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};function od(e,t){return Array.from({length:t-e+1},(t,i)=>e+i)}let oh=od(-53,53).filter(Boolean),ou=od(-366,366).filter(Boolean),oc=od(-31,31).filter(Boolean),op=od(1,24),o_=od(1,60);class ov extends CustomEvent{constructor(e){super(ov.NAME,{detail:{value:e},bubbles:!0,composed:!0})}}ov.NAME="or-scheduler-changed";class om extends CustomEvent{constructor(){super(om.NAME,{bubbles:!0,composed:!0})}}om.NAME="or-scheduler-removed";let of=class extends(0,h.translate)(h.i18next)(ek){constructor(){super(...arguments),this.defaultEventTypeLabel="default",this.disableNegativeByPartValues=!1,this.disabledFrequencies=[],this.disabledRRuleParts=[],this.disabledByPartCombinations=oe,this.header="scheduleActivity",this.isAllDay=!0,this.open=!1,this.removable=!1,this.schedule=this.defaultSchedule,this.timezoneOffset=0,this._count=1,this._ends="never",this._eventType=d.default,this._until=oo()().toDate()}get _scheduleWithOffset(){return this._applyTimezoneOffset(this.schedule,this.timezoneOffset)}set _scheduleWithOffset(e){this.schedule=this._applyTimezoneOffset(e,-this.timezoneOffset)}get _timeLabel(){if(this._eventType===d.default)return en`<or-translate value="${this.defaultEventTypeLabel}" .options="${this._getDefaultMessageOptions()}"></or-translate>`;if(this._scheduleWithOffset){let e=this._scheduleWithOffset;if(e.recurrence){let t=oo()(e.end).diff(e.start,"days"),i={start:oo()(e.start).format("HH:mm"),end:oo()(e.end).format("HH:mm")},s=en``;this.isAllDay&&t>0?s=en`<or-translate value="forDays" .options="${{days:t,count:t}}"></or-translate>`:t>0?s=en`<or-translate value="fromToDays" .options="${Object.assign(Object.assign({},i),{days:t,count:t})}"></or-translate>`:0===t&&(s=en`<or-translate value="fromTo" .options="${i}"></or-translate>`);let r=en`<span>&nbsp;${s}</span>`,n=Object.values(or).map(h.i18next.t),a=Object.values(os).map(h.i18next.t),o=[a.pop(),...a],l=this._rrule.toText(e=>h.i18next.t(`rrule.${e}`),{dayNames:o,monthNames:n,tokens:{}});return en`<span class="time-label"><span>${l}</span>${r}</span>`}let t=this.isAllDay?"DD-MM-YYYY":"DD-MM-YYYY HH:mm";return en`<or-translate value="activeFromTo" .options="${{start:oo()(e.start).format(t),end:oo()(e.end).format(t)}}"></or-translate>`}}connectedCallback(){var e,t,i;super.connectedCallback();let s=this._applyTimezoneOffset(null!=(e=this.schedule)?e:this.defaultSchedule,this.timezoneOffset);if((null==s?void 0:s.start)&&(null==s?void 0:s.start)){let e=oo()(null==s?void 0:s.start),t=oo()(null==s?void 0:s.end);this.isAllDay=e.isSame(e.clone().startOf("day"))&&t.isSame(t.clone().endOf("day"))}if(null==(t=this.schedule)?void 0:t.recurrence){let e=aQ.fromString(this.schedule.recurrence).origOptions;e.until?this._until=oo()(e.until).toDate():e.count&&(this._count=e.count)}!this.schedule||nS.Util.objectsEqual(this.schedule,this.defaultSchedule)?this._eventType=d.default:this._eventType=(null==(i=this.schedule)?void 0:i.recurrence)?d.recurrence:d.period}shouldUpdate(e){var t,i,s,r,n,a,o;return this.schedule&&!this.schedule.end&&(null==(t=this.defaultSchedule)?void 0:t.end)&&(this.schedule=Object.assign(Object.assign({},this.schedule),{end:this.defaultSchedule.end})),e.has("schedule")&&((null==(i=this._scheduleWithOffset)?void 0:i.recurrence)?this._rrule=aQ.fromString(this._scheduleWithOffset.recurrence):this._eventType===d.default&&(null==(s=this.defaultSchedule)?void 0:s.recurrence)&&(this._rrule=aQ.fromString(this.defaultSchedule.recurrence))),e.has("_rrule")&&this._rrule&&(this._byRRuleParts=a9.filter(e=>{var t;return!(null==(t=this.disabledByPartCombinations[l[this._rrule.options.freq]])?void 0:t.includes(e))}).filter(e=>!this.disabledRRuleParts.includes(e)),this._ends=(null==(n=null==(r=this._rrule)?void 0:r.origOptions)?void 0:n.until)&&"until"||(null==(o=null==(a=this._rrule)?void 0:a.origOptions)?void 0:o.count)&&"count"||"never"),super.shouldUpdate(e)}_setAllDay(){let e=this._scheduleWithOffset;if(this.isAllDay&&this._eventType!==d.default){let t=oo()(null==e?void 0:e.start).startOf("day").valueOf(),i=oo()(null==e?void 0:e.end).endOf("day").valueOf();this._scheduleWithOffset=Object.assign(Object.assign({},e),{start:t,end:i})}}_getRRule(e=this._rrule){var t,i,s;return null==(s=null==(i=null==(t=null==e?void 0:e.toString())?void 0:t.split("RRULE:"))?void 0:i[1])?void 0:s.replace(/(UNTIL=\d+T\d+)Z/,"$1")}_setRRuleValue(e,t){var i;let s=null==(i=this._rrule)?void 0:i.origOptions,r=this._scheduleWithOffset;if("interval"===t||"freq"===t||t.startsWith("by"))if("byweekday"===t)s.byweekday=e.map(e=>aQ[e]);else if("freq"===t){for(let e of a9)delete s[e];s[t]=e}else s[t]=e;else if("start"===t&&s){let[t,i,n]=e.split("-").map(Number);s.dtstart=oo()(r.start).set({year:t,month:i-1,date:n}).toDate(),r.start=s.dtstart.getTime()}else if("end"===t){let[t,i,s]=e.split("-").map(Number);r.end=oo()(r.end).set({year:t,month:i-1,date:s}).toDate().getTime()}else if("start-time"===t){let[t,i]=e.split(":");s?s.dtstart=oo()(r.start).set({hour:t,minute:i,second:0,millisecond:0}).toDate():s=new aQ({dtstart:oo()(r.start).set({hour:t,minute:i,second:0,millisecond:0}).toDate()}).origOptions,r.start=oo()(s.dtstart).toDate().getTime()}else if("end-time"===t){let[t,i]=e.split(":");r.end=oo()(r.end).set({hour:t,minute:i,second:0,millisecond:0}).toDate().getTime()}else switch(t){case"all-day":this.isAllDay=e;break;case"recurrence-ends":"until"===e?(s.until=this._until,delete s.count):("count"===e?s.count=this._count:delete s.count,delete s.until),this._ends=e;break;case"until":this._until=new Date(e),s.until=this._until;break;case"count":this._count=e,s.count=this._count}this._eventType===d.recurrence?(this._rrule=new aQ(s),this._scheduleWithOffset=Object.assign(Object.assign({},r),{recurrence:this._getRRule()})):this._scheduleWithOffset=Object.assign({},r)}_setCalendarEventType(e){var t,i,s,r,n,a,o,l,h,u;let c=e.target.value;this._eventType=c;let p=oo()().startOf("day");if(c===d.default){this.schedule={start:null!=(i=null==(t=this.defaultSchedule)?void 0:t.start)?i:p.valueOf()-this.timezoneOffset,end:null!=(r=null==(s=this.defaultSchedule)?void 0:s.end)?r:p.endOf("day").valueOf()-this.timezoneOffset};let e=null==(n=this.defaultSchedule)?void 0:n.recurrence;this._rrule=e?aQ.fromString(e):void 0;return}let _={start:null!=(o=null==(a=this._scheduleWithOffset)?void 0:a.start)?o:p.valueOf(),end:null!=(h=null==(l=this._scheduleWithOffset)?void 0:l.end)?h:p.endOf("day").valueOf()};c===d.period?this._scheduleWithOffset=_:this._scheduleWithOffset=Object.assign(Object.assign({},_),{recurrence:null!=(u=this._getRRule())?u:"FREQ=DAILY"})}_applyTimezoneOffset(e,t){if(e){let{start:i,end:s,recurrence:r}=Object.assign({},e);if(r&&aQ.fromString(r).origOptions.until){let e=aQ.fromString(r).origOptions;e.until=new Date(Number(e.until)+t),r=this._getRRule(new aQ(e))}return{start:null!=i?i+t:i,end:null!=s?s+t:s,recurrence:r}}}_getDefaultMessageOptions(){var e,t;return{date:oo().utc(null==(e=this.defaultSchedule)?void 0:e.start).format("YYYY-MM-DD"),time:oo().utc(null==(t=this.defaultSchedule)?void 0:t.start).format("HH:mm")}}render(){return en`
2713
2762
  <or-vaadin-button style="max-width: 100%" @click="${()=>this._dialog.open()}">${this._timeLabel}</or-vaadin-button>
2714
2763
  <or-vaadin-dialog id="scheduler" header-title="${h.i18next.t(this.header)}" ?opened="${this.open}" @closed="${this._onClose}"
2715
- ${rV(this._getDialogHeader,[])}
2716
- ${rR(this._getDialogContent,[this.defaultSchedule,this.defaultEventTypeLabel,this.disabledFrequencies,this.disabledRRuleParts,this.header,this.isAllDay,this.schedule,this.timezoneOffset,this._count,this._ends,this._rrule])}
2717
- ${rN(this._getDialogFooter,[])}
2764
+ ${rB(this._getDialogHeader,[])}
2765
+ ${rN(this._getDialogContent,[this.defaultSchedule,this.defaultEventTypeLabel,this.disabledFrequencies,this.disabledRRuleParts,this.header,this.isAllDay,this.schedule,this.timezoneOffset,this._count,this._ends,this._rrule])}
2766
+ ${rz(this._getDialogFooter,[])}
2718
2767
  ></or-vaadin-dialog>
2719
2768
  `}_getDialogHeader(){return en`
2720
2769
  <vaadin-button theme="tertiary" @click="${this._onClose}">
@@ -2784,21 +2833,21 @@
2784
2833
  <label class="title"><or-translate value="schedule.type"></or-translate></label>
2785
2834
  <or-vaadin-select style="flex: 1" .value="${this._eventType}" .items="${e}" @change="${this._setCalendarEventType}"></or-vaadin-select>
2786
2835
  </div>
2787
- ${nE(this._eventType!==d.default,()=>this._getPeriodTemplate())}
2788
- ${nE(this._eventType===d.recurrence,()=>this._getRepeatTemplate())}
2789
- ${nE(this._eventType===d.recurrence,()=>this._getEndsTemplate())}
2836
+ ${nD(this._eventType!==d.default,()=>this._getPeriodTemplate())}
2837
+ ${nD(this._eventType===d.recurrence,()=>this._getRepeatTemplate())}
2838
+ ${nD(this._eventType===d.recurrence,()=>this._getEndsTemplate())}
2790
2839
  </div>`}_getDialogFooter(){return en`
2791
- ${nE(this.removable,()=>en`
2840
+ ${nD(this.removable,()=>en`
2792
2841
  <or-vaadin-button style="background-color: unset; margin-right: auto" theme="error" @click="${this._onDelete}">
2793
2842
  <or-icon icon="or:trash" style="--or-icon-fill: white"></or-icon>
2794
2843
  <or-translate value="schedule.delete"></or-translate>
2795
2844
  </or-vaadin-button>`)}
2796
2845
  <or-vaadin-button theme="primary" @click="${this._onSave}"><or-translate value="schedule.save"></or-translate></or-vaadin-button>
2797
- `}_onClose(){this._dialog.close()}_onDelete(){this._dialog.close(),this.dispatchEvent(new op)}_onSave(){var e;this._setAllDay(),this.dispatchEvent(new oc(null!=(e=this.schedule)?e:this.defaultSchedule)),this._dialog.close()}_onPartChange(e,t,i){return s=>{if("detail"===t){nT.Util.objectsEqual(s.detail.value,i,!0)||this._setRRuleValue(s.detail.value,e);return}this._setRRuleValue(s.target[t],e)}}_isAllowedFrequency(e){return"SECONDLY"!==e&&!this.disabledFrequencies.includes(e)}_getRepeatTemplate(){var e,t,i,s,r;let a=null!=(t=null==(e=this._rrule)?void 0:e.origOptions.interval)?t:1,o=null!=(s=null==(i=this._rrule)?void 0:i.origOptions.freq)?s:l.DAILY,d=Object.entries(a4).map(([e,t])=>({value:String(l[e]),label:h.i18next.t(t,{count:a})})).filter(({value:e})=>this._isAllowedFrequency(l[e]));return en`
2846
+ `}_onClose(){this._dialog.close()}_onDelete(){this._dialog.close(),this.dispatchEvent(new om)}_onSave(){var e;this._setAllDay(),this.dispatchEvent(new ov(null!=(e=this.schedule)?e:this.defaultSchedule)),this._dialog.close()}_onPartChange(e,t,i){return s=>{if("detail"===t){nS.Util.objectsEqual(s.detail.value,i,!0)||this._setRRuleValue(s.detail.value,e);return}this._setRRuleValue(s.target[t],e)}}_isAllowedFrequency(e){return"SECONDLY"!==e&&!this.disabledFrequencies.includes(e)}_getRepeatTemplate(){var e,t,i,s,r;let a=null!=(t=null==(e=this._rrule)?void 0:e.origOptions.interval)?t:1,o=null!=(s=null==(i=this._rrule)?void 0:i.origOptions.freq)?s:l.DAILY,d=Object.entries(a7).map(([e,t])=>({value:String(l[e]),label:h.i18next.t(t,{count:a})})).filter(({value:e})=>this._isAllowedFrequency(l[e]));return en`
2798
2847
  <div id="recurrence" class="section">
2799
2848
  <label class="title"><or-translate value="schedule.repeat"></or-translate></label>
2800
2849
  <div style="display: flex; gap: 8px">
2801
- ${nE(!(null==(r=this.disabledRRuleParts)?void 0:r.includes("interval")),()=>en`
2850
+ ${nD(!(null==(r=this.disabledRRuleParts)?void 0:r.includes("interval")),()=>en`
2802
2851
  <or-vaadin-number-field min="1" max="9" step-buttons-visible style="width: 106px" .value="${a}"
2803
2852
  @change="${this._onPartChange("interval","value")}">
2804
2853
  </or-vaadin-number-field>
@@ -2807,19 +2856,19 @@
2807
2856
  @change="${this._onPartChange("freq","value")}">
2808
2857
  </or-vaadin-select>
2809
2858
  </div>
2810
- ${nE(a8.some(e=>{var t;return null==(t=this._byRRuleParts)?void 0:t.includes(e)}),()=>en`
2859
+ ${nD(a9.some(e=>{var t;return null==(t=this._byRRuleParts)?void 0:t.includes(e)}),()=>en`
2811
2860
  <label class="title" style="margin-top: var(--lumo-space-l)"><or-translate value="schedule.repeatOn"></or-translate></label>
2812
- <div>${this._getByRulePart("bymonth",n.CHECKBOX_LIST,Object.entries(ot))}</div>
2861
+ <div>${this._getByRulePart("bymonth",n.CHECKBOX_LIST,Object.entries(or))}</div>
2813
2862
  <div>
2814
- ${this._getByRulePart("byweekno",n.SELECT,oo)}
2815
- ${this._getByRulePart("byyearday",n.SELECT,ol)}
2816
- ${this._getByRulePart("bymonthday",n.SELECT,od)}
2863
+ ${this._getByRulePart("byweekno",n.SELECT,oh)}
2864
+ ${this._getByRulePart("byyearday",n.SELECT,ou)}
2865
+ ${this._getByRulePart("bymonthday",n.SELECT,oc)}
2817
2866
  </div>
2818
- <div>${this._getByRulePart("byweekday",n.CHECKBOX_LIST,Object.entries(oe))}</div>
2867
+ <div>${this._getByRulePart("byweekday",n.CHECKBOX_LIST,Object.entries(os))}</div>
2819
2868
  <div>
2820
- ${this._getByRulePart("byhour",n.SELECT,oh)}
2821
- ${this._getByRulePart("byminute",n.SELECT,ou)}
2822
- ${this._getByRulePart("bysecond",n.SELECT,ou)}
2869
+ ${this._getByRulePart("byhour",n.SELECT,op)}
2870
+ ${this._getByRulePart("byminute",n.SELECT,o_)}
2871
+ ${this._getByRulePart("bysecond",n.SELECT,o_)}
2823
2872
  </div>
2824
2873
  `)}
2825
2874
  </div>`}_getByRulePart(e,t,i){var s,r,a,o;if(!(null==(s=this._byRRuleParts)?void 0:s.includes(e)))return;let l=null!=(o=null==(a=null==(r=this._rrule)?void 0:r.origOptions)?void 0:a[e])?o:[],d="byweekday"===e?null==l?void 0:l.map(String):Array.isArray(l)?l:[l];return t===n.CHECKBOX_LIST?en`
@@ -2836,21 +2885,21 @@
2836
2885
  <label class="title"><or-translate value="period"></or-translate></label>
2837
2886
  <div style="display: flex; gap: 8px">
2838
2887
  <div class="period">
2839
- <or-vaadin-date-picker style="text-transform: capitalize" ?combined="${!this.isAllDay}" .value="${or()(e.start).format("YYYY-MM-DD")}"
2840
- @change="${this._onPartChange("start","value")}" label="${h.i18next.t("from")}" .max="${or()(e.end).format("YYYY-MM-DD")}">
2888
+ <or-vaadin-date-picker style="text-transform: capitalize" ?combined="${!this.isAllDay}" .value="${oo()(e.start).format("YYYY-MM-DD")}"
2889
+ @change="${this._onPartChange("start","value")}" label="${h.i18next.t("from")}" .max="${oo()(e.end).format("YYYY-MM-DD")}">
2841
2890
  </or-vaadin-date-picker>
2842
- <or-vaadin-time-picker style="margin-top: auto" ?hidden=${this.isAllDay} .value="${or()(e.start).format("HH:mm")}"
2891
+ <or-vaadin-time-picker style="margin-top: auto" ?hidden=${this.isAllDay} .value="${oo()(e.start).format("HH:mm")}"
2843
2892
  @change="${this._onPartChange("start-time","value")}"
2844
- .max="${or()(e.end).isSameOrBefore(or()(e.start),"day")&&or()(e.end).format("HH:mm")}">
2893
+ .max="${oo()(e.end).isSameOrBefore(oo()(e.start),"day")&&oo()(e.end).format("HH:mm")}">
2845
2894
  </or-vaadin-time-picker>
2846
2895
  </div>
2847
2896
  <div class="period">
2848
- <or-vaadin-date-picker style="text-transform: capitalize" ?combined="${!this.isAllDay}" .value="${or()(e.end).format("YYYY-MM-DD")}"
2849
- @change="${this._onPartChange("end","value")}" label="${h.i18next.t("to")}" .min="${or()(e.start).format("YYYY-MM-DD")}">
2897
+ <or-vaadin-date-picker style="text-transform: capitalize" ?combined="${!this.isAllDay}" .value="${oo()(e.end).format("YYYY-MM-DD")}"
2898
+ @change="${this._onPartChange("end","value")}" label="${h.i18next.t("to")}" .min="${oo()(e.start).format("YYYY-MM-DD")}">
2850
2899
  </or-vaadin-date-picker>
2851
- <or-vaadin-time-picker style="margin-top: auto" ?hidden=${this.isAllDay} .value="${or()(e.end).format("HH:mm")}"
2900
+ <or-vaadin-time-picker style="margin-top: auto" ?hidden=${this.isAllDay} .value="${oo()(e.end).format("HH:mm")}"
2852
2901
  @change="${this._onPartChange("end-time","value")}"
2853
- .min="${or()(e.end).isSameOrBefore(or()(e.start),"day")&&or()(e.start).format("HH:mm")}">
2902
+ .min="${oo()(e.end).isSameOrBefore(oo()(e.start),"day")&&oo()(e.start).format("HH:mm")}">
2854
2903
  </or-vaadin-time-picker>
2855
2904
  </div>
2856
2905
  </div>
@@ -2861,17 +2910,17 @@
2861
2910
  <div style="display: flex; gap: 8px;">
2862
2911
  <or-vaadin-radio-group style="padding-right: 10px; width: unset" .value="${this._ends}" theme="vertical"
2863
2912
  @change="${this._onPartChange("recurrence-ends","value")}">
2864
- ${Object.entries(oi).filter(([e])=>{var t;return!(null==(t=this.disabledRRuleParts)?void 0:t.includes(e))}).map(([e,t])=>en`
2913
+ ${Object.entries(on).filter(([e])=>{var t;return!(null==(t=this.disabledRRuleParts)?void 0:t.includes(e))}).map(([e,t])=>en`
2865
2914
  <vaadin-radio-button style="margin: 6px 0" value="${e}" label="${h.i18next.t(t)}"></vaadin-radio-button>
2866
2915
  `)}
2867
2916
  </or-vaadin-radio-group>
2868
2917
  <div style="display: flex; flex-direction: column; flex: 1; ">
2869
- ${nE(!this.disabledRRuleParts.includes("until"),()=>en`
2918
+ ${nD(!this.disabledRRuleParts.includes("until"),()=>en`
2870
2919
  <or-vaadin-date-time-picker style="margin-top: auto; padding: var(--lumo-space-s) 0" ?disabled="${"until"!==this._ends}"
2871
- .value="${or()(this._until).format("YYYY-MM-DDTHH:mm")}"
2920
+ .value="${oo()(this._until).format("YYYY-MM-DDTHH:mm")}"
2872
2921
  @change="${this._onPartChange("until","value")}">
2873
2922
  </or-vaadin-date-time-picker>`)}
2874
- ${nE(!this.disabledRRuleParts.includes("count"),()=>en`<div style="display: inline-flex">
2923
+ ${nD(!this.disabledRRuleParts.includes("count"),()=>en`<div style="display: inline-flex">
2875
2924
  <or-vaadin-number-field ?disabled="${"count"!==this._ends}" min="1" style="width: 120px"
2876
2925
  step-buttons-visible
2877
2926
  .value="${this._count}"
@@ -2882,7 +2931,7 @@
2882
2931
  </div>`)}
2883
2932
  </div>
2884
2933
  </div>
2885
- </div>`}};o_.styles=g`
2934
+ </div>`}};of.styles=g`
2886
2935
  .time-label {
2887
2936
  display: flex;
2888
2937
  &>:first-child {
@@ -2893,5 +2942,5 @@
2893
2942
  &::first-letter { text-transform: uppercase; }
2894
2943
  }
2895
2944
  }
2896
- `,on([R({type:Object})],o_.prototype,"defaultSchedule",void 0),on([R({type:String})],o_.prototype,"defaultEventTypeLabel",void 0),on([R({type:Boolean})],o_.prototype,"disableNegativeByPartValues",void 0),on([R({type:Array})],o_.prototype,"disabledFrequencies",void 0),on([R({type:Array})],o_.prototype,"disabledRRuleParts",void 0),on([R({type:Object})],o_.prototype,"disabledByPartCombinations",void 0),on([R({type:String})],o_.prototype,"header",void 0),on([R({type:Boolean})],o_.prototype,"isAllDay",void 0),on([R({type:Boolean})],o_.prototype,"open",void 0),on([R({type:Boolean})],o_.prototype,"removable",void 0),on([R({type:Object})],o_.prototype,"schedule",void 0),on([R({type:Number})],o_.prototype,"timezoneOffset",void 0),on([V()],o_.prototype,"_count",void 0),on([V()],o_.prototype,"_ends",void 0),on([V()],o_.prototype,"_eventType",void 0),on([V()],o_.prototype,"_rrule",void 0),on([(e,t,i)=>{let s,r,n;return s=e,r=t,(n={get(){let e;return e=this,e.renderRoot?.querySelector("#scheduler")??null}}).configurable=!0,n.enumerable=!0,Reflect.decorate&&"object"!=typeof r&&Object.defineProperty(s,r,n),n}],o_.prototype,"_dialog",void 0),o_=on([u("or-scheduler")],o_)})(),o})());
2945
+ `,ol([R({type:Object})],of.prototype,"defaultSchedule",void 0),ol([R({type:String})],of.prototype,"defaultEventTypeLabel",void 0),ol([R({type:Boolean})],of.prototype,"disableNegativeByPartValues",void 0),ol([R({type:Array})],of.prototype,"disabledFrequencies",void 0),ol([R({type:Array})],of.prototype,"disabledRRuleParts",void 0),ol([R({type:Object})],of.prototype,"disabledByPartCombinations",void 0),ol([R({type:String})],of.prototype,"header",void 0),ol([R({type:Boolean})],of.prototype,"isAllDay",void 0),ol([R({type:Boolean})],of.prototype,"open",void 0),ol([R({type:Boolean})],of.prototype,"removable",void 0),ol([R({type:Object})],of.prototype,"schedule",void 0),ol([R({type:Number})],of.prototype,"timezoneOffset",void 0),ol([V()],of.prototype,"_count",void 0),ol([V()],of.prototype,"_ends",void 0),ol([V()],of.prototype,"_eventType",void 0),ol([V()],of.prototype,"_rrule",void 0),ol([(e,t,i)=>{let s,r,n;return s=e,r=t,(n={get(){let e;return e=this,e.renderRoot?.querySelector("#scheduler")??null}}).configurable=!0,n.enumerable=!0,Reflect.decorate&&"object"!=typeof r&&Object.defineProperty(s,r,n),n}],of.prototype,"_dialog",void 0),of=ol([u("or-scheduler")],of)})(),o})());
2897
2946
  //# sourceMappingURL=index.js.map