@everymatrix/lottery-game-page 1.55.0 → 1.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/cjs/helper-accordion_14.cjs.entry.js +19183 -19410
  2. package/dist/cjs/{index-a240c449.js → index-c77bea42.js} +180 -76
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/lottery-game-page.cjs.js +3 -3
  5. package/dist/collection/collection-manifest.json +1 -1
  6. package/dist/collection/components/lottery-game-page/lottery-game-page.js +52 -32
  7. package/dist/esm/helper-accordion_14.entry.js +19183 -19410
  8. package/dist/esm/{index-ad071e63.js → index-13ed46b6.js} +180 -76
  9. package/dist/esm/loader.js +3 -3
  10. package/dist/esm/lottery-game-page.js +4 -4
  11. package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
  12. package/dist/lottery-game-page/p-07f9838b.js +2 -0
  13. package/dist/lottery-game-page/p-f348243b.entry.js +3901 -0
  14. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.d.ts +2 -0
  15. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.dev.d.ts +2 -0
  16. package/package.json +1 -1
  17. package/dist/lottery-game-page/p-5465eaee.entry.js +0 -4970
  18. package/dist/lottery-game-page/p-ed51a70f.js +0 -2
  19. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.d.ts +0 -2
  20. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.dev.d.ts +0 -2
  21. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/tools/plugins/index.d.ts +0 -0
  22. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  23. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  24. /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -0,0 +1,3901 @@
1
+ import{r as t,c as e,h as i,g as s,a as r}from"./p-07f9838b.js";const o=["ro","en","hr"],a={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}},n=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){this.showContent=!this.collapsed}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])a[e][i]=t[e][i]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{key:"2db19795aa22479f038d9fc7c936cf7403efa43e",class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{key:"6804e27dbd68e4f4182ab07beb665c53b54069b6",class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},i("p",{key:"d1293990d39da1f50d36dff28e1abbe53259356b",class:"Title"},this.headerTitle),i("p",{key:"7632e3ddda5dea8e91d8a3935ff46c0f357c4397",class:"Subtitle"},this.headerSubtitle),i("p",{key:"1ab0dd4cc2625ef20c858738ee290e922e37dd21",class:"Subtitle Description"},this.description),i("span",{key:"3c7e3d3092aa97d24f62383e17a8a91646a78058",class:"Expand"},this.showContent?"<":">")),this.showContent&&i("div",{key:"ba970b8947e1986aedbdfd37b044e05f2b1c29fc"},i("div",{key:"7cfc0ca2b99d76d7647569f7105c29d1be8cf994",class:"Content"},i("slot",{key:"a2d866a914d33eac26b3b7e138e611be9f942c65",name:"accordionContent"}),this.footer&&this.showContent&&i("div",{key:"c44d54e98f712c921e7dd16faaaaa7cfb92e17c4"},this.deleteTab&&i("span",{key:"8c46aa94fcce959f370d07da69bd58509c143373",class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return a[void 0!==t&&o.includes(t)?t:"en"].deleteTicket})())))))}};n.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:var(--emw--color-background, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-background-secondary, #00ABA4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-gray-50, #F1F1F1);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00ABA4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--button-text-color, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--button-border-color, #009993);padding:10px 15px;user-select:none;color:var(--emw--button-text-color, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ActionButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}';const l=["ro","en","hr"],h={en:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ro:{filterOpen:"Filtrare",filterClear:"Stergere",filterModalTicketTitle:"Rezultatele biletelor",filterModalDrawTitle:"Rezultatele draw-urilor",filterTicketPlaceholder:"Cauta ID bilet",filterDrawPlaceholder:"Cauta ID draw",filterModalButton:"Cauta",filterOrDate:"sau cauta dupa data"},fr:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ar:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},hr:{filterOpen:"Filter",filterClear:"Očisti",filterModalTicketTitle:"Rezultati listića",filterModalDrawTitle:"Povijest rezultata Izvlačenja",filterTicketPlaceholder:"Pretraga ID listića",filterDrawPlaceholder:"Pretraga ID izvlačenja",filterModalButton:"Traži",filterFromCalendar:"Od",filterToCalendar:"Do",filterOrDate:"ili tražite po datumu"}},c=(t,e)=>{const i=e;return h[void 0!==i&&l.includes(i)?i:"en"][t]};
2
+ /**
3
+ * @license
4
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
5
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6
+ */
7
+ window.Vaadin||={},window.Vaadin.featureFlags||={};const d={};function u(t,e="24.6.5"){if(Object.defineProperty(t,"version",{get:()=>e}),t.experimental){const e="string"==typeof t.experimental?t.experimental:`${i=t.is.split("-").slice(1).join("-"),i.replace(/-[a-z]/gu,(t=>t[1].toUpperCase()))}Component`;if(!window.Vaadin.featureFlags[e]&&!d[e])return d[e]=new Set,d[e].add(t),void Object.defineProperty(window.Vaadin.featureFlags,e,{get:()=>0===d[e].size,set(t){t&&d[e].size>0&&(d[e].forEach((t=>{customElements.define(t.is,t)})),d[e].clear())}});if(d[e])return void d[e].add(t)}var i;const s=customElements.get(t.is);if(s){const e=s.version;e&&t.version&&e===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${s.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
8
+ /**
9
+ * @license
10
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
11
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
12
+ */class p extends HTMLElement{static get is(){return"vaadin-lumo-styles"}}u(p);
13
+ /**
14
+ * @license
15
+ * Copyright 2019 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */
18
+ const m=globalThis,f=m.ShadowRoot&&(void 0===m.ShadyCSS||m.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,b=Symbol(),g=new WeakMap;class v{constructor(t,e,i){if(this._$cssResult$=!0,i!==b)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(f&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=g.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&g.set(e,t))}return t}toString(){return this.cssText}}const y=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new v(i,t,b)},w=(t,e)=>{if(f)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=m.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}},x=f?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new v("string"==typeof t?t:t+"",void 0,b))(e)})(t):t
19
+ /**
20
+ * @license
21
+ * Copyright 2017 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */,{is:k,defineProperty:_,getOwnPropertyDescriptor:C,getOwnPropertyNames:A,getOwnPropertySymbols:D,getPrototypeOf:S}=Object,T=globalThis,z=T.trustedTypes,B=z?z.emptyScript:"",N=T.reactiveElementPolyfillSupport,I={toAttribute(t,e){switch(e){case Boolean:t=t?B:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},P=(t,e)=>!k(t,e),M={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:P};Symbol.metadata??=Symbol("metadata"),T.litPropertyMetadata??=new WeakMap;class O extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=M){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&_(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:r}=C(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return s?.call(this)},set(e){const o=s?.call(this);r.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??M}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=S(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...A(t),...D(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(x(t))}else void 0!==t&&e.push(x(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return w(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:I).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:I;this._$Em=s,this[s]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??P)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}O.elementStyles=[],O.shadowRootOptions={mode:"open"},O.elementProperties=new Map,O.finalized=new Map,N?.({ReactiveElement:O}),(T.reactiveElementVersions??=[]).push("2.0.4");
24
+ /**
25
+ * @license
26
+ * Copyright 2017 Google LLC
27
+ * SPDX-License-Identifier: BSD-3-Clause
28
+ */
29
+ const F=globalThis,E=F.trustedTypes,R=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,j="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+L,W=`<${H}>`,G=document,$=()=>G.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,V=Array.isArray,q="[ \t\n\f\r]",Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,J=/-->/g,K=/>/g,X=RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,Q=/"/g,tt=/^(?:script|style|textarea|title)$/i,et=Symbol.for("lit-noChange"),it=Symbol.for("lit-nothing"),st=new WeakMap,rt=G.createTreeWalker(G,129);function ot(t,e){if(!V(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==R?R.createHTML(e):e}const at=(t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"<svg>":3===e?"<math>":"",a=Y;for(let e=0;e<i;e++){const i=t[e];let n,l,h=-1,c=0;for(;c<i.length&&(a.lastIndex=c,l=a.exec(i),null!==l);)c=a.lastIndex,a===Y?"!--"===l[1]?a=J:void 0!==l[1]?a=K:void 0!==l[2]?(tt.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=X):void 0!==l[3]&&(a=X):a===X?">"===l[0]?(a=r??Y,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?X:'"'===l[3]?Q:Z):a===Q||a===Z?a=X:a===J||a===K?a=Y:(a=X,r=void 0);const d=a===X&&t[e+1].startsWith("/>")?" ":"";o+=a===Y?i+W:h>=0?(s.push(n),i.slice(0,h)+j+i.slice(h)+L+d):i+L+(-2===h?e:d)}return[ot(t,o+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class nt{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const a=t.length-1,n=this.parts,[l,h]=at(t,e);if(this.el=nt.createElement(l,i),rt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=rt.nextNode())&&n.length<a;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(j)){const e=h[o++],i=s.getAttribute(t).split(L),a=/([.?@])?(.*)/.exec(e);n.push({type:1,index:r,name:a[2],strings:i,ctor:"."===a[1]?ut:"?"===a[1]?pt:"@"===a[1]?mt:dt}),s.removeAttribute(t)}else t.startsWith(L)&&(n.push({type:6,index:r}),s.removeAttribute(t));if(tt.test(s.tagName)){const t=s.textContent.split(L),e=t.length-1;if(e>0){s.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],$()),rt.nextNode(),n.push({type:2,index:++r});s.append(t[e],$())}}}else if(8===s.nodeType)if(s.data===H)n.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(L,t+1));)n.push({type:7,index:r}),t+=L.length-1}r++}}static createElement(t,e){const i=G.createElement("template");return i.innerHTML=t,i}}function lt(t,e,i=t,s){if(e===et)return e;let r=void 0!==s?i._$Co?.[s]:i._$Cl;const o=U(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),void 0===o?r=void 0:(r=new o(t),r._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=r:i._$Cl=r),void 0!==r&&(e=lt(t,r._$AS(t,e.values),r,s)),e}class ht{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??G).importNode(e,!0);rt.currentNode=s;let r=rt.nextNode(),o=0,a=0,n=i[0];for(;void 0!==n;){if(o===n.index){let e;2===n.type?e=new ct(r,r.nextSibling,this,t):1===n.type?e=new n.ctor(r,n.name,n.strings,this,t):6===n.type&&(e=new ft(r,this,t)),this._$AV.push(e),n=i[++a]}o!==n?.index&&(r=rt.nextNode(),o++)}return rt.currentNode=G,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ct{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=it,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=lt(this,t,e),U(t)?t===it||null==t||""===t?(this._$AH!==it&&this._$AR(),this._$AH=it):t!==this._$AH&&t!==et&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>V(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==it&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(G.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=nt.createElement(ot(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new ht(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new nt(t)),e}k(t){V(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const r of t)s===e.length?e.push(i=new ct(this.O($()),this.O($()),this,this.options)):i=e[s],i._$AI(r),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class dt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,r){this.type=1,this._$AH=it,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=it}_$AI(t,e=this,i,s){const r=this.strings;let o=!1;if(void 0===r)t=lt(this,t,e,0),o=!U(t)||t!==this._$AH&&t!==et,o&&(this._$AH=t);else{const s=t;let a,n;for(t=r[0],a=0;a<r.length-1;a++)n=lt(this,s[i+a],e,a),n===et&&(n=this._$AH[a]),o||=!U(n)||n!==this._$AH[a],n===it?t=it:t!==it&&(t+=(n??"")+r[a+1]),this._$AH[a]=n}o&&!s&&this.j(t)}j(t){t===it?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class ut extends dt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===it?void 0:t}}class pt extends dt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==it)}}class mt extends dt{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){if((t=lt(this,t,e,0)??it)===et)return;const i=this._$AH,s=t===it&&i!==it||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==it&&(i===it||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ft{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){lt(this,t)}}const bt=F.litHtmlPolyfillSupport;bt?.(nt,ct),(F.litHtmlVersions??=[]).push("3.2.1");
30
+ /**
31
+ * @license
32
+ * Copyright 2017 Google LLC
33
+ * SPDX-License-Identifier: BSD-3-Clause
34
+ */
35
+ class gt extends O{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let r=s._$litPart$;if(void 0===r){const t=i?.renderBefore??null;s._$litPart$=r=new ct(e.insertBefore($(),t),t,void 0,i??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return et}}gt._$litElement$=!0,gt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:gt});const vt=globalThis.litElementPolyfillSupport;vt?.({LitElement:gt}),(globalThis.litElementVersions??=[]).push("4.1.1");
36
+ /**
37
+ * @license
38
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
39
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
40
+ */
41
+ const yt=t=>class extends t{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"theme"===t&&this._set_theme(i)}}
42
+ /**
43
+ * @license
44
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
45
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
46
+ */,wt=[],xt=new Set,kt=new Set;function _t(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Ct(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function At(t){return t.map((t=>t.cssText)).join("\n")}const Dt="vaadin-themable-mixin-style";function St(t){t.prototype instanceof gt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Dt).textContent=At(t.getStylesForThis()),kt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&St(i)}))}function Tt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof v||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):wt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&kt.forEach((i=>{if(Ct(t,i)&&function(t){return _t(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),St(t),function(t){xt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof gt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),w(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Dt).textContent=e.prototype._template.content.getElementById(Dt).textContent}(i):i||xt.delete(e)}))}(t)}}))}function zt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():wt}function Bt(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Nt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=zt().find((e=>e.moduleId===t));i?e.push(...Nt(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function It(t){const e=`${t}-default-theme`,i=zt().filter((i=>i.moduleId!==e&&Ct(i.themeFor,t))).map((t=>({...t,styles:[...Nt(t),...t.styles],includePriority:Bt(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:zt().filter((t=>t.moduleId===e))}const Pt=t=>class extends(yt(t)){constructor(){super(),xt.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&kt.add(this.is),this.elementStyles)return;const t=this.prototype._template;t&&!_t(this)&&function(t,e){const i=document.createElement("style");i.id=Dt,i.textContent=At(t),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...[t].flat(1/0),...e]:e}static getStylesForThis(){const e=t.__themes||[],i=Object.getPrototypeOf(this.prototype);this.__themes=[...e,...(i?i.constructor.__themes:[])||[],...It(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
47
+ /**
48
+ * @license
49
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
50
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
51
+ */,Mt=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};Mt("sizing-props",y`
52
+ :host {
53
+ --lumo-size-xs: 1.625rem;
54
+ --lumo-size-s: 1.875rem;
55
+ --lumo-size-m: 2.25rem;
56
+ --lumo-size-l: 2.75rem;
57
+ --lumo-size-xl: 3.5rem;
58
+
59
+ /* Icons */
60
+ --lumo-icon-size-s: 1.25em;
61
+ --lumo-icon-size-m: 1.5em;
62
+ --lumo-icon-size-l: 2.25em;
63
+ /* For backwards compatibility */
64
+ --lumo-icon-size: var(--lumo-icon-size-m);
65
+ }
66
+ `),Mt("spacing-props",y`
67
+ :host {
68
+ /* Square */
69
+ --lumo-space-xs: 0.25rem;
70
+ --lumo-space-s: 0.5rem;
71
+ --lumo-space-m: 1rem;
72
+ --lumo-space-l: 1.5rem;
73
+ --lumo-space-xl: 2.5rem;
74
+
75
+ /* Wide */
76
+ --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
77
+ --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
78
+ --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
79
+ --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
80
+ --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
81
+
82
+ /* Tall */
83
+ --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
84
+ --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
85
+ --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
86
+ --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
87
+ --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
88
+ }
89
+ `),y`
90
+ html {
91
+ /* Button */
92
+ --vaadin-button-background: var(--lumo-contrast-5pct);
93
+ --vaadin-button-border: none;
94
+ --vaadin-button-border-radius: var(--lumo-border-radius-m);
95
+ --vaadin-button-font-size: var(--lumo-font-size-m);
96
+ --vaadin-button-font-weight: 500;
97
+ --vaadin-button-height: var(--lumo-size-m);
98
+ --vaadin-button-margin: var(--lumo-space-xs) 0;
99
+ --vaadin-button-min-width: calc(var(--vaadin-button-height) * 2);
100
+ --vaadin-button-padding: 0 calc(var(--vaadin-button-height) / 3 + var(--lumo-border-radius-m) / 2);
101
+ --vaadin-button-text-color: var(--lumo-primary-text-color);
102
+ --vaadin-button-primary-background: var(--lumo-primary-color);
103
+ --vaadin-button-primary-border: none;
104
+ --vaadin-button-primary-font-weight: 600;
105
+ --vaadin-button-primary-text-color: var(--lumo-primary-contrast-color);
106
+ --vaadin-button-tertiary-background: transparent !important;
107
+ --vaadin-button-tertiary-text-color: var(--lumo-primary-text-color);
108
+ --vaadin-button-tertiary-font-weight: 500;
109
+ --vaadin-button-tertiary-padding: 0 calc(var(--vaadin-button-height) / 6);
110
+ /* Checkbox */
111
+ --vaadin-checkbox-background: var(--lumo-contrast-20pct);
112
+ --vaadin-checkbox-background-hover: var(--lumo-contrast-30pct);
113
+ --vaadin-checkbox-border-radius: var(--lumo-border-radius-s);
114
+ --vaadin-checkbox-checkmark-char: var(--lumo-icons-checkmark);
115
+ --vaadin-checkbox-checkmark-char-indeterminate: '';
116
+ --vaadin-checkbox-checkmark-color: var(--lumo-primary-contrast-color);
117
+ --vaadin-checkbox-checkmark-size: calc(var(--vaadin-checkbox-size) + 2px);
118
+ --vaadin-checkbox-label-color: var(--lumo-body-text-color);
119
+ --vaadin-checkbox-label-font-size: var(--lumo-font-size-m);
120
+ --vaadin-checkbox-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs);
121
+ --vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
122
+ --vaadin-checkbox-disabled-checkmark-color: var(--lumo-contrast-30pct);
123
+ --vaadin-checkbox-disabled-background: var(--lumo-contrast-10pct);
124
+ /* Radio button */
125
+ --vaadin-radio-button-background: var(--lumo-contrast-20pct);
126
+ --vaadin-radio-button-background-hover: var(--lumo-contrast-30pct);
127
+ --vaadin-radio-button-dot-color: var(--lumo-primary-contrast-color);
128
+ --vaadin-radio-button-dot-size: 3px;
129
+ --vaadin-radio-button-label-color: var(--lumo-body-text-color);
130
+ --vaadin-radio-button-label-font-size: var(--lumo-font-size-m);
131
+ --vaadin-radio-button-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs)
132
+ var(--lumo-space-xs);
133
+ --vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
134
+ --vaadin-radio-button-disabled-background: var(--lumo-contrast-10pct);
135
+ --vaadin-radio-button-disabled-dot-color: var(--lumo-contrast-30pct);
136
+ --vaadin-selection-color: var(--lumo-primary-color);
137
+ --vaadin-selection-color-text: var(--lumo-primary-text-color);
138
+ --vaadin-input-field-border-radius: var(--lumo-border-radius-m);
139
+ --vaadin-focus-ring-color: var(--lumo-primary-color-50pct);
140
+ --vaadin-focus-ring-width: 2px;
141
+ /* Label */
142
+ --vaadin-input-field-label-color: var(--lumo-secondary-text-color);
143
+ --vaadin-input-field-focused-label-color: var(--lumo-primary-text-color);
144
+ --vaadin-input-field-hovered-label-color: var(--lumo-body-text-color);
145
+ --vaadin-input-field-label-font-size: var(--lumo-font-size-s);
146
+ --vaadin-input-field-label-font-weight: 500;
147
+ /* Helper */
148
+ --vaadin-input-field-helper-color: var(--lumo-secondary-text-color);
149
+ --vaadin-input-field-helper-font-size: var(--lumo-font-size-xs);
150
+ --vaadin-input-field-helper-font-weight: 400;
151
+ --vaadin-input-field-helper-spacing: 0.4em;
152
+ /* Error message */
153
+ --vaadin-input-field-error-color: var(--lumo-error-text-color);
154
+ --vaadin-input-field-error-font-size: var(--lumo-font-size-xs);
155
+ --vaadin-input-field-error-font-weight: 400;
156
+ /* Input field */
157
+ --vaadin-input-field-background: var(--lumo-contrast-10pct);
158
+ --vaadin-input-field-icon-color: var(--lumo-contrast-60pct);
159
+ --vaadin-input-field-icon-size: var(--lumo-icon-size-m);
160
+ --vaadin-input-field-invalid-background: var(--lumo-error-color-10pct);
161
+ --vaadin-input-field-invalid-hover-highlight: var(--lumo-error-color-50pct);
162
+ --vaadin-input-field-disabled-background: var(--lumo-contrast-5pct);
163
+ --vaadin-input-field-disabled-value-color: var(--lumo-disabled-text-color);
164
+ --vaadin-input-field-height: var(--lumo-size-m);
165
+ --vaadin-input-field-hover-highlight: var(--lumo-contrast-50pct);
166
+ --vaadin-input-field-placeholder-color: var(--lumo-secondary-text-color);
167
+ --vaadin-input-field-readonly-border: 1px dashed var(--lumo-contrast-30pct);
168
+ --vaadin-input-field-value-color: var(--lumo-body-text-color);
169
+ --vaadin-input-field-value-font-size: var(--lumo-font-size-m);
170
+ --vaadin-input-field-value-font-weight: 500;
171
+ }
172
+ `,Mt("style-props",y`
173
+ :host {
174
+ /* Border radius */
175
+ --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
176
+ --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
177
+ --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
178
+
179
+ /* Shadow */
180
+ --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
181
+ --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
182
+ --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
183
+ --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
184
+ --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
185
+
186
+ /* Clickable element cursor */
187
+ --lumo-clickable-cursor: default;
188
+ }
189
+ `),Mt("color-props",y`
190
+ :host {
191
+ /* Base (background) */
192
+ --lumo-base-color: #fff;
193
+
194
+ /* Tint */
195
+ --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
196
+ --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
197
+ --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
198
+ --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
199
+ --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
200
+ --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
201
+ --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
202
+ --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
203
+ --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
204
+ --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
205
+ --lumo-tint: #fff;
206
+
207
+ /* Shade */
208
+ --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
209
+ --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
210
+ --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
211
+ --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
212
+ --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
213
+ --lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
214
+ --lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
215
+ --lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
216
+ --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
217
+ --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
218
+ --lumo-shade: hsl(214, 35%, 15%);
219
+
220
+ /* Contrast */
221
+ --lumo-contrast-5pct: var(--lumo-shade-5pct);
222
+ --lumo-contrast-10pct: var(--lumo-shade-10pct);
223
+ --lumo-contrast-20pct: var(--lumo-shade-20pct);
224
+ --lumo-contrast-30pct: var(--lumo-shade-30pct);
225
+ --lumo-contrast-40pct: var(--lumo-shade-40pct);
226
+ --lumo-contrast-50pct: var(--lumo-shade-50pct);
227
+ --lumo-contrast-60pct: var(--lumo-shade-60pct);
228
+ --lumo-contrast-70pct: var(--lumo-shade-70pct);
229
+ --lumo-contrast-80pct: var(--lumo-shade-80pct);
230
+ --lumo-contrast-90pct: var(--lumo-shade-90pct);
231
+ --lumo-contrast: var(--lumo-shade);
232
+
233
+ /* Text */
234
+ --lumo-header-text-color: var(--lumo-contrast);
235
+ --lumo-body-text-color: var(--lumo-contrast-90pct);
236
+ --lumo-secondary-text-color: var(--lumo-contrast-70pct);
237
+ --lumo-tertiary-text-color: var(--lumo-contrast-50pct);
238
+ --lumo-disabled-text-color: var(--lumo-contrast-30pct);
239
+
240
+ /* Primary */
241
+ --lumo-primary-color: hsl(214, 100%, 48%);
242
+ --lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
243
+ --lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
244
+ --lumo-primary-text-color: hsl(214, 100%, 43%);
245
+ --lumo-primary-contrast-color: #fff;
246
+
247
+ /* Error */
248
+ --lumo-error-color: hsl(3, 85%, 48%);
249
+ --lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
250
+ --lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
251
+ --lumo-error-text-color: hsl(3, 89%, 42%);
252
+ --lumo-error-contrast-color: #fff;
253
+
254
+ /* Success */
255
+ --lumo-success-color: hsl(145, 72%, 30%);
256
+ --lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
257
+ --lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
258
+ --lumo-success-text-color: hsl(145, 85%, 25%);
259
+ --lumo-success-contrast-color: #fff;
260
+
261
+ /* Warning */
262
+ --lumo-warning-color: hsl(48, 100%, 50%);
263
+ --lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
264
+ --lumo-warning-text-color: hsl(32, 100%, 30%);
265
+ --lumo-warning-contrast-color: var(--lumo-shade-90pct);
266
+ }
267
+
268
+ /* forced-colors mode adjustments */
269
+ @media (forced-colors: active) {
270
+ html {
271
+ --lumo-disabled-text-color: GrayText;
272
+ }
273
+ }
274
+ `),Tt("",y`
275
+ [theme~='dark'] {
276
+ /* Base (background) */
277
+ --lumo-base-color: hsl(214, 35%, 21%);
278
+
279
+ /* Tint */
280
+ --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
281
+ --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
282
+ --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
283
+ --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
284
+ --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
285
+ --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
286
+ --lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
287
+ --lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
288
+ --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
289
+ --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
290
+ --lumo-tint: hsl(214, 100%, 98%);
291
+
292
+ /* Shade */
293
+ --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
294
+ --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
295
+ --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
296
+ --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
297
+ --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
298
+ --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
299
+ --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
300
+ --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
301
+ --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
302
+ --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
303
+ --lumo-shade: hsl(214, 33%, 13%);
304
+
305
+ /* Contrast */
306
+ --lumo-contrast-5pct: var(--lumo-tint-5pct);
307
+ --lumo-contrast-10pct: var(--lumo-tint-10pct);
308
+ --lumo-contrast-20pct: var(--lumo-tint-20pct);
309
+ --lumo-contrast-30pct: var(--lumo-tint-30pct);
310
+ --lumo-contrast-40pct: var(--lumo-tint-40pct);
311
+ --lumo-contrast-50pct: var(--lumo-tint-50pct);
312
+ --lumo-contrast-60pct: var(--lumo-tint-60pct);
313
+ --lumo-contrast-70pct: var(--lumo-tint-70pct);
314
+ --lumo-contrast-80pct: var(--lumo-tint-80pct);
315
+ --lumo-contrast-90pct: var(--lumo-tint-90pct);
316
+ --lumo-contrast: var(--lumo-tint);
317
+
318
+ /* Text */
319
+ --lumo-header-text-color: var(--lumo-contrast);
320
+ --lumo-body-text-color: var(--lumo-contrast-90pct);
321
+ --lumo-secondary-text-color: var(--lumo-contrast-70pct);
322
+ --lumo-tertiary-text-color: var(--lumo-contrast-50pct);
323
+ --lumo-disabled-text-color: var(--lumo-contrast-30pct);
324
+
325
+ /* Primary */
326
+ --lumo-primary-color: hsl(214, 90%, 48%);
327
+ --lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
328
+ --lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
329
+ --lumo-primary-text-color: hsl(214, 90%, 77%);
330
+ --lumo-primary-contrast-color: #fff;
331
+
332
+ /* Error */
333
+ --lumo-error-color: hsl(3, 79%, 49%);
334
+ --lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
335
+ --lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
336
+ --lumo-error-text-color: hsl(3, 100%, 80%);
337
+
338
+ /* Success */
339
+ --lumo-success-color: hsl(145, 72%, 30%);
340
+ --lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
341
+ --lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
342
+ --lumo-success-text-color: hsl(145, 85%, 46%);
343
+
344
+ /* Warning */
345
+ --lumo-warning-color: hsl(43, 100%, 48%);
346
+ --lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
347
+ --lumo-warning-text-color: hsl(45, 100%, 60%);
348
+ --lumo-warning-contrast-color: var(--lumo-shade-90pct);
349
+ }
350
+
351
+ html {
352
+ color: var(--lumo-body-text-color);
353
+ background-color: var(--lumo-base-color);
354
+ color-scheme: light;
355
+ }
356
+
357
+ [theme~='dark'] {
358
+ color: var(--lumo-body-text-color);
359
+ background-color: var(--lumo-base-color);
360
+ color-scheme: dark;
361
+ }
362
+
363
+ h1,
364
+ h2,
365
+ h3,
366
+ h4,
367
+ h5,
368
+ h6 {
369
+ color: var(--lumo-header-text-color);
370
+ }
371
+
372
+ a:where(:any-link) {
373
+ color: var(--lumo-primary-text-color);
374
+ }
375
+
376
+ a:not(:any-link) {
377
+ color: var(--lumo-disabled-text-color);
378
+ }
379
+
380
+ blockquote {
381
+ color: var(--lumo-secondary-text-color);
382
+ }
383
+
384
+ code,
385
+ pre {
386
+ background-color: var(--lumo-contrast-10pct);
387
+ border-radius: var(--lumo-border-radius-m);
388
+ }
389
+ pre code {
390
+ background: transparent;
391
+ }
392
+ `,{moduleId:"lumo-color"});
393
+ /**
394
+ * @license
395
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
396
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
397
+ */
398
+ const Ot=y`
399
+ :host {
400
+ /* prettier-ignore */
401
+ --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
402
+
403
+ /* Font sizes */
404
+ --lumo-font-size-xxs: 0.75rem;
405
+ --lumo-font-size-xs: 0.8125rem;
406
+ --lumo-font-size-s: 0.875rem;
407
+ --lumo-font-size-m: 1rem;
408
+ --lumo-font-size-l: 1.125rem;
409
+ --lumo-font-size-xl: 1.375rem;
410
+ --lumo-font-size-xxl: 1.75rem;
411
+ --lumo-font-size-xxxl: 2.5rem;
412
+
413
+ /* Line heights */
414
+ --lumo-line-height-xs: 1.25;
415
+ --lumo-line-height-s: 1.375;
416
+ --lumo-line-height-m: 1.625;
417
+ }
418
+ `;Tt("",y`
419
+ body,
420
+ :host {
421
+ font-family: var(--lumo-font-family);
422
+ font-size: var(--lumo-font-size-m);
423
+ line-height: var(--lumo-line-height-m);
424
+ -webkit-text-size-adjust: 100%;
425
+ -webkit-font-smoothing: antialiased;
426
+ -moz-osx-font-smoothing: grayscale;
427
+ }
428
+
429
+ small,
430
+ [theme~='font-size-s'] {
431
+ font-size: var(--lumo-font-size-s);
432
+ line-height: var(--lumo-line-height-s);
433
+ }
434
+
435
+ [theme~='font-size-xs'] {
436
+ font-size: var(--lumo-font-size-xs);
437
+ line-height: var(--lumo-line-height-xs);
438
+ }
439
+
440
+ :where(h1, h2, h3, h4, h5, h6) {
441
+ font-weight: 600;
442
+ line-height: var(--lumo-line-height-xs);
443
+ margin-block: 0;
444
+ }
445
+
446
+ :where(h1) {
447
+ font-size: var(--lumo-font-size-xxxl);
448
+ }
449
+
450
+ :where(h2) {
451
+ font-size: var(--lumo-font-size-xxl);
452
+ }
453
+
454
+ :where(h3) {
455
+ font-size: var(--lumo-font-size-xl);
456
+ }
457
+
458
+ :where(h4) {
459
+ font-size: var(--lumo-font-size-l);
460
+ }
461
+
462
+ :where(h5) {
463
+ font-size: var(--lumo-font-size-m);
464
+ }
465
+
466
+ :where(h6) {
467
+ font-size: var(--lumo-font-size-xs);
468
+ text-transform: uppercase;
469
+ letter-spacing: 0.03em;
470
+ }
471
+
472
+ p,
473
+ blockquote {
474
+ margin-top: 0.5em;
475
+ margin-bottom: 0.75em;
476
+ }
477
+
478
+ a {
479
+ text-decoration: none;
480
+ }
481
+
482
+ a:where(:any-link):hover {
483
+ text-decoration: underline;
484
+ }
485
+
486
+ hr {
487
+ display: block;
488
+ align-self: stretch;
489
+ height: 1px;
490
+ border: 0;
491
+ padding: 0;
492
+ margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
493
+ background-color: var(--lumo-contrast-10pct);
494
+ }
495
+
496
+ blockquote {
497
+ border-left: 2px solid var(--lumo-contrast-30pct);
498
+ }
499
+
500
+ b,
501
+ strong {
502
+ font-weight: 600;
503
+ }
504
+
505
+ /* RTL specific styles */
506
+ blockquote[dir='rtl'] {
507
+ border-left: none;
508
+ border-right: 2px solid var(--lumo-contrast-30pct);
509
+ }
510
+ `,{moduleId:"lumo-typography"}),Mt("typography-props",Ot);
511
+ /**
512
+ * @license
513
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
514
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
515
+ */
516
+ const Ft=y`
517
+ :host {
518
+ top: var(--lumo-space-m);
519
+ right: var(--lumo-space-m);
520
+ bottom: var(--lumo-space-m);
521
+ left: var(--lumo-space-m);
522
+ /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
523
+ /* stylelint-disable-next-line */
524
+ outline: 0px solid transparent;
525
+ }
526
+
527
+ [part='overlay'] {
528
+ background-color: var(--lumo-base-color);
529
+ background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
530
+ border-radius: var(--lumo-border-radius-m);
531
+ box-shadow:
532
+ 0 0 0 1px var(--lumo-shade-5pct),
533
+ var(--lumo-box-shadow-m);
534
+ color: var(--lumo-body-text-color);
535
+ font-family: var(--lumo-font-family);
536
+ font-size: var(--lumo-font-size-m);
537
+ font-weight: 400;
538
+ line-height: var(--lumo-line-height-m);
539
+ letter-spacing: 0;
540
+ text-transform: none;
541
+ -webkit-text-size-adjust: 100%;
542
+ -webkit-font-smoothing: antialiased;
543
+ -moz-osx-font-smoothing: grayscale;
544
+ }
545
+
546
+ [part='content'] {
547
+ padding: var(--lumo-space-xs);
548
+ }
549
+
550
+ [part='backdrop'] {
551
+ background-color: var(--lumo-shade-20pct);
552
+ animation: 0.2s lumo-overlay-backdrop-enter both;
553
+ will-change: opacity;
554
+ }
555
+
556
+ @keyframes lumo-overlay-backdrop-enter {
557
+ 0% {
558
+ opacity: 0;
559
+ }
560
+ }
561
+
562
+ :host([closing]) [part='backdrop'] {
563
+ animation: 0.2s lumo-overlay-backdrop-exit both;
564
+ }
565
+
566
+ @keyframes lumo-overlay-backdrop-exit {
567
+ 100% {
568
+ opacity: 0;
569
+ }
570
+ }
571
+
572
+ @keyframes lumo-overlay-dummy-animation {
573
+ 0% {
574
+ opacity: 1;
575
+ }
576
+
577
+ 100% {
578
+ opacity: 1;
579
+ }
580
+ }
581
+ `;Tt("",Ft,{moduleId:"lumo-overlay"});
582
+ /**
583
+ * @license
584
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
585
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
586
+ */
587
+ const Et=y`
588
+ :host([opening]),
589
+ :host([closing]) {
590
+ animation: 0.14s lumo-overlay-dummy-animation;
591
+ }
592
+
593
+ [part='overlay'] {
594
+ will-change: opacity, transform;
595
+ }
596
+
597
+ :host([opening]) [part='overlay'] {
598
+ animation: 0.1s lumo-menu-overlay-enter ease-out both;
599
+ }
600
+
601
+ @keyframes lumo-menu-overlay-enter {
602
+ 0% {
603
+ opacity: 0;
604
+ transform: translateY(-4px);
605
+ }
606
+ }
607
+
608
+ :host([closing]) [part='overlay'] {
609
+ animation: 0.1s lumo-menu-overlay-exit both;
610
+ }
611
+
612
+ @keyframes lumo-menu-overlay-exit {
613
+ 100% {
614
+ opacity: 0;
615
+ }
616
+ }
617
+ `;Tt("",Et,{moduleId:"lumo-menu-overlay-core"});const Rt=[Ft,Et,y`
618
+ /* Small viewport (bottom sheet) styles */
619
+ /* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
620
+ @media (max-width: 450px), (max-height: 450px) {
621
+ :host {
622
+ top: 0 !important;
623
+ right: 0 !important;
624
+ bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
625
+ left: 0 !important;
626
+ align-items: stretch !important;
627
+ justify-content: flex-end !important;
628
+ }
629
+
630
+ [part='overlay'] {
631
+ max-height: 50vh;
632
+ width: 100vw;
633
+ border-radius: 0;
634
+ box-shadow: var(--lumo-box-shadow-xl);
635
+ }
636
+
637
+ /* The content part scrolls instead of the overlay part, because of the gradient fade-out */
638
+ [part='content'] {
639
+ padding: 30px var(--lumo-space-m);
640
+ max-height: inherit;
641
+ box-sizing: border-box;
642
+ -webkit-overflow-scrolling: touch;
643
+ overflow: auto;
644
+ -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
645
+ mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
646
+ }
647
+
648
+ [part='backdrop'] {
649
+ display: block;
650
+ }
651
+
652
+ /* Animations */
653
+
654
+ :host([opening]) [part='overlay'] {
655
+ animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
656
+ }
657
+
658
+ :host([closing]),
659
+ :host([closing]) [part='backdrop'] {
660
+ animation-delay: 0.14s;
661
+ }
662
+
663
+ :host([closing]) [part='overlay'] {
664
+ animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
665
+ }
666
+ }
667
+
668
+ @keyframes lumo-mobile-menu-overlay-enter {
669
+ 0% {
670
+ transform: translateY(150%);
671
+ }
672
+ }
673
+
674
+ @keyframes lumo-mobile-menu-overlay-exit {
675
+ 100% {
676
+ transform: translateY(150%);
677
+ }
678
+ }
679
+ `];Tt("",Rt,{moduleId:"lumo-menu-overlay"}),Tt("vaadin-date-picker-overlay",[Rt,y`
680
+ [part='overlay'] {
681
+ /*
682
+ Width:
683
+ date cell widths
684
+ + month calendar side padding
685
+ + year scroller width
686
+ */
687
+ /* prettier-ignore */
688
+ width:
689
+ calc(
690
+ var(--lumo-size-m) * 7
691
+ + var(--lumo-space-xs) * 2
692
+ + 57px
693
+ );
694
+ height: 100%;
695
+ max-height: calc(var(--lumo-size-m) * 14);
696
+ overflow: hidden;
697
+ -webkit-tap-highlight-color: transparent;
698
+ flex-direction: column;
699
+ }
700
+
701
+ [part='content'] {
702
+ padding: 0;
703
+ height: 100%;
704
+ overflow: hidden;
705
+ -webkit-mask-image: none;
706
+ mask-image: none;
707
+ }
708
+
709
+ :host([top-aligned]) [part~='overlay'] {
710
+ margin-top: var(--lumo-space-xs);
711
+ }
712
+
713
+ :host([bottom-aligned]) [part~='overlay'] {
714
+ margin-bottom: var(--lumo-space-xs);
715
+ }
716
+
717
+ @media (max-width: 450px), (max-height: 450px) {
718
+ [part='overlay'] {
719
+ width: 100vw;
720
+ height: 70vh;
721
+ max-height: 70vh;
722
+ }
723
+ }
724
+ `],{moduleId:"lumo-date-picker-overlay"}),Tt("vaadin-button",y`
725
+ :host {
726
+ /* Sizing */
727
+ --lumo-button-size: var(--lumo-size-m);
728
+ min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));
729
+ height: var(--_button-size);
730
+ padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));
731
+ margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);
732
+ box-sizing: border-box;
733
+ /* Style */
734
+ font-family: var(--lumo-font-family);
735
+ font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));
736
+ font-weight: var(--vaadin-button-font-weight, 500);
737
+ color: var(--_lumo-button-text-color);
738
+ background: var(--_lumo-button-background);
739
+ border: var(--vaadin-button-border, none);
740
+ border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));
741
+ cursor: var(--lumo-clickable-cursor);
742
+ -webkit-tap-highlight-color: transparent;
743
+ -webkit-font-smoothing: antialiased;
744
+ -moz-osx-font-smoothing: grayscale;
745
+ flex-shrink: 0;
746
+ --_button-size: var(--vaadin-button-height, var(--lumo-button-size));
747
+ --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
748
+ --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
749
+ /* Used by notification */
750
+ --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));
751
+ --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));
752
+ --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));
753
+ --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));
754
+ }
755
+
756
+ /* Set only for the internal parts so we don't affect the host vertical alignment */
757
+ [part='label'],
758
+ [part='prefix'],
759
+ [part='suffix'] {
760
+ line-height: var(--lumo-line-height-xs);
761
+ }
762
+
763
+ [part='label'] {
764
+ padding: calc(var(--lumo-button-size) / 6) 0;
765
+ }
766
+
767
+ :host([theme~='small']) {
768
+ font-size: var(--lumo-font-size-s);
769
+ --lumo-button-size: var(--lumo-size-s);
770
+ }
771
+
772
+ :host([theme~='large']) {
773
+ font-size: var(--lumo-font-size-l);
774
+ --lumo-button-size: var(--lumo-size-l);
775
+ }
776
+
777
+ /* For interaction states */
778
+ :host::before,
779
+ :host::after {
780
+ content: '';
781
+ /* We rely on the host always being relative */
782
+ position: absolute;
783
+ z-index: 1;
784
+ inset: 0;
785
+ background-color: currentColor;
786
+ border-radius: inherit;
787
+ opacity: 0;
788
+ pointer-events: none;
789
+ }
790
+
791
+ /* Hover */
792
+
793
+ @media (any-hover: hover) {
794
+ :host(:hover)::before {
795
+ opacity: 0.02;
796
+ }
797
+ }
798
+
799
+ /* Active */
800
+
801
+ :host::after {
802
+ transition:
803
+ opacity 1.4s,
804
+ transform 0.1s;
805
+ filter: blur(8px);
806
+ }
807
+
808
+ :host([active])::before {
809
+ opacity: 0.05;
810
+ transition-duration: 0s;
811
+ }
812
+
813
+ :host([active])::after {
814
+ opacity: 0.1;
815
+ transition-duration: 0s, 0s;
816
+ transform: scale(0);
817
+ }
818
+
819
+ /* Keyboard focus */
820
+
821
+ :host([focus-ring]) {
822
+ box-shadow:
823
+ 0 0 0 calc(1px * var(--_focus-ring-gap-on, 0)) var(--_focus-ring-gap-color, var(--lumo-base-color)),
824
+ 0 0 0 calc(var(--_focus-ring-width) + 1px * var(--_focus-ring-gap-on, 0)) var(--_focus-ring-color);
825
+ }
826
+
827
+ :host([theme~='primary'][focus-ring]) {
828
+ --_focus-ring-gap-on: 1;
829
+ }
830
+
831
+ /* Types (primary, tertiary, tertiary-inline */
832
+
833
+ :host([theme~='tertiary']),
834
+ :host([theme~='tertiary-inline']) {
835
+ --_background: transparent !important;
836
+ background: var(--vaadin-button-tertiary-background, var(--_background));
837
+ min-width: 0;
838
+ }
839
+
840
+ :host([theme~='tertiary']) {
841
+ border: var(--vaadin-button-tertiary-border, none);
842
+ color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));
843
+ font-weight: var(--vaadin-button-tertiary-font-weight, 500);
844
+ padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));
845
+ }
846
+
847
+ :host([theme~='tertiary-inline'])::before {
848
+ display: none;
849
+ }
850
+
851
+ :host([theme~='tertiary-inline']) {
852
+ margin: 0;
853
+ height: auto;
854
+ padding: 0;
855
+ line-height: inherit;
856
+ font-size: inherit;
857
+ }
858
+
859
+ :host([theme~='tertiary-inline']) [part='label'] {
860
+ padding: 0;
861
+ overflow: visible;
862
+ line-height: inherit;
863
+ }
864
+
865
+ :host([theme~='primary']) {
866
+ background: var(--_lumo-button-primary-background);
867
+ border: var(--vaadin-button-primary-border, none);
868
+ color: var(--_lumo-button-primary-text-color);
869
+ font-weight: var(--vaadin-button-primary-font-weight, 600);
870
+ min-width: calc(var(--lumo-button-size) * 2.5);
871
+ }
872
+
873
+ :host([theme~='primary'])::before {
874
+ background-color: black;
875
+ }
876
+
877
+ @media (any-hover: hover) {
878
+ :host([theme~='primary']:hover)::before {
879
+ opacity: 0.05;
880
+ }
881
+ }
882
+
883
+ :host([theme~='primary'][active])::before {
884
+ opacity: 0.1;
885
+ }
886
+
887
+ :host([theme~='primary'][active])::after {
888
+ opacity: 0.2;
889
+ }
890
+
891
+ /* Colors (success, warning, error, contrast) */
892
+
893
+ :host([theme~='success']) {
894
+ color: var(--lumo-success-text-color);
895
+ }
896
+
897
+ :host([theme~='success'][theme~='primary']) {
898
+ background-color: var(--lumo-success-color);
899
+ color: var(--lumo-success-contrast-color);
900
+ }
901
+
902
+ :host([theme~='warning']) {
903
+ color: var(--lumo-warning-text-color);
904
+ }
905
+
906
+ :host([theme~='warning'][theme~='primary']) {
907
+ background-color: var(--lumo-warning-color);
908
+ color: var(--lumo-warning-contrast-color);
909
+ }
910
+
911
+ :host([theme~='error']) {
912
+ color: var(--lumo-error-text-color);
913
+ }
914
+
915
+ :host([theme~='error'][theme~='primary']) {
916
+ background-color: var(--lumo-error-color);
917
+ color: var(--lumo-error-contrast-color);
918
+ }
919
+
920
+ :host([theme~='contrast']) {
921
+ color: var(--lumo-contrast);
922
+ }
923
+
924
+ :host([theme~='contrast'][theme~='primary']) {
925
+ background-color: var(--lumo-contrast);
926
+ color: var(--lumo-base-color);
927
+ }
928
+
929
+ /* Disabled state. Keep selectors after other color variants. */
930
+
931
+ :host([disabled]) {
932
+ pointer-events: none;
933
+ color: var(--lumo-disabled-text-color);
934
+ }
935
+
936
+ :host([theme~='primary'][disabled]) {
937
+ background-color: var(--lumo-contrast-30pct);
938
+ color: var(--lumo-base-color);
939
+ }
940
+
941
+ :host([theme~='primary'][disabled]) [part] {
942
+ opacity: 0.7;
943
+ }
944
+
945
+ /* Icons */
946
+
947
+ [part] ::slotted(vaadin-icon) {
948
+ display: inline-block;
949
+ width: var(--lumo-icon-size-m);
950
+ height: var(--lumo-icon-size-m);
951
+ }
952
+
953
+ /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
954
+ [part] ::slotted(vaadin-icon[icon^='vaadin:']) {
955
+ padding: 0.25em;
956
+ box-sizing: border-box !important;
957
+ }
958
+
959
+ [part='prefix'] {
960
+ margin-left: -0.25em;
961
+ margin-right: 0.25em;
962
+ }
963
+
964
+ [part='suffix'] {
965
+ margin-left: 0.25em;
966
+ margin-right: -0.25em;
967
+ }
968
+
969
+ /* Icon-only */
970
+
971
+ :host([theme~='icon']:not([theme~='tertiary-inline'])) {
972
+ min-width: var(--lumo-button-size);
973
+ padding-left: calc(var(--lumo-button-size) / 4);
974
+ padding-right: calc(var(--lumo-button-size) / 4);
975
+ }
976
+
977
+ :host([theme~='icon']) [part='prefix'],
978
+ :host([theme~='icon']) [part='suffix'] {
979
+ margin-left: 0;
980
+ margin-right: 0;
981
+ }
982
+
983
+ /* RTL specific styles */
984
+
985
+ :host([dir='rtl']) [part='prefix'] {
986
+ margin-left: 0.25em;
987
+ margin-right: -0.25em;
988
+ }
989
+
990
+ :host([dir='rtl']) [part='suffix'] {
991
+ margin-left: -0.25em;
992
+ margin-right: 0.25em;
993
+ }
994
+
995
+ :host([dir='rtl'][theme~='icon']) [part='prefix'],
996
+ :host([dir='rtl'][theme~='icon']) [part='suffix'] {
997
+ margin-left: 0;
998
+ margin-right: 0;
999
+ }
1000
+ `,{moduleId:"lumo-button"}),Tt("vaadin-date-picker-year",y`
1001
+ :host([current]) [part='year-number'] {
1002
+ color: var(--lumo-primary-text-color);
1003
+ }
1004
+
1005
+ :host(:not([current])) [part='year-number'],
1006
+ [part='year-separator'] {
1007
+ opacity: var(--_lumo-date-picker-year-opacity, 0.7);
1008
+ transition: 0.2s opacity;
1009
+ }
1010
+
1011
+ [part='year-number'],
1012
+ [part='year-separator'] {
1013
+ display: flex;
1014
+ align-items: center;
1015
+ justify-content: center;
1016
+ height: 50%;
1017
+ transform: translateY(-50%);
1018
+ }
1019
+
1020
+ [part='year-separator']::after {
1021
+ color: var(--lumo-disabled-text-color);
1022
+ content: '\\2022';
1023
+ }
1024
+ `,{moduleId:"lumo-date-picker-year"}),Tt("vaadin-date-picker-overlay-content",y`
1025
+ :host {
1026
+ position: relative;
1027
+ /* Background for the year scroller, placed here as we are using a mask image on the actual years part */
1028
+ background-image: linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct));
1029
+ background-size: 57px 100%;
1030
+ background-position: top right;
1031
+ background-repeat: no-repeat;
1032
+ cursor: default;
1033
+ }
1034
+
1035
+ ::slotted([slot='months']) {
1036
+ /* Month calendar height:
1037
+ header height + margin-bottom
1038
+ + weekdays height + margin-bottom
1039
+ + date cell heights
1040
+ + small margin between month calendars
1041
+ */
1042
+ /* prettier-ignore */
1043
+ --vaadin-infinite-scroller-item-height:
1044
+ calc(
1045
+ var(--lumo-font-size-l) + var(--lumo-space-m)
1046
+ + var(--lumo-font-size-xs) + var(--lumo-space-s)
1047
+ + var(--lumo-size-m) * 6
1048
+ + var(--lumo-space-s)
1049
+ );
1050
+ --vaadin-infinite-scroller-buffer-offset: 10%;
1051
+ -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
1052
+ mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
1053
+ position: relative;
1054
+ margin-right: 57px;
1055
+ }
1056
+
1057
+ ::slotted([slot='years']) {
1058
+ /* TODO get rid of fixed magic number */
1059
+ --vaadin-infinite-scroller-buffer-width: 97px;
1060
+ width: 57px;
1061
+ height: auto;
1062
+ top: 0;
1063
+ bottom: 0;
1064
+ font-size: var(--lumo-font-size-s);
1065
+ box-shadow: inset 2px 0 4px 0 var(--lumo-shade-5pct);
1066
+ -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
1067
+ mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
1068
+ cursor: var(--lumo-clickable-cursor);
1069
+ }
1070
+
1071
+ ::slotted([slot='years']:hover) {
1072
+ --_lumo-date-picker-year-opacity: 1;
1073
+ }
1074
+
1075
+ /* TODO unsupported selector */
1076
+ #scrollers {
1077
+ position: static;
1078
+ display: block;
1079
+ }
1080
+
1081
+ /* TODO fix this in vaadin-date-picker that it adapts to the width of the year scroller */
1082
+ :host([desktop]) ::slotted([slot='months']) {
1083
+ right: auto;
1084
+ }
1085
+
1086
+ /* Year scroller position indicator */
1087
+ ::slotted([slot='years'])::before {
1088
+ border: none;
1089
+ width: 1em;
1090
+ height: 1em;
1091
+ background-color: var(--lumo-base-color);
1092
+ background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
1093
+ transform: translate(-75%, -50%) rotate(45deg);
1094
+ border-top-right-radius: var(--lumo-border-radius-s);
1095
+ box-shadow: 2px -2px 6px 0 var(--lumo-shade-5pct);
1096
+ z-index: 1;
1097
+ }
1098
+
1099
+ [part='toolbar'] {
1100
+ padding: var(--lumo-space-s);
1101
+ border-bottom-left-radius: var(--lumo-border-radius-l);
1102
+ margin-right: 57px;
1103
+ }
1104
+
1105
+ [part='toolbar'] ::slotted(vaadin-button) {
1106
+ margin: 0;
1107
+ }
1108
+
1109
+ /* Narrow viewport mode (fullscreen) */
1110
+
1111
+ :host([fullscreen]) [part='toolbar'] {
1112
+ order: -1;
1113
+ background-color: var(--lumo-base-color);
1114
+ }
1115
+
1116
+ :host([fullscreen]) [part='overlay-header'] {
1117
+ order: -2;
1118
+ height: var(--lumo-size-m);
1119
+ padding: var(--lumo-space-s);
1120
+ position: absolute;
1121
+ left: 0;
1122
+ right: 0;
1123
+ justify-content: center;
1124
+ }
1125
+
1126
+ :host([fullscreen]) [part='toggle-button'],
1127
+ :host([fullscreen]) [part='clear-button'],
1128
+ [part='overlay-header'] [part='label'] {
1129
+ display: none;
1130
+ }
1131
+
1132
+ /* Very narrow screen (year scroller initially hidden) */
1133
+
1134
+ [part='years-toggle-button'] {
1135
+ display: flex;
1136
+ align-items: center;
1137
+ height: var(--lumo-size-s);
1138
+ padding: 0 0.5em;
1139
+ border-radius: var(--lumo-border-radius-m);
1140
+ z-index: 3;
1141
+ color: var(--lumo-primary-text-color);
1142
+ font-weight: 500;
1143
+ -webkit-font-smoothing: antialiased;
1144
+ -moz-osx-font-smoothing: grayscale;
1145
+ }
1146
+
1147
+ :host([years-visible]) [part='years-toggle-button'] {
1148
+ background-color: var(--lumo-primary-color);
1149
+ color: var(--lumo-primary-contrast-color);
1150
+ }
1151
+
1152
+ /* TODO magic number (same as used for media-query in vaadin-date-picker-overlay-content) */
1153
+ @media screen and (max-width: 374px) {
1154
+ :host {
1155
+ background-image: none;
1156
+ }
1157
+
1158
+ [part='toolbar'],
1159
+ ::slotted([slot='months']) {
1160
+ margin-right: 0;
1161
+ }
1162
+
1163
+ /* TODO make date-picker adapt to the width of the years part */
1164
+ ::slotted([slot='years']) {
1165
+ --vaadin-infinite-scroller-buffer-width: 90px;
1166
+ width: 50px;
1167
+ background-color: var(--lumo-shade-5pct);
1168
+ }
1169
+
1170
+ :host([years-visible]) ::slotted([slot='months']) {
1171
+ padding-left: 50px;
1172
+ }
1173
+ }
1174
+ `,{moduleId:"lumo-date-picker-overlay-content"}),Tt("vaadin-month-calendar",y`
1175
+ :host {
1176
+ -moz-user-select: none;
1177
+ -webkit-user-select: none;
1178
+ -webkit-tap-highlight-color: transparent;
1179
+ user-select: none;
1180
+ font-size: var(--lumo-font-size-m);
1181
+ color: var(--lumo-body-text-color);
1182
+ text-align: center;
1183
+ padding: 0 var(--lumo-space-xs);
1184
+ --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
1185
+ --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
1186
+ --_selection-color: var(--vaadin-selection-color, var(--lumo-primary-color));
1187
+ --_selection-color-text: var(--vaadin-selection-color-text, var(--lumo-primary-text-color));
1188
+ }
1189
+
1190
+ /* Month header */
1191
+
1192
+ [part='month-header'] {
1193
+ color: var(--lumo-header-text-color);
1194
+ font-size: var(--lumo-font-size-l);
1195
+ line-height: 1;
1196
+ font-weight: 500;
1197
+ margin-bottom: var(--lumo-space-m);
1198
+ }
1199
+
1200
+ /* Week days and numbers */
1201
+
1202
+ [part='weekdays'],
1203
+ [part='weekday'],
1204
+ [part='week-number'] {
1205
+ font-size: var(--lumo-font-size-xxs);
1206
+ line-height: 1;
1207
+ color: var(--lumo-secondary-text-color);
1208
+ }
1209
+
1210
+ [part='weekdays'] {
1211
+ margin-bottom: var(--lumo-space-s);
1212
+ }
1213
+
1214
+ [part='weekday']:empty,
1215
+ [part='week-number'] {
1216
+ width: var(--lumo-size-xs);
1217
+ }
1218
+
1219
+ /* Date and week number cells */
1220
+
1221
+ [part~='date'],
1222
+ [part='week-number'] {
1223
+ box-sizing: border-box;
1224
+ display: inline-flex;
1225
+ align-items: center;
1226
+ justify-content: center;
1227
+ height: var(--lumo-size-m);
1228
+ position: relative;
1229
+ }
1230
+
1231
+ [part~='date'] {
1232
+ transition: color 0.1s;
1233
+ }
1234
+
1235
+ [part~='date']:not(:empty) {
1236
+ cursor: var(--lumo-clickable-cursor);
1237
+ }
1238
+
1239
+ :host([week-numbers]) [part='weekday']:not(:empty),
1240
+ :host([week-numbers]) [part~='date'] {
1241
+ width: calc((100% - var(--lumo-size-xs)) / 7);
1242
+ }
1243
+
1244
+ /* Today date */
1245
+
1246
+ [part~='date'][part~='today'] {
1247
+ color: var(--_selection-color-text);
1248
+ }
1249
+
1250
+ /* Focused date */
1251
+
1252
+ [part~='date']::before {
1253
+ content: '';
1254
+ position: absolute;
1255
+ z-index: -1;
1256
+ top: 50%;
1257
+ left: 50%;
1258
+ transform: translate(-50%, -50%);
1259
+ min-width: 2em;
1260
+ min-height: 2em;
1261
+ width: 80%;
1262
+ height: 80%;
1263
+ max-height: 100%;
1264
+ max-width: 100%;
1265
+ border-radius: var(--lumo-border-radius-m);
1266
+ }
1267
+
1268
+ [part~='date'][part~='focused']::before {
1269
+ box-shadow:
1270
+ 0 0 0 1px var(--lumo-base-color),
1271
+ 0 0 0 calc(var(--_focus-ring-width) + 1px) var(--_focus-ring-color);
1272
+ }
1273
+
1274
+ :host(:not([focused])) [part~='date'][part~='focused']::before {
1275
+ animation: vaadin-date-picker-month-calendar-focus-date 1.4s infinite;
1276
+ }
1277
+
1278
+ @keyframes vaadin-date-picker-month-calendar-focus-date {
1279
+ 50% {
1280
+ box-shadow:
1281
+ 0 0 0 1px var(--lumo-base-color),
1282
+ 0 0 0 calc(var(--_focus-ring-width) + 1px) transparent;
1283
+ }
1284
+ }
1285
+
1286
+ [part~='date']:not(:empty):not([part~='disabled']):not([part~='selected']):hover::before {
1287
+ background-color: var(--lumo-primary-color-10pct);
1288
+ }
1289
+
1290
+ [part~='date'][part~='selected'] {
1291
+ color: var(--lumo-primary-contrast-color);
1292
+ }
1293
+
1294
+ [part~='date'][part~='selected']::before {
1295
+ background-color: var(--_selection-color);
1296
+ }
1297
+
1298
+ [part~='date'][part~='disabled'] {
1299
+ color: var(--lumo-disabled-text-color);
1300
+ }
1301
+
1302
+ @media (pointer: coarse) {
1303
+ [part~='date']:hover:not([part~='selected'])::before,
1304
+ :host(:not([focus-ring])) [part~='focused']:not([part~='selected'])::before {
1305
+ display: none;
1306
+ }
1307
+
1308
+ [part~='date']:not(:empty):not([part~='disabled']):active::before {
1309
+ display: block;
1310
+ }
1311
+
1312
+ :host(:not([focus-ring])) [part~='date'][part~='selected']::before {
1313
+ box-shadow: none;
1314
+ }
1315
+ }
1316
+ /* Disabled */
1317
+
1318
+ :host([disabled]) * {
1319
+ color: var(--lumo-disabled-text-color) !important;
1320
+ }
1321
+ `,{moduleId:"lumo-month-calendar"}),Tt("vaadin-input-container",y`
1322
+ :host {
1323
+ background: var(--_background);
1324
+ padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
1325
+ font-weight: var(--vaadin-input-field-value-font-weight, 500);
1326
+ line-height: 1;
1327
+ position: relative;
1328
+ cursor: text;
1329
+ box-sizing: border-box;
1330
+ border-radius:
1331
+ /* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#syntax */
1332
+ var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
1333
+ var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
1334
+ var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius))
1335
+ var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius));
1336
+ /* Fallback */
1337
+ --_input-container-radius: var(--vaadin-input-field-border-radius, var(--lumo-border-radius-m));
1338
+ --_input-height: var(--lumo-text-field-size, var(--lumo-size-m));
1339
+ /* Default values */
1340
+ --_background: var(--vaadin-input-field-background, var(--lumo-contrast-10pct));
1341
+ --_hover-highlight: var(--vaadin-input-field-hover-highlight, var(--lumo-contrast-50pct));
1342
+ --_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
1343
+ --_icon-color: var(--vaadin-input-field-icon-color, var(--lumo-contrast-60pct));
1344
+ --_icon-size: var(--vaadin-input-field-icon-size, var(--lumo-icon-size-m));
1345
+ --_invalid-background: var(--vaadin-input-field-invalid-background, var(--lumo-error-color-10pct));
1346
+ --_invalid-hover-highlight: var(--vaadin-input-field-invalid-hover-highlight, var(--lumo-error-color-50pct));
1347
+ --_disabled-background: var(--vaadin-input-field-disabled-background, var(--lumo-contrast-5pct));
1348
+ --_disabled-value-color: var(--vaadin-input-field-disabled-value-color, var(--lumo-disabled-text-color));
1349
+ }
1350
+
1351
+ :host([dir='rtl']) {
1352
+ border-radius:
1353
+ /* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
1354
+ var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
1355
+ var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
1356
+ var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius))
1357
+ var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius));
1358
+ }
1359
+
1360
+ /* Used for hover and activation effects */
1361
+ :host::after {
1362
+ content: '';
1363
+ position: absolute;
1364
+ inset: 0;
1365
+ border-radius: inherit;
1366
+ pointer-events: none;
1367
+ background: var(--_hover-highlight);
1368
+ opacity: 0;
1369
+ transition:
1370
+ transform 0.15s,
1371
+ opacity 0.2s;
1372
+ transform-origin: 100% 0;
1373
+ }
1374
+
1375
+ ::slotted(:not([slot$='fix'])) {
1376
+ cursor: inherit;
1377
+ min-height: var(--vaadin-input-field-height, var(--_input-height));
1378
+ padding: 0 0.25em;
1379
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
1380
+ -webkit-mask-image: var(--_lumo-text-field-overflow-mask-image);
1381
+ mask-image: var(--_lumo-text-field-overflow-mask-image);
1382
+ }
1383
+
1384
+ /* Read-only */
1385
+ :host([readonly]) {
1386
+ color: var(--lumo-secondary-text-color);
1387
+ background-color: transparent;
1388
+ cursor: default;
1389
+ }
1390
+
1391
+ :host([readonly])::after {
1392
+ background-color: transparent;
1393
+ opacity: 1;
1394
+ border: var(--vaadin-input-field-readonly-border, 1px dashed var(--lumo-contrast-30pct));
1395
+ }
1396
+
1397
+ /* Disabled */
1398
+ :host([disabled]) {
1399
+ background: var(--_disabled-background);
1400
+ }
1401
+
1402
+ :host([disabled]) ::slotted(:not([slot$='fix'])) {
1403
+ -webkit-text-fill-color: var(--_disabled-value-color);
1404
+ color: var(--_disabled-value-color);
1405
+ }
1406
+
1407
+ /* Invalid */
1408
+ :host([invalid]) {
1409
+ background: var(--_invalid-background);
1410
+ }
1411
+
1412
+ :host([invalid]:not([readonly]))::after {
1413
+ background: var(--_invalid-hover-highlight);
1414
+ }
1415
+
1416
+ /* Slotted icons */
1417
+ ::slotted(vaadin-icon) {
1418
+ color: var(--_icon-color);
1419
+ width: var(--_icon-size);
1420
+ height: var(--_icon-size);
1421
+ }
1422
+
1423
+ /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
1424
+ ::slotted(vaadin-icon[icon^='vaadin:']) {
1425
+ padding: 0.25em;
1426
+ box-sizing: border-box !important;
1427
+ }
1428
+
1429
+ /* Text align */
1430
+ :host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
1431
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
1432
+ }
1433
+
1434
+ @-moz-document url-prefix() {
1435
+ :host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
1436
+ mask-image: var(--_lumo-text-field-overflow-mask-image);
1437
+ }
1438
+ }
1439
+
1440
+ :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
1441
+ text-align: start;
1442
+ --_lumo-text-field-overflow-mask-image: none;
1443
+ }
1444
+
1445
+ :host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {
1446
+ text-align: center;
1447
+ --_lumo-text-field-overflow-mask-image: none;
1448
+ }
1449
+
1450
+ :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
1451
+ text-align: end;
1452
+ --_lumo-text-field-overflow-mask-image: none;
1453
+ }
1454
+
1455
+ @-moz-document url-prefix() {
1456
+ /* Firefox is smart enough to align overflowing text to right */
1457
+ :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
1458
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
1459
+ }
1460
+ }
1461
+
1462
+ @-moz-document url-prefix() {
1463
+ /* Firefox is smart enough to align overflowing text to right */
1464
+ :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
1465
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
1466
+ }
1467
+ }
1468
+
1469
+ /* RTL specific styles */
1470
+ :host([dir='rtl'])::after {
1471
+ transform-origin: 0% 0;
1472
+ }
1473
+
1474
+ :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
1475
+ --_lumo-text-field-overflow-mask-image: none;
1476
+ }
1477
+
1478
+ :host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
1479
+ --_lumo-text-field-overflow-mask-image: none;
1480
+ }
1481
+
1482
+ :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
1483
+ --_lumo-text-field-overflow-mask-image: none;
1484
+ }
1485
+
1486
+ @-moz-document url-prefix() {
1487
+ /* Firefox is smart enough to align overflowing text to right */
1488
+ :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
1489
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
1490
+ }
1491
+ }
1492
+
1493
+ @-moz-document url-prefix() {
1494
+ /* Firefox is smart enough to align overflowing text to right */
1495
+ :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
1496
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
1497
+ }
1498
+ }
1499
+ `,{moduleId:"lumo-input-container"}),Mt("font-icons",y`
1500
+ @font-face {
1501
+ font-family: 'lumo-icons';
1502
+ src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABHAAAsAAAAAI6AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuNY21hcAAAAYgAAAD+AAADymne8hxnbHlmAAACiAAAC+gAABioIzlOlWhlYWQAAA5wAAAAMAAAADZa/6SsaGhlYQAADqAAAAAdAAAAJAbpA4BobXR4AAAOwAAAABAAAAC0q+AAAGxvY2EAAA7QAAAAXAAAAFyF7o1GbWF4cAAADywAAAAfAAAAIAFMAXBuYW1lAAAPTAAAATEAAAIuUUJZCHBvc3QAABCAAAABPQAAAgfdkltveJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+xDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mEO+p/FEMUcxDANKMwIkgMABvgMMAB4nO3SV26EMABF0UsZpjG9d6Y3FpgF5StLYxMTP16WEUvHV1gGIQzQAJKgDFKIfojQ+A6rUb2e0KnXU77qPanWq/LzCXOkOVyn9RyHvWl4YkaTFu1wX5ecHn0GDBkxZsKUGXMWLFmxZsOWHXsOFBw5cebClRt3Hjx58dZ7RRn/I9cUF39Xpb691acRG2piOtUqNZ1P1TCdeJUZatNQW4baNtSO6U+ouoaam96u6hlq31AHhjo01JGhjg11YqhTQ50Z6txQF4a6NNSVoa4NdWOoW0PdGereUA+GWhjq0VBPhno21IuhXg31Zqh3Q30Y6tNQX4b6NtTSKH8BOIRpQQAAeJy1WH1sW9UVv+fG9vPz+7Bf/N6zHcd2/J04jbP6s0lap4kDpB9JWzUUCqxNgaHxpTI6hNhUNLVr17HSISb2D2iAJrWb6FTWahNQdQxRvmHamAR0qibE1E18CG3QaVNFvJ17n+3YIf1AiMQ679x77j3v3HPPPed3H7ER/OsYpw8TmQRIiuQJ8RZK+WjO1B3xaCzla21orY10a+OQ6aHTHtP0zB31mBs1GZ6RNU2uXc7oPL+xdRS9R9X1oK4fVfijdsBqvqF6vd1eLzPrYrYZ57WteF7bPDIc5+ZcJnta+S9i2Vfhs4MaMwZNQmO0Vv7gF/MZcNsCcJp4sJFSwYyAmRuFCmTBDRBUkwGqnlViyjmVBpLqaXhNpt0J5V1JOqMkuqn8WkMHvZX+iOlImiqkBiFVYDrCqINulmkwKb8ry2fkZBBn7FcTlk4ZdfpRZ9MOesLSAakKt0N3g4p2jAL8eIEOOqom/U0lgQRXUl8LtXM7HFkojUIpF0ErVBhcZC1vtyjtpsqr83a8RVcSH+ool8LgcIMjNohmVCACuDs506BdO6WIQeXjUsh1XKZGRNpp9piv3+Givoh00OU6KEV81HUHTLtN093Q+YGlE3wLHWRtMNy9XWqdLm2HKbaNsGzhu+41eswFOjE6WKSk2/1Wpt+qHeM6phbohmVmj3GvpdcVkiy9zbXfzHVqKuDB0IR2P6ZpF+D7dy6YC/9svGmBE5hKB9+X2+hh4iYRMkhGyTqyFc9APmeGQHf043tWQKHkizmwaY5AroTNVJzJDc2SFzUu92kOLsdmKu77vByb8/IjtxmhkMFISRBFISO4XMLJlj4XgGuRXtaHw2FLyHifdSOpisIhJjgkiPBAyJh7lfXTkhEadwk1mUngrOC6MazX7mASeEAPV1FyjEumBOaEDu4DP/ogRDKkiLEV1woVyMeLLKJCEM+FwdCwL4XLcRgdbfkhbzS8BNvXDKzNQiAWgOzagTXF1Eyq+Ci6/TPm/JrNY/59p1epKN4jQFGe0fx+LTMwNVCrAU2VSqnaKYzIiGmWe2Rvp9KDJhncrjLaFce8VCUbyQ1kB9lNfkJ+To6R58mfyd/Ip9ABXohDHqqwEW7A2Mij1ehntLu+h8xMtocjUJcYwoLdtYafv/1Vjy8vjLaLtBfOt3/B931Rexa24e5zstgnyqvZHs69zuhq3vFgRpQVJyN7FuE++RLSeW4xMi+t6Zeo5sIK6S5dlGVRD2hWnGoB3j7OV3lesvNLic8tOnLRSRfRdOna63VJp/1WbYs5dFZjy1AqpGICQEWKmNI+CZNoVTJ7pNop+IZkRrBHgnEmqr3TrEsfw1Gi8LqE+S1aV0SNNwXVVVvuUoU3ld6TLwmditIpvKTU50zSzWwO1h0rL8awnulwTXMYrGDT4aQ1fb4GPkyv5vMEh5Vec6yw0AMXnfcx1l/rfVZaKLDi0W4j/HfeyGZuHOf1IUGW1udizU2leXY0OmLpVDpVKJfKpZzPRKHgEBzpXAUKWYipoIeBdl3JfLZVBizEqWun1i4ZGFiyduq3DebayXsmJ+95gBG4+Urm1a2SdpKV57lP2wZyZqI+FAlfUtO+NCmgdWhMOS1gDY+jHWnBhwjBQLMEXxmLbx6t9JXTWDLtsSxgisfErqvQMbbBoywZmeyLeWe8OWNydFDxzMx4lMGRtX0xN3YFJkeW+O0bascGNwwObtjCCOzrzAVWjSwN2K9cpyn9o5cZOXMmkAuM85EbNHnJyHhfLLCnPhxJYw9eoIMkyC3l+4ZuY5ig7lW2oYUynDgg+Xrk+++Xe3zSgRYetnyuy+KbfjiB+GAAtZ8HHXmtijZfFFgrujhmOs2qkXvuSV6WqA1WLYqhPHOfsa26rklKFqbAGL2dOIlGurB6LWFVFd/KoBBaYTFYVBs93hZRFlrG5Ex4NVFIJguJVvqnBW2kNNvFGx90YUcSEvyZSMDeZjc0xYlEYy8+hHcWx9YrZOaPPyCGepP5Q34aXnGBr8d1QhSf4yjtiebZqNJfEYl4SY6dDRb8WSguLZW9ZQtBpoW4hX0QMyB2KmsYcOh8HMQxBn288oZ6BXV0GOq/ClKsC6T8g9X3OFKZNkJrYkOx2lEk+KNDy953+wGHXuGGzhGZ+uLK8FVrQkbtKBv+9EztU2sgTCNpvXMdJjqJ4tkdw+x00dPKkZ1QR254x7GQoFmvfakSnL3gCc5nREly2mN2pyTLMacMipNT7YInGU7JzlN2p9N+yinXTirOKEvPUafSWMNDmCf9pIQYaG19DSxKGqvAQ+xg60iabEm5MheUU2n+HxO4TDDbjnw6xxK8QzfhbHXq8pWVqanKysun9s6ztdt7sivGqruqYyuyPS6Hw9XehGt6q+l0dT0jvaFMZjiTuTHo7+vdtHJTb58/2ML+IxHt9/n9vv5owiWKrrbWD+sakKxhKoYzxF5f7y9INxki42QNuYrVFDPfvqxyY83xWNMV+ZxPSMWb62W+wPSCJwkDDl1WZOGW84nAEo4A7HjB/uWmOdayRFnKjazi668u/ajJlUd87aPk048Crlu4j1Oh9gxdL3Z1inNPIt2xvKNlsU4hn54Z5Y6YbTDu9hHOvkcFAb35fU6hNovKOrtQmcvbNV9/Ntfv5xf4atDWOOTX6CSHZ08xujhPs51+f9zvf1YLIGoPPKvxVh0TSLAXzzUBFiXs7GJVB7vH5/PAXznd4+vx4a95h3qI/oYIpIdMkA1kC7kVLS3GhWI5bwj1fIaVKG/Ei5gXWOjhtcJbzFthaMQrwIcIRj0ppvO6yV95icu9j/YPDNySWp7w+kOr95R1RfGpfVlDVhS/2geJ5Umv2mn0rkxBvzvgdisndJXaVF1X5z5jdHGe2n/QnYo8+b2uaMivhowgjYcLnVqnrEpQezsieyVZ6ooETbdJO6ip+cORLpes6BL82/qg8VHbo45B/vch/YQeJX28QvEANR3sQhxh+TcMCEd4l8BKF7uID7KM05tRYlIHHXY63YIi2fXQyj5XSBbcMeewKLpttkJ2Syz33YJfDdJdSYkqHbYb3VHRJgTV8c0TAy67YHeK7htwOKWax5co7Do8Pfh1tKdx1g5j9o6TZeQyMo27FuW3vbYsbY/Op3AG06DMKionRlpgHzCEeMmLU5opRrCyS670RzppZeW5p/iT3jL3lB4O63QS6dzzh8SAtOqwGJK3bv+lGJTWbr++471wsVKMRJCEK5H+cLg/Qp+IDsdqs7HhKD7hMXyyrD/Li8RjRqimHhI7HP2vSDZn9brplySb0L9dgpURSwmSiBFhilrwB8OA9gZ29NkRO/669parW9e7XZDxwvgRu+SE7zgl+xG5p/HtRqJ3cdwSZwsbwTA1WT3jEdyPN0sWxvDGy+xovIzHosnwc9LePf9tywun0fMkWaFYZbB4oovRq8VyKYUBkMVXqVhBHSylQ0wanvla3+rQ1XbR8ZzstYOo2Mf7vjk8ftcGDWxdSdXx0cAVveHg1TZFtEOn8ntBBFs11V++vuLUQ5qz+U6d/oUjpGIdNjOQhJXNqn5YCS1Yy5PofLGEs6Js2yOKe2yyOLxtaGjbt7cNIURCEDdWfaQ6lurtRYbePCuItv1iUNxvE4Vdw2zQ0LZhdv2fxjHp5uAmdlBpopHXoJGU8e6BRc0yi+PztkaHTRRrW1m2hcfFLlEUzzD+DGczjEVCg9jEQZhFcdAL2DjD+DPiSWQzjM2I89g5RXdxfECS+CIWy1hTGmFs6EIbkv/pbtkfU3aPrZ+4c2Lizn07qufym/L5TTdtyuU2/We3HPeDsjtb3bGPSSfW31aX3LQpX/d9sL7fWYpRJPBbCJavYjrFjj0rT2GWCZjf6Ytffr8beXl/HYeyGwJiIK8FLDHbfo65xGz7YCSRqCQSkbbHI5eUU5X4sjj+zrU9aHnRlEnrd7YGptd0x2Jf/RbH9PAiovadckSnEsJ661OgPFuH9B4O6e202vIN0h9xHXSJh1wRP5Vqv1uI6Wn9Gxmrwzqrii1gqhEscJanuAlGas+s2/uzvetgS72NpHZ6aHbZstmh/wPq1seEeJxjYGRgYADi31ySEvH8Nl8ZuJlfAEUYalQ3NCLo/6+ZpzLdAnI5GJhAogAiBgraeJxjYGRgYA76nwUkXzAAAfNUBkYGVKALAFb4A3EAAAB4nGNgYGBgfjG0MAAMzihlAAAAAABOAJoA6AEKASwBTgFwAZoBxAHuAhoCnALoBJoEvATWBPIFDgUqBXoF0AX+BkQGlga4BwgHagfiCGoIpAi8CVAJmAoQCiwKVgqQCtYLGAtOC4gL6AwuDFR4nGNgZGBg0GVMYRBlAAEmIOYCQgaG/2A+AwAYygG+AHicbZE9TsMwGIbf9A/RSggEYmHxAgtq+jN2ZGj3Dt3T1GlTOXHkuBW9AyfgEByCgTNwCA7BW/NJlVBtyd/jx+8XKwmAa3whwnFE6Ib1OBq44O6Pm6Qb4Rb5QbiNHh6FO/RD4S6eMRHu4RaaT4halzR3eBVu4Apvwk36d+EW+UO4jXt8Cnfov4W7WOBHuIen6MXsCtvPU1vWc73emcSdxIkW2tW5LdUoHp7kTJfaJV6v1PKg6v167H2mMmcLNbWl18ZYVTm71amPN95Xk8EgEx+ntoDBDgUs+siRspaoMef7rukNEriziXNuwS7Hmoe9wggxv+e55IzJMqQTeNYV00scuNbY8+YxrUfGfcaMZb/CNPQe04bT0lThbEuT0sfYhK6K/23Amf3Lx+H24hcj4GScAAAAeJxtjuduwzAMhH2NnTqOk+6993TfSZFY24giGZTVon36eiRFf5SAiO/A05HBWtBXEvxfGdYwQIgIQ6wjxggJxkgxwRQb2MQWtrGDXexhHwc4xBGOcYJTnOEcF7jEFa5xg1vc4R4PeMQTnvGCV2R4C1Khy9xkkkxNnPRC03s97pHLvKgTYXJNmbKfZom9o8POEffsq0Qw28+ltcPe2uHS2rGvRjPBmSwE1+GMtI6l0GSU4JEsSM4XgudpQx9sTRf3K9rAyUr0962UryKprZwPpM0jyda5uP2qrVBjxSLPCmGUplixrdpBSKqsI2oO4gF9Udq8TJVOzDSpcEHGR4vSeJdaVsSkMl26OqoKa6jttQ0rLb6a5l3YjO2QqV01YXLlNy2XDR0JlkXojbJTb/5GDX3V+kPviIPgB9AUks0AAAA=)
1503
+ format('woff');
1504
+ font-weight: normal;
1505
+ font-style: normal;
1506
+ }
1507
+
1508
+ html {
1509
+ --lumo-icons-align-center: '\\ea01';
1510
+ --lumo-icons-align-left: '\\ea02';
1511
+ --lumo-icons-align-right: '\\ea03';
1512
+ --lumo-icons-angle-down: '\\ea04';
1513
+ --lumo-icons-angle-left: '\\ea05';
1514
+ --lumo-icons-angle-right: '\\ea06';
1515
+ --lumo-icons-angle-up: '\\ea07';
1516
+ --lumo-icons-arrow-down: '\\ea08';
1517
+ --lumo-icons-arrow-left: '\\ea09';
1518
+ --lumo-icons-arrow-right: '\\ea0a';
1519
+ --lumo-icons-arrow-up: '\\ea0b';
1520
+ --lumo-icons-bar-chart: '\\ea0c';
1521
+ --lumo-icons-bell: '\\ea0d';
1522
+ --lumo-icons-calendar: '\\ea0e';
1523
+ --lumo-icons-checkmark: '\\ea0f';
1524
+ --lumo-icons-chevron-down: '\\ea10';
1525
+ --lumo-icons-chevron-left: '\\ea11';
1526
+ --lumo-icons-chevron-right: '\\ea12';
1527
+ --lumo-icons-chevron-up: '\\ea13';
1528
+ --lumo-icons-clock: '\\ea14';
1529
+ --lumo-icons-cog: '\\ea15';
1530
+ --lumo-icons-cross: '\\ea16';
1531
+ --lumo-icons-download: '\\ea17';
1532
+ --lumo-icons-drag-handle: '\\ea18';
1533
+ --lumo-icons-dropdown: '\\ea19';
1534
+ --lumo-icons-edit: '\\ea1a';
1535
+ --lumo-icons-error: '\\ea1b';
1536
+ --lumo-icons-eye: '\\ea1c';
1537
+ --lumo-icons-eye-disabled: '\\ea1d';
1538
+ --lumo-icons-menu: '\\ea1e';
1539
+ --lumo-icons-minus: '\\ea1f';
1540
+ --lumo-icons-ordered-list: '\\ea20';
1541
+ --lumo-icons-phone: '\\ea21';
1542
+ --lumo-icons-photo: '\\ea22';
1543
+ --lumo-icons-play: '\\ea23';
1544
+ --lumo-icons-plus: '\\ea24';
1545
+ --lumo-icons-redo: '\\ea25';
1546
+ --lumo-icons-reload: '\\ea26';
1547
+ --lumo-icons-resize-handle: '\\ea27';
1548
+ --lumo-icons-search: '\\ea28';
1549
+ --lumo-icons-undo: '\\ea29';
1550
+ --lumo-icons-unordered-list: '\\ea2a';
1551
+ --lumo-icons-upload: '\\ea2b';
1552
+ --lumo-icons-user: '\\ea2c';
1553
+ }
1554
+ `);
1555
+ /**
1556
+ * @license
1557
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
1558
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1559
+ */
1560
+ const jt=y`
1561
+ [part$='button'] {
1562
+ flex: none;
1563
+ width: 1em;
1564
+ height: 1em;
1565
+ line-height: 1;
1566
+ font-size: var(--lumo-icon-size-m);
1567
+ text-align: center;
1568
+ color: var(--lumo-contrast-60pct);
1569
+ transition: 0.2s color;
1570
+ cursor: var(--lumo-clickable-cursor);
1571
+ }
1572
+
1573
+ [part$='button']:hover {
1574
+ color: var(--lumo-contrast-90pct);
1575
+ }
1576
+
1577
+ :host([disabled]) [part$='button'],
1578
+ :host([readonly]) [part$='button'] {
1579
+ color: var(--lumo-contrast-20pct);
1580
+ cursor: default;
1581
+ }
1582
+
1583
+ [part$='button']::before {
1584
+ font-family: 'lumo-icons';
1585
+ display: block;
1586
+ }
1587
+ `;Tt("",jt,{moduleId:"lumo-field-button"});
1588
+ /**
1589
+ * @license
1590
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
1591
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1592
+ */
1593
+ const Lt=y`
1594
+ :host {
1595
+ --_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
1596
+ }
1597
+
1598
+ :host([has-helper]) [part='helper-text']::before {
1599
+ content: '';
1600
+ display: block;
1601
+ height: var(--_helper-spacing);
1602
+ }
1603
+
1604
+ [part='helper-text'] {
1605
+ display: block;
1606
+ color: var(--vaadin-input-field-helper-color, var(--lumo-secondary-text-color));
1607
+ font-size: var(--vaadin-input-field-helper-font-size, var(--lumo-font-size-xs));
1608
+ line-height: var(--lumo-line-height-xs);
1609
+ font-weight: var(--vaadin-input-field-helper-font-weight, 400);
1610
+ margin-left: calc(var(--lumo-border-radius-m) / 4);
1611
+ transition: color 0.2s;
1612
+ }
1613
+
1614
+ :host(:hover:not([readonly])) [part='helper-text'] {
1615
+ color: var(--lumo-body-text-color);
1616
+ }
1617
+
1618
+ :host([disabled]) [part='helper-text'] {
1619
+ color: var(--lumo-disabled-text-color);
1620
+ -webkit-text-fill-color: var(--lumo-disabled-text-color);
1621
+ }
1622
+
1623
+ :host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
1624
+ display: none;
1625
+ }
1626
+
1627
+ :host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
1628
+ content: '';
1629
+ display: block;
1630
+ height: var(--_helper-spacing);
1631
+ }
1632
+
1633
+ :host([has-helper][theme~='helper-above-field']) [part='label'] {
1634
+ order: 0;
1635
+ padding-bottom: var(--_helper-spacing);
1636
+ }
1637
+
1638
+ :host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
1639
+ order: 1;
1640
+ }
1641
+
1642
+ :host([has-helper][theme~='helper-above-field']) [part='label'] + * {
1643
+ order: 2;
1644
+ }
1645
+
1646
+ :host([has-helper][theme~='helper-above-field']) [part='error-message'] {
1647
+ order: 3;
1648
+ }
1649
+ `
1650
+ /**
1651
+ * @license
1652
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
1653
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1654
+ */,Ht=y`
1655
+ [part='label'] {
1656
+ align-self: flex-start;
1657
+ color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
1658
+ font-weight: var(--vaadin-input-field-label-font-weight, 500);
1659
+ font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
1660
+ margin-left: calc(var(--lumo-border-radius-m) / 4);
1661
+ transition: color 0.2s;
1662
+ line-height: 1;
1663
+ padding-right: 1em;
1664
+ padding-bottom: 0.5em;
1665
+ /* As a workaround for diacritics being cut off, add a top padding and a
1666
+ negative margin to compensate */
1667
+ padding-top: 0.25em;
1668
+ margin-top: -0.25em;
1669
+ overflow: hidden;
1670
+ white-space: nowrap;
1671
+ text-overflow: ellipsis;
1672
+ position: relative;
1673
+ max-width: 100%;
1674
+ box-sizing: border-box;
1675
+ }
1676
+
1677
+ :host([focused]:not([readonly])) [part='label'] {
1678
+ color: var(--vaadin-input-field-focused-label-color, var(--lumo-primary-text-color));
1679
+ }
1680
+
1681
+ :host(:hover:not([readonly]):not([focused])) [part='label'] {
1682
+ color: var(--vaadin-input-field-hovered-label-color, var(--lumo-body-text-color));
1683
+ }
1684
+
1685
+ /* Touch device adjustment */
1686
+ @media (pointer: coarse) {
1687
+ :host(:hover:not([readonly]):not([focused])) [part='label'] {
1688
+ color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
1689
+ }
1690
+ }
1691
+
1692
+ :host([has-label])::before {
1693
+ margin-top: calc(var(--lumo-font-size-s) * 1.5);
1694
+ }
1695
+
1696
+ :host([has-label][theme~='small'])::before {
1697
+ margin-top: calc(var(--lumo-font-size-xs) * 1.5);
1698
+ }
1699
+
1700
+ :host([has-label]) {
1701
+ padding-top: var(--lumo-space-m);
1702
+ }
1703
+
1704
+ :host([has-label]) ::slotted([slot='tooltip']) {
1705
+ --vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
1706
+ }
1707
+
1708
+ :host([required]) [part='required-indicator']::after {
1709
+ content: var(--lumo-required-field-indicator, '\\2022');
1710
+ transition: opacity 0.2s;
1711
+ color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
1712
+ position: absolute;
1713
+ right: 0;
1714
+ width: 1em;
1715
+ text-align: center;
1716
+ }
1717
+
1718
+ :host([invalid]) [part='required-indicator']::after {
1719
+ color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
1720
+ }
1721
+
1722
+ [part='error-message'] {
1723
+ margin-left: calc(var(--lumo-border-radius-m) / 4);
1724
+ font-size: var(--vaadin-input-field-error-font-size, var(--lumo-font-size-xs));
1725
+ line-height: var(--lumo-line-height-xs);
1726
+ font-weight: var(--vaadin-input-field-error-font-weight, 400);
1727
+ color: var(--vaadin-input-field-error-color, var(--lumo-error-text-color));
1728
+ will-change: max-height;
1729
+ transition: 0.4s max-height;
1730
+ max-height: 5em;
1731
+ }
1732
+
1733
+ :host([has-error-message]) [part='error-message']::before,
1734
+ :host([has-error-message]) [part='error-message']::after {
1735
+ content: '';
1736
+ display: block;
1737
+ height: 0.4em;
1738
+ }
1739
+
1740
+ :host(:not([invalid])) [part='error-message'] {
1741
+ max-height: 0;
1742
+ overflow: hidden;
1743
+ }
1744
+
1745
+ /* RTL specific styles */
1746
+
1747
+ :host([dir='rtl']) [part='label'] {
1748
+ margin-left: 0;
1749
+ margin-right: calc(var(--lumo-border-radius-m) / 4);
1750
+ }
1751
+
1752
+ :host([dir='rtl']) [part='label'] {
1753
+ padding-left: 1em;
1754
+ padding-right: 0;
1755
+ }
1756
+
1757
+ :host([dir='rtl']) [part='required-indicator']::after {
1758
+ right: auto;
1759
+ left: 0;
1760
+ }
1761
+
1762
+ :host([dir='rtl']) [part='error-message'] {
1763
+ margin-left: 0;
1764
+ margin-right: calc(var(--lumo-border-radius-m) / 4);
1765
+ }
1766
+ `;Tt("",Ht,{moduleId:"lumo-required-field"});
1767
+ /**
1768
+ * @license
1769
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
1770
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1771
+ */
1772
+ const Wt=[Ht,jt,Lt,y`
1773
+ :host {
1774
+ --lumo-text-field-size: var(--lumo-size-m);
1775
+ color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
1776
+ font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
1777
+ font-family: var(--lumo-font-family);
1778
+ -webkit-font-smoothing: antialiased;
1779
+ -moz-osx-font-smoothing: grayscale;
1780
+ -webkit-tap-highlight-color: transparent;
1781
+ padding: var(--lumo-space-xs) 0;
1782
+ --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
1783
+ --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
1784
+ --_input-height: var(--vaadin-input-field-height, var(--lumo-text-field-size));
1785
+ --_disabled-value-color: var(--vaadin-input-field-disabled-value-color, var(--lumo-disabled-text-color));
1786
+ }
1787
+
1788
+ :host::before {
1789
+ height: var(--_input-height);
1790
+ box-sizing: border-box;
1791
+ display: inline-flex;
1792
+ align-items: center;
1793
+ }
1794
+
1795
+ :host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) {
1796
+ -webkit-mask-image: none;
1797
+ mask-image: none;
1798
+ }
1799
+
1800
+ ::slotted(:is(input, textarea):placeholder-shown) {
1801
+ color: var(--vaadin-input-field-placeholder-color, var(--lumo-secondary-text-color));
1802
+ }
1803
+
1804
+ /* Hover */
1805
+ :host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
1806
+ opacity: var(--vaadin-input-field-hover-highlight-opacity, 0.1);
1807
+ }
1808
+
1809
+ /* Touch device adjustment */
1810
+ @media (pointer: coarse) {
1811
+ :host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
1812
+ opacity: 0;
1813
+ }
1814
+
1815
+ :host(:active:not([readonly]):not([focused])) [part='input-field']::after {
1816
+ opacity: 0.2;
1817
+ }
1818
+ }
1819
+
1820
+ /* Trigger when not focusing using the keyboard */
1821
+ :host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after {
1822
+ transform: scaleX(0);
1823
+ transition-duration: 0.15s, 1s;
1824
+ }
1825
+
1826
+ /* Focus-ring */
1827
+ :host([focus-ring]) [part='input-field'] {
1828
+ box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
1829
+ }
1830
+
1831
+ /* Read-only and disabled */
1832
+ :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {
1833
+ opacity: 0;
1834
+ }
1835
+
1836
+ /* Read-only style */
1837
+ :host([readonly]) {
1838
+ --vaadin-input-field-border-color: transparent;
1839
+ }
1840
+
1841
+ /* Disabled style */
1842
+ :host([disabled]) {
1843
+ pointer-events: none;
1844
+ --vaadin-input-field-border-color: var(--lumo-contrast-20pct);
1845
+ }
1846
+
1847
+ :host([disabled]) [part='label'],
1848
+ :host([disabled]) [part='input-field'] ::slotted([slot$='fix']) {
1849
+ color: var(--lumo-disabled-text-color);
1850
+ -webkit-text-fill-color: var(--lumo-disabled-text-color);
1851
+ }
1852
+
1853
+ :host([disabled]) [part='input-field'] ::slotted(:not([slot$='fix'])) {
1854
+ color: var(--_disabled-value-color);
1855
+ -webkit-text-fill-color: var(--_disabled-value-color);
1856
+ }
1857
+
1858
+ /* Invalid style */
1859
+ :host([invalid]) {
1860
+ --vaadin-input-field-border-color: var(--lumo-error-color);
1861
+ }
1862
+
1863
+ :host([invalid][focus-ring]) [part='input-field'] {
1864
+ box-shadow: 0 0 0 var(--_focus-ring-width) var(--lumo-error-color-50pct);
1865
+ }
1866
+
1867
+ :host([input-prevented]) [part='input-field'] {
1868
+ animation: shake 0.15s infinite;
1869
+ }
1870
+
1871
+ @keyframes shake {
1872
+ 25% {
1873
+ transform: translateX(4px);
1874
+ }
1875
+ 75% {
1876
+ transform: translateX(-4px);
1877
+ }
1878
+ }
1879
+
1880
+ /* Small theme */
1881
+ :host([theme~='small']) {
1882
+ font-size: var(--lumo-font-size-s);
1883
+ --lumo-text-field-size: var(--lumo-size-s);
1884
+ }
1885
+
1886
+ :host([theme~='small']) [part='label'] {
1887
+ font-size: var(--lumo-font-size-xs);
1888
+ }
1889
+
1890
+ :host([theme~='small']) [part='error-message'] {
1891
+ font-size: var(--lumo-font-size-xxs);
1892
+ }
1893
+
1894
+ /* Slotted content */
1895
+ [part='input-field'] ::slotted(:not(vaadin-icon):not(input):not(textarea)) {
1896
+ color: var(--lumo-secondary-text-color);
1897
+ font-weight: 400;
1898
+ }
1899
+
1900
+ [part='clear-button']::before {
1901
+ content: var(--lumo-icons-cross);
1902
+ }
1903
+ `];Tt("",Wt,{moduleId:"lumo-input-field-shared-styles"}),Tt("vaadin-date-picker",[Wt,y`
1904
+ [part='toggle-button']::before {
1905
+ content: var(--lumo-icons-calendar);
1906
+ }
1907
+
1908
+ [part='clear-button']::before {
1909
+ content: var(--lumo-icons-cross);
1910
+ }
1911
+
1912
+ @media (max-width: 450px), (max-height: 450px) {
1913
+ [part='overlay-content'] {
1914
+ height: 70vh;
1915
+ }
1916
+ }
1917
+
1918
+ :host([dir='rtl']) [part='input-field'] ::slotted(input) {
1919
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
1920
+ }
1921
+
1922
+ :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
1923
+ --_lumo-text-field-overflow-mask-image: none;
1924
+ }
1925
+ `],{moduleId:"lumo-date-picker"}),
1926
+ /**
1927
+ @license
1928
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1929
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1930
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1931
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1932
+ Code distributed by Google as part of the polymer project is also
1933
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1934
+ */
1935
+ window.JSCompiler_renameProperty=function(t){return t};
1936
+ /**
1937
+ @license
1938
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1939
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1940
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1941
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1942
+ Code distributed by Google as part of the polymer project is also
1943
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1944
+ */
1945
+ let Gt,$t,Ut=/(url\()([^)]*)(\))/g,Vt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function qt(t,e){if(t&&Vt.test(t))return t;if("//"===t)return t;if(void 0===Gt){Gt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Gt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Gt)try{return new URL(t,e).href}catch(e){return t}return $t||($t=document.implementation.createHTMLDocument("temp"),$t.base=$t.createElement("base"),$t.head.appendChild($t.base),$t.anchor=$t.createElement("a"),$t.body.appendChild($t.anchor)),$t.base.href=e,$t.anchor.href=t,$t.anchor.href||t}function Yt(t,e){return t.replace(Ut,(function(t,i,s,r){return i+"'"+qt(s.replace(/["']/g,""),e)+"'"+r}))}function Jt(t){return t.substring(0,t.lastIndexOf("/")+1)}
1946
+ /**
1947
+ @license
1948
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1949
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1950
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1951
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1952
+ Code distributed by Google as part of the polymer project is also
1953
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1954
+ */const Kt=!window.ShadyDOM||!window.ShadyDOM.inUse,Xt=Kt&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let Zt=window.Polymer&&window.Polymer.rootPath||Jt(document.baseURI||window.location.href),Qt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,te=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,ee=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,ie=window.Polymer&&window.Polymer.legacyOptimizations||!1,se=window.Polymer&&window.Polymer.legacyWarnings||!1,re=window.Polymer&&window.Polymer.syncInitialRender||!1,oe=window.Polymer&&window.Polymer.legacyUndefined||!1,ae=window.Polymer&&window.Polymer.orderedComputed||!1,ne=window.Polymer&&window.Polymer.removeNestedTemplates||!1,le=window.Polymer&&window.Polymer.fastDomIf||!1,he=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,ce=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,de=0;const ue=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=de++;return function(s){let r=s.__mixinSet;if(r&&r[i])return s;let o=e,a=o.get(s);if(!a){a=t(s),o.set(s,a);let e=Object.create(a.__mixinSet||r||null);e[i]=!0,a.__mixinSet=e}return a}};
1955
+ /**
1956
+ @license
1957
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1958
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1959
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1960
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1961
+ Code distributed by Google as part of the polymer project is also
1962
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1963
+ */let pe={},me={};function fe(t,e){pe[t]=me[t.toLowerCase()]=e}function be(t){return pe[t]||me[t.toLowerCase()]}class ge extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=be(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=qt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Jt(e)}return this.__assetpath}register(t){if(t=t||this.id){if(te&&void 0!==be(t))throw fe(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,fe(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}ge.prototype.modules=pe,customElements.define("dom-module",ge);
1964
+ /**
1965
+ @license
1966
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1967
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1968
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1969
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1970
+ Code distributed by Google as part of the polymer project is also
1971
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1972
+ */
1973
+ const ve="link[rel=import][type~=css]",ye="include",we="shady-unscoped";function xe(t){return ge.import(t)}function ke(t){const e=Yt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function _e(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...Ce(e[t]));return i}function Ce(t){const e=xe(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...De(e));const i=e.querySelector("template");i&&t.push(...Ae(i,e.assetpath)),e._styles=t}return e._styles}function Ae(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let r=s[t],o=r.getAttribute(ye);o&&i.push(..._e(o).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(r.textContent=Yt(r.textContent,e)),i.push(r)}t._styles=i}return t._styles}function De(t){const e=[],i=t.querySelectorAll(ve);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(we);if(i&&!t._unscopedStyle){const e=ke(t);e.setAttribute(we,""),t._unscopedStyle=e}else t._style||(t._style=ke(t));e.push(i?t._unscopedStyle:t._style)}}return e}
1974
+ /**
1975
+ @license
1976
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1977
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1978
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1979
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1980
+ Code distributed by Google as part of the polymer project is also
1981
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1982
+ */const Se=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
1983
+ /**
1984
+ @license
1985
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1986
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1987
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1988
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1989
+ Code distributed by Google as part of the polymer project is also
1990
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1991
+ */function Te(t){return t.indexOf(".")>=0}function ze(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Be(t,e){return 0===t.indexOf(e+".")}function Ne(t,e){return 0===e.indexOf(t+".")}function Ie(t,e,i){return e+i.slice(t.length)}function Pe(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function Me(t){return Array.isArray(t)?Pe(t).split("."):t.toString().split(".")}function Oe(t,e,i){let s=t,r=Me(e);for(let t=0;t<r.length;t++){if(!s)return;s=s[r[t]]}return i&&(i.path=r.join(".")),s}function Fe(t,e,i){let s=t,r=Me(e),o=r[r.length-1];if(r.length>1){for(let t=0;t<r.length-1;t++)if(s=s[r[t]],!s)return;s[o]=i}else s[e]=i;return r.join(".")}
1992
+ /**
1993
+ @license
1994
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1995
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1996
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1997
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1998
+ Code distributed by Google as part of the polymer project is also
1999
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2000
+ */const Ee={},Re=/-[a-z]/g,je=/([A-Z])/g;function Le(t){return Ee[t]||(Ee[t]=t.indexOf("-")<0?t:t.replace(Re,(t=>t[1].toUpperCase())))}function He(t){return Ee[t]||(Ee[t]=t.replace(je,"-$1").toLowerCase())}
2001
+ /**
2002
+ @license
2003
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2004
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2005
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2006
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2007
+ Code distributed by Google as part of the polymer project is also
2008
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2009
+ */let We=0,Ge=0,$e=[],Ue=0,Ve=!1,qe=document.createTextNode("");new window.MutationObserver((function(){Ve=!1;const t=$e.length;for(let e=0;e<t;e++){let t=$e[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}$e.splice(0,t),Ge+=t})).observe(qe,{characterData:!0});const Ye={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Je={run:t=>(Ve||(Ve=!0,qe.textContent=Ue++),$e.push(t),We++),cancel(t){const e=t-Ge;if(e>=0){if(!$e[e])throw new Error("invalid async handle: "+t);$e[e]=null}}},Ke=Je,Xe=ue((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],r=this._shouldPropertyChange(t,e,s);return r&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),r}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Ke.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,r=s&&s[t]||t;this[r]=this._deserializeValue(e,i||this.constructor.typeForProperty(r))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=Se(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Ze={};let Qe=HTMLElement.prototype;for(;Qe;){let t=Object.getOwnPropertyNames(Qe);for(let e=0;e<t.length;e++)Ze[t[e]]=!0;Qe=Object.getPrototypeOf(Qe)}const ti=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,ei=ue((t=>{const e=Xe(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Le(t[e]))}static attributeNameForProperty(t){return He(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(ti(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!Ze[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),ii={"dom-if":!0,"dom-repeat":!0};let si=!1,ri=!1;const oi=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const r=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(r,s)):e.setAttribute(s,r)}})();function ai(t){let e=t.getAttribute("is");if(e&&ii[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];oi(t,i,e),i.removeAttribute(e)}}return t}function ni(t,e){let i=e.parentInfo&&ni(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function li(t,e,i,s){s.id&&(e[s.id]=i)}function hi(t,e,i){if(i.events&&i.events.length)for(let s,r=0,o=i.events;r<o.length&&(s=o[r]);r++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function ci(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const di=ue((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,r=t;return"template"!=r.localName||r.hasAttribute("preserve-content")?"slot"===r.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(r,e,i)||s,function(t){(function(){if(!si){si=!0;const t=document.createElement("textarea");t.placeholder="a",ri=t.placeholder===t.textContent}return ri})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(r),r.firstChild&&this._parseTemplateChildNodes(r,e,i),r.hasAttributes&&r.hasAttributes()&&(s=this._parseTemplateNodeAttributes(r,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,r=t.firstChild,o=0;r;r=s){if("template"==r.localName&&(r=ai(r)),s=r.nextSibling,r.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)r.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!r.textContent.trim()){t.removeChild(r);continue}}let a={parentIndex:o,parentInfo:i};this._parseTemplateNode(r,e,a)&&(a.infoIndex=e.nodeInfoList.push(a)-1),r.parentNode&&o++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,r=this._parseTemplate(s,e);return(r.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=r,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,r=Array.from(t.attributes);for(let o,a=r.length-1;o=r[a];a--)s=this._parseTemplateNodeAttribute(t,e,i,o.name,o.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,r){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:r}),!0):"id"===s&&(i.id=r,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let r=s.nodeList=new Array(i.length);s.$={};for(let t,o=0,a=i.length;o<a&&(t=i[o]);o++){let i=r[o]=ni(s,t);li(0,s.$,i,t),ci(0,i,t,e),hi(this,i,t)}return s}_addMethodEventListenerToNode(t,e,i,s){let r=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,r),r}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
2010
+ /**
2011
+ * @fileoverview
2012
+ * @suppress {checkPrototypalTypes}
2013
+ * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2014
+ * This code may only be used under the BSD style license found at
2015
+ * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
2016
+ * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
2017
+ * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
2018
+ * Google as part of the polymer project is also subject to an additional IP
2019
+ * rights grant found at http://polymer.github.io/PATENTS.txt
2020
+ */let ui=0;const pi=[],mi={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},fi="__computeInfo",bi=/[A-Z]/;function gi(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function vi(t,e,i,s,r,o){if(e){let a=!1;const n=ui++;for(let l in i){let h=e[r?ze(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===n||r&&!wi(l,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,l,i,s,e.info,r,o),a=!0)}return a}return!1}function yi(t,e,i,s,r,o,a,n){let l=!1,h=e[a?ze(s):s];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===i||a&&!wi(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,r,o,e.info,a,n),l=!0);return l}function wi(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Be(i,t))||!(!e.wildcard||!Ne(i,t))}return!0}function xi(t,e,i,s,r){let o="string"==typeof r.method?t[r.method]:r.method,a=r.property;o?o.call(t,t.__data[a],s[a]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function ki(t,e,i){let s=ze(e);return s!==e&&(_i(t,He(s)+"-changed",i[e],e),!0)}function _i(t,e,i,s){let r={value:i,queueProperty:!0};s&&(r.path=s),Se(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function Ci(t,e,i,s,r,o){let a=(o?ze(e):e)!=e?e:null,n=a?Oe(t,a):t.__data[e];a&&void 0===n&&(n=i[e]),_i(t,r.eventName,n,a)}function Ai(t,e,i,s,r){let o=t.__data[e];Qt&&(o=Qt(o,r.attrName,"attribute",t)),t._propertyToAttribute(e,r.attrName,o)}const Di=(t,e,i)=>{let s=0,r=e.length-1,o=-1;for(;s<=r;){const a=s+r>>1,n=i.get(e[a].methodInfo)-i.get(t.methodInfo);if(n<0)s=a+1;else{if(!(n>0)){o=a;break}r=a-1}}o<0&&(o=r+1),e.splice(o,0,t)},Si=(t,e,i,s,r)=>{const o=e[r?ze(t):t];if(o)for(let e=0;e<o.length;e++){const a=o[e];a.info.lastRun===ui||r&&!wi(t,a.trigger)||(a.info.lastRun=ui,Di(a.info,i,s))}};function Ti(t,e,i,s,r){let o=Oi(t,e,i,0,r);if(o===pi)return!1;let a=r.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[a]?t._setPendingProperty(a,o,!0):(t[a]=o,!1)}function zi(t,e,i,s,r,o,a){i.bindings=i.bindings||[];let n={kind:s,target:r,parts:o,literal:a,isCompound:1!==o.length};if(i.bindings.push(n),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(n)){let{event:t,negate:e}=n.parts[0];n.listenerEvent=t||He(r)+"-changed",n.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<n.parts.length;i++){let s=n.parts[i];s.compoundIndex=i,Bi(t,e,n,s,l)}}function Bi(t,e,i,s,r){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let o=s.dependencies,a={index:r,binding:i,part:s,evaluator:t};for(let i=0;i<o.length;i++){let s=o[i];"string"==typeof s&&(s=Wi(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Ni,info:a,trigger:s})}}}function Ni(t,e,i,s,r,o,a){let n=a[r.index],l=r.binding,h=r.part;if(o&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&n.__isPropertyEffectsClient&&n.__dataHasAccessor&&n.__dataHasAccessor[l.target]){let s=i[e];e=Ie(h.source,l.target,e),n._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(n)}else{let a=r.evaluator._evaluateBinding(t,h,e,i,s,o);a!==pi&&function(t,e,i,s,r){if(r=function(t,e,i,s){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[s.compoundIndex]=e,e=r.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,r,i,s),Qt&&(r=Qt(r,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,r,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[mi.READ_ONLY]&&e[mi.READ_ONLY][s]||e._setPendingProperty(s,r)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,r)}}(t,n,l,h,a)}}function Ii(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,r=new Array(s.length);for(let t=0;t<s.length;t++)r[t]=s[t].literal;let o=e.target;i[o]=r,e.literal&&"property"==e.kind&&("className"===o&&(t=Se(t)),t[o]=e.literal)}}function Pi(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,r){let o,a=t.detail,n=a&&a.path;n?(s=Ie(i,s,n),o=a&&a.value):o=t.currentTarget[i],o=r?!o:o,e[mi.READ_ONLY]&&e[mi.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,o,!0,Boolean(n))||a&&a.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function Mi(t,e,i,s,r,o){let a={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:o=e.static||o&&("object"!=typeof o||o[e.methodName])};for(let r,o=0;o<e.args.length&&(r=e.args[o]);o++)r.literal||t._addPropertyEffect(r.rootProperty,i,{fn:s,info:a,trigger:r});return o&&t._addPropertyEffect(e.methodName,i,{fn:s,info:a}),a}function Oi(t,e,i,s,r){let o=t._methodHost||t,a=o[r.methodName];if(a){let s=t._marshalArgs(r.args,e,i);return s===pi?pi:a.apply(o,s)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const Fi=[],Ei="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Ri="(?:("+Ei+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",ji=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Ei+"\\s*(?:\\(\\s*(?:(?:"+Ri+"(?:,\\s*"+Ri+")*)?)\\)\\s*)?)(?:]]|}})","g");function Li(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Hi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Fi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Wi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function Wi(t){let e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=ze(e),i.structured=Te(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Gi(t,e,i){let s=Oe(t,i);return void 0===s&&(s=e[i]),s}function $i(t,e,i,s){const r={indexSplices:s};oe&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),oe&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function Ui(t,e,i,s,r,o){$i(t,e,i,[{index:s,addedCount:r,removed:o,object:e,type:"splice"}])}const Vi=ue((t=>{const e=di(ei(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return mi}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(qi.length){let t=qi[qi.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[mi.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==mi.READ_ONLY);let s=gi(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=gi(this,e,!0)[t],r=s.indexOf(i);r>=0&&s.splice(r,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,mi.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,mi.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,mi.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,mi.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||ze(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Oe(this,t);if(!(t=Fe(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let r;for(let o in s){let a=s[o];Ne(o,e)?(r=Ie(o,a,e),t._setPendingPropertyOrPath(r,i,!0,!0)):Ne(a,e)&&(r=Ie(a,o,e),t._setPendingPropertyOrPath(r,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=Se(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&Te(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[mi.NOTIFY]&&this[mi.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[mi.READ_ONLY]&&this[mi.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,r=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let r=t[mi.COMPUTE];if(r)if(ae){ui++;const o=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[mi.COMPUTE];let s,{counts:r,ready:o,total:a}=function(t){const e=t[fi],i={},s=t[mi.COMPUTE],r=[];let o=0;for(let t in e){const s=e[t];o+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||r.push(t);return{counts:i,ready:r,total:o}}(t);for(;s=o.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--r[e]&&o.push(e)}))}0!==a&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),a=[];for(let t in e)Si(t,r,a,o,s);let n;for(;n=a.shift();)Ti(t,"",e,0,n)&&Si(n.methodInfo,r,a,o,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;vi(t,r,o,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}(this,e,i,r),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,r),this._flushClients(),vi(this,this[mi.REFLECT],e,i,r),vi(this,this[mi.OBSERVE],e,i,r),s&&function(t,e,i,s,r){let o,a,n=t[mi.NOTIFY],l=ui++;for(let a in e)e[a]&&(n&&yi(t,n,l,a,i,s,r)||r&&ki(t,a,i))&&(o=!0);o&&(a=t.__dataHost)&&a._invalidateProperties&&a._invalidateProperties()}(this,s,e,i,r),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[mi.PROPAGATE]&&vi(this,this[mi.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const r=(e,s)=>{vi(this,t.propertyEffects,e,i,s,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,e,i,s)};t.runEffects?t.runEffects(r,e,s):r(e,s)}linkPaths(t,e){t=Pe(t),e=Pe(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Pe(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};$i(this,Oe(this,t,i),i.path,e)}get(t,e){return Oe(e||this,t)}set(t,e,i){i?Fe(i,t,e):this[mi.READ_ONLY]&&this[mi.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Oe(this,t,i),r=s.length,o=s.push(...e);return e.length&&Ui(this,s,i.path,r,e.length,[]),o}pop(t){let e={path:""},i=Oe(this,t,e),s=Boolean(i.length),r=i.pop();return s&&Ui(this,i,e.path,i.length,0,[r]),r}splice(t,e,i,...s){let r,o={path:""},a=Oe(this,t,o);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),r=2===arguments.length?a.splice(e):a.splice(e,i,...s),(s.length||r.length)&&Ui(this,a,o.path,e,s.length,r),r}shift(t){let e={path:""},i=Oe(this,t,e),s=Boolean(i.length),r=i.shift();return s&&Ui(this,i,e.path,0,0,[r]),r}unshift(t,...e){let i={path:""},s=Oe(this,t,i),r=s.unshift(...e);return e.length&&Ui(this,s,i.path,0,e.length,[]),r}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Oe(this,t,s),i=s.path}else i=Array.isArray(t)?Pe(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,mi.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,mi.OBSERVE,{fn:xi,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,mi.OBSERVE,{fn:xi,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Hi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Mi(this,i,mi.OBSERVE,Oi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,mi.NOTIFY,{fn:Ci,info:{eventName:He(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,mi.REFLECT,{fn:Ai,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Hi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const r=Mi(this,s,mi.COMPUTE,Ti,t,i);gi(this,fi)[t]=r}_marshalArgs(t,e,i){const s=this.__data,r=[];for(let o=0,a=t.length;o<a;o++){let{name:a,structured:n,wildcard:l,value:h,literal:c}=t[o];if(!c)if(l){const t=Ne(a,e),r=Gi(s,i,t?e:a);h={path:t?e:a,value:r,base:t?Oe(s,a):r}}else h=n?Gi(s,i,a):s[a];if(oe&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return pi;r[o]=h}return r}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),qi.push(this);let i=super._stampTemplate(t,e);if(qi.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let r=i[e],o=s[e].bindings;if(o)for(let e=0;e<o.length;e++){let i=o[e];Ii(r,i),Pi(r,t,i)}r.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:r}=e;i?i.nextSibling=s:r&&(r.firstChild=s),s?s.previousSibling=i:r&&(r.lastChild=i),e.nextSibling=e.previousSibling=null;let o=e.childNodes;for(let t=0;t<o.length;t++){let e=o[t];Se(Se(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let r=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Li(e)||" ",zi(this,i,s,"text","textContent",e),r=!0)}return r}static _parseTemplateNodeAttribute(t,i,s,r,o){let a=this._parseBindings(o,i);if(a){let e=r,o="property";bi.test(r)?o="attribute":"$"==r[r.length-1]&&(r=r.slice(0,-1),o="attribute");let n=Li(a);return n&&"attribute"==o&&("class"==r&&t.hasAttribute("class")&&(n+=" "+t.getAttribute(r)),t.setAttribute(r,n)),"attribute"==o&&"disable-upgrade$"==e&&t.setAttribute(r,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===o&&(r=Le(r)),zi(this,i,s,o,r,a,n),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,r,o)}static _parseTemplateNestedTemplate(t,i,s){let r=e._parseTemplateNestedTemplate.call(this,t,i,s);const o=t.parentNode,a=s.templateInfo,n="dom-if"===o.localName;ne&&(n||"dom-repeat"===o.localName)&&(o.removeChild(t),(s=s.parentInfo).templateInfo=a,s.noted=!0,r=!1);let l=a.hostProps;if(le&&n)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ne||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)zi(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return r}static _parseBindings(t,e){let i,s=[],r=0;for(;null!==(i=ji.exec(t));){i.index>r&&s.push({literal:t.slice(r,i.index)});let o=i[1][0],a=Boolean(i[2]),n=i[3].trim(),l=!1,h="",c=-1;"{"==o&&(c=n.indexOf("::"))>0&&(h=n.substring(c+2),n=n.substring(0,c),l=!0);let d=Hi(n),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(n);s.push({source:n,mode:o,negate:a,customEvent:l,signature:d,dependencies:u,event:h}),r=ji.lastIndex}if(r&&r<t.length){let e=t.substring(r);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,r,o){let a;return a=e.signature?Oi(t,i,s,0,e.signature):i!=e.source?Oe(t,e.source):o&&Te(i)?Oe(t,i):t.__data[i],e.negate&&(a=!a),a}}})),qi=[],Yi=ue((t=>{const e=Xe(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
2021
+ /**
2022
+ @license
2023
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2024
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2025
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2026
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2027
+ Code distributed by Google as part of the polymer project is also
2028
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2029
+ */
2030
+ function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class r extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return r})),Ji=window.ShadyCSS&&window.ShadyCSS.cssBuild,Ki=ue((t=>{const e=Yi(Vi(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):ie||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!te||ee)&&(e=ge.import(t,"template"),te&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Jt(t.url);else{const t=ge.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Zt,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return Yt(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,s){if(!Ji){const r=e.content.querySelectorAll("style"),o=Ae(e),a=function(t){let e=xe(t);return e?De(e):[]}(i),n=e.content.firstElementChild;for(let i=0;i<a.length;i++){let r=a[i];r.textContent=t._processStyleText(r.textContent,s),e.content.insertBefore(r,n)}let l=0;for(let e=0;e<o.length;e++){let i=o[e],a=r[l];a!==i?(i=i.cloneNode(!0),a.parentNode.insertBefore(i,a)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),ce&&Ji&&Xt){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?qt(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=Se(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),re&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=qt(this.importPath)),qt(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return!se||i in this._properties||s.info.part.signature&&s.info.part.signature.static||s.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,s)}}})),Xi=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Zi{constructor(t,e){es(t,e);const i=e.reduce(((e,i,s)=>e+Qi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Qi(t){if(t instanceof Zi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const ts=function(t,...e){es(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Zi)return Qi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Xi&&(s=Xi.createHTML(s)),i.innerHTML=s,i},es=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},is=Ki(HTMLElement),ss=[];function rs(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function os(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=os();ss.forEach((e=>{rs(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const as=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),rs(this,os(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=os(),r=i===s&&-1===ss.indexOf(this),o=!i&&e&&-1===ss.indexOf(this),a=i!==s&&e===s;r||o?(this.__subscribe(),rs(this,s,i)):a&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=ss.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(){ss.includes(this)||ss.push(this)}__unsubscribe(){ss.includes(this)&&ss.splice(ss.indexOf(this),1)}}
2031
+ /**
2032
+ * @license
2033
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2034
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2035
+ */,ns=t=>class extends t{static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}
2036
+ /**
2037
+ * @license
2038
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2039
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2040
+ */;
2041
+ /**
2042
+ * @license
2043
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2044
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2045
+ */
2046
+ Tt("vaadin-input-container",y`
2047
+ :host {
2048
+ display: flex;
2049
+ align-items: center;
2050
+ flex: 0 1 auto;
2051
+ border-radius:
2052
+ /* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius */
2053
+ var(--vaadin-input-field-top-start-radius, var(--__border-radius))
2054
+ var(--vaadin-input-field-top-end-radius, var(--__border-radius))
2055
+ var(--vaadin-input-field-bottom-end-radius, var(--__border-radius))
2056
+ var(--vaadin-input-field-bottom-start-radius, var(--__border-radius));
2057
+ --_border-radius: var(--vaadin-input-field-border-radius, 0);
2058
+ --_input-border-width: var(--vaadin-input-field-border-width, 0);
2059
+ --_input-border-color: var(--vaadin-input-field-border-color, transparent);
2060
+ box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
2061
+ }
2062
+
2063
+ :host([dir='rtl']) {
2064
+ border-radius:
2065
+ /* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
2066
+ var(--vaadin-input-field-top-end-radius, var(--_border-radius))
2067
+ var(--vaadin-input-field-top-start-radius, var(--_border-radius))
2068
+ var(--vaadin-input-field-bottom-start-radius, var(--_border-radius))
2069
+ var(--vaadin-input-field-bottom-end-radius, var(--_border-radius));
2070
+ }
2071
+
2072
+ :host([hidden]) {
2073
+ display: none !important;
2074
+ }
2075
+
2076
+ /* Reset the native input styles */
2077
+ ::slotted(input) {
2078
+ -webkit-appearance: none;
2079
+ -moz-appearance: none;
2080
+ flex: auto;
2081
+ white-space: nowrap;
2082
+ overflow: hidden;
2083
+ width: 100%;
2084
+ height: 100%;
2085
+ outline: none;
2086
+ margin: 0;
2087
+ padding: 0;
2088
+ border: 0;
2089
+ border-radius: 0;
2090
+ min-width: 0;
2091
+ font: inherit;
2092
+ line-height: normal;
2093
+ color: inherit;
2094
+ background-color: transparent;
2095
+ /* Disable default invalid style in Firefox */
2096
+ box-shadow: none;
2097
+ }
2098
+
2099
+ ::slotted(*) {
2100
+ flex: none;
2101
+ }
2102
+
2103
+ ::slotted(:is(input, textarea))::placeholder {
2104
+ /* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
2105
+ /* because ::slotted(...)::placeholder does not work in Safari. */
2106
+ font: inherit;
2107
+ color: inherit;
2108
+ /* Override default opacity in Firefox */
2109
+ opacity: 1;
2110
+ }
2111
+ `,{moduleId:"vaadin-input-container-styles"});class ls extends(ns(Pt(as(is)))){static get is(){return"vaadin-input-container"}static get template(){return ts`
2112
+ <slot name="prefix"></slot>
2113
+ <slot></slot>
2114
+ <slot name="suffix"></slot>
2115
+ `}}u(ls);
2116
+ /**
2117
+ * @license
2118
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
2119
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2120
+ */
2121
+ const hs=y`
2122
+ :host {
2123
+ z-index: 200;
2124
+ position: fixed;
2125
+
2126
+ /* Despite of what the names say, <vaadin-overlay> is just a container
2127
+ for position/sizing/alignment. The actual overlay is the overlay part. */
2128
+
2129
+ /* Default position constraints: the entire viewport. Note: themes can
2130
+ override this to introduce gaps between the overlay and the viewport. */
2131
+ inset: 0;
2132
+ bottom: var(--vaadin-overlay-viewport-bottom);
2133
+
2134
+ /* Use flexbox alignment for the overlay part. */
2135
+ display: flex;
2136
+ flex-direction: column; /* makes dropdowns sizing easier */
2137
+ /* Align to center by default. */
2138
+ align-items: center;
2139
+ justify-content: center;
2140
+
2141
+ /* Allow centering when max-width/max-height applies. */
2142
+ margin: auto;
2143
+
2144
+ /* The host is not clickable, only the overlay part is. */
2145
+ pointer-events: none;
2146
+
2147
+ /* Remove tap highlight on touch devices. */
2148
+ -webkit-tap-highlight-color: transparent;
2149
+
2150
+ /* CSS API for host */
2151
+ --vaadin-overlay-viewport-bottom: 0;
2152
+ }
2153
+
2154
+ :host([hidden]),
2155
+ :host(:not([opened]):not([closing])),
2156
+ :host(:not([opened]):not([closing])) [part='overlay'] {
2157
+ display: none !important;
2158
+ }
2159
+
2160
+ [part='overlay'] {
2161
+ -webkit-overflow-scrolling: touch;
2162
+ overflow: auto;
2163
+ pointer-events: auto;
2164
+
2165
+ /* Prevent overflowing the host */
2166
+ max-width: 100%;
2167
+ box-sizing: border-box;
2168
+
2169
+ -webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
2170
+ }
2171
+
2172
+ [part='backdrop'] {
2173
+ z-index: -1;
2174
+ content: '';
2175
+ background: rgba(0, 0, 0, 0.5);
2176
+ position: fixed;
2177
+ inset: 0;
2178
+ pointer-events: auto;
2179
+ }
2180
+ `;
2181
+ /**
2182
+ * @license
2183
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2184
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2185
+ */let cs=!1;function ds(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function us(){return cs}function ps(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}function ms(t,e){const i=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===i||0===s?s>i:i>s}function fs(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)ms(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(fs(t.slice(0,i)),fs(t.slice(i)))}function bs(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||ps(t)}function gs(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function vs(t){return t.getRootNode().activeElement===t}function ys(t,e){if(t.nodeType!==Node.ELEMENT_NODE||ps(t))return!1;const i=t,s=function(t){if(!gs(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let r=s>0;s>=0&&e.push(i);let o=[];return o="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...o].forEach((t=>{r=ys(t,e)||r})),r}window.addEventListener("keydown",(()=>{cs=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{cs=!1}),{capture:!0});
2186
+ /**
2187
+ @license
2188
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2189
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2190
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2191
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2192
+ Code distributed by Google as part of the polymer project is also
2193
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2194
+ */
2195
+ let ws=!1,xs=[],ks=[];function _s(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function Cs(t,e,i){ws||(ws=!0,requestAnimationFrame((function(){ws=!1,function(t){for(;t.length;)_s(t.shift())}(xs),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)_s(t.shift())}(ks)}))}))),ks.push([t,e,i])}
2196
+ /**
2197
+ * @license
2198
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2199
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2200
+ */const As=t=>t.test(navigator.userAgent),Ds=t=>t.test(navigator.platform);As(/Android/u),As(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),As(/Firefox/u);const Ss=Ds(/^iPad/u)||Ds(/^Mac/u)&&navigator.maxTouchPoints>1,Ts=Ds(/^iPhone/u)||Ss;As(/^((?!chrome|android).)*safari/iu);const zs=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
2201
+ /**
2202
+ * @license
2203
+ * Copyright (c) 2017 Anton Korzunov
2204
+ * SPDX-License-Identifier: MIT
2205
+ */let Bs=new WeakMap,Ns=new WeakMap,Is={},Ps=0;const Ms=t=>t&&t.nodeType===Node.ELEMENT_NODE,Os=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},Fs=(t,e=document.body,i="data-aria-hidden")=>{const s=Array.from(Array.isArray(t)?t:[t]);return e&&s.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,s)=>{const r=((t,e)=>Ms(t)?e.map((e=>{if(!Ms(e))return Os(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 Os(e,"is not contained inside",t),null})).filter((t=>Boolean(t))):(Os(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);Is[i]||(Is[i]=new WeakMap);const o=Is[i],a=[],n=new Set,l=new Set(r),h=t=>{if(!t||n.has(t))return;n.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};r.forEach(h);const c=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(n.has(t))c(t);else{const e=t.getAttribute(s),r=null!==e&&"false"!==e,n=(Bs.get(t)||0)+1,l=(o.get(t)||0)+1;Bs.set(t,n),o.set(t,l),a.push(t),1===n&&r&&Ns.set(t,!0),1===l&&t.setAttribute(i,"true"),r||t.setAttribute(s,"true")}}))};return c(e),n.clear(),Ps+=1,()=>{a.forEach((t=>{const e=Bs.get(t)-1,r=o.get(t)-1;Bs.set(t,e),o.set(t,r),e||(Ns.has(t)?Ns.delete(t):t.removeAttribute(s)),r||t.removeAttribute(i)})),Ps-=1,Ps||(Bs=new WeakMap,Bs=new WeakMap,Ns=new WeakMap,Is={})}})(s,e,i,"aria-hidden")};
2206
+ /**
2207
+ * @license
2208
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2209
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2210
+ */
2211
+ class Es{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=Fs(t)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}
2212
+ /**
2213
+ * @license
2214
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2215
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2216
+ */class Rs{saveFocus(t){this.focusNode=t||ds()}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=!!t&&t.preventScroll;ds()===document.body?setTimeout((()=>e.focus({preventScroll:i}))):e.focus({preventScroll:i}),this.focusNode=null}}
2217
+ /**
2218
+ * @license
2219
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2220
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2221
+ */const js=[];class Ls{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return ys(t,e)?fs(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(vs).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");js.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,js.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(js).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}}
2222
+ /**
2223
+ * @license
2224
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2225
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2226
+ */const Hs=ue((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})),Ws=t=>class extends(Hs(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Es(this),this.__focusTrapController=new Ls(this),this.__focusRestorationController=new Rs}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const t=!us();this.__focusRestorationController.restoreFocus({preventScroll:t})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=ds();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
2227
+ /**
2228
+ * @license
2229
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
2230
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2231
+ */,Gs=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),$s=()=>Gs().filter((t=>t.$.overlay)),Us=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===$s().pop())()}bringToFront(){let t="";const e=Gs().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),$s().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=$s();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
2232
+ /**
2233
+ * @license
2234
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
2235
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2236
+ */,Vs=t=>class extends(Ws(Us(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},owner:{type:Object,sync:!0},model:{type:Object,sync:!0},renderer:{type:Object,sync:!0},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged",sync:!0},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged",sync:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),Ts&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e>t&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,s){const r=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const o=this._oldRenderer!==t,a=void 0!==this._oldRenderer;this._oldRenderer=t;const n=this._oldOpened!==s;this._oldOpened=s,o&&a&&(this.innerHTML="",delete this._$litPart$),s&&t&&(o||n||r)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),Cs(this,(()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const i=`__${t}Handler`,s=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
2237
+ /**
2238
+ * @license
2239
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2240
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2241
+ */;
2242
+ /**
2243
+ * @license
2244
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
2245
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2246
+ */function qs(t){const e=[];let i;return"slot"===t.localName?i=t.assignedElements():(e.push(t),i=[...t.children]),i.forEach((t=>e.push(...qs(t)))),e}function Ys(t){return t?new Set(t.split(" ")):new Set}function Js(t){return t?[...t].join(" "):""}function Ks(t,e,i){const s=Ys(t.getAttribute(e));s.add(i),t.setAttribute(e,Js(s))}
2247
+ /**
2248
+ * @license
2249
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
2250
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2251
+ */
2252
+ const Xs={start:"top",end:"bottom"},Zs={start:"left",end:"right"},Qs=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),tr=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)})),this.positionTarget&&(this.__observePositionTargetMove=
2253
+ /**
2254
+ * @license
2255
+ * Copyright (c) 2024 Vaadin Ltd.
2256
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2257
+ */
2258
+ function(t,e){let i=null;const s=document.documentElement;function r(){i&&i.disconnect(),i=null}return function o(a=!1,n=1){r();const{left:l,top:h,width:c,height:d}=t.getBoundingClientRect();if(a||e(),!c||!d)return;const u={rootMargin:`${-Math.floor(h)}px ${-Math.floor(s.clientWidth-(l+c))}px ${-Math.floor(s.clientHeight-(h+d))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,n))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==n){if(!p)return o();0===e&&(e=1e-7),o(!1,e)}p=!1}),u),i.observe(t)}(!0),r}(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Qs.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Qs.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,s=this.__shouldAlignStartHorizontally(t,i),r=!i&&s||i&&!s;this.style.alignItems=r?"flex-start":"flex-end";const o=this.getBoundingClientRect(),a=this.__calculatePositionInOneDimension(t,o,this.noVerticalOverlap,Xs,this,e),n=this.__calculatePositionInOneDimension(t,o,this.noHorizontalOverlap,Zs,this,s);Object.assign(this.style,a,n),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!r),this.toggleAttribute("start-aligned",r)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,s,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Zs)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,i,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,Xs)}__shouldAlignStart(t,e,i,s,r,o,a){const n=i-t[o?a.end:a.start]-s[a.end],l=t[o?a.start:a.end]-s[a.start],h=r?n:l;return r===(h>(r?l:n)||h>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===Xs.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(s=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===Zs.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return s}__calculatePositionInOneDimension(t,e,i,s,r,o){const a=o?s.start:s.end,n=o?s.end:s.start,l=parseFloat(r.style[a]||getComputedStyle(r)[a]),h=this.__adjustBottomProperty(a,s,l),c=h?`${h}px`:`${l+(e[o?s.start:s.end]-t[i===o?s.end:s.start])*(o?-1:1)}px`;return{[a]:c,[n]:""}}}
2259
+ /**
2260
+ * @license
2261
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
2262
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2263
+ */,er=t=>class extends(tr(Vs(t))){_shouldCloseOnOutsideClick(t){return!t.composedPath().includes(this.positionTarget)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!gs(t.composedPath()[0])&&t.preventDefault()}}
2264
+ /**
2265
+ * @license
2266
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
2267
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2268
+ */;
2269
+ /**
2270
+ * @license
2271
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
2272
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2273
+ */
2274
+ Tt("vaadin-date-picker-overlay",[hs,y`
2275
+ [part='overlay'] {
2276
+ display: flex;
2277
+ flex: auto;
2278
+ }
2279
+
2280
+ [part~='content'] {
2281
+ flex: auto;
2282
+ }
2283
+
2284
+ @media (forced-colors: active) {
2285
+ [part='overlay'] {
2286
+ outline: 3px solid;
2287
+ }
2288
+ }
2289
+ `],{moduleId:"vaadin-date-picker-overlay-styles"});class ir extends(er(as(Pt(is)))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return ts`
2290
+ <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
2291
+ <div part="overlay" id="overlay">
2292
+ <div part="content" id="content">
2293
+ <slot></slot>
2294
+ </div>
2295
+ </div>
2296
+ `}}u(ir);const sr=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,rr=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function or(t,e){if("function"!=typeof t)return;const i=sr.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function ar(){
2297
+ /*! vaadin-dev-mode:start
2298
+ (function () {
2299
+ 'use strict';
2300
+
2301
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
2302
+ return typeof obj;
2303
+ } : function (obj) {
2304
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2305
+ };
2306
+
2307
+ var classCallCheck = function (instance, Constructor) {
2308
+ if (!(instance instanceof Constructor)) {
2309
+ throw new TypeError("Cannot call a class as a function");
2310
+ }
2311
+ };
2312
+
2313
+ var createClass = function () {
2314
+ function defineProperties(target, props) {
2315
+ for (var i = 0; i < props.length; i++) {
2316
+ var descriptor = props[i];
2317
+ descriptor.enumerable = descriptor.enumerable || false;
2318
+ descriptor.configurable = true;
2319
+ if ("value" in descriptor) descriptor.writable = true;
2320
+ Object.defineProperty(target, descriptor.key, descriptor);
2321
+ }
2322
+ }
2323
+
2324
+ return function (Constructor, protoProps, staticProps) {
2325
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
2326
+ if (staticProps) defineProperties(Constructor, staticProps);
2327
+ return Constructor;
2328
+ };
2329
+ }();
2330
+
2331
+ var getPolymerVersion = function getPolymerVersion() {
2332
+ return window.Polymer && window.Polymer.version;
2333
+ };
2334
+
2335
+ var StatisticsGatherer = function () {
2336
+ function StatisticsGatherer(logger) {
2337
+ classCallCheck(this, StatisticsGatherer);
2338
+
2339
+ this.now = new Date().getTime();
2340
+ this.logger = logger;
2341
+ }
2342
+
2343
+ createClass(StatisticsGatherer, [{
2344
+ key: 'frameworkVersionDetectors',
2345
+ value: function frameworkVersionDetectors() {
2346
+ return {
2347
+ 'Flow': function Flow() {
2348
+ if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {
2349
+ var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {
2350
+ return window.Vaadin.Flow.clients[key];
2351
+ }).filter(function (client) {
2352
+ return client.getVersionInfo;
2353
+ }).map(function (client) {
2354
+ return client.getVersionInfo().flow;
2355
+ });
2356
+ if (flowVersions.length > 0) {
2357
+ return flowVersions[0];
2358
+ }
2359
+ }
2360
+ },
2361
+ 'Vaadin Framework': function VaadinFramework() {
2362
+ if (window.vaadin && window.vaadin.clients) {
2363
+ var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {
2364
+ return client.getVersionInfo;
2365
+ }).map(function (client) {
2366
+ return client.getVersionInfo().vaadinVersion;
2367
+ });
2368
+ if (frameworkVersions.length > 0) {
2369
+ return frameworkVersions[0];
2370
+ }
2371
+ }
2372
+ },
2373
+ 'AngularJs': function AngularJs() {
2374
+ if (window.angular && window.angular.version && window.angular.version) {
2375
+ return window.angular.version.full;
2376
+ }
2377
+ },
2378
+ 'Angular': function Angular() {
2379
+ if (window.ng) {
2380
+ var tags = document.querySelectorAll("[ng-version]");
2381
+ if (tags.length > 0) {
2382
+ return tags[0].getAttribute("ng-version");
2383
+ }
2384
+ return "Unknown";
2385
+ }
2386
+ },
2387
+ 'Backbone.js': function BackboneJs() {
2388
+ if (window.Backbone) {
2389
+ return window.Backbone.VERSION;
2390
+ }
2391
+ },
2392
+ 'React': function React() {
2393
+ var reactSelector = '[data-reactroot], [data-reactid]';
2394
+ if (!!document.querySelector(reactSelector)) {
2395
+ // React does not publish the version by default
2396
+ return "unknown";
2397
+ }
2398
+ },
2399
+ 'Ember': function Ember() {
2400
+ if (window.Em && window.Em.VERSION) {
2401
+ return window.Em.VERSION;
2402
+ } else if (window.Ember && window.Ember.VERSION) {
2403
+ return window.Ember.VERSION;
2404
+ }
2405
+ },
2406
+ 'jQuery': function (_jQuery) {
2407
+ function jQuery() {
2408
+ return _jQuery.apply(this, arguments);
2409
+ }
2410
+
2411
+ jQuery.toString = function () {
2412
+ return _jQuery.toString();
2413
+ };
2414
+
2415
+ return jQuery;
2416
+ }(function () {
2417
+ if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {
2418
+ return jQuery.prototype.jquery;
2419
+ }
2420
+ }),
2421
+ 'Polymer': function Polymer() {
2422
+ var version = getPolymerVersion();
2423
+ if (version) {
2424
+ return version;
2425
+ }
2426
+ },
2427
+ 'LitElement': function LitElement() {
2428
+ var version = window.litElementVersions && window.litElementVersions[0];
2429
+ if (version) {
2430
+ return version;
2431
+ }
2432
+ },
2433
+ 'LitHtml': function LitHtml() {
2434
+ var version = window.litHtmlVersions && window.litHtmlVersions[0];
2435
+ if (version) {
2436
+ return version;
2437
+ }
2438
+ },
2439
+ 'Vue.js': function VueJs() {
2440
+ if (window.Vue) {
2441
+ return window.Vue.version;
2442
+ }
2443
+ }
2444
+ };
2445
+ }
2446
+ }, {
2447
+ key: 'getUsedVaadinElements',
2448
+ value: function getUsedVaadinElements(elements) {
2449
+ var version = getPolymerVersion();
2450
+ var elementClasses = void 0;
2451
+ // NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.
2452
+ // Check all locations calling the method getEntries() in
2453
+ // https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106
2454
+ // Currently it is only used by BootstrapHandler.
2455
+ if (version && version.indexOf('2') === 0) {
2456
+ // Polymer 2: components classes are stored in window.Vaadin
2457
+ elementClasses = Object.keys(window.Vaadin).map(function (c) {
2458
+ return window.Vaadin[c];
2459
+ }).filter(function (c) {
2460
+ return c.is;
2461
+ });
2462
+ } else {
2463
+ // Polymer 3: components classes are stored in window.Vaadin.registrations
2464
+ elementClasses = window.Vaadin.registrations || [];
2465
+ }
2466
+ elementClasses.forEach(function (klass) {
2467
+ var version = klass.version ? klass.version : "0.0.0";
2468
+ elements[klass.is] = { version: version };
2469
+ });
2470
+ }
2471
+ }, {
2472
+ key: 'getUsedVaadinThemes',
2473
+ value: function getUsedVaadinThemes(themes) {
2474
+ ['Lumo', 'Material'].forEach(function (themeName) {
2475
+ var theme;
2476
+ var version = getPolymerVersion();
2477
+ if (version && version.indexOf('2') === 0) {
2478
+ // Polymer 2: themes are stored in window.Vaadin
2479
+ theme = window.Vaadin[themeName];
2480
+ } else {
2481
+ // Polymer 3: themes are stored in custom element registry
2482
+ theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');
2483
+ }
2484
+ if (theme && theme.version) {
2485
+ themes[themeName] = { version: theme.version };
2486
+ }
2487
+ });
2488
+ }
2489
+ }, {
2490
+ key: 'getFrameworks',
2491
+ value: function getFrameworks(frameworks) {
2492
+ var detectors = this.frameworkVersionDetectors();
2493
+ Object.keys(detectors).forEach(function (framework) {
2494
+ var detector = detectors[framework];
2495
+ try {
2496
+ var version = detector();
2497
+ if (version) {
2498
+ frameworks[framework] = { version: version };
2499
+ }
2500
+ } catch (e) {}
2501
+ });
2502
+ }
2503
+ }, {
2504
+ key: 'gather',
2505
+ value: function gather(storage) {
2506
+ var storedStats = storage.read();
2507
+ var gatheredStats = {};
2508
+ var types = ["elements", "frameworks", "themes"];
2509
+
2510
+ types.forEach(function (type) {
2511
+ gatheredStats[type] = {};
2512
+ if (!storedStats[type]) {
2513
+ storedStats[type] = {};
2514
+ }
2515
+ });
2516
+
2517
+ var previousStats = JSON.stringify(storedStats);
2518
+
2519
+ this.getUsedVaadinElements(gatheredStats.elements);
2520
+ this.getFrameworks(gatheredStats.frameworks);
2521
+ this.getUsedVaadinThemes(gatheredStats.themes);
2522
+
2523
+ var now = this.now;
2524
+ types.forEach(function (type) {
2525
+ var keys = Object.keys(gatheredStats[type]);
2526
+ keys.forEach(function (key) {
2527
+ if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {
2528
+ storedStats[type][key] = { firstUsed: now };
2529
+ }
2530
+ // Discards any previously logged version number
2531
+ storedStats[type][key].version = gatheredStats[type][key].version;
2532
+ storedStats[type][key].lastUsed = now;
2533
+ });
2534
+ });
2535
+
2536
+ var newStats = JSON.stringify(storedStats);
2537
+ storage.write(newStats);
2538
+ if (newStats != previousStats && Object.keys(storedStats).length > 0) {
2539
+ this.logger.debug("New stats: " + newStats);
2540
+ }
2541
+ }
2542
+ }]);
2543
+ return StatisticsGatherer;
2544
+ }();
2545
+
2546
+ var StatisticsStorage = function () {
2547
+ function StatisticsStorage(key) {
2548
+ classCallCheck(this, StatisticsStorage);
2549
+
2550
+ this.key = key;
2551
+ }
2552
+
2553
+ createClass(StatisticsStorage, [{
2554
+ key: 'read',
2555
+ value: function read() {
2556
+ var localStorageStatsString = localStorage.getItem(this.key);
2557
+ try {
2558
+ return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');
2559
+ } catch (e) {
2560
+ return {};
2561
+ }
2562
+ }
2563
+ }, {
2564
+ key: 'write',
2565
+ value: function write(data) {
2566
+ localStorage.setItem(this.key, data);
2567
+ }
2568
+ }, {
2569
+ key: 'clear',
2570
+ value: function clear() {
2571
+ localStorage.removeItem(this.key);
2572
+ }
2573
+ }, {
2574
+ key: 'isEmpty',
2575
+ value: function isEmpty() {
2576
+ var storedStats = this.read();
2577
+ var empty = true;
2578
+ Object.keys(storedStats).forEach(function (key) {
2579
+ if (Object.keys(storedStats[key]).length > 0) {
2580
+ empty = false;
2581
+ }
2582
+ });
2583
+
2584
+ return empty;
2585
+ }
2586
+ }]);
2587
+ return StatisticsStorage;
2588
+ }();
2589
+
2590
+ var StatisticsSender = function () {
2591
+ function StatisticsSender(url, logger) {
2592
+ classCallCheck(this, StatisticsSender);
2593
+
2594
+ this.url = url;
2595
+ this.logger = logger;
2596
+ }
2597
+
2598
+ createClass(StatisticsSender, [{
2599
+ key: 'send',
2600
+ value: function send(data, errorHandler) {
2601
+ var logger = this.logger;
2602
+
2603
+ if (navigator.onLine === false) {
2604
+ logger.debug("Offline, can't send");
2605
+ errorHandler();
2606
+ return;
2607
+ }
2608
+ logger.debug("Sending data to " + this.url);
2609
+
2610
+ var req = new XMLHttpRequest();
2611
+ req.withCredentials = true;
2612
+ req.addEventListener("load", function () {
2613
+ // Stats sent, nothing more to do
2614
+ logger.debug("Response: " + req.responseText);
2615
+ });
2616
+ req.addEventListener("error", function () {
2617
+ logger.debug("Send failed");
2618
+ errorHandler();
2619
+ });
2620
+ req.addEventListener("abort", function () {
2621
+ logger.debug("Send aborted");
2622
+ errorHandler();
2623
+ });
2624
+ req.open("POST", this.url);
2625
+ req.setRequestHeader("Content-Type", "application/json");
2626
+ req.send(data);
2627
+ }
2628
+ }]);
2629
+ return StatisticsSender;
2630
+ }();
2631
+
2632
+ var StatisticsLogger = function () {
2633
+ function StatisticsLogger(id) {
2634
+ classCallCheck(this, StatisticsLogger);
2635
+
2636
+ this.id = id;
2637
+ }
2638
+
2639
+ createClass(StatisticsLogger, [{
2640
+ key: '_isDebug',
2641
+ value: function _isDebug() {
2642
+ return localStorage.getItem("vaadin." + this.id + ".debug");
2643
+ }
2644
+ }, {
2645
+ key: 'debug',
2646
+ value: function debug(msg) {
2647
+ if (this._isDebug()) {
2648
+ console.info(this.id + ": " + msg);
2649
+ }
2650
+ }
2651
+ }]);
2652
+ return StatisticsLogger;
2653
+ }();
2654
+
2655
+ var UsageStatistics = function () {
2656
+ function UsageStatistics() {
2657
+ classCallCheck(this, UsageStatistics);
2658
+
2659
+ this.now = new Date();
2660
+ this.timeNow = this.now.getTime();
2661
+ this.gatherDelay = 10; // Delay between loading this file and gathering stats
2662
+ this.initialDelay = 24 * 60 * 60;
2663
+
2664
+ this.logger = new StatisticsLogger("statistics");
2665
+ this.storage = new StatisticsStorage("vaadin.statistics.basket");
2666
+ this.gatherer = new StatisticsGatherer(this.logger);
2667
+ this.sender = new StatisticsSender("https://tools.vaadin.com/usage-stats/submit", this.logger);
2668
+ }
2669
+
2670
+ createClass(UsageStatistics, [{
2671
+ key: 'maybeGatherAndSend',
2672
+ value: function maybeGatherAndSend() {
2673
+ var _this = this;
2674
+
2675
+ if (localStorage.getItem(UsageStatistics.optOutKey)) {
2676
+ return;
2677
+ }
2678
+ this.gatherer.gather(this.storage);
2679
+ setTimeout(function () {
2680
+ _this.maybeSend();
2681
+ }, this.gatherDelay * 1000);
2682
+ }
2683
+ }, {
2684
+ key: 'lottery',
2685
+ value: function lottery() {
2686
+ return true;
2687
+ }
2688
+ }, {
2689
+ key: 'currentMonth',
2690
+ value: function currentMonth() {
2691
+ return this.now.getYear() * 12 + this.now.getMonth();
2692
+ }
2693
+ }, {
2694
+ key: 'maybeSend',
2695
+ value: function maybeSend() {
2696
+ var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));
2697
+ var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));
2698
+
2699
+ if (!firstUse) {
2700
+ // Use a grace period to avoid interfering with tests, incognito mode etc
2701
+ firstUse = this.timeNow;
2702
+ localStorage.setItem(UsageStatistics.firstUseKey, firstUse);
2703
+ }
2704
+
2705
+ if (this.timeNow < firstUse + this.initialDelay * 1000) {
2706
+ this.logger.debug("No statistics will be sent until the initial delay of " + this.initialDelay + "s has passed");
2707
+ return;
2708
+ }
2709
+ if (this.currentMonth() <= monthProcessed) {
2710
+ this.logger.debug("This month has already been processed");
2711
+ return;
2712
+ }
2713
+ localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());
2714
+ // Use random sampling
2715
+ if (this.lottery()) {
2716
+ this.logger.debug("Congratulations, we have a winner!");
2717
+ } else {
2718
+ this.logger.debug("Sorry, no stats from you this time");
2719
+ return;
2720
+ }
2721
+
2722
+ this.send();
2723
+ }
2724
+ }, {
2725
+ key: 'send',
2726
+ value: function send() {
2727
+ // Ensure we have the latest data
2728
+ this.gatherer.gather(this.storage);
2729
+
2730
+ // Read, send and clean up
2731
+ var data = this.storage.read();
2732
+ data["firstUse"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));
2733
+ data["usageStatisticsVersion"] = UsageStatistics.version;
2734
+ var info = 'This request contains usage statistics gathered from the application running in development mode. \n\nStatistics gathering is automatically disabled and excluded from production builds.\n\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\n\n\n\n';
2735
+ var self = this;
2736
+ this.sender.send(info + JSON.stringify(data), function () {
2737
+ // Revert the 'month processed' flag
2738
+ localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);
2739
+ });
2740
+ }
2741
+ }], [{
2742
+ key: 'version',
2743
+ get: function get$1() {
2744
+ return '2.1.2';
2745
+ }
2746
+ }, {
2747
+ key: 'firstUseKey',
2748
+ get: function get$1() {
2749
+ return 'vaadin.statistics.firstuse';
2750
+ }
2751
+ }, {
2752
+ key: 'monthProcessedKey',
2753
+ get: function get$1() {
2754
+ return 'vaadin.statistics.monthProcessed';
2755
+ }
2756
+ }, {
2757
+ key: 'optOutKey',
2758
+ get: function get$1() {
2759
+ return 'vaadin.statistics.optout';
2760
+ }
2761
+ }]);
2762
+ return UsageStatistics;
2763
+ }();
2764
+
2765
+ try {
2766
+ window.Vaadin = window.Vaadin || {};
2767
+ window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();
2768
+ window.Vaadin.usageStatsChecker.maybeGatherAndSend();
2769
+ } catch (e) {
2770
+ // Intentionally ignored as this is not a problem in the app being developed
2771
+ }
2772
+
2773
+ }());
2774
+
2775
+ vaadin-dev-mode:end **/}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(rr?!(rr&&Object.keys(rr).map((t=>rr[t])).filter((t=>t.productionMode)).length>0):!or((function(){return!0})))}catch(t){return!1}}());
2776
+ /**
2777
+ * @license
2778
+ * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2779
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2780
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2781
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2782
+ * Code distributed by Google as part of the polymer project is also
2783
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2784
+ */
2785
+ let nr=0,lr=0;const hr=[];let cr=!1;const dr={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},ur={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},pr={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},mr={run(t){cr||(cr=!0,queueMicrotask((()=>function(){cr=!1;const t=hr.length;for(let e=0;e<t;e++){const t=hr[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}hr.splice(0,t),lr+=t}()))),hr.push(t);const e=nr;return nr+=1,e},cancel(t){const e=t-lr;if(e>=0){if(!hr[e])throw new Error(`invalid async handle: ${t}`);hr[e]=null}}},fr=new Set;class br{static debounce(t,e,i){return t instanceof br?t._cancelAsync():t=new br,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,fr.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),fr.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 gr;
2786
+ /**
2787
+ * @license
2788
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2789
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2790
+ */
2791
+ window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)or(t,e)}(ar)};const vr=new Set,yr=t=>class extends(as(t)){static finalize(){super.finalize();const{is:t}=this;t&&!vr.has(t)&&(window.Vaadin.registrations.push(this),vr.add(t),window.Vaadin.developmentModeCallback&&(gr=br.debounce(gr,pr,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),fr.add(gr)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
2792
+ /**
2793
+ * @license
2794
+ * Copyright (c) 2023 - 2024 Vaadin Ltd.
2795
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2796
+ */;class wr{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,r)=>{const o=t.indexOf(e);-1===o?i.push(e):o!==r&&s.push(e)})),(e.length||i.length||s.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:s,removedNodes:i}),this._storedNodes=t}}
2797
+ /**
2798
+ * @license
2799
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2800
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2801
+ */let xr=0;function kr(){return xr++}
2802
+ /**
2803
+ * @license
2804
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2805
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2806
+ */class _r extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${kr()}`}constructor(t,e,i,s={}){super();const{initializer:r,multiple:o,observe:a,useUniqueId:n,uniqueIdPrefix:l}=s;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof a||a,this.multiple="boolean"==typeof o&&o,this.slotInitializer=r,o&&(this.nodes=[]),n&&(this.defaultId=this.constructor.generateId(t,l||e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let s=this.defaultNode;return!s&&i&&(s=document.createElement(i),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new wr(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>!function(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}(t)&&!i.includes(t)));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...s].filter((t=>t!==this.defaultNode)),s.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))}))}}
2807
+ /**
2808
+ * @license
2809
+ * Copyright (c) 2022 - 2024 Vaadin Ltd.
2810
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2811
+ */class Cr extends _r{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
2812
+ /**
2813
+ * @license
2814
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
2815
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2816
+ */const Ar=y`
2817
+ :host {
2818
+ display: inline-block;
2819
+ position: relative;
2820
+ outline: none;
2821
+ white-space: nowrap;
2822
+ -webkit-user-select: none;
2823
+ -moz-user-select: none;
2824
+ user-select: none;
2825
+ }
2826
+
2827
+ :host([hidden]) {
2828
+ display: none !important;
2829
+ }
2830
+
2831
+ /* Aligns the button with form fields when placed on the same line.
2832
+ Note, to make it work, the form fields should have the same "::before" pseudo-element. */
2833
+ .vaadin-button-container::before {
2834
+ content: '\\2003';
2835
+ display: inline-block;
2836
+ width: 0;
2837
+ max-height: 100%;
2838
+ }
2839
+
2840
+ .vaadin-button-container {
2841
+ display: inline-flex;
2842
+ align-items: center;
2843
+ justify-content: center;
2844
+ text-align: center;
2845
+ width: 100%;
2846
+ height: 100%;
2847
+ min-height: inherit;
2848
+ text-shadow: inherit;
2849
+ }
2850
+
2851
+ [part='prefix'],
2852
+ [part='suffix'] {
2853
+ flex: none;
2854
+ }
2855
+
2856
+ [part='label'] {
2857
+ white-space: nowrap;
2858
+ overflow: hidden;
2859
+ text-overflow: ellipsis;
2860
+ }
2861
+
2862
+ @media (forced-colors: active) {
2863
+ :host {
2864
+ outline: 1px solid;
2865
+ outline-offset: -1px;
2866
+ }
2867
+
2868
+ :host([focused]) {
2869
+ outline-width: 2px;
2870
+ }
2871
+
2872
+ :host([disabled]) {
2873
+ outline-color: GrayText;
2874
+ }
2875
+ }
2876
+ `,Dr=!1,Sr=t=>t,Tr="string"==typeof document.head.style.touchAction,zr="__polymerGestures",Br="__polymerGesturesHandled",Nr="__polymerGesturesTouchAction",Ir=["mousedown","mousemove","mouseup","click"],Pr=[0,1,4,2],Mr=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Or(t){return Ir.indexOf(t)>-1}let Fr=!1;function Er(t){if(!Or(t)&&"touchend"!==t)return Tr&&Fr&&Dr?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){Fr=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const Rr=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),jr={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Lr(t){const e=t.type;if(!Or(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Mr&&(e=Pr[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const Hr={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Wr(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Gr(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const $r=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Ur={},Vr=[];function qr(t){const e=$r(t);return e.length>0?e[0]:t.target}function Yr(t){const e=t.type,i=t.currentTarget[zr];if(!i)return;const s=i[e];if(!s)return;if(!t[Br]&&(t[Br]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Hr.touch.id=i.identifier),Hr.touch.id!==i.identifier)return;Tr||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Hr.touch.x=e.clientX,Hr.touch.y=e.clientY,Hr.touch.scrollDecided=!1;else if("touchmove"===i){if(Hr.touch.scrollDecided)return;Hr.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=$r(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[Nr]){e=t[Nr];break}return e}(t);let s=!1;const r=Math.abs(Hr.touch.x-e.clientX),o=Math.abs(Hr.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=o>r:"pan-y"===i&&(s=r>o)),s?t.preventDefault():Qr("track")}}(t)}const r=t[Br];if(!r.skip){for(let e,i=0;i<Vr.length;i++)e=Vr[i],s[e.name]&&!r[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,o=0;o<Vr.length;o++)i=Vr[o],s[i.name]&&!r[i.name]&&(r[i.name]=!0,i[e](t))}}function Jr(t,e,i){return!!Ur[e]&&(function(t,e,i){const s=Ur[e],r=s.deps,o=s.name;let a=t[zr];a||(t[zr]=a={});for(let e,i,s=0;s<r.length;s++)e=r[s],Rr&&Or(e)&&"click"!==e||(i=a[e],i||(a[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Yr,Er(e)),i[o]=(i[o]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&Xr(t,s.touchAction)}(t,e,i),!0)}function Kr(t){Vr.push(t),t.emits.forEach((e=>{Ur[e]=t}))}function Xr(t,e){Tr&&t instanceof HTMLElement&&mr.run((()=>{t.style.touchAction=e})),t[Nr]=e}function Zr(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,Sr(t).dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Qr(t){const e=function(t){for(let e,i=0;i<Vr.length;i++){e=Vr[i];for(let i,s=0;s<e.emits.length;s++)if(i=e.emits[s],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function to(t,e,i,s){e&&Zr(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>Qr(t)})}function eo(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),r=Math.abs(t.y-i);return s>=5||r>=5}function io(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],r=t.moves[t.moves.length-1];let o,a=0;s&&(o=r.x-s.x,a=r.y-s.y),Zr(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:r.x-t.x,dy:r.y-t.y,ddx:o,ddy:a,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const r=s;if(s=s.shadowRoot.elementFromPoint(t,e),r===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function so(t,e,i){const s=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y),o=qr(i||e);!o||jr[o.localName]&&o.hasAttribute("disabled")||(isNaN(s)||isNaN(r)||s<=25&&r<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=qr(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,r=t.pageY;return!(s>=i.left&&s<=i.right&&r>=i.top&&r<=i.bottom)}return!1}(e))&&(t.prevent||Zr(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
2877
+ /**
2878
+ * @license
2879
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2880
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2881
+ */Kr({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Gr(this.info)},mousedown(t){if(!Lr(t))return;const e=qr(t),i=this;Wr(this.info,(t=>{Lr(t)||(to("up",e,t),Gr(i.info))}),(t=>{Lr(t)&&to("up",e,t),Gr(i.info)})),to("down",e,t)},touchstart(t){to("down",qr(t),t.changedTouches[0],t)},touchend(t){to("up",qr(t),t.changedTouches[0],t)}}),Kr({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Gr(this.info)},mousedown(t){if(!Lr(t))return;const e=qr(t),i=this,s=t=>{const s=t.clientX,r=t.clientY;eo(i.info,s,r)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&Qr("tap"),i.info.addMove({x:s,y:r}),Lr(t)||(i.info.state="end",Gr(i.info)),e&&io(i.info,e,t),i.info.started=!0)};Wr(this.info,s,(t=>{i.info.started&&s(t),Gr(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=qr(t),i=t.changedTouches[0],s=i.clientX,r=i.clientY;eo(this.info,s,r)&&("start"===this.info.state&&Qr("tap"),this.info.addMove({x:s,y:r}),io(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=qr(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),io(this.info,e,i))}}),Kr({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){Lr(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){Lr(t)&&so(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){so(this.info,t.changedTouches[0],t)}});const ro=ue((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),oo=ue((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),ao=t=>class extends(ro(oo(t))){get _activeKeys(){return[" "]}ready(){super.ready(),Jr(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),Jr(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
2882
+ /**
2883
+ * @license
2884
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2885
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2886
+ */,no=ue((t=>class extends t{get _keyboardActive(){return us()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),lo=t=>class extends(ro(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}
2887
+ /**
2888
+ * @license
2889
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
2890
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2891
+ */,ho=t=>class extends(ao(lo(no(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}}
2892
+ /**
2893
+ * @license
2894
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
2895
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2896
+ */;
2897
+ /**
2898
+ * @license
2899
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
2900
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2901
+ */Tt("vaadin-button",Ar,{moduleId:"vaadin-button-styles"});class co extends(ho(yr(Pt(Hs(is))))){static get is(){return"vaadin-button"}static get template(){return(t=>t`
2902
+ <div class="vaadin-button-container">
2903
+ <span part="prefix" aria-hidden="true">
2904
+ <slot name="prefix"></slot>
2905
+ </span>
2906
+ <span part="label">
2907
+ <slot></slot>
2908
+ </span>
2909
+ <span part="suffix" aria-hidden="true">
2910
+ <slot name="suffix"></slot>
2911
+ </span>
2912
+ </div>
2913
+ <slot name="tooltip"></slot>
2914
+ `
2915
+ /**
2916
+ @license
2917
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2918
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2919
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2920
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2921
+ Code distributed by Google as part of the polymer project is also
2922
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2923
+ */)(ts)}ready(){super.ready(),this._tooltipController=new Cr(this),this.addController(this._tooltipController)}}function uo(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function po(t,e,i=uo){return t instanceof Date&&e instanceof Date&&i(t).getTime()===i(e).getTime()}function mo(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function fo(t,e,i,s){let r=!1;return"function"==typeof s&&t&&(r=s(mo(t))),(!e||t>=e)&&(!i||t<=i)&&!r}function bo(t,e){return e.filter((t=>void 0!==t)).reduce(((e,i)=>i?e?Math.abs(t.getTime()-i.getTime())<Math.abs(e.getTime()-t.getTime())?i:e:i:e))}function go(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function vo(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(t);if(!e)return;const i=new Date(0,0);return i.setFullYear(parseInt(e[1],10)),i.setMonth(parseInt(e[2],10)-1),i.setDate(parseInt(e[3],10)),i}u(co);
2924
+ /**
2925
+ @license
2926
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2927
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2928
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2929
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2930
+ Code distributed by Google as part of the polymer project is also
2931
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2932
+ */
2933
+ class yo{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,wo.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),wo.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(t,e,i){return t instanceof yo?t._cancelAsync():t=new yo,t.setConfig(e,i),t}}let wo=new Set;const xo=function(){const t=Boolean(wo.size);return wo.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t},ko=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=xo()}while(t||e)},_o=document.createElement("template");_o.innerHTML='\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id="scroller" tabindex="-1">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class Co extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(_o.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px")}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()),ko()}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))})),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=br.debounce(this._debouncerScrollFinish,dr.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();this._isVisible(this._buffers[0],t)||this._isVisible(this._buffers[1],t)||(this.position=this.position)}))}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=br.debounce(this._debouncerUpdateClones,dr.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()})),this._scrollDisabled=!1}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach((e=>{for(let i=0;i<this.bufferSize;i++){const i=document.createElement("div");i.style.height=`${this.itemHeight}px`,i.instance={};const s=`vaadin-infinite-scroller-item-content-${kr()}`,r=document.createElement("slot");r.setAttribute("name",s),r._itemWrapper=i,e.appendChild(r),i.setAttribute("slot",s),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),this.__pendingFinishInit=requestAnimationFrame((()=>{this._finishInit(),this.__pendingFinishInit=null}))}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),t.instance.performUpdate&&t.instance.performUpdate(),Object.keys(e).forEach((i=>{t.instance[i]=e[i]}))}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const r=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const o=i._itemWrapper;t&&!this._isVisible(o,e)||this._updateElement(o.instance,r+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
2934
+ /**
2935
+ * @license
2936
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
2937
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2938
+ */const Ao=document.createElement("template");Ao.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 270px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n }\n </style>\n",u(class extends Co{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(Ao.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=go(e)}});
2939
+ /**
2940
+ * @license
2941
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
2942
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2943
+ */
2944
+ const Do=document.createElement("template");Do.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 80px;\n width: 50px;\n display: block;\n height: 100%;\n position: absolute;\n right: 0;\n transform: translateX(100%);\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n /* Center the year scroller position. */\n --vaadin-infinite-scroller-buffer-offset: 50%;\n }\n\n :host::before {\n content: '';\n display: block;\n background: transparent;\n width: 0;\n height: 0;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n border-width: 6px;\n border-style: solid;\n border-color: transparent;\n border-left-color: #000;\n }\n </style>\n",u(class extends Co{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(Do.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-date-picker-year")}_updateElement(t,e){t.year=this._yearAfterXYears(e)}_yearAfterXYears(t){const e=new Date,i=new Date(e);return i.setFullYear(parseInt(t)+e.getFullYear()),i.getFullYear()}});
2945
+ /**
2946
+ * @license
2947
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
2948
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2949
+ */
2950
+ const So=t=>class extends t{static get properties(){return{year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}static get observers(){return["__updateSelected(year, selectedDate)"]}__updateSelected(t,e){this.toggleAttribute("selected",e&&e.getFullYear()===t),this.toggleAttribute("current",t===(new Date).getFullYear())}}
2951
+ /**
2952
+ * @license
2953
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
2954
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2955
+ */;class To extends(Pt(So(is))){static get is(){return"vaadin-date-picker-year"}static get template(){return ts`
2956
+ <style>
2957
+ :host {
2958
+ display: block;
2959
+ height: 100%;
2960
+ }
2961
+ </style>
2962
+ <div part="year-number">[[year]]</div>
2963
+ <div part="year-separator" aria-hidden="true"></div>
2964
+ `}}
2965
+ /**
2966
+ @license
2967
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2968
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2969
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2970
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2971
+ Code distributed by Google as part of the polymer project is also
2972
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2973
+ */
2974
+ function zo(t,e,i,s,r){let o;r&&(o="object"==typeof i&&null!==i,o&&(s=t.__dataTemp[e]));let a=s!==i&&(s==s||i==i);return o&&a&&(t.__dataTemp[e]=i),a}u(To);const Bo=ue((t=>class extends t{_shouldPropertyChange(t,e,i){return zo(this,t,e,i,!0)}})),No=ue((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return zo(this,t,e,i,this.mutableData)}}));Bo._mutablePropertyChange=zo;
2975
+ /**
2976
+ @license
2977
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2978
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2979
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2980
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2981
+ Code distributed by Google as part of the polymer project is also
2982
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2983
+ */
2984
+ let Io=null;function Po(){return Io}Po.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Po,writable:!0}});const Mo=Vi(Po),Oo=Bo(Mo),Fo=Vi(class{});class Eo extends Fo{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,i(t)}));else{let s=this.__dataHost.__dataHost;s&&s._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let s=e[i];if(Boolean(t)!=Boolean(s.__hideTemplateChildren__))if(s.nodeType===Node.TEXT_NODE)t?(s.__polymerTextContent__=s.textContent,s.textContent=""):s.textContent=s.__polymerTextContent__;else if("slot"===s.localName)if(t)s.__polymerReplaced__=document.createComment("hidden-slot"),Se(Se(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&Se(Se(t).parentNode).replaceChild(s,t)}else s.style&&(t?(s.__polymerDisplay__=s.style.display,s.style.display="none"):s.style.display=s.__polymerDisplay__);s.__hideTemplateChildren__=t,s._showHideChildren&&s._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(t,e,i)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}const Ro=Bo(Eo);function jo(t){let e=t.__dataHost;return e&&e._methodHost||e}function Lo(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring(6),s[i])}}function Ho(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function Wo(t,e,i){if(te&&!jo(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(i=i||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let s=(e?e.constructor:Eo)._parseTemplate(t),r=s.templatizeInstanceClass;r||(r=function(t,e,i){let s=i.mutableData?Ro:Eo;Wo.mixin&&(s=Wo.mixin(s));let r=class extends s{};return r.prototype.__templatizeOptions=i,r.prototype._bindTemplate(t),function(t,e,i,s){let r=i.hostProps||{};for(let e in s.instanceProps){delete r[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Ho(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in r)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(r,t,e,i),r}(t,s,i),s.templatizeInstanceClass=r);const o=jo(t);!function(t,e,i,s){let r=i.forwardHostProp;if(r&&e.hasHostProps){const o="template"==t.localName;let a=e.templatizeTemplateClass;if(!a){if(o){let t=i.mutableData?Oo:Mo;class s extends t{}a=e.templatizeTemplateClass=s}else{const i=t.constructor;class s extends i{}a=e.templatizeTemplateClass=s}let n=e.hostProps;for(let t in n)a.prototype._addPropertyEffect("_host_"+t,a.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Lo(0,r)}),a.prototype._createNotifyingProperty("_host_"+t);se&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:r}=t,{instanceProps:o}=e;for(let t in r)if(!(s[t]||o&&o[t])){const e=r[t];for(let i=0;i<e.length;i++){const{part:s}=e[i].info;if(!s.signature||!s.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,s)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),o)!function(t,e){Io=t,Object.setPrototypeOf(t,e.prototype),new e,Io=null}(t,a),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,a.prototype);const i=e.hostProps;for(let e in i)if(e="_host_"+e,e in t){const i=t[e];delete t[e],t.__data[e]=i}}}}(t,s,i,o);let a=class extends r{};return a.prototype._methodHost=o,a.prototype.__dataHost=t,a.prototype.__templatizeOwner=e,a.prototype.__hostProps=s.hostProps,a}
2985
+ /**
2986
+ @license
2987
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2988
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2989
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2990
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2991
+ Code distributed by Google as part of the polymer project is also
2992
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2993
+ */
2994
+ let Go=!1;
2995
+ /**
2996
+ @license
2997
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2998
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2999
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3000
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3001
+ Code distributed by Google as part of the polymer project is also
3002
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3003
+ */
3004
+ const $o=No(is);class Uo extends $o{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!he,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(ie&&!Kt){if(!Go){Go=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=Se(Se(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=Wo(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,r=0;r<i.length&&(s=i[r]);r++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if((s=this.as)===(r=e)||Be(s,r)||Ne(s,r)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let r=Ie(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(r,i)}var s,r}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=yo.debounce(this.__renderDebouncer,e>0?Ye.after(e):Je,t.bind(this)),wo.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),ko()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),i=this.__calculateLimit(e.length);this.__updateInstances(t,i,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null,this.__continueChunking()}))),this._setRenderedItemCount(this.__instances.length),he&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let r;for(r=0;r<e;r++){let e=this.__instances[r],o=i[r],a=t[o];s[o]=r,e?(e._setPendingProperty(this.as,a),e._setPendingProperty(this.indexAs,r),e._setPendingProperty(this.itemsIndexAs,o),e._flushProperties()):this.__insertInstance(a,r,o)}for(let t=this.__instances.length-1;t>=r;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=Se(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let r=this.__instances[e+1],o=r?r.children[0]:this;return Se(Se(this).parentNode).insertBefore(s.root,o),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),r=s<0?i:i.substring(0,s);if(r==parseInt(r,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let o=this.__instances[this.__itemsIdxToInstIdx[r]];return o&&(o._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),o._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=Se(e).parentNode;return null}(this.template,t)}}customElements.define(Uo.is,Uo);
3005
+ /**
3006
+ * @license
3007
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
3008
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3009
+ */
3010
+ const Vo=t=>class extends(no(t)){static get properties(){return{month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},isDateDisabled:{type:Function,value:()=>!1},enteredDate:{type:Date},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean},__hasFocus:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find((t=>po(t.date,this.focusedDate)))}ready(){super.ready(),Jr(this.$.monthGrid,"tap",this._handleTap.bind(this))}_setFocused(t){super._setFocused(t),this.__hasFocus=t}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);const r=new Date(0,0);return r.setFullYear(t.getFullYear()),r.setMonth(t.getMonth()+1),r.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||fo(s,e,i)||fo(r,e,i))}_getTitle(t,e){if(void 0!==t&&void 0!==e)return e.formatTitle(e.monthNames[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300)}_dateAdd(t,e){t.setDate(t.getDate()+e)}_applyFirstDayOfWeek(t,e){if(void 0!==t&&void 0!==e)return t.slice(e).concat(t.slice(0,e))}_getWeekDayNames(t,e){if(void 0===t||void 0===e)return[];const{weekdays:i,weekdaysShort:s,firstDayOfWeek:r}=t,o=this._applyFirstDayOfWeek(s,r);return this._applyFirstDayOfWeek(i,r).map(((t,e)=>({weekDay:t,weekDayShort:o[e]}))).slice(0,7)}__focusedDateChanged(t,e){Array.isArray(e)&&e.some((e=>po(e,t)))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(t){return t?t.getDate():""}_showWeekSeparator(t,e){return t&&e&&1===e.firstDayOfWeek}_isToday(t){return po(new Date,t)}_getDays(t,e){if(void 0===t||void 0===e)return[];const i=new Date(0,0);for(i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(1);i.getDay()!==e.firstDayOfWeek;)this._dateAdd(i,-1);const s=[],r=i.getMonth(),o=t.getMonth();for(;i.getMonth()===o||i.getMonth()===r;)s.push(i.getMonth()===o?new Date(i.getTime()):null),this._dateAdd(i,1);return s}_getWeeks(t){return t.reduce(((t,e,i)=>(i%7==0&&t.push([]),t[t.length-1].push(e),t)),[])}_handleTap(t){this.ignoreTaps||this._notTapping||!t.target.date||t.target.hasAttribute("disabled")||(this.selectedDate=t.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:!0,composed:!0})))}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){const e=t.reduce(((t,e)=>!t&&e?e:t));
3011
+ /**
3012
+ * @license
3013
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
3014
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3015
+ */
3016
+ return function(t){let e=t.getDay();0===e&&(e=7);const i=4-e,s=new Date(t.getTime()+24*i*3600*1e3),r=new Date(0,0);r.setFullYear(s.getFullYear());const o=s.getTime()-r.getTime(),a=Math.round(o/864e5);return Math.floor(a/7+1)}(e)}__getDayAriaLabel(t){if(!t)return"";let e=`${this._getDate(t)} ${this.i18n.monthNames[t.getMonth()]} ${t.getFullYear()}, ${this.i18n.weekdays[t.getDay()]}`;return this._isToday(t)&&(e+=`, ${this.i18n.today}`),e}}
3017
+ /**
3018
+ * @license
3019
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
3020
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3021
+ */;
3022
+ /**
3023
+ * @license
3024
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
3025
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3026
+ */
3027
+ Tt("vaadin-month-calendar",y`
3028
+ :host {
3029
+ display: block;
3030
+ }
3031
+
3032
+ #monthGrid {
3033
+ width: 100%;
3034
+ border-collapse: collapse;
3035
+ }
3036
+
3037
+ #days-container tr,
3038
+ #weekdays-container tr {
3039
+ display: flex;
3040
+ }
3041
+
3042
+ [part~='date'] {
3043
+ outline: none;
3044
+ }
3045
+
3046
+ [part~='disabled'] {
3047
+ pointer-events: none;
3048
+ }
3049
+
3050
+ [part='week-number'][hidden],
3051
+ [part='weekday'][hidden] {
3052
+ display: none;
3053
+ }
3054
+
3055
+ [part='weekday'],
3056
+ [part~='date'] {
3057
+ width: calc(100% / 7);
3058
+ padding: 0;
3059
+ font-weight: normal;
3060
+ }
3061
+
3062
+ [part='weekday']:empty,
3063
+ [part='week-number'] {
3064
+ width: 12.5%;
3065
+ flex-shrink: 0;
3066
+ padding: 0;
3067
+ }
3068
+
3069
+ :host([week-numbers]) [part='weekday']:not(:empty),
3070
+ :host([week-numbers]) [part~='date'] {
3071
+ width: 12.5%;
3072
+ }
3073
+
3074
+ @media (forced-colors: active) {
3075
+ [part~='date'][part~='focused'] {
3076
+ outline: 1px solid;
3077
+ }
3078
+
3079
+ [part~='date'][part~='selected'] {
3080
+ outline: 3px solid;
3081
+ }
3082
+ }
3083
+ `,{moduleId:"vaadin-month-calendar-styles"});class qo extends(Vo(Pt(is))){static get template(){return ts`
3084
+ <div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
3085
+ <table
3086
+ id="monthGrid"
3087
+ role="grid"
3088
+ aria-labelledby="month-header"
3089
+ on-touchend="_preventDefault"
3090
+ on-touchstart="_onMonthGridTouchStart"
3091
+ >
3092
+ <thead id="weekdays-container">
3093
+ <tr role="row" part="weekdays">
3094
+ <th part="weekday" aria-hidden="true" hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n)]]"></th>
3095
+ <template is="dom-repeat" items="[[_getWeekDayNames(i18n, showWeekNumbers)]]">
3096
+ <th role="columnheader" part="weekday" scope="col" abbr$="[[item.weekDay]]" aria-hidden="true">
3097
+ [[item.weekDayShort]]
3098
+ </th>
3099
+ </template>
3100
+ </tr>
3101
+ </thead>
3102
+ <tbody id="days-container">
3103
+ <template is="dom-repeat" items="[[_weeks]]" as="week">
3104
+ <tr role="row">
3105
+ <td part="week-number" aria-hidden="true" hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n)]]">
3106
+ [[__getWeekNumber(week)]]
3107
+ </td>
3108
+ <template is="dom-repeat" items="[[week]]">
3109
+ <td
3110
+ role="gridcell"
3111
+ part$="[[__getDatePart(item, focusedDate, selectedDate, minDate, maxDate, isDateDisabled, enteredDate, __hasFocus)]]"
3112
+ date="[[item]]"
3113
+ tabindex$="[[__getDayTabindex(item, focusedDate)]]"
3114
+ disabled$="[[__isDayDisabled(item, minDate, maxDate, isDateDisabled)]]"
3115
+ aria-selected$="[[__getDayAriaSelected(item, selectedDate)]]"
3116
+ aria-disabled$="[[__getDayAriaDisabled(item, minDate, maxDate, isDateDisabled)]]"
3117
+ aria-label$="[[__getDayAriaLabel(item)]]"
3118
+ >[[_getDate(item)]]</td
3119
+ >
3120
+ </template>
3121
+ </tr>
3122
+ </template>
3123
+ </tbody>
3124
+ </table>
3125
+ `}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,i,s,r,o,a,n){const l=["date"],h=t>uo(new Date),c=t<uo(new Date);return this.__isDayDisabled(t,s,r,o)&&l.push("disabled"),po(t,e)&&(n||po(t,a))&&l.push("focused"),this.__isDaySelected(t,i)&&l.push("selected"),this._isToday(t)&&l.push("today"),c&&l.push("past"),h&&l.push("future"),l.join(" ")}__isDaySelected(t,e){return po(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i,s){return!fo(t,e,i,s)}__getDayAriaDisabled(t,e,i,s){if(void 0!==t&&(void 0!==e||void 0!==i||void 0!==s))return this.__isDayDisabled(t,e,i,s)?"true":void 0}__getDayTabindex(t,e){return po(t,e)?"0":"-1"}}u(qo);
3126
+ /**
3127
+ * @license
3128
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3129
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3130
+ */
3131
+ class Yo{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler)}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null}_queryHandler(t){"function"==typeof this.callback&&this.callback(t.matches)}}
3132
+ /**
3133
+ * @license
3134
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
3135
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3136
+ */const Jo=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged",sync:!0},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},enteredDate:{type:Date,sync:!0},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled, enteredDate)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){Xr(this.$.scrollers,"pan-y"),Jr(this.$.scrollers,"track",this._track.bind(this)),Jr(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Jr(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Jr(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Yo(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new _r(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Jr(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new _r(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Jr(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new _r(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new _r(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Jr(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,s,r){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,r))}__updateCalendars(t,e,i,s,r,o,a,n,l,h,c){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=h,t.focusedDate=o,t.selectedDate=r,t.showWeekNumbers=a,t.ignoreTaps=n,t.enteredDate=c,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this._monthScroller.position>i,r=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,o=this._monthScroller.position+r-1<i;s?this._scrollToPosition(i,e):o&&this._scrollToPosition(i-r+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=br.debounce(this._debouncer,dr.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(mo(t)):i}_onTodayTap(){const t=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2);this._scrollToPosition(this._monthScroller.position+e/this._yearScroller.itemHeight*12,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let s=0;const r=this._monthScroller.position,o=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,r,this._targetPosition-r);this._monthScroller.position=t,window.requestAnimationFrame(o)}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(o)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return go(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){po(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),e=!0);break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&po(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}async focusDate(t,e){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),await this.focusDateElement(!1)}async focusDateElement(t=!0){this.__pendingDateFocus=this.focusedDate,this.calendars.length||await new Promise((t=>{Cs(this,(()=>{ko(),t()}))})),t&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(bo(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,s=this.isDateDisabled){return fo(t,e,i,s)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
3137
+ /**
3138
+ * @license
3139
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
3140
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3141
+ */;
3142
+ /**
3143
+ * @license
3144
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
3145
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3146
+ */
3147
+ Tt("vaadin-date-picker-overlay-content",y`
3148
+ :host {
3149
+ display: flex;
3150
+ flex-direction: column;
3151
+ height: 100%;
3152
+ width: 100%;
3153
+ outline: none;
3154
+ }
3155
+
3156
+ [part='overlay-header'] {
3157
+ display: flex;
3158
+ flex-shrink: 0;
3159
+ flex-wrap: nowrap;
3160
+ align-items: center;
3161
+ }
3162
+
3163
+ :host(:not([fullscreen])) [part='overlay-header'] {
3164
+ display: none;
3165
+ }
3166
+
3167
+ [part='label'] {
3168
+ flex-grow: 1;
3169
+ }
3170
+
3171
+ [hidden] {
3172
+ display: none !important;
3173
+ }
3174
+
3175
+ [part='years-toggle-button'] {
3176
+ display: flex;
3177
+ }
3178
+
3179
+ #scrollers {
3180
+ display: flex;
3181
+ height: 100%;
3182
+ width: 100%;
3183
+ position: relative;
3184
+ overflow: hidden;
3185
+ }
3186
+
3187
+ :host([desktop]) ::slotted([slot='months']) {
3188
+ right: 50px;
3189
+ transform: none !important;
3190
+ }
3191
+
3192
+ :host([desktop]) ::slotted([slot='years']) {
3193
+ transform: none !important;
3194
+ }
3195
+
3196
+ :host(.animate) ::slotted([slot='months']),
3197
+ :host(.animate) ::slotted([slot='years']) {
3198
+ transition: all 200ms;
3199
+ }
3200
+
3201
+ [part='toolbar'] {
3202
+ display: flex;
3203
+ justify-content: space-between;
3204
+ z-index: 2;
3205
+ flex-shrink: 0;
3206
+ }
3207
+ `,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Ko extends(Jo(Hs(Pt(as(is))))){static get template(){return ts`
3208
+ <div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
3209
+ <div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
3210
+ <div part="clear-button" hidden$="[[!selectedDate]]"></div>
3211
+ <div part="toggle-button"></div>
3212
+
3213
+ <div part="years-toggle-button" hidden$="[[_desktopMode]]" aria-hidden="true">
3214
+ [[_yearAfterXMonths(_visibleMonthIndex)]]
3215
+ </div>
3216
+ </div>
3217
+
3218
+ <div id="scrollers">
3219
+ <slot name="months"></slot>
3220
+ <slot name="years"></slot>
3221
+ </div>
3222
+
3223
+ <div on-touchend="_preventDefault" role="toolbar" part="toolbar">
3224
+ <slot name="today-button"></slot>
3225
+ <slot name="cancel-button"></slot>
3226
+ </div>
3227
+ `}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}u(Ko);
3228
+ /**
3229
+ * @license
3230
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3231
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3232
+ */
3233
+ const Xo=ue((t=>class extends(no(lo(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),Zo=new WeakMap,Qo=ue((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Zo.has(t)||Zo.set(t,new Set),Zo.get(t)}(t);this.slotStyles.forEach((i=>{e.has(i)||(function(t,e){const i=document.createElement("style");i.textContent=t,e===document?document.head.appendChild(i):e.insertBefore(i,e.firstChild)}(i,t),e.add(i))}))}})),ta=ue((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t),this._hasInputValue=t&&t.length>0}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),""===t&&void 0===e||this.__userInput||this._forwardInputValue(t)}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),ea=t=>class extends(ta(oo(t))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),zs||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
3234
+ /**
3235
+ * @license
3236
+ * Copyright (c) 2023 - 2024 Vaadin Ltd.
3237
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3238
+ */,ia=new Map;
3239
+ /**
3240
+ * @license
3241
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3242
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3243
+ */function sa(t){return ia.has(t)||ia.set(t,new WeakMap),ia.get(t)}function ra(t,e){t&&t.removeAttribute(e)}function oa(t,e){if(!t||!e)return;const i=sa(e);if(i.has(t))return;const s=Ys(t.getAttribute(e));i.set(t,new Set(s))}function aa(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:r,fromUser:o}=i,a=sa(e),n=a.get(t);if(!o&&n)return r&&n.delete(r),void(s&&n.add(s));o&&(n?s||a.delete(t):oa(t,e),ra(t,e)),function(t,e,i){const s=Ys(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,Js(s)):t.removeAttribute(e)}(t,e,r);const l=s||Js(n);l&&Ks(t,e,l)}
3244
+ /**
3245
+ * @license
3246
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3247
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3248
+ */
3249
+ class na{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){var e;this.__target&&(t?(oa(e=this.__target,"aria-labelledby"),ra(e,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=sa(e),s=i.get(t);s&&0!==s.size?Ks(t,e,Js(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){aa(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){aa(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){aa(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}
3250
+ /**
3251
+ * @license
3252
+ * Copyright (c) 2022 - 2024 Vaadin Ltd.
3253
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3254
+ */const la=document.createElement("div");let ha;la.style.position="fixed",la.style.clip="rect(0px, 0px, 0px, 0px)",la.setAttribute("aria-live","polite"),document.body.appendChild(la);
3255
+ /**
3256
+ * @license
3257
+ * Copyright (c) 2022 - 2024 Vaadin Ltd.
3258
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3259
+ */
3260
+ class ca extends _r{constructor(t,e,i,s={}){super(t,e,i,{...s,useUniqueId:!0})}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType!==Node.ELEMENT_NODE||this.multiple&&this.nodes&&t!==this.nodes[0]||t.id||(t.id=this.defaultId)}}
3261
+ /**
3262
+ * @license
3263
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3264
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3265
+ */class da extends ca{constructor(t){super(t,"error-message","div")}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node)}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node)}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t)}initNode(t){this.updateDefaultNode(t)}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,s=Boolean(i&&e&&""!==e.trim());t&&(t.textContent=s?e:"",t.hidden=!s,s&&function(t,e={}){const i=e.mode||"polite",s=void 0===e.timeout?150:e.timeout;"alert"===i?(la.removeAttribute("aria-live"),la.removeAttribute("role"),ha=br.debounce(ha,ur,(()=>{la.setAttribute("role","alert")}))):(ha&&ha.cancel(),la.removeAttribute("role"),la.setAttribute("aria-live",i)),la.textContent="",setTimeout((()=>{la.textContent=t}),s)}(e,{mode:"assertive"})),super.updateDefaultNode(t)}}
3266
+ /**
3267
+ * @license
3268
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3269
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3270
+ */class ua extends ca{constructor(t){super(t,"helper",null)}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:t}=this;if(t&&""!==t.trim()){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
3271
+ /**
3272
+ * @license
3273
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3274
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3275
+ */class pa extends ca{constructor(t){super(t,"label","label")}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:t}=this;if(t&&""!==t.trim()){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
3276
+ /**
3277
+ * @license
3278
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3279
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3280
+ */const ma=ue((t=>class extends(Hs(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new pa(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),fa=ue((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},manualValidation:{type:Boolean,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}_requestValidation(){this.manualValidation||this.validate()}})),ba=t=>class extends(fa(ma(Hs(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new na(this),this._helperController=new ua(this),this._errorController=new da(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
3281
+ /**
3282
+ * @license
3283
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3284
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3285
+ */,ga=ue((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),va=ue((t=>class extends(ga(fa(ta(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this._requestValidation():s&&!this.manualValidation&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return Boolean(t)||0===t}})),ya=t=>class extends(Qo(Xo(va(ba(ea(oo(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=br.debounce(this._preventInputDebouncer,dr.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
3286
+ /**
3287
+ * @license
3288
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3289
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3290
+ */;
3291
+ /**
3292
+ * @license
3293
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3294
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3295
+ */class wa extends _r{constructor(t,e,i={}){const{uniqueIdPrefix:s}=i;super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0,uniqueIdPrefix:s})}}
3296
+ /**
3297
+ * @license
3298
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3299
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3300
+ */class xa{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}}
3301
+ /**
3302
+ * @license
3303
+ * Copyright (c) 2021 - 2024 Vaadin Ltd..
3304
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3305
+ */const ka=y`
3306
+ :host {
3307
+ display: inline-flex;
3308
+ outline: none;
3309
+ }
3310
+
3311
+ :host::before {
3312
+ content: '\\2003';
3313
+ width: 0;
3314
+ display: inline-block;
3315
+ /* Size and position this element on the same vertical position as the input-field element
3316
+ to make vertical align for the host element work as expected */
3317
+ }
3318
+
3319
+ :host([hidden]) {
3320
+ display: none !important;
3321
+ }
3322
+
3323
+ :host(:not([has-label])) [part='label'] {
3324
+ display: none;
3325
+ }
3326
+
3327
+ @media (forced-colors: active) {
3328
+ :host(:not([readonly])) [part='input-field'] {
3329
+ outline: 1px solid;
3330
+ outline-offset: -1px;
3331
+ }
3332
+ :host([focused]) [part='input-field'] {
3333
+ outline-width: 2px;
3334
+ }
3335
+ :host([disabled]) [part='input-field'] {
3336
+ outline-color: GrayText;
3337
+ }
3338
+ }
3339
+ `
3340
+ /**
3341
+ * @license
3342
+ * Copyright (c) 2021 - 2024 Vaadin Ltd..
3343
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3344
+ */,_a=y`
3345
+ [class$='container'] {
3346
+ display: flex;
3347
+ flex-direction: column;
3348
+ min-width: 100%;
3349
+ max-width: 100%;
3350
+ width: var(--vaadin-field-default-width, 12em);
3351
+ }
3352
+ `
3353
+ /**
3354
+ * @license
3355
+ * Copyright (c) 2021 - 2024 Vaadin Ltd..
3356
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3357
+ */,Ca=[ka,_a,y`
3358
+ [part='clear-button'] {
3359
+ display: none;
3360
+ cursor: default;
3361
+ }
3362
+
3363
+ [part='clear-button']::before {
3364
+ content: '\\2715';
3365
+ }
3366
+
3367
+ :host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part='clear-button'] {
3368
+ display: block;
3369
+ }
3370
+ `
3371
+ /**
3372
+ * @license
3373
+ * Copyright (c) 2021 - 2024 Vaadin Ltd..
3374
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3375
+ */],Aa=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e)return;if(void 0===t)return;const{classList:i}=e;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&i.remove(...t)}const s="string"==typeof t?t.split(" ").filter(Boolean):[];s.length>0&&i.add(...s),this.__previousClasses=s}}
3376
+ /**
3377
+ * @license
3378
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3379
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3380
+ */;class Da{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.opened||this.__setVirtualKeyboardEnabled(!1)})),t.addEventListener("blur",(()=>this.__setVirtualKeyboardEnabled(!0))),t.addEventListener("touchstart",(()=>this.__setVirtualKeyboardEnabled(!0)))}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none")}}
3381
+ /**
3382
+ * @license
3383
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
3384
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3385
+ */const Sa=Object.freeze({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,r=i.getMonth(),o=i.getFullYear();if(3===e.length?(r=parseInt(e[0])-1,s=parseInt(e[1]),o=parseInt(e[2]),e[2].length<3&&o>=0&&(o=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let r=e+100*Math.floor(t.getFullYear()/100);return t<new Date(r-50,i,s)?r-=100:t>new Date(r+50,i,s)&&(r+=100),r}(this.referenceDate?vo(this.referenceDate):new Date,o,r,s))):2===e.length?(r=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:r,year:o}},formatTitle:(t,e)=>`${t} ${e}`}),Ta=t=>class extends(Aa(Hs(Xo(va(oo(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:{type:Boolean,sync:!0},showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({...Sa})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:Ts},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},__enteredDate:{type:Date,sync:!0}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled, __enteredDate)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t;const e=this.__parseDate(t);this.__setEnteredDate(e)}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!us()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this._requestValidation())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Yo(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Da(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=vo(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(mo(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||fo(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&this.inputElement.checkValidity&&(s=this.inputElement.checkValidity()),e&&i&&s}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this._requestValidation(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,r,o){return!t||e&&(!o||r)||i&&r||!s.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",r=t.year;return r<0?(r=-r,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(r,s),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0!==t&&void 0!==e&&(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0!==t&&void 0!==e&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(t))}_valueChanged(t,e){const i=vo(t);!t||i?(t?po(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this._requestValidation()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,r,o,a,n,l,h){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=r,t.focusedDate=o,t.selectedDate=a,t.showWeekNumbers=n,t.isDateDisabled=l,t.enteredDate=h)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=Fs(this._noInput?t:[s,t])}_getInitialPosition(){const t=vo(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||fo(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?bo(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this._keyboardActive||this._requestValidation()}_onScroll(t){t.target!==window&&this._overlayContent.contains(t.target)||this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){this.autoOpenDisabled&&!this._noInput||(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened)return this.clearButtonVisible&&this.value&&!this.readonly?(t.stopPropagation(),void this._onClearButtonClick(t)):void(""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate))}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open();const t=this.__parseDate(this._inputElementValue||"");t&&(this._ignoreFocusedDateChange=!0,po(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1),this.__setEnteredDate(t)}__setEnteredDate(t){t?po(this.__enteredDate,t)||(this.__enteredDate=t):null!=this.__enteredDate&&(this.__enteredDate=null)}__computeMinOrMaxDate(t){return vo(t)}}
3386
+ /**
3387
+ * @license
3388
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
3389
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3390
+ */;
3391
+ /**
3392
+ * @license
3393
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
3394
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3395
+ */
3396
+ Tt("vaadin-date-picker",[Ca,y`
3397
+ :host([opened]) {
3398
+ pointer-events: auto;
3399
+ }
3400
+
3401
+ :host([dir='rtl']) [part='input-field'] {
3402
+ direction: ltr;
3403
+ }
3404
+
3405
+ :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
3406
+ direction: rtl;
3407
+ text-align: left;
3408
+ }
3409
+ `],{moduleId:"vaadin-date-picker-styles"});class za extends(Ta(ya(Pt(yr(is))))){static get is(){return"vaadin-date-picker"}static get template(){return ts`
3410
+ <div class="vaadin-date-picker-container">
3411
+ <div part="label">
3412
+ <slot name="label"></slot>
3413
+ <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
3414
+ </div>
3415
+
3416
+ <vaadin-input-container
3417
+ part="input-field"
3418
+ readonly="[[readonly]]"
3419
+ disabled="[[disabled]]"
3420
+ invalid="[[invalid]]"
3421
+ theme$="[[_theme]]"
3422
+ >
3423
+ <slot name="prefix" slot="prefix"></slot>
3424
+ <slot name="input"></slot>
3425
+ <div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
3426
+ <div part="toggle-button" slot="suffix" aria-hidden="true" on-click="_toggle"></div>
3427
+ </vaadin-input-container>
3428
+
3429
+ <div part="helper-text">
3430
+ <slot name="helper"></slot>
3431
+ </div>
3432
+
3433
+ <div part="error-message">
3434
+ <slot name="error-message"></slot>
3435
+ </div>
3436
+ </div>
3437
+
3438
+ <vaadin-date-picker-overlay
3439
+ id="overlay"
3440
+ fullscreen$="[[_fullscreen]]"
3441
+ theme$="[[_theme]]"
3442
+ opened="{{opened}}"
3443
+ on-vaadin-overlay-escape-press="_onOverlayEscapePress"
3444
+ on-vaadin-overlay-open="_onOverlayOpened"
3445
+ on-vaadin-overlay-closing="_onOverlayClosed"
3446
+ restore-focus-on-close
3447
+ restore-focus-node="[[inputElement]]"
3448
+ ></vaadin-date-picker-overlay>
3449
+
3450
+ <slot name="tooltip"></slot>
3451
+ `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new wa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new xa(this.inputElement,this._labelController)),this._tooltipController=new Cr(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}u(za);const Ba=class{constructor(i){t(this,i),this.filterDraw=e(this,"filterDraw",7),this.filterSelection=e(this,"filterSelection",7),this.filterSelectionReset=e(this,"filterSelectionReset",7),this.showFilterId=!0,this.activateTicketSearch=!1,this.gameId="",this.playerId="",this.session="",this.postMessage=!1,this.language="en",this.quickFiltersActive=!1,this.clientStyling="",this.clientStylingUrlContent="",this.showFilterModal=!1,this.showClearButton=!1,this.filterData={},this.filterDataReset={ticketDrawId:"",filterFromCalendar:"",filterToCalendar:""},this.limitStylingAppends=!1,this.handleTicketDrawId=t=>{this.filterData.ticketDrawId=t.target.value},this.handleFilterFrom=t=>{let e=t.target.value.split("-");this.filterData.filterFromCalendar=new Date(Number(e[0]),Number(e[1])-1,Number(e[2]),0,0,0).toISOString()},this.handleFilterTo=t=>{let e=t.target.value.split("-");this.filterData.filterToCalendar=new Date(Number(e[0]),Number(e[1])-1,Number(e[2]),23,59,59).toISOString()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])h[e][i]=t[e][i]})))}componentDidRender(){document.getElementById("#FilterById")&&(document.getElementById("#FilterById").value=""),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}filterSelectionHandler(t){this.postMessage&&window.postMessage({type:"filterSelection",event:t},window.location.href),(this.filterData.ticketDrawId||this.filterData.filterFromCalendar||this.filterData.filterToCalendar)&&this.filterSelection.emit(t)}filterSelectionResetHandler(t){this.postMessage&&window.postMessage({type:"filterSelectionReset",event:t},window.location.href),this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=!1}toggleFilterModal(){this.showFilterModal=!0}filterSearch(){this.modalCloseEvent(),this.showClearButton=!0,this.filterSelectionHandler(this.filterData)}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.filterData={}}render(){return i("div",{key:"92b6e88d833f8fdc12d833636e80aff214a8eb9d",class:"HelperFilters",ref:t=>this.stylingContainer=t},i("div",{key:"fed2cf119553fc6d2b9ecaaf83e3c68ef040fd46",class:"FilterButtonsWrapper"},i("button",{key:"2ef40face6ef68541041994f263094d155aca23e",class:"FilterOpen",onClick:()=>this.toggleFilterModal()},c("filterOpen",this.language)),this.showClearButton||this.quickFiltersActive?i("button",{class:"FilterClear",onClick:()=>this.resetSearch()},c("filterClear",this.language)):null),i("helper-modal",{key:"7b6a634f3f1f4497d6d39aebcb8249d153e5c277","title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"37c5aaabc27e32d24de1e3a50c8140c3674e07d5",class:"FilterModalHeader"},i("h3",{key:"50b10b90dffdff3edd5933278d3ab000ecc2a93a",class:"FilterModalTitle"},c(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),i("div",{key:"bf843f5003fe32555a949474b1fa7b966000cb83",class:"FilterModalBody"},this.showFilterId&&i("div",{key:"bd763dc296c986f1d3a2c04e30f2c4c8f02c9b7e"},i("input",{key:"d393e06b61d5f14e3a28330c15c3fb01257c8472",id:"FilterById",type:"text",value:this.filterData.ticketDrawId,onInput:this.handleTicketDrawId,class:"FilterModalSearch",placeholder:c(this.activateTicketSearch?"filterTicketPlaceholder":"filterDrawPlaceholder",this.language)}),i("p",{key:"f8a8afe9594f8f0cad7bf0654f23348341f08a3d"},c("filterOrDate",this.language))),i("div",{key:"a6b8fc4a3c424a1d56236c168e0298de3511cba5",class:"FilterCalendarWrapper"},i("vaadin-date-picker",{key:"06c32fbf0073a7097ec6a8c24b200868a0c525cb",value:this.filterData.filterFromCalendar,onChange:this.handleFilterFrom,placeholder:c("filterFromCalendar",this.language),class:"VaadinDatePicker"}),i("vaadin-date-picker",{key:"a4d4212b6107ce9cf572f40a4713d9d038c8b395",value:this.filterData.filterToCalendar,onChange:this.handleFilterTo,placeholder:c("filterToCalendar",this.language),class:"VaadinDatePicker"}))),i("div",{key:"7dec7662f1b093b6c443d0c194eb614aa608a342",class:"FilterModalFooter"},i("button",{key:"336d6f0a0fb88bff6c44f593a754afbc43cd1e03",class:"FilterModalButton",onClick:()=>this.filterSearch()},c("filterModalButton",this.language)))))}};Ba.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;width:max-content;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;width:max-content;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:var(--emw--color-typography, #009993);text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:var(--emw--button-border-radius, 4px);background:var(--emw--color-gray-transparency-60, #e8ebef);color:var(--emw--color-secondary-variant, #263445);width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:var(--emw--color-typography, #009993)}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 60px;width:max-content;margin:5px;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}';const Na=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),Ia=class{constructor(i){t(this,i),this.cancel=e(this,"modalCloseEvent",7),this.visible=!0,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.userAgent=window.navigator.userAgent,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.visible&&i("div",{key:"ba2aed789565b37bfdbb34bdf3ccace827231653",class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:t=>this.stylingContainer=t},i("div",{key:"151ca4cd80d259ac955b92b10bf6f0df2698a937",class:"HelperModalWrapper HelperModalVisible"},i("div",{key:"804cb1dea73321c4935e4a8ddb1136e98e89a070",class:"HelperModalContent"+(Na(this.userAgent)?" HelperModalMobileContent":"")},i("span",{key:"30cf7928c1e4baa53f3514fc1930823db76c874c",class:"HelperModalClose"+(Na(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),i("slot",{key:"5c1323a98cdcd09669020a00affe5673856e807e"}))))}};Ia.style=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px var(--emw--color-gray-transparency-40, #848e97);box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:var(--emw--button-text-color, #000)}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:var(--emw--button-text-color, #000)}";const Pa="en",Ma=["en"],Oa={en:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},ro:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},fr:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},ar:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},hr:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"}},Fa=(t,e)=>{const i=e;return Oa[void 0!==i&&Ma.includes(i)?i:Pa][t]};function Ea(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function Ra(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function ja(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}const La=class{constructor(e){t(this,e),this.selectedIndex=0,this.clientStyling="",this.clientStylingUrl="",this.language="en",this.tabContent=""}handleClientStylingChange(t,e){t!=e&&Ea(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!=e&&this.clientStylingUrl&&Ra(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?ja(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&Ea(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&Ra(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Oa[e][i]=t[e][i]})))}getHowToPlay(){return this.lowNumber&&this.highNumber&&this.maxinumAllowed&&this.minimumAllowed?((t,e)=>{const i=e.lang;let s=Oa[void 0!==i&&Ma.includes(i)?i:Pa][t];return e?(Object.keys(e).forEach((t=>{s=s.replace(new RegExp("\\${"+t+"}","gm"),e[t])})),s):Oa[void 0!==i&&Ma.includes(i)?i:Pa][t]})("howToPlay",{lowNumber:this.lowNumber,highNumber:this.highNumber,maxinumAllowed:this.maxinumAllowed,minimumAllowed:this.minimumAllowed,lang:this.language}):""}render(){return this.tabContent=i("div",{key:"92877a17361066f68fce6299cb8f65901f6abc60",class:"TabContent",ref:t=>this.stylingContainer=t},this.getHowToPlay()),this.selectedIndex+1==2?this.tabContent=i("div",{key:"9876b9250371034ef40dab0f5fc3fe1a5631a370",class:"TabContent",ref:t=>this.stylingContainer=t},i("ol",{key:"ef2097eb54aeb640f06871277d8cafd2f4455109"},i("li",{key:"e9a0237e1fdead445abcd9240174276ffef81a67"},Fa("register",this.language)),i("li",{key:"2bdfaffdc9f1a7ae021913cb0ba346132140dcfd"},Fa("butTickets",this.language)),i("li",{key:"bff38eaeabeaece83dc8ed1697e5b052802753f6"},Fa("reviewPurchase",this.language)))):this.selectedIndex+1==3&&(this.tabContent=i("div",{key:"49a7fb3435fb50b54572ec38d1e632e2eacf56fb",class:"TabContent",ref:t=>this.stylingContainer=t},i("ul",{key:"7f642625f35a1ed1eae7655144c0b8b1bfe25f55"},i("li",{key:"037a5913be57dd1e2dcde5a061e9c64e70365e8d"},Fa("odds",this.language)),i("li",{key:"8775a1b2e8eda285e2c248b8d7235f06ac593fc6"},Fa("winGame",this.language)),i("li",{key:"5297fc5e757c29a1349049f1fe294e926255d518"},Fa("claimPrize",this.language))))),this.tabContent}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};La.style=":host{display:block}.TabContent{font-size:14px;color:var(--emw--button-text-color, #000);font-weight:normal}";const Ha=class{constructor(e){t(this,e),this.disabled=!1,this.selected=!1,this.selectedIndex=0,this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}],this.clientStyling="",this.clientStylingurl="",this.clientStylingUrl="",this.language="en"}connectedCallback(){}handleClientStylingChange(t,e){t!=e&&Ea(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!=e&&this.clientStylingUrl&&Ra(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?ja(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&Ea(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&Ra(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"173c4774748482dc56fcffb4bac4e1666fa9170f",ref:t=>this.stylingContainer=t},i("div",{key:"680b65218e4b00f134b354f593c0c20fb5882dca",class:"Tabs"},this.tabs.map(((t,e)=>i("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),i("div",{key:"67aa26c92fb416c5d0934988fb071481f805685b"},i("helper-tab",{key:"63c8dfc253d4fc12b0310a2585a44b90807e1a9f","low-number":this.lowNumber,"high-number":this.highNumber,"minimum-allowed":this.minimumAllowed,"maxinum-allowed":this.maxinumAllowed,selectedIndex:this.selectedIndex,"client-styling":this.clientStyling,language:this.language,"translation-url":this.translationUrl,"client-stylingurl":this.clientStylingurl,"client-styling-url-content":this.clientStylingUrl,"mb-source":this.mbSource})))}get host(){return s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Ha.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;margin:5px 0 10px;border:1px solid var(--emw--color-typography, #009993);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:var(--emw--color-gray-50, #F1F1F1)}.TabButton.Active{background:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}';const Wa=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.value="0",this.selectable=!0,this.isSelected=!1,this.isBonus=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"a21cbee8f556bfbbe9f97be5f44bfc08b6f24dd6",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":"")+(this.isBonus?" Bonus":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};Wa.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:var(--emw--button-text-color, #000);display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-50, #F1F1F1) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--button-border-color, #00958f)}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-gray-100, #D4D4D4);border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.Bonus{background:var(--emw--color-error, #FF3D00)}';const Ga=["ro","en","hr"],$a={en:{drawId:"Draw ID",drawDate:"Draw Date",drawNumbersGridDraw:"Draw numbers",drawNumbersGridTicket:"Selected Numbers",ticketResult:"Ticket result",amountWon:"Amount won",numberOfDraws:"Number of draws",multiplierNum:"Multiplier Number",ticketId:"Ticket ID",ticketAmount:"Ticket Amount",prize:"Prizes"},ro:{drawId:"Id extragere",drawDate:"Data extragerii",drawNumbersGridDraw:"Numerele extrase",drawNumbersGridTicket:"Numere selectate",ticketResult:"Rezultatul biletului",amountWon:"Suma castigata",numberOfDraws:"Numarul de extrageri",multiplierNum:"Multiplier Number",ticketId:"Id biletul",ticketAmount:"Valoarea biletului",prize:"Premii"},fr:{drawId:"ID de tirage",drawDate:"Date du tirage",drawNumbersGridDraw:"Tirage des numéros",drawNumbersGridTicket:"Nombres sélectionnés",ticketResult:"Résultat du ticket",amountWon:"Montant gagné",numberOfDraws:"Nombre de tirages",multiplierNum:"Multiplier Number",ticketId:"ID de billets",ticketAmount:"Montant du billet",prize:"Prix"},ar:{drawId:"معرّف السحب",drawDate:"تاريخ السحب",drawNumbersGridDraw:" أرقام السحب",drawNumbersGridTicket:"الأرقام المختارة",ticketResult:"نتيجة التذكرة",amountWon:"المبلغ الذي تم ربحه",numberOfDraws:"عدد السحوبات",multiplierNum:"Multiplier Number",ticketId:"معرّف التذكرة",ticketAmount:"مبلغ التذكرة",prize:"الجوائز"},hr:{drawId:"ID izvlačenja",drawDate:"Datum izvlačenja",drawNumbersGridDraw:"Tablica izvučenih",drawNumbersGridTicket:"Odabrani brojevi",ticketResult:"Rezultat listića",amountWon:"Osvojeni iznos",numberOfDraws:"Broj izvlačenja",multiplierNum:"Multiplier Number",ticketId:"ID listića",ticketAmount:"Iznos listića",prize:"Nagrade"}},Ua=(t,e)=>{const i=e;return $a[void 0!==i&&Ga.includes(i)?i:"en"][t]},Va=class{constructor(e){t(this,e),this.language="en",this.drawMode=!1,this.drawId="",this.gameName="",this.ticketDate="",this.ticketStatus="",this.ticketId="",this.ticketAmount="",this.ticketCurrency="",this.ticketMultiplier=!1,this.ticketDrawCount=0,this.ticketNumbers="",this.sessionId="",this.clientStyling="",this.clientStylingUrlContent="",this.ticketDrawData="",this.tabValue="",this.multiplier=3,this.isLoading=!0,this.hasErrors=!1,this.errorText="",this.ticketData=[],this.ticketDataLoaded=!1,this.ticketDraws=[],this.toggleDrawer=[!1],this.limitStylingAppends=!1,this.ticketDrawDetails=[],this.ticketDrawDetailsFlag=!0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])$a[e][i]=t[e][i]})))}connectedCallback(){let t=[];if(this.ticketNumbers){let t=[];try{t=JSON.parse(this.ticketNumbers)}catch(e){t=[]}this.gridNumbers=t.map((t=>t.selections)),this.gridSecondaryNumbers=t.map((t=>t.secondarySelections||[]))}this.drawId&&t.push(this.getDrawData()),Promise.all(t).then((()=>{this.isLoading=!1})).catch((t=>{console.log("error ",t),this.isLoading=!1}))}componentWillRender(){this.ticketDrawData&&this.ticketDrawDetailsFlag&&(this.ticketDrawDetails=JSON.parse(this.ticketDrawData),this.ticketDrawDetails.forEach((t=>{this.getDrawData(t.drawId).then((e=>t.drawData=Object.assign({},e)))})),this.ticketDrawDetailsFlag=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getDrawData(t){return this.isLoading=!0,new Promise(((e,i)=>{let s=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t||this.drawId}`);fetch(s.href).then((t=>t.json())).then((i=>{t?e(i):(this.drawData=i,e(!0)),this.isLoading=!1})).catch((t=>{i(t),this.isLoading=!1}))}))}drawerToggle(t){this.toggleDrawer=this.toggleDrawer.map(((e,i)=>i==t?!e:e)),t>=this.toggleDrawer.length&&this.toggleDrawer.push(!0)}getDivision(t,e){var i,s;let r=t.division,o=null===(s=null===(i=e.drawData)||void 0===i?void 0:i.prizes)||void 0===s?void 0:s.filter((t=>t.order===r));return o&&o.length?o[0].division:null}render(){return this.isLoading?i("p",null,"Loading, please wait ..."):this.hasErrors?void i("p",null,this.errorText):i("section",{class:"DrawResultsSection",ref:t=>this.stylingContainer=t},this.drawMode?i("div",{class:"DrawResultsArea"},this.drawData&&i("div",null,i("div",{class:"DrawResultsHeader"},i("span",null,Ua("drawId",this.language),": ",this.drawData.id),i("span",null,Ua("drawDate",this.language),": ",this.drawData.date.slice(0,10))),i("div",{class:"DrawResultsBody"},i("div",{class:"DrawNumbersGrid"},i("p",null,Ua("drawNumbersGridDraw",this.language)),i("div",{class:"BulletContainer"},i("lottery-grid",{"selected-numbers":this.drawData.winningNumbers.length&&this.drawData.winningNumbers[0].numbers.join(","),"secondary-numbers":this.drawData.winningNumbers.length?this.drawData.winningNumbers[0].secondaryNumbers.join(","):"","display-selected":!0,selectable:!1,language:this.language,"grid-type":"ticket","translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),i("div",{class:"DrawPrizes"},i("label",{class:"Label"},Ua("prize",this.language)," "),this.drawData.prizes.length?i("div",null," ",this.drawData.prizes.filter((t=>"None"!==t.division)).map((t=>i("div",null,i("span",{style:{"margin-right":"5px"}},t.division,":"),i("span",{style:{"margin-right":"2px"}},t.amount.value),i("span",null,t.amount.currency))))):i("div",null,"None")))))):i("div",{class:"DrawResultsArea TicketDraws"},i("div",{class:"DrawResultsBody"},i("div",{class:"TicketIdContainer"},i("label",{class:"Label"},Ua("ticketId",this.language),": ",i("span",null,this.ticketId))),i("div",{class:"TicketAmountContainer"},i("label",{class:"Label"},Ua("ticketAmount",this.language),": ",i("span",null,this.ticketAmount),i("span",null,this.ticketCurrency))),i("div",{class:"DrawNumbersGrid"},this.gridNumbers.map(((t,e)=>{var s;return i("div",null,i("label",{class:"Label"},Ua("drawNumbersGridTicket",this.language),":"),i("div",{class:"BulletContainer"},i("lottery-grid",{"selected-numbers":t.join(","),"secondary-numbers":null===(s=this.gridSecondaryNumbers[e])||void 0===s?void 0:s.join(","),selectable:!1,"display-selected":!0,language:this.language,"translation-url":this.translationUrl,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))}))),this.ticketMultiplier&&i("div",{class:"DrawMultipler"},i("label",{class:"Label"},Ua("multiplierNum",this.language),": ",this.ticketMultiplierNum)),i("div",{class:"NumberOfDrawsContainer"},i("label",{class:"Label"},Ua("numberOfDraws",this.language),": ",this.ticketDrawCount),i("div",{class:"DrawTicketsContainer"},"Settled"===this.tabValue&&this.ticketDrawDetails&&this.ticketDrawDetails.length>0&&i("div",{class:"ExpandableBoxes"},this.ticketDrawDetails.map(((t,e)=>{var s,r,o,a,n,l,h,c;return i("div",{class:{ExpandableBox:!0,ShowBox:this.toggleDrawer[e]},onClick:this.drawerToggle.bind(this,e)},i("div",{class:"ExpandableBoxHeader"},i("div",{class:"TicketResultContainer"},i("p",null,Ua("ticketResult",this.language),": ",t.state)),"won"==t.state&&i("div",{class:"AmountWonContainer"},i("p",null,Ua("amountWon",this.language),": ",Number(t.amount).toLocaleString("en")," ",t.currency)),"lost"==t.state&&i("div",{class:"DrawIdContainer"},i("p",null,Ua("drawId",this.language),": ",t.drawId))),i("div",{class:"ExpandableBoxBody"},i("div",{class:"DrawIdContainer"},i("p",null,Ua("drawId",this.language),": ",t.drawId)),i("div",{class:"DrawDateContainer"},i("p",null,Ua("drawDate",this.language),": ",null===(s=t.drawData)||void 0===s?void 0:s.date.slice(0,10)," | ",null===(r=t.drawData)||void 0===r?void 0:r.date.slice(11,19))),i("div",{class:"DrawNumbersGrid"},t.drawData&&i("div",{class:"BulletContainer"},i("label",{class:"Label"},Ua("drawNumbersGridDraw",this.language),":"),i("lottery-grid",{"selected-numbers":(null===(a=null===(o=t.drawData)||void 0===o?void 0:o.winningNumbers)||void 0===a?void 0:a.length)&&(null===(n=t.drawData.winningNumbers[0].numbers)||void 0===n?void 0:n.join(",")),"secondary-numbers":(null===(h=null===(l=t.drawData)||void 0===l?void 0:l.winningNumbers)||void 0===h?void 0:h.length)&&(null===(c=t.drawData.winningNumbers[0].secondaryNumbers)||void 0===c?void 0:c.join(",")),selectable:!1,"display-selected":!0,language:this.language,"translation-url":this.translationUrl,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))),i("div",{class:"DrawPrizes"},i("label",{class:"Label"},Ua("prize",this.language),":"),0!==Number(t.amount)?i("span",null,t.details.filter((t=>"0"!==t.amount)).map((e=>i("span",null,this.getDivision(e,t)&&i("div",null,i("span",null,this.getDivision(e,t),":"),i("span",{style:{"margin-right":"2px"}},e.amount),i("span",null,e.currency)))))):i("span",null,"None"))))}))))))))}};Va.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketInfo{display:flex;flex-direction:row;gap:15px;background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));padding:12px;font-size:14px}.DrawResultsArea{margin-top:15px}.DrawResultsArea.TicketDraws .Content{padding:0;border:0}.DrawResultsArea.TicketDraws .DrawResultsBody{padding:0;margin-bottom:5px;border-radius:0;border:0}.DrawResultsSection{max-width:600px;margin:0px auto;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:14px;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0;padding-top:15px}.DrawResultsBody{padding:20px;margin-bottom:5px;border-radius:0 0 4px 4px;border:1px solid var(--emw--color-typography, #009993)}.DrawResultsBody>div{margin:10px 0}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.DrawNumbersGrid{display:flex;flex-direction:column;gap:5px}.DrawNumbersGrid label{display:block;margin-bottom:7px}.Label{position:relative}.DrawTicketsContainer{display:flex;flex-direction:column;margin:20px auto 0}.DrawMultipler{margin-top:15px}.DrawPrizes{margin-top:10px}.ExpandableBoxes{position:relative;display:flex;flex-direction:column;border:1px solid var(--emw--color-gray-transparency-80, #ccc);border-radius:5px;background-color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ExpandableBox{border-bottom:1px solid var(--emw--color-gray-transparency-80, #ccc);transition:height 300ms ease-in-out;overflow:hidden;height:80px}.ExpandableBox:last-child{border-bottom:0}.ExpandableBoxHeader{position:relative;list-style:none;outline:0;cursor:pointer;text-transform:uppercase;transition:color 300ms ease-in-out;margin-bottom:24px;margin-left:5px}.ShowBox>.ExpandableBoxHeader{color:var(--emw--color-typography, #009993)}.ExpandableBoxHeader::-webkit-details-marker{display:none}.ExpandableBoxHeader:before,.ExpandableBoxHeader:after{content:"";position:absolute}.ExpandableBoxHeader:before{right:21px;top:50%;height:2px;margin-top:-1px;width:16px;background:var(--emw--color-background, #009993)}.ExpandableBoxHeader:after{right:28px;top:50%;height:16px;margin-top:-8px;width:2px;margin-left:-1px;background:var(--emw--color-background, #009993);transition:all 300ms ease-in-out}.ShowBox .ExpandableBoxHeader:after{opacity:0;transform:translateY(25%)}.ExpandableBoxBody{padding-top:0;font-weight:lighter;margin-left:5px}.ExpandableBox.ShowBox{height:auto}';const qa=["ro","en","fr","ar","hr"],Ya={en:{drawResultsHeader:"Draw results history",viewAllResults:"View All",noResults:"No results",fetchingResults:"Fetching results",resetButton:"Reset"},ro:{drawResultsHeader:"Istoricul extragerilor",viewAllResults:"Vezi toate rezultatele",noResults:"Niciun rezultat",fetchingResults:"Se obtin rezultatele"},fr:{drawResultsHeader:"Dessiner l'historique des résultats",viewAllResults:"Voir tout",noResults:"Aucun résultat",fetchingResults:"Récupération des résultats"},ar:{drawResultsHeader:"سجل نتائج السحب",viewAllResults:"عرض الكل",noResults:"لا توجد نتائج",fetchingResults:"جلب النتائج"},hr:{drawResultsHeader:"Povijest rezultata izvlačenja",viewAllResults:"Pogledaj sve",noResults:"Nema rezultata",fetchingResults:"Dohvaćanje rezultata"}},Ja=(t,e)=>{const i=e;return Ya[void 0!==i&&qa.includes(i)?i:"en"][t]},Ka=class{constructor(e){t(this,e),this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.drawData=[],this.winningDataSetsData=[""],this.dateFiltersFrom="",this.dateFiltersTo="",this.isLoading=!1,this.noResults=!1,this.limitStylingAppends=!1,this.activeIndex=0,this.totalResults=0,this.limit=5,this.offset=0,this.isReset=!1,this.getDrawsData=()=>{this.isLoading=!0;let t=new URL(`${this.endpoint}/games/${this.gameId}/draws`);t.searchParams.append("limit",this.limit.toString()),t.searchParams.append("offset",this.offset.toString()),t.searchParams.append("excludeStatus","INIT,OPEN"),this.dateFiltersFrom&&t.searchParams.append("from",this.dateFiltersFrom),this.dateFiltersTo&&t.searchParams.append("to",this.dateFiltersTo),fetch(t.href).then((t=>{if(t.status>=300)throw new Error("There was an error while fetching the data");return t.json()})).then((t=>{this.winningDataSetsData=t.items?t.items.filter((t=>t.winningNumbers)):[],this.drawData=this.winningDataSetsData.map((t=>t)),this.totalResults=t.total})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1,this.noResults=0==this.drawData.filter((t=>t.winningNumbers)).length}))},this.getDrawResults=t=>{this.isLoading=!0;let e=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t}`);fetch(e.href,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>(404==t.status&&(this.noResults=!0),t.json()))).then((t=>{this.drawData=[t].map((t=>t))})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}filtersHandler(t){t.detail.ticketDrawId?this.getDrawResults(t.detail.ticketDrawId):(this.dateFiltersFrom=t.detail.filterFromCalendar,this.dateFiltersTo=t.detail.filterToCalendar,this.limit=5,this.offset=0,this.getDrawsData())}clearFiltersHandler(){this.dateFiltersFrom="",this.dateFiltersTo="",this.limit=5,this.offset=0,this.drawData=this.winningDataSetsData,this.getDrawsData()}hpPageChange(t){this.limit=t.detail.limit,this.offset=t.detail.offset,this.isReset=!1,this.getDrawsData()}connectedCallback(){this.getDrawsData()}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Ya[e][i]=t[e][i]})))}disconnectedCallback(){clearInterval(this.interval)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=i("div",{key:"6fe19d40938e44d09482b7c1b8c58ff5d962565e",class:"DrawResultsHeader"},i("div",{key:"0b3639c6d21100af3fa1c33b9663452da8281f63",class:"DrawResultsHeaderContent"},i("h4",{key:"66902020884d393eb476fe1503fb75530a8fd0b1"},Ja("drawResultsHeader",this.language)),i("div",{key:"3b98ce12acfd58006ab1c92805c4808370f5a1a4",class:"FilterSection"},i("helper-filters",{key:"3fba60abe71aa1c231365be8e20a8deccd7940cf","show-filter-id":"true","activate-ticket-search":"false","game-id":this.gameId,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))));return i("section",{key:"b6e07e38c0c0c3aecd95972f345c839d7230c7e5",class:"GridWrapper",ref:t=>this.stylingContainer=t},i("div",{key:"428ec5f0cf7556b92c1a5b840c23fae3133dcc59",class:"DrawResultsSection"},i("div",{key:"5d5da0f3740c674ad9fc526c2a9950ae209f4a00",class:"DrawResultsAreaHistory"},t,i("div",{key:"5a483612824d102ccf8685b030b7475b17caeeaf",class:"HistoryGridWrapper"},i("div",{key:"0645d2e1b984fe63b9a75a5e6e1af13b853cf39c",class:"HistoryGrid"},this.isLoading&&i("p",{key:"473d2a7b68d2d288b8c43917d2cff16f479d350f"},Ja("fetchingResults",this.language)),!this.isLoading&&!this.noResults&&this.drawData.map((t=>i("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,"draw-id":t.id,"draw-mode":!0,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))),!this.isLoading&&this.noResults&&i("p",{key:"66c3dcbac799822242b7036ef8aa9b2e1d9c0f7e"},Ja("noResults",this.language)))),i("div",{key:"dadc2068cec33ef4571a36cbb4aa713f435befdd",class:"DrawHistoryPaginationWrapper"},this.totalResults>this.limit&&i("lottery-pagination",{key:"3f4a23466e8245517e5cca81e0f2e6de3a698d05",arrowsActive:!0,numberedNavActive:!0,"is-reset":this.isReset,"first-page":!1,"prev-page":!0,"next-page":!0,offset:this.offset,limit:this.limit,total:this.totalResults,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))))}};Ka.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridBanner{background-color:var(--emw--color-background, #009993);background-repeat:no-repeat;background-position:center;color:var(--emw--color-gray-300, #111);padding:0 20px 30px}.GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GridBanner .BannerButtonsWrapper .BannerBackButton,.GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--color-typography, #009993);border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GridBanner .HistoryGridBannerArea{padding-top:30px}.HistoryGridBannerArea{display:flex;flex-direction:column;align-items:center}.BannerText{font-size:14px;font-weight:300}.BannerCountdown{font-size:22px;display:flex;gap:20px}.DrawResultsSection{max-width:600px;margin:0px auto}.HistoryGrid{border-radius:5px}.DrawResultsHeader{color:var(--emw--color-typography, #009993);padding:25px 0 10px 0;text-align:center;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.DrawNumbersGrid{padding:10px 50px}.DrawNumbersGrid p{margin:0 0 10px 0;font-size:14px}.BulletContainer{margin-bottom:20px}.DrawResultTop{background-color:var(--emw--color-background, #009993);padding:10px;text-align:center;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));padding:0 50px;display:flex;justify-content:center;gap:40px}.ViewAllResults{display:block;padding:10px 40px;margin:40px auto;border:0;border-radius:5px;background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));outline:none}.FilterSection{display:flex;justify-content:space-between;padding:25px 15px 10px;gap:10px;margin:0px 15px}.FilterSection .FilterResultsContainer{display:flex;gap:5px;overflow-x:auto}.FilterSection .QuickFilterButton,.FilterSection .ResetButton{cursor:pointer;width:max-content;border-radius:var(--emw--button-border-radius, 4px);border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterSection .Active{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterSection helper-filters{margin-left:auto}';const Xa=class{constructor(e){t(this,e),this.clientStyling="",this.clientStylingUrlContent="",this.language="en",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"bfc44a442056b452e331fc736f9c22e30dca143b",class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"c8ad00900a8f16050a840c2e21fd4c2cebf2e1ec","header-title":"Game Details",collapsed:!1,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"cc8dc2dc148fb862f51a5c45b18c6c3e9fbb46f7",class:"AccordionContainer",slot:"accordionContent"},i("helper-tabs",{key:"b72ade93e6a2432276b24929be8865b2516ca44a","low-number":this.lowNumber,"high-number":this.highNumber,"minimum-allowed":this.minimumAllowed,"maxinum-allowed":this.maxinumAllowed,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};Xa.style=":host{display:block}";const Za=["ro","en","fr","ar","hr"],Qa={en:{error:"Error",backButton:"Back",lobbyButton:"Lobby",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",submitSuccess:"Submit successfully!",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",modalLogin:"Please login to submit a ticket",loading:"Loading, please wait ..."},ro:{error:"Eroare",backButton:"Inapoi",lobbyButton:"Lobby",nextDraw:"Urmatoarea extragere:",buy:"Cumpara bilet",viewLatest:"Ultimile extrageri",submitSuccess:"Submit successfully!",orderSummaryTitle:"Rezumat comanda",orderSummaryTickets:"Bilet",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",modalLogin:"Please login to submit a ticket",loading:"Se incarca, va rugam asteptati ..."},fr:{error:"Error",backButton:"Back",lobbyButton:"Lobby",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",submitSuccess:"Submit successfully!",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",modalLogin:"Please login to submit a ticket",loading:"Loading, please wait ..."},ar:{error:"خطأ",backButton:"خلف",lobbyButton:"ردهة",nextDraw:"السحب التالي:",buy:"اشتري تذاكر",viewLatest:"عرض أحدث النتائج",submitSuccess:"Submit successfully!",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"تذكرة",orderSummaryTotal:"المجموع",orderSummarySubmit:"يُقدِّم",modalLogin:"الرجاء تسجيل الدخول لتقديم تذكرة",loading:"Loading, please wait ..."},hr:{error:"Greška",backButton:"Nazad",lobbyButton:"Lobby",nextDraw:"Sljedeće izvlačenje za: ",buy:"Uplati listić",viewLatest:"Pogledajte najnovije rezultate",submitSuccess:"Submit successfully!",orderSummaryTitle:"Sažetak narudžbe",orderSummaryTickets:"Listić",orderSummaryTotal:"Ukupno",orderSummarySubmit:"Podnijeti",modalLogin:"Molimo prijavite se da uplatite listić",loading:"Učitavanje, molimo pričekajte ..."}},tn=(t,e)=>{const i=e;return Qa[void 0!==i&&Za.includes(i)?i:"en"][t]},en=t=>new Promise(((e,i)=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])Qa[e][i]=t[e][i]})),e(Qa)})).catch((t=>{i(t)}))})),sn=class{constructor(i){var s;t(this,i),this.goBackEvent=e(this,"goBackEvent",7),this.goToLobbyEvent=e(this,"goToLobbyEvent",7),this.language="en",this.clientStyling="",this.clientStylingurl="",this.translationUrl="",this.clientStylingUrlContent="",this.tickets=[],this.mainTickets=[],this.secondaryTickets=[],this.tabIndex=0,this.hasErrors=!1,this.totalAmount=0,this.successVisible=!1,this.isLoggedIn=!1,this.loginModalVisible=!1,this.limitStylingAppends=!1,this.isLoading=!1,this.showSubmitError=!1,this.submitError="",this.showApiError=!1,this.apiError="",this.userAgent=window.navigator.userAgent,this.quickPick=!1,this.gameData={},this.isMobile=!!((s=this.userAgent).toLowerCase().match(/android/i)||s.toLowerCase().match(/blackberry|bb/i)||s.toLowerCase().match(/iphone|ipad|ipod/i)||s.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.secondarySelectionAllowed=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingurl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{this.clientStylingUrlContent=t,e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))}}handleNewTranslations(){this.isLoading=!0,en(this.translationUrl).then((()=>{this.isLoading=!1}))}connectedCallback(){this.getGameDetails(),this.sessionId&&(this.isLoggedIn=!0)}async componentWillLoad(){const t=[];if(this.translationUrl){const e=en(this.translationUrl).then((t=>{this.translationData=JSON.stringify(t)})).catch((t=>{console.log(t)}));t.push(e)}return Promise.all(t)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingurl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}countdownLogic(t){this.interval=setInterval((()=>{this.daysRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/864e5),this.hoursRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/36e5-24*this.daysRemaining),this.minutesRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/6e4-24*this.daysRemaining*60-60*this.hoursRemaining),this.secondsRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/1e3-24*this.daysRemaining*60*60-60*this.hoursRemaining*60-60*this.minutesRemaining)}),1e3)}disconnectedCallback(){clearInterval(this.interval)}getGameDetails(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.status>=300)throw this.hasErrors=!0,new Error("There was an error while fetching the data");return t.json()})).then((t=>{var e,i;this.gameData=t,this.basicStake=this.gameData.rules.stakes.length?Number(this.gameData.rules.stakes[0].value):0,this.basicLine=(null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.length)?this.gameData.rules.betTypes[0].boardsAllowed[0]:1,this.basicBetType=this.gameData.rules.betTypes[0],this.nextDate=null===(i=this.gameData.currentDraw)||void 0===i?void 0:i.date,this.nextDate&&this.countdownLogic(this.nextDate),this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed,this.quickPick=this.gameData.rules.quickPickAvailable;let s=this.gameData.draws?this.gameData.draws.filter((t=>!t.winningNumbers)):[];s.length>0&&(this.nextDraw=s[0].id),this.createNewTicket()})).catch((t=>{this.hasErrors=!0,console.log("Error",t)}))}calculateTotalAmount(){const{currency:t}=this.gameData.rules.stakes[0];this.totalAmount=0,this.mainTickets.forEach((t=>{var e;t.completed.every((t=>t))&&(this.totalAmount+=t.drawCount*(t.stake||this.basicStake)*t.multiplierNum*t.lineNum*(null===(e=t.betType)||void 0===e?void 0:e.combinations))})),this.currency=t}gridFilledHandler(t){let e="secondarySelection"===t.detail.selectionType?this.secondaryTickets:this.mainTickets;e=e.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10)));let s=e.completed||[];return s[t.detail.index]=!0,{gameId:e.gameId,ticketId:e.ticketId,completed:s,drawCount:t.detail.drawCount,stake:e.stake||this.basicStake,selectedNumbers:i,multiplierNum:t.detail.multiplierNum,multiplier:t.detail.multiplier,lineNum:e.lineNum,betType:e.betType}}return e})),"secondarySelection"===t.detail.selectionType?this.secondaryTickets=e:this.mainTickets=e,this.calculateTotalAmount()}gridDirtyHandler(t){let e="secondarySelection"===t.detail.selectionType?this.secondaryTickets:this.mainTickets;e=e.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10)));let s=e.completed||[];return s[t.detail.index]=!1,{gameId:e.gameId,ticketId:e.ticketId,completed:s,drawCount:e.drawCount,stake:e.stake,selectedNumbers:i,multiplierNum:e.multiplierNum,multiplier:e.multiplier,lineNum:e.lineNum,betType:e.betType}}return e})),"secondarySelection"===t.detail.selectionType?this.secondaryTickets=e:this.mainTickets=e,this.calculateTotalAmount()}modalCloseEvent(){this.loginModalVisible=!1,this.successVisible=!1}stakeChangeHandler(t){const{ticketId:e,stake:i}=t.detail;this.mainTickets[e-1].stake=i,this.calculateTotalAmount()}multiplierChangeHandler(t){const{ticketId:e,multiplierNum:i,multiplier:s}=t.detail;this.mainTickets[e-1].multiplierNum=i,this.mainTickets[e-1].multiplier=s,this.calculateTotalAmount()}drawMultiplierChangeHandler(t){const{ticketId:e,drawCount:i}=t.detail;this.mainTickets[e-1].drawCount=i,this.calculateTotalAmount()}lineMultiplierChangeHandler(t){const{ticketId:e,lineNum:i}=t.detail;this.mainTickets[e-1].lineNum=i,this.mainTickets[e-1].completed=Array.from({length:i},(()=>!1)),this.mainTickets[e-1].selectedNumbers=[]}betTypeChangeHandler(t){const{ticketId:e,betType:i}=t.detail;this.mainTickets[e-1].betType=i}createNewTicket(){this.mainTickets=[...this.mainTickets,{gameId:this.gameId,ticketId:this.mainTickets.length+1,drawCount:1,multiplierNum:1,completed:[!1],stake:this.basicStake,betType:this.basicBetType,lineNum:this.basicLine}],this.secondaryTickets=[...this.secondaryTickets,{gameId:this.gameId,ticketId:this.secondaryTickets.length+1,drawCount:1,multiplierNum:1,completed:[!1],stake:this.basicStake,betType:this.basicBetType,lineNum:this.basicLine}]}showLoginModal(){this.loginModalVisible=!0}submitTickets(){let t=new URL(`${this.endpointTicket}/tickets`),e={playerId:this.playerId.toString(),tickets:[]},i=[];this.secondarySelectionAllowed&&(i=this.secondaryTickets[0].completed.reduce(((t,e,i)=>(e||t.push(i),t)),[]));let s=this.mainTickets[0].completed.reduce(((t,e,i)=>(e||t.push(i),t)),[]),r=[...new Set([...i,...s])].sort(((t,e)=>t-e));if(r.length){this.showSubmitError=!0;let t=r.map((t=>`Line${t+1}`)).join();return this.submitError=`The number of the selected number(s) on ${t} is invalid.`,void setTimeout((()=>{this.showSubmitError=!1}),3e3)}this.mainTickets.forEach(((t,i)=>{var s;e.tickets.push({startingDrawId:this.nextDraw,amount:(t.stake*t.drawCount*t.multiplierNum*(t.lineNum||1)*(null===(s=t.betType)||void 0===s?void 0:s.combinations)).toString(),gameId:this.gameId,gameName:this.gameData.name,currency:this.currency,selection:t.selectedNumbers.map(((e,s)=>{var r;return{betType:(null===(r=t.betType)||void 0===r?void 0:r.id)||this.gameData.rules.defaultBetType,stake:t.stake,selections:e,secondarySelections:this.secondarySelectionAllowed?this.secondaryTickets[i].selectedNumbers[s]:[]}})),multiplier:t.multiplier,multiplierNum:t.multiplierNum,drawCount:t.drawCount,quickPick:this.quickPick})}));const o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}));let a={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${this.sessionId}`,"X-Idempotency-Key":o},body:JSON.stringify(e)};this.isLoading=!0,fetch(t.href,a).then((t=>{if(t.status>300)throw this.apiError=t.statusText+".",this.showApiError=!0,setTimeout((()=>{this.showApiError=!1}),3e3),new Error(t.statusText);return t.json()})).then((()=>{this.successVisible=!0})).catch((t=>{console.log("Error ",t)})).finally((()=>{this.isLoading=!1}))}goBack(){this.goBackEvent.emit()}goToLobby(){this.goToLobbyEvent.emit()}render(){var t,e,s,o,a,n,l,h,c,d,u,p,m,f,b,g,v,y,w,x;const k=r(this.isMobile?"../static/chrono_lottery_mobile.png":"../static/chrono_desktop.png");return this.hasErrors?i("div",{class:"GamePage"},i("div",{class:"Title"},tn("error",this.language))):i("div",{class:"GamePage",dir:"ar"==this.language?"rtl":"ltr",ref:t=>this.stylingContainer=t},i("div",{class:"GridBanner",style:{background:`url(${this.backgroundUrl?this.backgroundUrl:k})`,"background-size":"contain","background-repeat":"no-repeat","background-position":"center"}},i("div",{class:"BannerButtonsWrapper"}),i("div",{class:"Tabs"},i("div",{class:"TabButton"+(0==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=0},tn("buy",this.language)),i("div",{class:"TabButton"+(1==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=1},tn("viewLatest",this.language)))),i("div",{class:"NextDrawWrapper"},this.nextDate&&i("div",{class:"NextDraw"},i("p",{class:"BannerText"},tn("nextDraw",this.language)),i("div",{class:"BannerCountdown"},i("span",{class:"CountdownDays"},this.daysRemaining,"D"),i("span",{class:"CountdownHours"},this.hoursRemaining,"H"),i("span",{class:"CountdownMinutes"},this.minutesRemaining,"M"),i("span",{class:"CountdownSeconds"},this.secondsRemaining,"S")))),0==this.tabIndex&&i("div",{class:"GamePageContent"},i("div",{class:"GameDetails"},i("lottery-game-details",{"low-number":null===(e=null===(t=this.gameData.rules)||void 0===t?void 0:t.boards[0])||void 0===e?void 0:e.lowNumber,"high-number":null===(o=null===(s=this.gameData.rules)||void 0===s?void 0:s.boards[0])||void 0===o?void 0:o.highNumber,"minimum-allowed":null===(n=null===(a=this.gameData.rules)||void 0===a?void 0:a.boards[0])||void 0===n?void 0:n.minimumAllowed,"maxinum-allowed":null===(h=null===(l=this.gameData.rules)||void 0===l?void 0:l.boards[0])||void 0===h?void 0:h.maxinumAllowed,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent,"translation-url":this.translationData})),i("div",{class:"TicketsWrapper"},this.mainTickets.map((t=>{var e,s;return i("lottery-ticket-controller",{endpoint:this.endpoint,"ticket-id":t.ticketId,"game-id":t.gameId,collapsed:!1,last:!0,language:this.language,"auto-pick":null===(e=this.gameData.rules)||void 0===e?void 0:e.quickPickAvailable,"reset-button":null===(s=this.gameData.rules)||void 0===s?void 0:s.quickPickAvailable,"total-controllers":this.mainTickets.length,"translation-url":this.translationData,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})}))),i("div",{class:"OrderSummary"},i("h3",{class:"OrderSummaryTitle"},tn("orderSummaryTitle",this.language)),i("div",{class:"OrderTicketInfo"},i("div",{class:"Ticket"},tn("orderSummaryTickets",this.language),": ",i("span",null,this.mainTickets.length)),i("div",null,i("span",null,(null===(d=null===(c=this.mainTickets[0])||void 0===c?void 0:c.betType)||void 0===d?void 0:d.combinations)*(null===(u=this.mainTickets[0])||void 0===u?void 0:u.lineNum)),i("span",{class:"Multiplier"},"x"),(null===(p=this.gameData.rules)||void 0===p?void 0:p.stakeMultiplierAvailable)&&i("span",null,i("span",null,1===(null===(m=this.mainTickets[0])||void 0===m?void 0:m.multiplierNum)?`${null===(f=this.mainTickets[0])||void 0===f?void 0:f.multiplierNum} Multiplier`:`${null===(b=this.mainTickets[0])||void 0===b?void 0:b.multiplierNum} Multipliers`),i("span",{class:"Multiplier"},"x")),i("span",null,`${null===(g=this.mainTickets[0])||void 0===g?void 0:g.stake} EUR`),(null===(v=this.gameData.rules)||void 0===v?void 0:v.drawMultiplierAvailable)&&i("span",null,i("span",{class:"Multiplier"},"x"),i("span",null,1===(null===(y=this.mainTickets[0])||void 0===y?void 0:y.drawCount)?`${null===(w=this.mainTickets[0])||void 0===w?void 0:w.drawCount} Draw`:`${null===(x=this.mainTickets[0])||void 0===x?void 0:x.drawCount} Draws`)))),i("hr",null),i("div",{class:"Total"},tn("orderSummaryTotal",this.language),": ",i("span",null,this.totalAmount," ",this.currency)),i("div",{class:"ButtonWrapper"},this.isLoggedIn&&i("div",null,!this.isLoading&&i("div",{class:"submitWrap"},i("div",{class:"Button",onClick:()=>this.submitTickets()},tn("orderSummarySubmit",this.language)),this.showSubmitError&&i("div",{class:"submitError"},this.submitError),this.showApiError&&i("div",{class:"submitError"},this.apiError)),this.isLoading&&i("span",{class:"Button",style:{cursor:"default"}},tn("loading",this.language))),!this.isLoggedIn&&i("div",null,i("span",{class:"Button",onClick:()=>this.showLoginModal()},tn("orderSummarySubmit",this.language)),i("helper-modal",{"title-modal":"Success",visible:this.loginModalVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("p",{class:"SubmitModalSuccess"},tn("modalLogin",this.language))))))),1==this.tabIndex&&i("div",null,i("lottery-draw-results-history",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"translation-url":this.translationData,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),i("helper-modal",{"title-modal":"Success",visible:this.successVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("p",{class:"SubmitModalSuccess"},tn("submitSuccess",this.language))))}static get assetsDirs(){return["../static"]}get element(){return s(this)}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};sn.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GamePage .GridBanner{background-color:var(--emw--color-background, #009993);background-repeat:no-repeat;background-position:center;color:var(--emw--color-gray-300, #111);padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--color-gray-100, #D4D4D4);border-radius:var(--emw--button-border-radius, 4px);padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:var(--emw--button-text-color, #000);font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:var(--emw--button-background-color, #00958f);font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:4px}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:var(--emw--button-background-color, #00958f);display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:var(--emw--button-border-radius, 4px);cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{color:var(--emw--button-background-color, #00958f);background:var(--emw--color-gray-50, #F1F1F1);border:1px solid var(--emw--color-gray-50, #F1F1F1)}.LastDrawResultsTitle{color:var(--emw--color-typography, #009993);padding:25px 0 10px 0;text-align:center;border-radius:var(--emw--button-border-radius, 4px);text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:var(--emw--color-gray-50, #F1F1F1);background:linear-gradient(0deg, var(--emw--color-gray-50, #F1F1F1) 0%, var(--emw--color-gray-transparency-20, rgba(253, 187, 45, 0)) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:var(--emw--color-typography, #009993);font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:var(--emw--color-primary-variant, #004D4A);height:100px;width:100%;display:flex;margin-top:10px;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--color-primary-variant, #004D4A);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:var(--emw--color-gray-50, #F1F1F1)}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.OrderSummary{min-width:200px;border-radius:var(--emw--button-border-radius, 4px);display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.OrderSummary .OrderSummaryTitle{font-size:16px;color:var(--emw--color-typography, #009993);text-transform:uppercase;text-align:center}.OrderSummary .OrderTicketInfo{display:flex;align-items:center}.OrderSummary .OrderTicketInfo .Multiplier{margin:0 6px}.OrderSummary .Ticket{display:inline-block;color:var(--emw--button-text-color, #000);font-size:14px;height:50px;line-height:50px;margin-left:15px;margin-right:30px}.OrderSummary .Ticket span{text-align:right}.OrderSummary hr{border:none;border-top:1px double var(--emw--color-gray-100, #D4D4D4);color:var(--emw--color-gray-100, #D4D4D4);width:100%}.OrderSummary .Total{display:inline-block;color:var(--emw--button-text-color, #000);font-size:14px;height:50px;line-height:50px;margin-left:15px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-background, #009993);border:1px solid var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ButtonWrapper .Button:hover{background:var(--emw--color-background-secondary, #00ABA4)}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:var(--emw--color-gray-transparency-80, #ccc);border:1px solid var(--emw--color-gray-transparency-80, #ccc)}.ButtonWrapper .submitError{margin-top:10px;color:var(--emw--color-error, #FF3D00)}.ButtonWrapper .submitWrap{display:flex;flex-direction:column;align-items:center}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:var(--emw--button-background-color, #00958f);font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:var(--emw--button-text-color, #000);line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:var(--emw--button-border-radius, 4px);padding:10px 25px;margin:5px;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:var(--emw--color-gray-50, #F1F1F1)}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}';const rn=class{constructor(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.gridClearAllEvent=e(this,"gridClearAllEvent",7),this.totalNumbers=0,this.maximumAllowed=7,this.minimumAllowed=3,this.selectable=!0,this.selectedNumbers="",this.secondaryNumbers="",this.displaySelected=!1,this.language="en",this.gridType="",this.clientStyling="",this.clientStylingUrlContent="",this.highNumber=47,this.lowNumber=1,this.selectionType="mainSelection",this.partialQuickpickAvailable=!1,this.numbers=[],this.bonusNumbers=[],this.limitStylingAppends=!1,this.selectedCounter=0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.secondaryNumbers.length>0&&(this.bonusNumbers=this.secondaryNumbers.split(",").map((t=>({number:t,selected:!0,selectable:this.selectable})))),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e)).map((t=>t.toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}shuffleArray(t){const e=[];for(;t.length>0;){const i=Math.floor(Math.random()*t.length);e.push(t.splice(i,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>({number:e.number,selected:e.number==t.detail.value?t.detail.selected:e.selected,selectable:e.selectable}))),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter>=this.minimumAllowed&&this.selectedCounter<=this.maximumAllowed&&(this.numbers=this.numbers.map((t=>this.selectedCounter===this.maximumAllowed?{number:t.number,selected:t.selected,selectable:!!t.selected}:{number:t.number,selected:t.selected,selectable:!0})),JSON.parse(this.numberRange).includes(this.selectedCounter)?this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter-=1,this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),this.selectedCounter<this.minimumAllowed?this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),0===this.selectedCounter&&this.gridClearAllEvent.emit(this.gridIndex))}async resetSelectionHandler(t){t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:[]}))}async autoSelectionHandler(t){if(t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex){this.resetSelectionHandler(t);let e=Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e));e=this.shuffleArray(e),e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:!!this.partialQuickpickAvailable&&e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.minimumAllowed}}render(){return i("div",{key:"8ad436904a126e6bee036c7372cf45c075022e5f",class:"GridContainer",ref:t=>this.stylingContainer=t},i("div",{key:"5a8818209485f0808a99978910f6f26473dd6f59",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>i("div",null,i("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))),this.bonusNumbers.length?this.bonusNumbers.map((t=>i("div",null,i("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"is-bonus":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))):""))}};rn.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const on=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),an={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},nn=(t,e)=>an[void 0!==e&&e in an?e:"en"][t],ln=class{constructor(i){t(this,i),this.hpPageChange=e(this,"hpPageChange",7),this.nextPage=!1,this.prevPage=!1,this.offset=0,this.limit=10,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.isReset=!1,this.lastPage=!1,this.previousPage=!1,this.pagesArray=[],this.endInt=0,this.userAgent=window.navigator.userAgent,this.currentPage=1,this.limitStylingAppends=!1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt,this.nextPage=!0;break;case"nextPage":this.offsetInt+=this.limitInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage}this.previousPage=!!this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,e)=>{isNaN(t)?0===e&&this.currentPage<=4?this.navigateTo("firstPage"):0===e&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===e&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):(1===t?(this.offsetInt=t-1,this.previousPage=!1):(this.offsetInt=(t-1)*this.limitInt,this.nextPage=!(t>this.endInt)),this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])an[e][i]=t[e][i]})))}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.nextPage=!!this.isReset||this.nextPage,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?this.endInt>3?(this.pagesArray=Array.from({length:4},((t,e)=>e+1)),this.pagesArray.push("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,e)=>e+1)):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,e)=>this.currentPage+e-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.endInt>4?(this.pagesArray=Array.from({length:4},((t,e)=>this.endInt-2+e)),this.pagesArray.unshift("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,e)=>e+1)))}componentDidRender(){this.isReset=!1,!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=i("ul",{class:"PaginationArea"},this.pagesArray.map(((t,e)=>i("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(on(this.userAgent)?"MobileButtons":"")},i("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,e)},i("span",null,t)))))),e=i("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},i("span",{class:"NavigationButton"},nn("firstPage",this.language)),i("span",{class:"NavigationIcon"})),s=i("div",{class:"LeftItems"},this.secondaryArrowsActive&&e,i("button",{disabled:!this.prevPage||1===this.currentPage,onClick:this.navigateTo.bind(this,"previousPage")},i("span",{class:"NavigationButton"},nn("previousPage",this.language)),i("span",{class:"NavigationIcon"})));on(this.userAgent)&&(s=i("div",{class:"LeftItems"},i("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},i("span",{class:"NavigationButton"},nn("previousPage",this.language)),i("span",{class:"NavigationIcon"}))));let r=i("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},i("span",{class:"NavigationButton"},nn("lastPage",this.language)),i("span",{class:"NavigationIcon"})),o=i("div",{class:"RightItems"},i("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},i("span",{class:"NavigationButton"},nn("nextPage",this.language)),i("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&r);return on(this.userAgent)&&(o=i("div",{class:"RightItems"},i("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},i("span",{class:"NavigationButton"},nn("nextPage",this.language)),i("span",{class:"NavigationIcon"})))),i("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&s,this.numberedNavActive&&t,this.arrowsActive&&o)}};ln.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993)}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:var(--emw--button-text-color, #000);cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));opacity:0.8}button{width:100px;height:32px;border:1px solid var(--emw--color-gray-transparency-30, #524e52);border-radius:5px;background:var(--emw--color-gray-transparency-30, #524e52);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:var(--emw--color-primary-variant, #004D4A);border-color:var(--emw--color-primary-variant, #004D4A)}button:disabled{background-color:var(--emw--color-gray-transparency-80, #ccc);border-color:var(--emw--color-gray-transparency-80, #ccc);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}}';const hn=["ro","en","hr"],cn={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},hr:{loading:"Učitavanje, molimo pričekajte ...",error:"Došlo je do pogreške prilikom pokušaja dohvaćanja podataka",multiplier:"Multiplikator",numberOfDraws:"Broj izvlačenja",wagerPerDraw:"Ulog po izvlačenju",resetButton:"Resetiraj",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"}},dn=(t,e)=>{const i=e;return cn[void 0!==i&&hn.includes(i)?i:"en"][t]},un=y`
3452
+ :host {
3453
+ display: flex;
3454
+ align-items: center;
3455
+ box-sizing: border-box;
3456
+ font-family: var(--lumo-font-family);
3457
+ font-size: var(--lumo-font-size-m);
3458
+ line-height: var(--lumo-line-height-xs);
3459
+ padding: 0.5em calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4) 0.5em
3460
+ var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
3461
+ min-height: var(--lumo-size-m);
3462
+ outline: none;
3463
+ border-radius: var(--lumo-border-radius-m);
3464
+ cursor: var(--lumo-clickable-cursor);
3465
+ -webkit-font-smoothing: antialiased;
3466
+ -moz-osx-font-smoothing: grayscale;
3467
+ -webkit-tap-highlight-color: var(--lumo-primary-color-10pct);
3468
+ --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
3469
+ --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
3470
+ --_selection-color-text: var(--vaadin-selection-color-text, var(--lumo-primary-text-color));
3471
+ }
3472
+
3473
+ /* Checkmark */
3474
+ [part='checkmark']::before {
3475
+ display: var(--_lumo-item-selected-icon-display, none);
3476
+ content: var(--lumo-icons-checkmark);
3477
+ font-family: lumo-icons;
3478
+ font-size: var(--lumo-icon-size-m);
3479
+ line-height: 1;
3480
+ font-weight: normal;
3481
+ width: 1em;
3482
+ height: 1em;
3483
+ margin: calc((1 - var(--lumo-line-height-xs)) * var(--lumo-font-size-m) / 2) 0;
3484
+ color: var(--_selection-color-text);
3485
+ flex: none;
3486
+ opacity: 0;
3487
+ transition:
3488
+ transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2),
3489
+ opacity 0.1s;
3490
+ }
3491
+
3492
+ :host([selected]) [part='checkmark']::before {
3493
+ opacity: 1;
3494
+ }
3495
+
3496
+ :host([active]:not([selected])) [part='checkmark']::before {
3497
+ transform: scale(0.8);
3498
+ opacity: 0;
3499
+ transition-duration: 0s;
3500
+ }
3501
+
3502
+ [part='content'] {
3503
+ flex: auto;
3504
+ }
3505
+
3506
+ /* Disabled */
3507
+ :host([disabled]) {
3508
+ color: var(--lumo-disabled-text-color);
3509
+ cursor: default;
3510
+ pointer-events: none;
3511
+ }
3512
+
3513
+ /* TODO a workaround until we have "focus-follows-mouse". After that, use the hover style for focus-ring as well */
3514
+ @media (any-hover: hover) {
3515
+ :host(:hover:not([disabled])) {
3516
+ background-color: var(--lumo-primary-color-10pct);
3517
+ }
3518
+ }
3519
+
3520
+ :host([focus-ring]:not([disabled])) {
3521
+ box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
3522
+ }
3523
+
3524
+ /* RTL specific styles */
3525
+ :host([dir='rtl']) {
3526
+ padding-left: calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4);
3527
+ padding-right: var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
3528
+ }
3529
+
3530
+ /* Slotted icons */
3531
+ :host ::slotted(vaadin-icon) {
3532
+ width: var(--lumo-icon-size-m);
3533
+ height: var(--lumo-icon-size-m);
3534
+ }
3535
+ `;Tt("vaadin-item",un,{moduleId:"lumo-item"});const pn=y`
3536
+ :host {
3537
+ -webkit-tap-highlight-color: transparent;
3538
+ --_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
3539
+ }
3540
+
3541
+ /* Dividers */
3542
+ [part='items'] ::slotted(hr) {
3543
+ height: 1px;
3544
+ border: 0;
3545
+ padding: 0;
3546
+ margin: var(--lumo-space-s) var(--lumo-border-radius-m);
3547
+ background-color: var(--lumo-contrast-10pct);
3548
+ }
3549
+ `;Tt("vaadin-list-box",pn,{moduleId:"lumo-list-box"}),
3550
+ /**
3551
+ * @license
3552
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
3553
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3554
+ */
3555
+ Tt("vaadin-select-item",un,{moduleId:"lumo-select-item"}),Tt("vaadin-select-list-box",pn,{moduleId:"lumo-select-list-box"}),Tt("vaadin-select",[Wt,y`
3556
+ :host(:not([theme*='align'])) ::slotted([slot='value']) {
3557
+ text-align: start;
3558
+ }
3559
+
3560
+ [part='input-field'] {
3561
+ cursor: var(--lumo-clickable-cursor);
3562
+ }
3563
+
3564
+ [part='input-field'] ::slotted([slot='value']) {
3565
+ font-weight: var(--vaadin-input-field-value-font-weight, 500);
3566
+ }
3567
+
3568
+ [part='input-field'] ::slotted([slot='value']:not([placeholder])) {
3569
+ color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
3570
+ }
3571
+
3572
+ :host([readonly]) [part='input-field'] ::slotted([slot='value']:not([placeholder])) {
3573
+ color: var(--lumo-secondary-text-color);
3574
+ }
3575
+
3576
+ /* placeholder styles */
3577
+ [part='input-field'] ::slotted([slot='value'][placeholder]) {
3578
+ color: var(--vaadin-input-field-placeholder-color, var(--lumo-secondary-text-color));
3579
+ }
3580
+
3581
+ :host(:is([readonly], [disabled])) ::slotted([slot='value'][placeholder]) {
3582
+ opacity: 0;
3583
+ }
3584
+
3585
+ [part='toggle-button']::before {
3586
+ content: var(--lumo-icons-dropdown);
3587
+ }
3588
+
3589
+ /* Highlight the toggle button when hovering over the entire component */
3590
+ :host(:hover:not([readonly]):not([disabled])) [part='toggle-button'] {
3591
+ color: var(--lumo-contrast-80pct);
3592
+ }
3593
+
3594
+ :host([theme~='small']) [part='input-field'] ::slotted([slot='value']) {
3595
+ --_lumo-selected-item-height: var(--lumo-size-s);
3596
+ --_lumo-selected-item-padding: 0;
3597
+ }
3598
+ `],{moduleId:"lumo-select"}),Tt("vaadin-select-value-button",y`
3599
+ :host {
3600
+ font-family: var(--lumo-font-family);
3601
+ font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
3602
+ padding: 0 0.25em;
3603
+ --_lumo-selected-item-height: var(--lumo-size-m);
3604
+ --_lumo-selected-item-padding: 0.5em;
3605
+ }
3606
+
3607
+ ::slotted(*) {
3608
+ min-height: var(--_lumo-selected-item-height);
3609
+ padding-top: var(--_lumo-selected-item-padding);
3610
+ padding-bottom: var(--_lumo-selected-item-padding);
3611
+ font-size: inherit;
3612
+ }
3613
+
3614
+ ::slotted(*:hover) {
3615
+ background-color: transparent;
3616
+ }
3617
+ `,{moduleId:"lumo-select-value-button"}),Tt("vaadin-select-overlay",[Rt,y`
3618
+ :host {
3619
+ --_lumo-item-selected-icon-display: block;
3620
+ }
3621
+
3622
+ /* Small viewport adjustment */
3623
+ :host([phone]) {
3624
+ /* stylelint-disable declaration-block-no-redundant-longhand-properties */
3625
+ top: 0 !important;
3626
+ right: 0 !important;
3627
+ bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
3628
+ left: 0 !important;
3629
+ /* stylelint-enable declaration-block-no-redundant-longhand-properties */
3630
+ align-items: stretch;
3631
+ justify-content: flex-end;
3632
+ }
3633
+
3634
+ :host([no-vertical-overlap][top-aligned]) [part='overlay'] {
3635
+ margin-block-start: var(--lumo-space-xs);
3636
+ }
3637
+
3638
+ :host([no-vertical-overlap][bottom-aligned]) [part='overlay'] {
3639
+ margin-block-end: var(--lumo-space-xs);
3640
+ }
3641
+
3642
+ :host([theme~='align-left']) {
3643
+ text-align: left;
3644
+ }
3645
+
3646
+ :host([theme~='align-right']) {
3647
+ text-align: right;
3648
+ }
3649
+
3650
+ :host([theme~='align-center']) {
3651
+ text-align: center;
3652
+ }
3653
+ `],{moduleId:"lumo-select-overlay"});
3654
+ /**
3655
+ * @license
3656
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
3657
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3658
+ */
3659
+ const mn=t=>class extends(ao(no(t))){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(t){this._value=t}ready(){super.ready();const t=this.getAttribute("value");null!==t&&(this.value=t)}focus(){this.disabled||(super.focus(),this._setFocused(!0))}_shouldSetActive(t){return!(this.disabled||"keydown"===t.type&&t.defaultPrevented)}_selectedChanged(t){this.setAttribute("aria-selected",t)}_disabledChanged(t){super._disabledChanged(t),t&&(this.selected=!1,this.blur())}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&!t.defaultPrevented&&(t.preventDefault(),this.click())}}
3660
+ /**
3661
+ * @license
3662
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
3663
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3664
+ */;class fn extends(mn(Pt(as(is)))){static get is(){return"vaadin-select-item"}static get template(){return ts`
3665
+ <style>
3666
+ :host {
3667
+ display: inline-block;
3668
+ }
3669
+
3670
+ :host([hidden]) {
3671
+ display: none !important;
3672
+ }
3673
+ </style>
3674
+ <span part="checkmark" aria-hidden="true"></span>
3675
+ <div part="content">
3676
+ <slot></slot>
3677
+ </div>
3678
+ `}ready(){super.ready(),this.setAttribute("role","option")}}u(fn);
3679
+ /**
3680
+ * @license
3681
+ * Copyright (c) 2022 - 2024 Vaadin Ltd.
3682
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3683
+ */
3684
+ const bn=t=>class extends(oo(t)){get focused(){return(this._getItems()||[]).find(vs)}get _vertical(){return!0}focus(){const t=this._getItems();if(Array.isArray(t)){const e=this._getAvailableIndex(t,0,null,(t=>!bs(t)));e>=0&&this._focus(e)}}_getItems(){return Array.from(this.children)}_onKeyDown(t){if(super._onKeyDown(t),t.metaKey||t.ctrlKey)return;const{key:e}=t,i=this._getItems()||[],s=i.indexOf(this.focused);let r,o;const a=this._vertical||"rtl"!==this.getAttribute("dir")?1:-1;this.__isPrevKey(e)?(o=-a,r=s-a):this.__isNextKey(e)?(o=a,r=s+a):"Home"===e?(o=1,r=0):"End"===e&&(o=-1,r=i.length-1),r=this._getAvailableIndex(i,r,o,(t=>!bs(t))),r>=0&&(t.preventDefault(),this._focus(r,!0))}__isPrevKey(t){return this._vertical?"ArrowUp"===t:"ArrowLeft"===t}__isNextKey(t){return this._vertical?"ArrowDown"===t:"ArrowRight"===t}_focus(t,e=!1){const i=this._getItems();this._focusItem(i[t],e)}_focusItem(t){t&&(t.focus(),t.setAttribute("focus-ring",""))}_getAvailableIndex(t,e,i,s){const r=t.length;let o=e;for(let e=0;"number"==typeof o&&e<r;e+=1,o+=i||1){o<0?o=r-1:o>=r&&(o=0);const e=t[o];if(!e.hasAttribute("disabled")&&this.__isMatchingItem(e,s))return o}return-1}__isMatchingItem(t,e){return"function"!=typeof e||e(t)}}
3685
+ /**
3686
+ * @license
3687
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
3688
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3689
+ */,gn=t=>class extends(bn(t)){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(){this._observer&&this._observer.flush();const t=Array.isArray(this.items)?this.items:[],e=this._getAvailableIndex(t,0,null,(t=>0===t.tabIndex&&!bs(t)));e>=0?this._focus(e):super.focus()}ready(){super.ready(),this.addEventListener("click",(t=>this._onClick(t)));const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new wr(t,(()=>{this._setItems(this._filterItems(qs(this)))}))}_getItems(){return this.items}_enhanceItems(t,e,i,s){if(!s&&t){this.setAttribute("aria-orientation",e||"vertical"),t.forEach((t=>{e?t.setAttribute("orientation",e):t.removeAttribute("orientation")})),this._setFocusable(i<0||!i?0:i);const s=t[i];t.forEach((t=>{t.selected=t===s})),s&&!s.disabled&&this._scrollToItem(i)}}_filterItems(t){return t.filter((t=>t._hasVaadinItemMixin))}_onClick(t){if(t.metaKey||t.shiftKey||t.ctrlKey||t.defaultPrevented)return;const e=this._filterItems(t.composedPath())[0];let i;e&&!e.disabled&&(i=this.items.indexOf(e))>=0&&(this.selected=i)}_searchKey(t,e){return this._searchReset=br.debounce(this._searchReset,dr.after(500),(()=>{this._searchBuf=""})),this._searchBuf+=e.toLowerCase(),this.items.some((t=>this.__isMatchingKey(t)))||(this._searchBuf=e.toLowerCase()),this._getAvailableIndex(this.items,1===this._searchBuf.length?t+1:t,1,(t=>this.__isMatchingKey(t)&&"none"!==getComputedStyle(t).display))}__isMatchingKey(t){return t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(t){if(t.metaKey||t.ctrlKey)return;const e=t.key,i=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(e)&&1===e.length){const t=this._searchKey(i,e);t>=0&&this._focus(t)}else super._onKeyDown(t)}_isItemHidden(t){return"none"===getComputedStyle(t).display}_setFocusable(t){t=this._getAvailableIndex(this.items,t,1);const e=this.items[t];this.items.forEach((t=>{t.tabIndex=t===e?0:-1}))}_focus(t){this.items.forEach(((e,i)=>{e.focused=i===t})),this._setFocusable(t),this._scrollToItem(t),super._focus(t)}_scrollToItem(t){const e=this.items[t];if(!e)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],s=this._scrollerElement.getBoundingClientRect(),r=(this.items[t+1]||e).getBoundingClientRect(),o=(this.items[t-1]||e).getBoundingClientRect();let 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&&o[i[0]]<=s[i[0]]||this._isRTL&&o[i[0]]>=s[i[0]])&&(a=o[i[0]]-s[i[0]]),this._scroll(a)}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const e=this.getAttribute("dir")||"ltr",i=
3690
+ /**
3691
+ * @license
3692
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3693
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3694
+ */
3695
+ function(t,e){const{scrollLeft:i}=t;return"rtl"!==e?i:t.scrollWidth-t.clientWidth+i}(this._scrollerElement,e)+t;!function(t,e,i){t.scrollLeft="rtl"!==e?i:t.clientWidth-t.scrollWidth+i}(this._scrollerElement,e,i)}}}
3696
+ /**
3697
+ * @license
3698
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
3699
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3700
+ */;class vn extends(gn(Pt(as(Hs(is))))){static get is(){return"vaadin-select-list-box"}static get template(){return ts`
3701
+ <style>
3702
+ :host {
3703
+ display: flex;
3704
+ }
3705
+
3706
+ :host([hidden]) {
3707
+ display: none !important;
3708
+ }
3709
+
3710
+ [part='items'] {
3711
+ height: 100%;
3712
+ width: 100%;
3713
+ overflow-y: auto;
3714
+ -webkit-overflow-scrolling: touch;
3715
+ }
3716
+ </style>
3717
+ <div part="items">
3718
+ <slot></slot>
3719
+ </div>
3720
+ `}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox")}}u(vn);
3721
+ /**
3722
+ * @license
3723
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
3724
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3725
+ */
3726
+ const yn=t=>class extends(tr(Vs(as(t)))){static get observers(){return["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0}_getMenuElement(){return Array.from(this.children).find((t=>"style"!==t.localName))}_updateOverlayWidth(t,e){if(t&&e){const t="--vaadin-select-overlay-width",i=getComputedStyle(e).getPropertyValue(t);""===i?this.style.removeProperty(t):this.style.setProperty(t,i)}}}
3727
+ /**
3728
+ * @license
3729
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
3730
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3731
+ */;Tt("vaadin-select-overlay",[hs,y`
3732
+ :host {
3733
+ align-items: flex-start;
3734
+ justify-content: flex-start;
3735
+ }
3736
+
3737
+ :host(:not([phone])) [part='overlay'] {
3738
+ min-width: var(--vaadin-select-overlay-width, var(--vaadin-select-text-field-width));
3739
+ }
3740
+
3741
+ @media (forced-colors: active) {
3742
+ [part='overlay'] {
3743
+ outline: 3px solid;
3744
+ }
3745
+ }
3746
+ `],{moduleId:"vaadin-select-overlay-styles"});class wn extends(yn(Pt(is))){static get is(){return"vaadin-select-overlay"}static get template(){return ts`
3747
+ <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
3748
+ <div part="overlay" id="overlay" tabindex="0">
3749
+ <div part="content" id="content">
3750
+ <slot></slot>
3751
+ </div>
3752
+ </div>
3753
+ `}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t)}}}u(wn),
3754
+ /**
3755
+ * @license
3756
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
3757
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3758
+ */
3759
+ Tt("vaadin-select-value-button",y`
3760
+ :host {
3761
+ display: inline-block;
3762
+ position: relative;
3763
+ outline: none;
3764
+ white-space: nowrap;
3765
+ -webkit-user-select: none;
3766
+ -moz-user-select: none;
3767
+ user-select: none;
3768
+ min-width: 0;
3769
+ width: 0;
3770
+ }
3771
+
3772
+ ::slotted(*) {
3773
+ padding-left: 0;
3774
+ padding-right: 0;
3775
+ flex: auto;
3776
+ }
3777
+
3778
+ /* placeholder styles */
3779
+ ::slotted(*:not([selected])) {
3780
+ line-height: 1;
3781
+ }
3782
+
3783
+ .vaadin-button-container {
3784
+ display: inline-flex;
3785
+ align-items: center;
3786
+ justify-content: center;
3787
+ text-align: inherit;
3788
+ width: 100%;
3789
+ height: 100%;
3790
+ min-height: inherit;
3791
+ text-shadow: inherit;
3792
+ }
3793
+
3794
+ [part='label'] {
3795
+ white-space: nowrap;
3796
+ overflow: hidden;
3797
+ text-overflow: ellipsis;
3798
+ width: 100%;
3799
+ line-height: inherit;
3800
+ }
3801
+ `,{moduleId:"vaadin-select-value-button-styles"});class xn extends(ho(Pt(is))){static get is(){return"vaadin-select-value-button"}static get template(){return ts`
3802
+ <div class="vaadin-button-container">
3803
+ <span part="label">
3804
+ <slot></slot>
3805
+ </span>
3806
+ </div>
3807
+ `}}u(xn);
3808
+ /**
3809
+ * @license
3810
+ * Copyright (c) 2021 - 2024 Vaadin Ltd..
3811
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3812
+ */
3813
+ const kn=y`
3814
+ .sr-only {
3815
+ border: 0 !important;
3816
+ clip: rect(1px, 1px, 1px, 1px) !important;
3817
+ -webkit-clip-path: inset(50%) !important;
3818
+ clip-path: inset(50%) !important;
3819
+ height: 1px !important;
3820
+ margin: -1px !important;
3821
+ overflow: hidden !important;
3822
+ padding: 0 !important;
3823
+ position: absolute !important;
3824
+ width: 1px !important;
3825
+ white-space: nowrap !important;
3826
+ }
3827
+ `
3828
+ /**
3829
+ * @license
3830
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
3831
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3832
+ */;
3833
+ /**
3834
+ * @license
3835
+ * Copyright (c) 2023 - 2024 Vaadin Ltd.
3836
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3837
+ */
3838
+ class _n extends _r{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(t,e)=>{e._setFocusElement(t),e.ariaTarget=t,e.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}
3839
+ /**
3840
+ * @license
3841
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
3842
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3843
+ */const Cn=t=>class extends(Aa(Xo(ga(oo(ba(t)))))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${kr()}`,this._srLabelController=new pa(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new _n(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Yo(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new Cr(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_requiredChanged(t){super._requiredChanged(t),!1===t&&this._requestValidation()}__itemsChanged(t,e){(t||e)&&this.requestContentUpdate()}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",(()=>{this.__initMenuItems(t)})),t.addEventListener("selected-changed",(()=>this.__updateValueButton())),t.addEventListener("keydown",(t=>this._onKeyDownInside(t)),!0),t.addEventListener("click",(t=>{const e=t.composedPath().find((t=>t._hasVaadinItemMixin));this.__dispatchChangePending=Boolean(e&&void 0!==e.value&&e.value!==this.value),this.opened=!1}),!0),this.__lastMenuElement=t)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,e){this.toggleAttribute("has-value",Boolean(t)),void 0===e||this.__dispatchChangePending||this._requestValidation()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onToggleMouseDown(t){t.preventDefault()}_onKeyDown(t){if(t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){const e=this._menuElement.selected,i=this._menuElement._searchKey(void 0!==e?e:-1,t.key);i>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=i)}}_onKeyDownInside(t){/^(Tab)$/u.test(t.key)&&(this.opened=!1)}_openedChanged(t,e,i){if(e&&i){if(t){if(this.disabled||this.readonly)return void(this.opened=!1);this._updateAriaLive(!1),e.style.setProperty("--vaadin-select-text-field-width",`${i.offsetWidth}px`);const t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),this.__dispatchChangePending||this._keyboardActive||this._requestValidation());this.__oldOpened=t}}_updateAriaExpanded(t,e){e&&e.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&(t?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(t){let e;const i=t.getAttribute("label");e=i?this.__createItemElement({label:i}):t.cloneNode(!0),e._sourceItem=t,this.__appendValueItemElement(e,this.focusElement),e.selected=!0}__createItemElement(t){const e=document.createElement(t.component||"vaadin-select-item");return t.label&&(e.textContent=t.label),t.value&&(e.value=t.value),t.disabled&&(e.disabled=t.disabled),t.className&&(e.className=t.className),e}__appendValueItemElement(t,e){e.appendChild(t),t.performUpdate&&t.performUpdate(),t.removeAttribute("tabindex"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}_accessibleNameChanged(t){this._srLabelController.setLabel(t),this._setCustomAriaLabelledBy(t?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(t){this._setCustomAriaLabelledBy(t)}_setCustomAriaLabelledBy(t){const e=this._getLabelIdWithItemId(t);this._fieldAriaController.setLabelId(e,!0)}_getLabelIdWithItemId(t){return t?`${t} ${this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:""}`.trim():null}__updateValueButton(){const t=this.focusElement;if(!t)return;t.innerHTML="";const e=this._items[this._menuElement.selected];if(t.removeAttribute("placeholder"),this._hasContent(e))this.__attachSelectedItem(e);else if(this.placeholder){const e=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(e,t),t.setAttribute("placeholder","")}!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),aa(t,"aria-labelledby",e||this.placeholder?{newId:this._itemId}:{oldId:this._itemId}),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(t){return!!t&&(Boolean(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim())||t.childElementCount>0)}_updateSelectedItem(t,e){if(e){const i=null==t?t:t.toString();this._menuElement.selected=e.reduce(((t,e,s)=>void 0===t&&e.value===i?s:t),void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}}_shouldRemoveFocus(){return!this.opened}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this._requestValidation()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,e){if(!this.items||0===this.items.length)return void(t.textContent="");let i=t.firstElementChild;i||(i=document.createElement("vaadin-select-list-box"),t.appendChild(i)),i.textContent="",this.items.forEach((t=>{i.appendChild(this.__createItemElement(t))}))}async __dispatchChange(){this.updateComplete&&await this.updateComplete,this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}}
3844
+ /**
3845
+ * @license
3846
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
3847
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3848
+ */;Tt("vaadin-select",[ka,_a,kn],{moduleId:"vaadin-select-styles"});class An extends(Cn(yr(Pt(is)))){static get is(){return"vaadin-select"}static get template(){return ts`
3849
+ <style>
3850
+ :host {
3851
+ position: relative;
3852
+ }
3853
+
3854
+ ::slotted([slot='value']) {
3855
+ flex-grow: 1;
3856
+ }
3857
+ </style>
3858
+
3859
+ <div class="vaadin-select-container">
3860
+ <div part="label" on-click="_onClick">
3861
+ <slot name="label"></slot>
3862
+ <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
3863
+ </div>
3864
+
3865
+ <vaadin-input-container
3866
+ part="input-field"
3867
+ readonly="[[readonly]]"
3868
+ disabled="[[disabled]]"
3869
+ invalid="[[invalid]]"
3870
+ theme$="[[_theme]]"
3871
+ on-click="_onClick"
3872
+ >
3873
+ <slot name="prefix" slot="prefix"></slot>
3874
+ <slot name="value"></slot>
3875
+ <div part="toggle-button" slot="suffix" aria-hidden="true" on-mousedown="_onToggleMouseDown"></div>
3876
+ </vaadin-input-container>
3877
+
3878
+ <div part="helper-text">
3879
+ <slot name="helper"></slot>
3880
+ </div>
3881
+
3882
+ <div part="error-message">
3883
+ <slot name="error-message"></slot>
3884
+ </div>
3885
+ </div>
3886
+
3887
+ <vaadin-select-overlay
3888
+ position-target="[[_inputContainer]]"
3889
+ opened="{{opened}}"
3890
+ with-backdrop="[[_phone]]"
3891
+ phone$="[[_phone]]"
3892
+ theme$="[[_theme]]"
3893
+ no-vertical-overlap$="[[noVerticalOverlap]]"
3894
+ on-vaadin-overlay-open="_onOverlayOpen"
3895
+ ></vaadin-select-overlay>
3896
+
3897
+ <slot name="tooltip"></slot>
3898
+ <div class="sr-only">
3899
+ <slot name="sr-label"></slot>
3900
+ </div>
3901
+ `}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){var t;super.ready(),t=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}u(An);const Dn=class{constructor(i){t(this,i),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.drawMultiplierChange=e(this,"drawMultiplierChange",7),this.lineMultiplierChange=e(this,"lineMultiplierChange",7),this.betTypeChange=e(this,"betTypeChange",7),this.numberOfGrids=1,this.multipleDraws=!0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.isLoading=!0,this.hasErrors=!1,this.ticketDone=[],this.isCustomSelect=!1,this.amountInfo={},this.limitStylingAppends=!1,this.stakeMultiplier="1",this.lineMultiplier=0,this.isCustomSelectStake=!1,this.isCustomSelectDraw=!1,this.isCustomSelectLine=!1,this.drawMultiplier=1,this.secondarySelectionAllowed=!1,this.partialQuickpickAvailable=!1,this.boardsAllowed=[],this.tabIndex=0,this.groupType=[],this.playType=[],this.selectedPlayTypeId="",this.maximumAllowed=6,this.numberRange=[],this.secondaryNumberRange=[],this.secondaryMaximumAllowed=1,this.minimumAllowed=6,this.secondaryMinimumAllowed=1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}handleLineMultiplierChange(t){this.grids=Array.from({length:t},((t,e)=>e+1)),this.ticketDone=Array.from({length:t},(()=>!1)),this.grids.forEach(((t,e)=>{this.resetSelection.emit({ticketId:this.ticketId,index:e})}))}handleTabIndexChange(t){this.grids.forEach(((t,e)=>{this.toggleResetSelection(e)})),this.setDrawMultiplier(1),this.setStakeMultiplier("1"),this.amountInfo=this.gameData.rules.stakes[0],this.setWagerPerDraw(this.amountInfo),this.playType=this.groupType[t].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.boardsAllowed=this.playType[0].boardsAllowed,this.setLineMultiplier(this.boardsAllowed[0]),this.selectedPlayTypeId=this.playType[0].value,this.numberRange=this.playType[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=this.playType[0].secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange),this.betTypeChange.emit({ticketId:this.ticketId,betType:this.playType[0]})}checkForClickOutside(t){this.selectRef&&!this.selectRef.contains(t.composedPath()[0])&&(this.isCustomSelect=!1),this.selectStakeRef&&!this.selectStakeRef.contains(t.composedPath()[0])&&(this.isCustomSelectStake=!1),this.selectDrawRef&&!this.selectDrawRef.contains(t.composedPath()[0])&&(this.isCustomSelectDraw=!1),this.selectLineRef&&!this.selectLineRef.contains(t.composedPath()[0])&&(this.isCustomSelectLine=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{var e;this.isLoading=!1,this.gameData=t,this.amountInfo=this.gameData.rules.stakes[0],this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed;const i=this.gameData.rules.betTypes.reduce(((t,e)=>(e.group?(t.groups[e.group]||(t.groups[e.group]=[]),t.groups[e.group].push(e)):t.noGroup.push({groupName:e.name||e.id,betType:[Object.assign({},e)]}),t)),{groups:{},noGroup:[]}),s=Object.entries(i.groups).map((([t,e])=>({groupName:t,betType:e})));this.groupType=[...i.noGroup,...s],this.playType=this.groupType[0].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.partialQuickpickAvailable=this.gameData.rules.partialQuickpickAvailable,this.boardsAllowed=null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.filter((t=>"Prima"===t.id))[0].boardsAllowed,this.lineMultiplier=this.boardsAllowed[0];let r=this.gameData.rules.betTypes[0].secondarySelectionRules;this.numberRange=this.gameData.rules.betTypes[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=r.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange)})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])cn[e][i]=t[e][i]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{drawCount:this.drawMultiplier,multiplierNum:Number(this.stakeMultiplier),multiplier:this.gameData.rules.stakeMultiplierAvailable}),this.ticketDone=[...this.ticketDone.slice(0,t.detail.index),!0,...this.ticketDone.slice(t.detail.index+1)],this.ticketCompleted.emit(this.ticket)}handleGridClearAllEvent(t){let e=t.detail;this.ticketDone=[...this.ticketDone.slice(0,e),!1,...this.ticketDone.slice(e+1)]}toggleAutoSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!0,...this.ticketDone.slice(t+1)],this.autoSelection.emit({ticketId:this.ticketId,index:t})}toggleResetSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!1,...this.ticketDone.slice(t+1)],this.resetSelection.emit({ticketId:this.ticketId,index:t})}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}toggleSelection(){this.isCustomSelectStake=!this.isCustomSelectStake}toggleLineSelection(){this.isCustomSelectLine=!this.isCustomSelectLine}toggleDrawSelection(){this.isCustomSelectDraw=!this.isCustomSelectDraw}setWagerPerDraw(t){this.amountInfo={value:t.value,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.value)}setStakeMultiplier(t){this.stakeMultiplier=t,this.isCustomSelectStake=!1,this.multiplierChange.emit({ticketId:this.ticketId,multiplierNum:Number(t),multiplier:this.gameData.rules.stakeMultiplierAvailable})}setLineMultiplier(t){this.lineMultiplier=t,this.isCustomSelectLine=!1,this.lineMultiplierChange.emit({ticketId:this.ticketId,lineNum:t})}setDrawMultiplier(t){this.drawMultiplier=t,this.isCustomSelectDraw=!1,this.drawMultiplierChange.emit({ticketId:this.ticketId,drawCount:t})}handlePlayTypeChange(t){this.selectedPlayTypeId=t;let e=this.playType.filter((e=>e.id===t))[0];this.boardsAllowed=e.boardsAllowed,this.numberRange=e.selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=e.secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange);for(let t=0;t<this.lineMultiplier;t++)this.toggleResetSelection(t);this.betTypeChange.emit({ticketId:this.ticketId,betType:e})}render(){if(this.isLoading)return i("div",null,i("p",null,dn("loading",this.language)));if(this.hasErrors)return i("div",null,i("p",null,dn("error",this.language)));{const{rules:t}=this.gameData;return i("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},i("p",{class:"TicketTitle"},this.gameData.name),i("div",{class:"TicketTabs"},this.groupType.map(((t,e)=>i("div",{class:"TabButton"+(this.tabIndex==e?" Active":""),onClick:()=>this.tabIndex=e},t.groupName)))),this.playType.length>1&&i("div",null,i("label",{class:"Label"},dn("playType",this.language),": "),i("vaadin-select",{style:{width:"160px"},items:this.playType,value:this.selectedPlayTypeId,"on-value-changed":t=>this.handlePlayTypeChange(t.detail.value)})),this.boardsAllowed.length>1&&i("div",null,i("label",{class:"Label"},dn("lines",this.language),": "),i("div",{class:"WagerInput"},i("div",{ref:t=>this.selectLineRef=t,class:this.isCustomSelectLine?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleLineSelection()},i("span",null,this.lineMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},this.boardsAllowed.map((t=>i("li",{class:this.lineMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setLineMultiplier(t)},t)))))))),this.grids.map(((e,s)=>i("div",null,i("div",{class:"TicketGridHeader"},i("div",null,dn("lineName",this.language),s+1),this.resetButton&&this.ticketDone[s]&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection(s)},dn("resetButton",this.language))),this.autoPick&&!this.ticketDone[s]&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection(s)},dn("autoButton",this.language)))),i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},t.boards[0].selectionName),i("lottery-grid",{"grid-index":s,"maximum-allowed":this.maximumAllowed,"minimum-allowed":this.minimumAllowed,"number-range":JSON.stringify(this.numberRange),"high-number":t.boards[0].highNumber,"low-number":t.boards[0].lowNumber,"total-numbers":t.boards[0].highNumber-t.boards[0].lowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"mainSelection","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),this.secondarySelectionAllowed&&i("div",{class:"SecondarySelectionWrapper"},i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},t.boards[0].secondarySelectionName),i("lottery-grid",{"grid-index":s,"maximum-allowed":this.secondaryMaximumAllowed,"minimum-allowed":this.secondaryMinimumAllowed,"number-range":JSON.stringify(this.secondaryNumberRange),"high-number":t.boards[0].secondaryHighNumber,"low-number":t.boards[0].secondaryLowNumber,"total-numbers":t.boards[0].secondaryHighNumber-t.boards[0].secondaryLowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"secondarySelection","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))))),t.stakeMultiplierAvailable&&i("div",null,i("label",{class:"Label"},dn("multiplier",this.language),": "),i("div",{class:"WagerInput"},t.stakeMultipliers.length>1?i("div",{ref:t=>this.selectStakeRef=t,class:this.isCustomSelectStake?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleSelection()},i("span",null,this.stakeMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.stakeMultipliers.map((t=>i("li",{class:this.stakeMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setStakeMultiplier(t)},t)))))):i("div",null,i("input",{min:"1",value:t.stakeMultipliers[0]||1,type:"number",disabled:!0})))),t.drawMultiplierAvailable&&i("div",null,i("label",{class:"Label"},dn("numberOfDraws",this.language),": "),i("div",{class:"WagerInput"},t.durations.length>1?i("div",{ref:t=>this.selectDrawRef=t,class:this.isCustomSelectDraw?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleDrawSelection()},i("span",null,this.drawMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.durations.map((t=>i("li",{class:this.drawMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setDrawMultiplier(t)},t)))))):i("div",null,i("input",{min:"1",value:t.durations[0]||1,type:"number",disabled:!0})))),i("div",null,i("label",{class:"Label"},dn("wagerPerDraw",this.language),": "),i("div",{class:"WagerInput"},t.stakes.length>1?i("div",{ref:t=>this.selectRef=t,class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleClass()},i("span",null,this.amountInfo.value," ",this.amountInfo.currency),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.stakes.map((t=>i("li",{class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setWagerPerDraw(t)},t.value," ",t.currency)))))):i("div",null,i("input",{min:"1",value:t.stakes[0].value,type:"number",disabled:!0}),i("span",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{lineMultiplier:["handleLineMultiplierChange"],tabIndex:["handleTabIndexChange"]}}};Dn.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.TicketTabs{display:flex;overflow:auto}.TicketTabs .TabButton{color:var(--emw--color-typography, #009993);margin:0 40px 10px 0;cursor:pointer}.TicketTabs .Active{border-bottom:1px solid var(--emw--color-typography, #009993)}.ButtonContainer{display:flex;justify-content:flex-end}.SecondarySelectionWrapper{margin-top:20px}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:var(--emw--button-text-color, #000)}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:var(--emw--button-text-color, #000);padding:10px;margin-left:8px}.AutoButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}.TicketGridHeader{display:flex;justify-content:space-between;align-items:center;font-weight:bold;margin-top:10px}.TicketGridBullets{background:var(--emw--color-gray-50, #F1F1F1);border-radius:4px;padding:20px;margin-top:5px;margin-bottom:10px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid var(--emw--color-gray-transparency-80, #ccc);border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid var(--emw--color-gray-transparency-80, #ccc);overflow:hidden;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));z-index:20}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:var(--emw--color-gray-50, #F1F1F1);border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:var(--emw--color-gray-transparency-80, #ccc);border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:var(--emw--color-gray-150, #f2f2f2)}';const Sn=["ro","en","fr","ar","hr"],Tn={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},zn=(t,e)=>{const i=e;return Tn[void 0!==i&&Sn.includes(i)?i:"en"][t]},Bn=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.totalControllers=1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Tn[e][i]=t[e][i]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"581989035aa42a397cd39a4cdd929ea91190494c",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"724d50d1532510344ed7acd57c3c5faef17aef8c","header-title":`${zn("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":1!==this.totalControllers,collapsed:!this.last||this.collapsed,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"ba851ea2792641971a5552a94558fe8d28068187",slot:"accordionContent"},i("lottery-ticket",{key:"199abc15160d60499d7d1d1d14084f64a6314c53",endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"translation-url":this.translationUrl,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};Bn.style=':host{font-family:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}';export{n as helper_accordion,Ba as helper_filters,Ia as helper_modal,La as helper_tab,Ha as helper_tabs,Wa as lottery_bullet,Va as lottery_draw_results,Ka as lottery_draw_results_history,Xa as lottery_game_details,sn as lottery_game_page,rn as lottery_grid,ln as lottery_pagination,Dn as lottery_ticket,Bn as lottery_ticket_controller}