@everymatrix/lottery-ticket-controller 1.77.25 → 1.77.27

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.
@@ -1,4 +1,4 @@
1
- import{r as t,c as e,h as i}from"./index-4d2aef6e.js";const s=["ro","en","hr"],o={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}},r=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),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)},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.translationUrl=void 0,this.showContent=void 0,this.limitStylingAppends=!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])o[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 o[void 0!==t&&s.includes(t)?t:"en"].deleteTicket})())))))}};function a(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function n(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 l(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}r.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 h=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.value="0",this.selectable=!0,this.isSelected=!1,this.isBonus=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}render(){return i("div",{key:"2cfab600728d3aa72f9f87e4e07a968ea030e415",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":"")+(this.isBonus?" Bonus":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};h.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 c=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.selectedCounter=0,this.ticketId=void 0,this.totalNumbers=0,this.gameId=void 0,this.maximumAllowed=7,this.minimumAllowed=3,this.numberRange=void 0,this.selectable=!0,this.selectedNumbers="",this.secondaryNumbers="",this.displaySelected=!1,this.language="en",this.gridIndex=void 0,this.gridType="",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.highNumber=47,this.lowNumber=1,this.selectionType="mainSelection",this.partialQuickpickAvailable=!1,this.numbers=[],this.bonusNumbers=[]}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}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})}))}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}))),0===this.selectedCounter&&this.gridClearAllEvent.emit(this.gridIndex),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))}))}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:"f62b5b1e5a6cf7bcaa13ce2c8a281bc93fa439f7",class:"GridContainer",ref:t=>this.stylingContainer=t},i("div",{key:"e381adbfff57e2cc343188c46037eb45ab798cac",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":this.clientStylingUrl,"mb-source":this.mbSource})))),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":this.clientStylingUrl,"mb-source":this.mbSource})))):""))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};c.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 d=["ro","en","hr"],u={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"}},p=(t,e)=>{const i=e;return u[void 0!==i&&d.includes(i)?i:"en"][t]};var m=Object.defineProperty,v=Object.defineProperties,f=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,w=(t,e,i)=>e in t?m(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,_=(t,e)=>{for(var i in e||(e={}))g.call(e,i)&&w(t,i,e[i]);if(b)for(var i of b(e))y.call(e,i)&&w(t,i,e[i]);return t},x=(t,e)=>v(t,f(e)),k=(t,e,i)=>(w(t,"symbol"!=typeof e?e+"":e,i),i),C=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{n(i.next(t))}catch(t){o(t)}},a=t=>{try{n(i.throw(t))}catch(t){o(t)}},n=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,a);n((i=i.apply(t,e)).next())}))
1
+ import{r as t,c as e,h as i}from"./index-66213763.js";const s=["ro","en","hr"],o={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}};function r(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function a(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 n(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}const l=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,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.translationUrl=void 0,this.showContent=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}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])o[e][i]=t[e][i]})))}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{key:"58cd507e7d1dc8de1e3b049936a2d6acb355e83d",class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{key:"70c6453ca4c4d40738edb1ae7e91f8954eebd3eb",class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},i("p",{key:"cf543e01c0baa833bea27aa4effb19734e234ed1",class:"Title"},this.headerTitle),i("p",{key:"365a05cabda273796e9d9689e514566ecc2aadcc",class:"Subtitle"},this.headerSubtitle),i("p",{key:"f30680b6c9d2d65fdb607a7293d6ce4b56c6b20f",class:"Subtitle Description"},this.description),i("span",{key:"a47718e90743d53b31968f67b002a3e427e193bc",class:"Expand"},this.showContent?"<":">")),this.showContent&&i("div",{key:"bb34d51602f9397c427d79141a38aca7a64bf206"},i("div",{key:"64171a30185b88bbafaa4ea555aeb9e2e33c46d6",class:"Content"},i("slot",{key:"6def0d44f3881196255f3329184053fb3d5a3cfd",name:"accordionContent"}),this.footer&&this.showContent&&i("div",{key:"08bfb5b017055788ba55b149e3bee23964f11ccf"},this.deleteTab&&i("span",{key:"b7b03fc6329a37841a2cf2b6a34780349341a0d5",class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return o[void 0!==t&&s.includes(t)?t:"en"].deleteTicket})())))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};l.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-primary, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-primary, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-secondary, #00aba4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-typography-inverse, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-typography-inverse, 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-background, #fff);display:flex;gap:30px;border:1px solid var(--emw--color-primary, #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--color-typography, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-typography-inverse, 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-background, #fff);border:1px solid var(--emw--color-primary, #009993);padding:10px 15px;user-select:none;color:var(--emw--color-typography, #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-background, #fff)}.ActionButton:hover{background:var(--emw--color-secondary, #ff6536);border:1px solid var(--emw--color-error, #ff3d00)}';const h=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.value="0",this.selectable=!0,this.isSelected=!1,this.isBonus=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){return i("div",{key:"2cfab600728d3aa72f9f87e4e07a968ea030e415",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":"")+(this.isBonus?" Bonus":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};h.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--color-typography, #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-background, #fff);background:radial-gradient(circle at top, var(--emw--color-background, #fff) 0%, var(--emw--color-background, #fff) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 var(--emw--color-gray-300, #333);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-background, #fff) 0%, var(--emw--color-background-secondary, #f5f5f5) 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-background, #fff);background:-webkit-radial-gradient(top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));background:-moz-radial-gradient(top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));background:radial-gradient(circle at top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));border:solid 2px var(--emw--color-primary, #009993)}.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, #f5f5f5);background:var(--emw--color-gray-250, #ccc);border:solid 2px var(--emw--color-gray-100, #e6e6e6);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, #f5f5f5);background:-webkit-radial-gradient(top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));background:-moz-radial-gradient(top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));background:radial-gradient(circle at top, var(--emw--color-primary, #009993), var(--emw--color-primary-variant, #004d4a));border:solid 2px var(--emw--color-gray-100, #e6e6e6);cursor:default}.Circle.Bonus{background:var(--emw--color-tertiary, #ff6536)}';const c=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.selectedCounter=0,this.ticketId=void 0,this.totalNumbers=0,this.gameId=void 0,this.maximumAllowed=7,this.minimumAllowed=3,this.numberRange=void 0,this.selectable=!0,this.selectedNumbers="",this.secondaryNumbers="",this.displaySelected=!1,this.language="en",this.gridIndex=void 0,this.gridType="",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.highNumber=47,this.lowNumber=1,this.selectionType="mainSelection",this.partialQuickpickAvailable=!1,this.numbers=[],this.bonusNumbers=[]}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}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})}))}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}))),0===this.selectedCounter&&this.gridClearAllEvent.emit(this.gridIndex),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))}))}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:"f62b5b1e5a6cf7bcaa13ce2c8a281bc93fa439f7",class:"GridContainer",ref:t=>this.stylingContainer=t},i("div",{key:"e381adbfff57e2cc343188c46037eb45ab798cac",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":this.clientStylingUrl,"mb-source":this.mbSource})))),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":this.clientStylingUrl,"mb-source":this.mbSource})))):""))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};c.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 d=["ro","en","hr"],u={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"}},p=(t,e)=>{const i=e;return u[void 0!==i&&d.includes(i)?i:"en"][t]};var m=Object.defineProperty,v=Object.defineProperties,f=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,w=(t,e,i)=>e in t?m(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,_=(t,e)=>{for(var i in e||(e={}))g.call(e,i)&&w(t,i,e[i]);if(b)for(var i of b(e))y.call(e,i)&&w(t,i,e[i]);return t},x=(t,e)=>v(t,f(e)),k=(t,e,i)=>(w(t,"symbol"!=typeof e?e+"":e,i),i),C=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{n(i.next(t))}catch(t){o(t)}},a=t=>{try{n(i.throw(t))}catch(t){o(t)}},n=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,a);n((i=i.apply(t,e)).next())}))
2
2
  /**
3
3
  * @license
4
4
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -19,7 +19,7 @@ const z=globalThis,I=z.ShadowRoot&&(void 0===z.ShadyCSS||z.ShadyCSS.nativeShadow
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
21
21
  * SPDX-License-Identifier: BSD-3-Clause
22
- */,{is:N,defineProperty:B,getOwnPropertyDescriptor:F,getOwnPropertyNames:j,getOwnPropertySymbols:L,getPrototypeOf:$}=Object,R=globalThis,V=R.trustedTypes,W=V?V.emptyScript:"",U=R.reactiveElementPolyfillSupport,q={toAttribute(t,e){switch(e){case Boolean:t=t?W: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}},H=(t,e)=>!N(t,e),G={attribute:!0,type:String,converter:q,reflect:!1,useDefault:!1,hasChanged:H};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=R.litPropertyMetadata||(R.litPropertyMetadata=new WeakMap);class Y extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=G){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&B(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;const{get:o,set:r}=null!=(s=F(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const s=null==o?void 0:o.call(this);null==r||r.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:G}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=$(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...j(t),...L(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(M(t))}else void 0!==t&&e.push(M(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(){var t;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return P(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var i;const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:q).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){var i,s,o;const r=this.constructor,a=r._$Eh.get(t);if(void 0!==a&&this._$Em!==a){const t=r.getPropertyOptions(a),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:q;this._$Em=a;const l=n.fromAttribute(e,t.type);this[a]=null!=(o=null!=l?l:null==(s=this._$Ej)?void 0:s.get(a))?o:l,this._$Em=null}}requestUpdate(t,e,i){var s,o;if(void 0!==t){const r=this.constructor,a=this[t];if(null!=i||(i=r.getPropertyOptions(t)),!((null!=(s=i.hasChanged)?s:H)(a,e)||i.useDefault&&i.reflect&&a===(null==(o=this._$Ej)?void 0:o.get(t))&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){var a,n,l;i&&!(null!=(a=this._$Ej)?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,null!=(n=null!=r?r:e)?n:this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(null!=(l=this._$Eq)?l:this._$Eq=new Set).add(t))}_$EP(){return C(this,null,(function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&(yield t),!this.isUpdatePending}))}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(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){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(i)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(t){}firstUpdated(t){}}var K;Y.elementStyles=[],Y.shadowRootOptions={mode:"open"},Y.elementProperties=new Map,Y.finalized=new Map,null==U||U({ReactiveElement:Y}),(null!=(K=R.reactiveElementVersions)?K:R.reactiveElementVersions=[]).push("2.1.1");
22
+ */,{is:N,defineProperty:B,getOwnPropertyDescriptor:j,getOwnPropertyNames:F,getOwnPropertySymbols:L,getPrototypeOf:$}=Object,R=globalThis,V=R.trustedTypes,U=V?V.emptyScript:"",W=R.reactiveElementPolyfillSupport,q={toAttribute(t,e){switch(e){case Boolean:t=t?U: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}},H=(t,e)=>!N(t,e),G={attribute:!0,type:String,converter:q,reflect:!1,useDefault:!1,hasChanged:H};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=R.litPropertyMetadata||(R.litPropertyMetadata=new WeakMap);class Y extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=G){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&B(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;const{get:o,set:r}=null!=(s=j(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const s=null==o?void 0:o.call(this);null==r||r.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:G}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=$(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...F(t),...L(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(M(t))}else void 0!==t&&e.push(M(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(){var t;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return P(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var i;const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:q).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){var i,s,o;const r=this.constructor,a=r._$Eh.get(t);if(void 0!==a&&this._$Em!==a){const t=r.getPropertyOptions(a),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:q;this._$Em=a;const l=n.fromAttribute(e,t.type);this[a]=null!=(o=null!=l?l:null==(s=this._$Ej)?void 0:s.get(a))?o:l,this._$Em=null}}requestUpdate(t,e,i){var s,o;if(void 0!==t){const r=this.constructor,a=this[t];if(null!=i||(i=r.getPropertyOptions(t)),!((null!=(s=i.hasChanged)?s:H)(a,e)||i.useDefault&&i.reflect&&a===(null==(o=this._$Ej)?void 0:o.get(t))&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){var a,n,l;i&&!(null!=(a=this._$Ej)?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,null!=(n=null!=r?r:e)?n:this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(null!=(l=this._$Eq)?l:this._$Eq=new Set).add(t))}_$EP(){return C(this,null,(function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&(yield t),!this.isUpdatePending}))}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(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){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(i)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(t){}firstUpdated(t){}}var K;Y.elementStyles=[],Y.shadowRootOptions={mode:"open"},Y.elementProperties=new Map,Y.finalized=new Map,null==W||W({ReactiveElement:Y}),(null!=(K=R.reactiveElementVersions)?K:R.reactiveElementVersions=[]).push("2.1.1");
23
23
  /**
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
@@ -36,12 +36,12 @@ const J=globalThis,Z=J.trustedTypes,X=Z?Z.createPolicy("lit-html",{createHTML:t=
36
36
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
37
37
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
38
38
  */
39
- const Ft=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)}}
39
+ const jt=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)}}
40
40
  /**
41
41
  * @license
42
42
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
43
43
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
44
- */,jt=[],Lt=new Set,$t=new Set;function Rt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Vt(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function Wt(t){return t.map((t=>t.cssText)).join("\n")}const Ut="vaadin-themable-mixin-style";function qt(t){t.prototype instanceof Pt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Ut).textContent=Wt(t.getStylesForThis()),$t.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&qt(i)}))}function Ht(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof O||(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):jt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&$t.forEach((i=>{if(Vt(t,i)&&function(t){return Rt(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}`),qt(t),function(t){Lt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof Pt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),P(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Ut).textContent=e.prototype._template.content.getElementById(Ut).textContent}(i):i||Lt.delete(e)}))}(t)}}))}function Gt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():jt}function Yt(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Kt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=Gt().find((e=>e.moduleId===t));i?e.push(...Kt(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function Jt(t){const e=`${t}-default-theme`,i=Gt().filter((i=>i.moduleId!==e&&Vt(i.themeFor,t))).map((t=>x(_({},t),{styles:[...Kt(t),...t.styles],includePriority:Yt(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:Gt().filter((t=>t.moduleId===e))}const Zt=t=>class extends(Ft(t)){constructor(){super(),Lt.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&$t.add(this.is),this.elementStyles)return;const t=this.prototype._template;!t||Rt(this)||function(t,e){const i=document.createElement("style");i.id=Ut,i.textContent=Wt(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:[])||[],...Jt(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
44
+ */,Ft=[],Lt=new Set,$t=new Set;function Rt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Vt(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function Ut(t){return t.map((t=>t.cssText)).join("\n")}const Wt="vaadin-themable-mixin-style";function qt(t){t.prototype instanceof Pt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Wt).textContent=Ut(t.getStylesForThis()),$t.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&qt(i)}))}function Ht(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof O||(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):Ft.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&$t.forEach((i=>{if(Vt(t,i)&&function(t){return Rt(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}`),qt(t),function(t){Lt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof Pt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),P(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Wt).textContent=e.prototype._template.content.getElementById(Wt).textContent}(i):i||Lt.delete(e)}))}(t)}}))}function Gt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():Ft}function Yt(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Kt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=Gt().find((e=>e.moduleId===t));i?e.push(...Kt(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function Jt(t){const e=`${t}-default-theme`,i=Gt().filter((i=>i.moduleId!==e&&Vt(i.themeFor,t))).map((t=>x(_({},t),{styles:[...Kt(t),...t.styles],includePriority:Yt(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:Gt().filter((t=>t.moduleId===e))}const Zt=t=>class extends(jt(t)){constructor(){super(),Lt.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&$t.add(this.is),this.elementStyles)return;const t=this.prototype._template;!t||Rt(this)||function(t,e){const i=document.createElement("style");i.id=Wt,i.textContent=Ut(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:[])||[],...Jt(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
45
45
  /**
46
46
  * @license
47
47
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -910,7 +910,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
910
910
  Code distributed by Google as part of the polymer project is also
911
911
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
912
912
  */
913
- const Te="link[rel=import][type~=css]",De="include",Oe="shady-unscoped";function Ee(t){return Ie.import(t)}function Pe(t){const e=re((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function Me(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...Ne(e[t]));return i}function Ne(t){const e=Ee(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...Fe(e));const i=e.querySelector("template");i&&t.push(...Be(i,e.assetpath)),e._styles=t}return e._styles}function Be(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute(De);r&&i.push(...Me(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=re(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function Fe(t){const e=[],i=t.querySelectorAll(Te);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(Oe);if(i&&!t._unscopedStyle){const e=Pe(t);e.setAttribute(Oe,""),t._unscopedStyle=e}else t._style||(t._style=Pe(t));e.push(i?t._unscopedStyle:t._style)}}return e}
913
+ const Te="link[rel=import][type~=css]",De="include",Oe="shady-unscoped";function Ee(t){return Ie.import(t)}function Pe(t){const e=re((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function Me(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...Ne(e[t]));return i}function Ne(t){const e=Ee(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...je(e));const i=e.querySelector("template");i&&t.push(...Be(i,e.assetpath)),e._styles=t}return e._styles}function Be(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute(De);r&&i.push(...Me(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=re(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function je(t){const e=[],i=t.querySelectorAll(Te);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(Oe);if(i&&!t._unscopedStyle){const e=Pe(t);e.setAttribute(Oe,""),t._unscopedStyle=e}else t._style||(t._style=Pe(t));e.push(i?t._unscopedStyle:t._style)}}return e}
914
914
  /**
915
915
  @license
916
916
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -919,7 +919,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
919
919
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
920
920
  Code distributed by Google as part of the polymer project is also
921
921
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
922
- */const je=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t
922
+ */const Fe=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t
923
923
  /**
924
924
  @license
925
925
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -928,7 +928,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
928
928
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
929
929
  Code distributed by Google as part of the polymer project is also
930
930
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
931
- */;function Le(t){return t.indexOf(".")>=0}function $e(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Re(t,e){return 0===t.indexOf(e+".")}function Ve(t,e){return 0===e.indexOf(t+".")}function We(t,e,i){return e+i.slice(t.length)}function Ue(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 qe(t){return Array.isArray(t)?Ue(t).split("."):t.toString().split(".")}function He(t,e,i){let s=t,o=qe(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function Ge(t,e,i){let s=t,o=qe(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
931
+ */;function Le(t){return t.indexOf(".")>=0}function $e(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Re(t,e){return 0===t.indexOf(e+".")}function Ve(t,e){return 0===e.indexOf(t+".")}function Ue(t,e,i){return e+i.slice(t.length)}function We(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function qe(t){return Array.isArray(t)?We(t).split("."):t.toString().split(".")}function He(t,e,i){let s=t,o=qe(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function Ge(t,e,i){let s=t,o=qe(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
932
932
  /**
933
933
  @license
934
934
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -946,7 +946,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
946
946
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
947
947
  Code distributed by Google as part of the polymer project is also
948
948
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
949
- */let Qe=0,ti=0,ei=[],ii=0,si=!1,oi=document.createTextNode("");new window.MutationObserver((function(){si=!1;const t=ei.length;for(let e=0;e<t;e++){let t=ei[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}ei.splice(0,t),ti+=t})).observe(oi,{characterData:!0});const ri={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)}},ai={run:t=>(si||(si=!0,oi.textContent=ii++),ei.push(t),Qe++),cancel(t){const e=t-ti;if(e>=0){if(!ei[e])throw new Error("invalid async handle: "+t);ei[e]=null}}},ni=ai,li=ke((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],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,ni.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!!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,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_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=je(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}}})),hi={};
949
+ */let Qe=0,ti=0,ei=[],ii=0,si=!1,oi=document.createTextNode("");new window.MutationObserver((function(){si=!1;const t=ei.length;for(let e=0;e<t;e++){let t=ei[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}ei.splice(0,t),ti+=t})).observe(oi,{characterData:!0});const ri={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)}},ai={run:t=>(si||(si=!0,oi.textContent=ii++),ei.push(t),Qe++),cancel(t){const e=t-ti;if(e>=0){if(!ei[e])throw new Error("invalid async handle: "+t);ei[e]=null}}},ni=ai,li=ke((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],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,ni.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!!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,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_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=Fe(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}}})),hi={};
950
950
  /**
951
951
  @license
952
952
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -966,7 +966,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
966
966
  * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
967
967
  * Google as part of the polymer project is also subject to an additional IP
968
968
  * rights grant found at http://polymer.github.io/PATENTS.txt
969
- */let ki=0;const Ci=[],Si={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ai="__computeInfo",zi=/[A-Z]/;function Ii(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 Ti(t,e,i,s,o,r){if(e){let a=!1;const n=ki++;for(let l in i){let h=e[o?$e(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)(!e.info||e.info.lastRun!==n)&&(!o||Oi(l,e.trigger))&&(e.info&&(e.info.lastRun=n),e.fn(t,l,i,s,e.info,o,r),a=!0)}return a}return!1}function Di(t,e,i,s,o,r,a,n){let l=!1,h=e[a?$e(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||Oi(s,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,a,n),l=!0);return l}function Oi(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Re(i,t))||!(!e.wildcard||!Ve(i,t))}return!0}function Ei(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,a=o.property;r?r.call(t,t.__data[a],s[a]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function Pi(t,e,i){let s=$e(e);return s!==e&&(Mi(t,Xe(s)+"-changed",i[e],e),!0)}function Mi(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),je(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function Ni(t,e,i,s,o,r){let a=(r?$e(e):e)!=e?e:null,n=a?He(t,a):t.__data[e];a&&void 0===n&&(n=i[e]),Mi(t,o.eventName,n,a)}function Bi(t,e,i,s,o){let r=t.__data[e];ce&&(r=ce(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const Fi=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const a=s+o>>1,n=i.get(e[a].methodInfo)-i.get(t.methodInfo);if(n<0)s=a+1;else{if(!(n>0)){r=a;break}o=a-1}}r<0&&(r=o+1),e.splice(r,0,t)},ji=(t,e,i,s,o)=>{const r=e[o?$e(t):t];if(r)for(let e=0;e<r.length;e++){const a=r[e];a.info.lastRun!==ki&&(!o||Oi(t,a.trigger))&&(a.info.lastRun=ki,Fi(a.info,i,s))}};function Li(t,e,i,s,o){let r=Hi(t,e,i,0,o);if(r===Ci)return!1;let a=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[a]?t._setPendingProperty(a,r,!0):(t[a]=r,!1)}function $i(t,e,i,s,o,r,a){i.bindings=i.bindings||[];let n={kind:s,target:o,parts:r,literal:a,isCompound:1!==r.length};if(i.bindings.push(n),function(t){return!!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||Xe(o)+"-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,Ri(t,e,n,s,l)}}function Ri(t,e,i,s,o){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 r=s.dependencies,a={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Qi(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Vi,info:a,trigger:s})}}}function Vi(t,e,i,s,o,r,a){let n=a[o.index],l=o.binding,h=o.part;if(r&&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=We(h.source,l.target,e),n._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(n)}else{let a=o.evaluator._evaluateBinding(t,h,e,i,s,r);a!==Ci&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,o,i,s),ce&&(o=ce(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?(!e[Si.READ_ONLY]||!e[Si.READ_ONLY][s])&&e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,n,l,h,a)}}function Wi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=je(t)),t[r]=e.literal)}}function Ui(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,a=t.detail,n=a&&a.path;n?(s=We(i,s,n),r=a&&a.value):r=t.currentTarget[i],r=o?!r:r,(!e[Si.READ_ONLY]||!e[Si.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,r,!0,!!n)&&(!a||!a.queueProperty)&&e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function qi(t,e,i,s,o,r){let a={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:a,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:a}),a}function Hi(t,e,i,s,o){let r=t._methodHost||t,a=r[o.methodName];if(a){let s=t._marshalArgs(o.args,e,i);return s===Ci?Ci:a.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Gi=[],Yi="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Ki="(?:("+Yi+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Ji=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Yi+"\\s*(?:\\(\\s*(?:(?:"+Ki+"(?:,\\s*"+Ki+")*)?)\\)\\s*)?)(?:]]|}})","g");function Zi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Xi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Gi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Qi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function Qi(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=$e(e),i.structured=Le(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function ts(t,e,i){let s=He(t,i);return void 0===s&&(s=e[i]),s}function es(t,e,i,s){const o={indexSplices:s};fe&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),fe&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function is(t,e,i,s,o,r){es(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const ss=ke((t=>{const e=xi(ui(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Si}_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(os.length){let t=os[os.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[Si.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==Si.READ_ONLY);let s=Ii(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=Ii(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Si.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Si.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Si.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Si.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||$e(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=He(this,t);if(!(t=Ge(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 o;for(let r in s){let a=s[r];Ve(r,e)?(o=We(r,a,e),t._setPendingPropertyOrPath(o,i,!0,!0)):Ve(a,e)&&(o=We(a,r,e),t._setPendingPropertyOrPath(o,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=je(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&Le(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[Si.NOTIFY]&&this[Si.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[Si.READ_ONLY]||!this[Si.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,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[Si.COMPUTE];if(o)if(be){ki++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Si.COMPUTE];let s,{counts:o,ready:r,total:a}=function(t){const e=t[Ai],i={},s=t[Si.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--o[e]&&r.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)ji(t,o,a,r,s);let n;for(;n=a.shift();)Li(t,"",e,0,n)&&ji(n.methodInfo,o,a,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;Ti(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),Ti(this,this[Si.REFLECT],e,i,o),Ti(this,this[Si.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,a,n=t[Si.NOTIFY],l=ki++;for(let a in e)e[a]&&(n&&Di(t,n,l,a,i,s,o)||o&&Pi(t,a,i))&&(r=!0);r&&(a=t.__dataHost)&&a._invalidateProperties&&a._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Si.PROPAGATE]&&Ti(this,this[Si.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{Ti(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Ue(t),e=Ue(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Ue(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};es(this,He(this,t,i),i.path,e)}get(t,e){return He(e||this,t)}set(t,e,i){i?Ge(i,t,e):(!this[Si.READ_ONLY]||!this[Si.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=He(this,t,i),o=s.length,r=s.push(...e);return e.length&&is(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=He(this,t,e),s=!!i.length,o=i.pop();return s&&is(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},a=He(this,t,r);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?a.splice(e):a.splice(e,i,...s),(s.length||o.length)&&is(this,a,r.path,e,s.length,o),o}shift(t){let e={path:""},i=He(this,t,e),s=!!i.length,o=i.shift();return s&&is(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=He(this,t,i),o=s.unshift(...e);return e.length&&is(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=He(this,t,s),i=s.path}else i=Array.isArray(t)?Ue(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,Si.READ_ONLY),e&&(this["_set"+function(t){return t[0].toUpperCase()+t.substring(1)}(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,Si.OBSERVE,{fn:Ei,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,Si.OBSERVE,{fn:Ei,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Xi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");qi(this,i,Si.OBSERVE,Hi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Si.NOTIFY,{fn:Ni,info:{eventName:Xe(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,Si.REFLECT,{fn:Bi,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Xi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=qi(this,s,Si.COMPUTE,Li,t,i);Ii(this,Ai)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,a=t.length;r<a;r++){let{name:a,structured:n,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=Ve(a,e),o=ts(s,i,t?e:a);h={path:t?e:a,value:o,base:t?He(s,a):o}}else h=n?ts(s,i,a):s[a];if(fe&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Ci;o[r]=h}return o}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),os.push(this);let i=super._stampTemplate(t,e);if(os.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 o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Wi(o,i),Ui(o,t,i)}o.__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:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];je(je(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Zi(e)||" ",$i(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let a=this._parseBindings(r,i);if(a){let e=o,r="property";zi.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let n=Zi(a);return n&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(n+=" "+t.getAttribute(o)),t.setAttribute(o,n)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Ze(o)),$i(this,i,s,r,o,a,n),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,a=s.templateInfo,n="dom-if"===r.localName;ge&&(n||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=a,s.noted=!0,o=!1);let l=a.hostProps;if(ye&&n)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ge||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)$i(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=Ji.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],a=!!i[2],n=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=n.indexOf("::"))>0&&(h=n.substring(c+2),n=n.substring(0,c),l=!0);let d=Xi(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:r,negate:a,customEvent:l,signature:d,dependencies:u,event:h}),o=Ji.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let a;return a=e.signature?Hi(t,i,s,0,e.signature):i!=e.source?He(t,e.source):r&&Le(i)?He(t,i):t.__data[i],e.negate&&(a=!a),a}}})),os=[],rs=ke((t=>{const e=li(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?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=
969
+ */let ki=0;const Ci=[],Si={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ai="__computeInfo",zi=/[A-Z]/;function Ii(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 Ti(t,e,i,s,o,r){if(e){let a=!1;const n=ki++;for(let l in i){let h=e[o?$e(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)(!e.info||e.info.lastRun!==n)&&(!o||Oi(l,e.trigger))&&(e.info&&(e.info.lastRun=n),e.fn(t,l,i,s,e.info,o,r),a=!0)}return a}return!1}function Di(t,e,i,s,o,r,a,n){let l=!1,h=e[a?$e(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||Oi(s,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,a,n),l=!0);return l}function Oi(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Re(i,t))||!(!e.wildcard||!Ve(i,t))}return!0}function Ei(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,a=o.property;r?r.call(t,t.__data[a],s[a]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function Pi(t,e,i){let s=$e(e);return s!==e&&(Mi(t,Xe(s)+"-changed",i[e],e),!0)}function Mi(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),Fe(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function Ni(t,e,i,s,o,r){let a=(r?$e(e):e)!=e?e:null,n=a?He(t,a):t.__data[e];a&&void 0===n&&(n=i[e]),Mi(t,o.eventName,n,a)}function Bi(t,e,i,s,o){let r=t.__data[e];ce&&(r=ce(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const ji=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const a=s+o>>1,n=i.get(e[a].methodInfo)-i.get(t.methodInfo);if(n<0)s=a+1;else{if(!(n>0)){r=a;break}o=a-1}}r<0&&(r=o+1),e.splice(r,0,t)},Fi=(t,e,i,s,o)=>{const r=e[o?$e(t):t];if(r)for(let e=0;e<r.length;e++){const a=r[e];a.info.lastRun!==ki&&(!o||Oi(t,a.trigger))&&(a.info.lastRun=ki,ji(a.info,i,s))}};function Li(t,e,i,s,o){let r=Hi(t,e,i,0,o);if(r===Ci)return!1;let a=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[a]?t._setPendingProperty(a,r,!0):(t[a]=r,!1)}function $i(t,e,i,s,o,r,a){i.bindings=i.bindings||[];let n={kind:s,target:o,parts:r,literal:a,isCompound:1!==r.length};if(i.bindings.push(n),function(t){return!!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||Xe(o)+"-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,Ri(t,e,n,s,l)}}function Ri(t,e,i,s,o){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 r=s.dependencies,a={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Qi(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Vi,info:a,trigger:s})}}}function Vi(t,e,i,s,o,r,a){let n=a[o.index],l=o.binding,h=o.part;if(r&&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=Ue(h.source,l.target,e),n._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(n)}else{let a=o.evaluator._evaluateBinding(t,h,e,i,s,r);a!==Ci&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,o,i,s),ce&&(o=ce(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?(!e[Si.READ_ONLY]||!e[Si.READ_ONLY][s])&&e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,n,l,h,a)}}function Ui(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=Fe(t)),t[r]=e.literal)}}function Wi(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,a=t.detail,n=a&&a.path;n?(s=Ue(i,s,n),r=a&&a.value):r=t.currentTarget[i],r=o?!r:r,(!e[Si.READ_ONLY]||!e[Si.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,r,!0,!!n)&&(!a||!a.queueProperty)&&e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function qi(t,e,i,s,o,r){let a={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:a,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:a}),a}function Hi(t,e,i,s,o){let r=t._methodHost||t,a=r[o.methodName];if(a){let s=t._marshalArgs(o.args,e,i);return s===Ci?Ci:a.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Gi=[],Yi="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Ki="(?:("+Yi+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Ji=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Yi+"\\s*(?:\\(\\s*(?:(?:"+Ki+"(?:,\\s*"+Ki+")*)?)\\)\\s*)?)(?:]]|}})","g");function Zi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Xi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Gi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Qi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function Qi(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=$e(e),i.structured=Le(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function ts(t,e,i){let s=He(t,i);return void 0===s&&(s=e[i]),s}function es(t,e,i,s){const o={indexSplices:s};fe&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),fe&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function is(t,e,i,s,o,r){es(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const ss=ke((t=>{const e=xi(ui(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Si}_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(os.length){let t=os[os.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[Si.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==Si.READ_ONLY);let s=Ii(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=Ii(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Si.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Si.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Si.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Si.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||$e(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=He(this,t);if(!(t=Ge(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 o;for(let r in s){let a=s[r];Ve(r,e)?(o=Ue(r,a,e),t._setPendingPropertyOrPath(o,i,!0,!0)):Ve(a,e)&&(o=Ue(a,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){(i!==t[e]||"object"==typeof i)&&("className"===e&&(t=Fe(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&Le(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[Si.NOTIFY]&&this[Si.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[Si.READ_ONLY]||!this[Si.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,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[Si.COMPUTE];if(o)if(be){ki++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Si.COMPUTE];let s,{counts:o,ready:r,total:a}=function(t){const e=t[Ai],i={},s=t[Si.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--o[e]&&r.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)Fi(t,o,a,r,s);let n;for(;n=a.shift();)Li(t,"",e,0,n)&&Fi(n.methodInfo,o,a,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;Ti(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),Ti(this,this[Si.REFLECT],e,i,o),Ti(this,this[Si.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,a,n=t[Si.NOTIFY],l=ki++;for(let a in e)e[a]&&(n&&Di(t,n,l,a,i,s,o)||o&&Pi(t,a,i))&&(r=!0);r&&(a=t.__dataHost)&&a._invalidateProperties&&a._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Si.PROPAGATE]&&Ti(this,this[Si.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{Ti(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=We(t),e=We(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=We(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};es(this,He(this,t,i),i.path,e)}get(t,e){return He(e||this,t)}set(t,e,i){i?Ge(i,t,e):(!this[Si.READ_ONLY]||!this[Si.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=He(this,t,i),o=s.length,r=s.push(...e);return e.length&&is(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=He(this,t,e),s=!!i.length,o=i.pop();return s&&is(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},a=He(this,t,r);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?a.splice(e):a.splice(e,i,...s),(s.length||o.length)&&is(this,a,r.path,e,s.length,o),o}shift(t){let e={path:""},i=He(this,t,e),s=!!i.length,o=i.shift();return s&&is(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=He(this,t,i),o=s.unshift(...e);return e.length&&is(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=He(this,t,s),i=s.path}else i=Array.isArray(t)?We(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,Si.READ_ONLY),e&&(this["_set"+function(t){return t[0].toUpperCase()+t.substring(1)}(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,Si.OBSERVE,{fn:Ei,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,Si.OBSERVE,{fn:Ei,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Xi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");qi(this,i,Si.OBSERVE,Hi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Si.NOTIFY,{fn:Ni,info:{eventName:Xe(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,Si.REFLECT,{fn:Bi,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Xi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=qi(this,s,Si.COMPUTE,Li,t,i);Ii(this,Ai)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,a=t.length;r<a;r++){let{name:a,structured:n,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=Ve(a,e),o=ts(s,i,t?e:a);h={path:t?e:a,value:o,base:t?He(s,a):o}}else h=n?ts(s,i,a):s[a];if(fe&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Ci;o[r]=h}return o}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),os.push(this);let i=super._stampTemplate(t,e);if(os.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 o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Ui(o,i),Wi(o,t,i)}o.__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:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];Fe(Fe(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Zi(e)||" ",$i(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let a=this._parseBindings(r,i);if(a){let e=o,r="property";zi.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let n=Zi(a);return n&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(n+=" "+t.getAttribute(o)),t.setAttribute(o,n)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Ze(o)),$i(this,i,s,r,o,a,n),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,a=s.templateInfo,n="dom-if"===r.localName;ge&&(n||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=a,s.noted=!0,o=!1);let l=a.hostProps;if(ye&&n)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ge||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)$i(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=Ji.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],a=!!i[2],n=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=n.indexOf("::"))>0&&(h=n.substring(c+2),n=n.substring(0,c),l=!0);let d=Xi(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:r,negate:a,customEvent:l,signature:d,dependencies:u,event:h}),o=Ji.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let a;return a=e.signature?Hi(t,i,s,0,e.signature):i!=e.source?He(t,e.source):r&&Le(i)?He(t,i):t.__data[i],e.negate&&(a=!a),a}}})),os=[],rs=ke((t=>{const e=li(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?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=
970
970
  /**
971
971
  @license
972
972
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -985,7 +985,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
985
985
  Code distributed by Google as part of the polymer project is also
986
986
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
987
987
  */
988
- 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 o 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 o})),as=window.ShadyCSS&&window.ShadyCSS.cssBuild,ns=ke((t=>{const e=rs(ss(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):pe||(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&&(!de||ue)&&(e=Ie.import(t,"template"),de&&!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=ae(t.url);else{const t=Ie.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=he,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 re(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(!as){const o=e.content.querySelectorAll("style"),r=Be(e),a=function(t){let e=Ee(t);return e?Fe(e):[]}(i),n=e.content.firstElementChild;for(let i=0;i<a.length;i++){let o=a[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,n)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],a=o[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),_e&&as&&le){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?oe(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=je(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])),ve&&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=oe(this.importPath)),oe(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 me&&!(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)}}})),ls=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class hs{constructor(t,e){us(t,e);const i=e.reduce(((e,i,s)=>e+cs(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function cs(t){if(t instanceof hs)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const ds=function(t,...e){us(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 hs)return cs(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return ls&&(s=ls.createHTML(s)),i.innerHTML=s,i},us=(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")},ps=ns(HTMLElement),ms=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,vs=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;
988
+ 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 o 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 o})),as=window.ShadyCSS&&window.ShadyCSS.cssBuild,ns=ke((t=>{const e=rs(ss(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):pe||(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&&(!de||ue)&&(e=Ie.import(t,"template"),de&&!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=ae(t.url);else{const t=Ie.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=he,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 re(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(!as){const o=e.content.querySelectorAll("style"),r=Be(e),a=function(t){let e=Ee(t);return e?je(e):[]}(i),n=e.content.firstElementChild;for(let i=0;i<a.length;i++){let o=a[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,n)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],a=o[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),_e&&as&&le){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?oe(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=Fe(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])),ve&&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=oe(this.importPath)),oe(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 me&&!(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)}}})),ls=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class hs{constructor(t,e){us(t,e);const i=e.reduce(((e,i,s)=>e+cs(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function cs(t){if(t instanceof hs)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const ds=function(t,...e){us(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 hs)return cs(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return ls&&(s=ls.createHTML(s)),i.innerHTML=s,i},us=(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")},ps=ns(HTMLElement),ms=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,vs=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;
989
989
  /**
990
990
  @license
991
991
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1502,12 +1502,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1502
1502
  * @license
1503
1503
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1504
1504
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1505
- */;let Ns;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)fs(t,e)}(bs)};const Bs=new Set,Fs=t=>class extends(Ms(t)){static finalize(){super.finalize();const{is:t}=this;t&&!Bs.has(t)&&(window.Vaadin.registrations.push(this),Bs.add(t),window.Vaadin.developmentModeCallback&&(Ns=zs.debounce(Ns,Cs,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),Is(Ns)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
1505
+ */;let Ns;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)fs(t,e)}(bs)};const Bs=new Set,js=t=>class extends(Ms(t)){static finalize(){super.finalize();const{is:t}=this;t&&!Bs.has(t)&&(window.Vaadin.registrations.push(this),Bs.add(t),window.Vaadin.developmentModeCallback&&(Ns=zs.debounce(Ns,Cs,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),Is(Ns)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
1506
1506
  /**
1507
1507
  * @license
1508
1508
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1509
1509
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1510
- */;function js(t){const e=[];let i;return"slot"===t.localName?i=t.assignedElements():(e.push(t),i=[...t.children]),i.forEach((t=>e.push(...js(t)))),e}function Ls(t){return t?new Set(t.split(" ")):new Set}function $s(t){return t?[...t].join(" "):""}function Rs(t,e,i){const s=Ls(t.getAttribute(e));s.add(i),t.setAttribute(e,$s(s))}
1510
+ */;function Fs(t){const e=[];let i;return"slot"===t.localName?i=t.assignedElements():(e.push(t),i=[...t.children]),i.forEach((t=>e.push(...Fs(t)))),e}function Ls(t){return t?new Set(t.split(" ")):new Set}function $s(t){return t?[...t].join(" "):""}function Rs(t,e,i){const s=Ls(t.getAttribute(e));s.add(i),t.setAttribute(e,$s(s))}
1511
1511
  /**
1512
1512
  * @license
1513
1513
  * Copyright (c) 2023 - 2024 Vaadin Ltd.
@@ -1518,12 +1518,12 @@ class Vs{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this.
1518
1518
  * @license
1519
1519
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1520
1520
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1521
- */let Ws=0;function Us(){return Ws++}
1521
+ */let Us=0;function Ws(){return Us++}
1522
1522
  /**
1523
1523
  * @license
1524
1524
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1525
1525
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1526
- */class qs extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${Us()}`}constructor(t,e,i,s={}){super();const{initializer:o,multiple:r,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 r&&r,this.slotInitializer=o,r&&(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 Vs(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>{return!((e=t).nodeType===Node.TEXT_NODE&&""===e.textContent.trim()||i.includes(t));var e}));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)))}))}}
1526
+ */class qs extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${Ws()}`}constructor(t,e,i,s={}){super();const{initializer:o,multiple:r,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 r&&r,this.slotInitializer=o,r&&(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 Vs(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>{return!((e=t).nodeType===Node.TEXT_NODE&&""===e.textContent.trim()||i.includes(t));var e}));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)))}))}}
1527
1527
  /**
1528
1528
  * @license
1529
1529
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
@@ -1558,23 +1558,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1558
1558
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1559
1559
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1560
1560
  */
1561
- const Bo=ke((t=>class extends t{get _keyboardActive(){return Io()}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}})),Fo=t=>class extends(ko(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)}}
1561
+ const Bo=ke((t=>class extends t{get _keyboardActive(){return Io()}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}})),jo=t=>class extends(ko(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)}}
1562
1562
  /**
1563
1563
  * @license
1564
1564
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1565
1565
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1566
- */,jo=ke((t=>class extends(Bo(Fo(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)}})),Lo=ke((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)}})),$o=ke((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),(""!==t||void 0!==e)&&(this.__userInput||this._forwardInputValue(t))}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),Ro=ke((t=>class extends(Lo(ko($o(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){this._toggleChecked(t.target.checked)}_toggleChecked(t){this.checked=t}})),Vo=new Map;
1566
+ */,Fo=ke((t=>class extends(Bo(jo(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)}})),Lo=ke((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)}})),$o=ke((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),(""!==t||void 0!==e)&&(this.__userInput||this._forwardInputValue(t))}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),Ro=ke((t=>class extends(Lo(ko($o(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){this._toggleChecked(t.target.checked)}_toggleChecked(t){this.checked=t}})),Vo=new Map;
1567
1567
  /**
1568
1568
  * @license
1569
1569
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1570
1570
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1571
- */function Wo(t){return Vo.has(t)||Vo.set(t,new WeakMap),Vo.get(t)}function Uo(t,e){t&&t.removeAttribute(e)}function qo(t,e){if(!t||!e)return;const i=Wo(e);if(i.has(t))return;const s=Ls(t.getAttribute(e));i.set(t,new Set(s))}function Ho(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:o,fromUser:r}=i,a=Wo(e),n=a.get(t);if(!r&&n)return o&&n.delete(o),void(s&&n.add(s));r&&(n?s||a.delete(t):qo(t,e),Uo(t,e)),function(t,e,i){const s=Ls(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,$s(s)):t.removeAttribute(e)}(t,e,o);const l=s||$s(n);l&&Rs(t,e,l)}
1571
+ */function Uo(t){return Vo.has(t)||Vo.set(t,new WeakMap),Vo.get(t)}function Wo(t,e){t&&t.removeAttribute(e)}function qo(t,e){if(!t||!e)return;const i=Uo(e);if(i.has(t))return;const s=Ls(t.getAttribute(e));i.set(t,new Set(s))}function Ho(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:o,fromUser:r}=i,a=Uo(e),n=a.get(t);if(!r&&n)return o&&n.delete(o),void(s&&n.add(s));r&&(n?s||a.delete(t):qo(t,e),Wo(t,e)),function(t,e,i){const s=Ls(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,$s(s)):t.removeAttribute(e)}(t,e,o);const l=s||$s(n);l&&Rs(t,e,l)}
1572
1572
  /**
1573
1573
  * @license
1574
1574
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1575
1575
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1576
1576
  */
1577
- class Go{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){this.__target&&(t?(function(t,e){qo(t,e),Uo(t,e)}(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=Wo(e),s=i.get(t);s&&0!==s.size?Rs(t,e,$s(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){Ho(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){Ho(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){Ho(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")))}}
1577
+ class Go{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){this.__target&&(t?(function(t,e){qo(t,e),Wo(t,e)}(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=Uo(e),s=i.get(t);s&&0!==s.size?Rs(t,e,$s(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){Ho(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){Ho(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){Ho(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")))}}
1578
1578
  /**
1579
1579
  * @license
1580
1580
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -1629,7 +1629,7 @@ class Go{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
1629
1629
  * @license
1630
1630
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1631
1631
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1632
- */const nr=t=>class extends(or(Ro(jo(So(t))))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get observers(){return["__readonlyChanged(readonly, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name","invalid","required"]}constructor(){super(),this._setType("checkbox"),this._boundOnInputClick=this._onInputClick.bind(this),this.value="on"}ready(){super.ready(),this.addController(new rr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new ar(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)")}_shouldSetActive(t){return!this.readonly&&"a"!==t.target.localName&&t.target!==this._helperNode&&t.target!==this._errorNode&&super._shouldSetActive(t)}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("click",this._boundOnInputClick)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("click",this._boundOnInputClick)}_onInputClick(t){this.readonly&&t.preventDefault()}__readonlyChanged(t,e){e&&(t?e.setAttribute("aria-readonly","true"):e.removeAttribute("aria-readonly"))}_toggleChecked(t){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(t)}checkValidity(){return!this.required||!!this.checked}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_checkedChanged(t){(t||this.__oldChecked)&&this.validate(),this.__oldChecked=t}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}_onRequiredIndicatorClick(){this._labelNode.click()}}
1632
+ */const nr=t=>class extends(or(Ro(Fo(So(t))))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get observers(){return["__readonlyChanged(readonly, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name","invalid","required"]}constructor(){super(),this._setType("checkbox"),this._boundOnInputClick=this._onInputClick.bind(this),this.value="on"}ready(){super.ready(),this.addController(new rr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new ar(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)")}_shouldSetActive(t){return!this.readonly&&"a"!==t.target.localName&&t.target!==this._helperNode&&t.target!==this._errorNode&&super._shouldSetActive(t)}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("click",this._boundOnInputClick)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("click",this._boundOnInputClick)}_onInputClick(t){this.readonly&&t.preventDefault()}__readonlyChanged(t,e){e&&(t?e.setAttribute("aria-readonly","true"):e.removeAttribute("aria-readonly"))}_toggleChecked(t){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(t)}checkValidity(){return!this.required||!!this.checked}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_checkedChanged(t){(t||this.__oldChecked)&&this.validate(),this.__oldChecked=t}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}_onRequiredIndicatorClick(){this._labelNode.click()}}
1633
1633
  /**
1634
1634
  * @license
1635
1635
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -1728,7 +1728,7 @@ Ht("vaadin-checkbox",E`
1728
1728
  outline-width: 2px;
1729
1729
  }
1730
1730
  }
1731
- `,{moduleId:"vaadin-checkbox-styles"});class lr extends(nr(Fs(Zt(ps)))){static get is(){return"vaadin-checkbox"}static get template(){return ds`
1731
+ `,{moduleId:"vaadin-checkbox-styles"});class lr extends(nr(js(Zt(ps)))){static get is(){return"vaadin-checkbox"}static get template(){return ds`
1732
1732
  <div class="vaadin-checkbox-container">
1733
1733
  <div part="checkbox" aria-hidden="true"></div>
1734
1734
  <slot name="input"></slot>
@@ -2012,7 +2012,7 @@ Ht("vaadin-checkbox-group",E`
2012
2012
  :host(:not([has-label])) [part='label'] {
2013
2013
  display: none;
2014
2014
  }
2015
- `,{moduleId:"vaadin-checkbox-group-styles"});class ur extends(dr(Fs(Zt(ps)))){static get is(){return"vaadin-checkbox-group"}static get template(){return ds`
2015
+ `,{moduleId:"vaadin-checkbox-group-styles"});class ur extends(dr(js(Zt(ps)))){static get is(){return"vaadin-checkbox-group"}static get template(){return ds`
2016
2016
  <div class="vaadin-group-field-container">
2017
2017
  <div part="label">
2018
2018
  <slot name="label"></slot>
@@ -3384,7 +3384,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3384
3384
  * @license
3385
3385
  * Copyright (c) 2017 Anton Korzunov
3386
3386
  * SPDX-License-Identifier: MIT
3387
- */let Pr=new WeakMap,Mr=new WeakMap,Nr={},Br=0;const Fr=t=>t&&t.nodeType===Node.ELEMENT_NODE,jr=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},Lr=(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 o=((t,e)=>Fr(t)?e.map((e=>{if(!Fr(e))return jr(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 jr(e,"is not contained inside",t),null})).filter((t=>!!t)):(jr(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);Nr[i]||(Nr[i]=new WeakMap);const r=Nr[i],a=[],n=new Set,l=new Set(o),h=t=>{if(!t||n.has(t))return;n.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};o.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),o=null!==e&&"false"!==e,n=(Pr.get(t)||0)+1,l=(r.get(t)||0)+1;Pr.set(t,n),r.set(t,l),a.push(t),1===n&&o&&Mr.set(t,!0),1===l&&t.setAttribute(i,"true"),o||t.setAttribute(s,"true")}}))};return c(e),n.clear(),Br+=1,()=>{a.forEach((t=>{const e=Pr.get(t)-1,o=r.get(t)-1;Pr.set(t,e),r.set(t,o),e||(Mr.has(t)?Mr.delete(t):t.removeAttribute(s)),o||t.removeAttribute(i)})),Br-=1,Br||(Pr=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,Nr={})}})(s,e,i,"aria-hidden")
3387
+ */let Pr=new WeakMap,Mr=new WeakMap,Nr={},Br=0;const jr=t=>t&&t.nodeType===Node.ELEMENT_NODE,Fr=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},Lr=(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 o=((t,e)=>jr(t)?e.map((e=>{if(!jr(e))return Fr(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 Fr(e,"is not contained inside",t),null})).filter((t=>!!t)):(Fr(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);Nr[i]||(Nr[i]=new WeakMap);const r=Nr[i],a=[],n=new Set,l=new Set(o),h=t=>{if(!t||n.has(t))return;n.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};o.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),o=null!==e&&"false"!==e,n=(Pr.get(t)||0)+1,l=(r.get(t)||0)+1;Pr.set(t,n),r.set(t,l),a.push(t),1===n&&o&&Mr.set(t,!0),1===l&&t.setAttribute(i,"true"),o||t.setAttribute(s,"true")}}))};return c(e),n.clear(),Br+=1,()=>{a.forEach((t=>{const e=Pr.get(t)-1,o=r.get(t)-1;Pr.set(t,e),r.set(t,o),e||(Mr.has(t)?Mr.delete(t):t.removeAttribute(s)),o||t.removeAttribute(i)})),Br-=1,Br||(Pr=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,Nr={})}})(s,e,i,"aria-hidden")
3388
3388
  /**
3389
3389
  * @license
3390
3390
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -3399,12 +3399,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3399
3399
  * @license
3400
3400
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3401
3401
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3402
- */const Vr=[];class Wr{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return No(t,e)?Oo(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Mo).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.");Vr.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Vr.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Vr).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()}}
3402
+ */const Vr=[];class Ur{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return No(t,e)?Oo(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Mo).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.");Vr.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Vr.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Vr).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()}}
3403
3403
  /**
3404
3404
  * @license
3405
3405
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3406
3406
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3407
- */const Ur=t=>class extends(Yo(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new $r(this),this.__focusTrapController=new Wr(this),this.__focusRestorationController=new Rr}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=!Io();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=zo();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}}
3407
+ */const Wr=t=>class extends(Yo(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new $r(this),this.__focusTrapController=new Ur(this),this.__focusRestorationController=new Rr}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=!Io();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=zo();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}}
3408
3408
  /**
3409
3409
  * @license
3410
3410
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -3414,7 +3414,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3414
3414
  * @license
3415
3415
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3416
3416
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3417
- */,Yr=t=>class extends(Ur(Gr(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),Dr&&(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>t,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e&&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 o=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,a=void 0!==this._oldRenderer;this._oldRenderer=t;const n=this._oldOpened!==s;this._oldOpened=s,r&&a&&(this.innerHTML="",delete this._$litPart$),s&&t&&(r||n||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),Ar(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)}}}
3417
+ */,Yr=t=>class extends(Wr(Gr(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),Dr&&(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>t,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e&&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 o=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,a=void 0!==this._oldRenderer;this._oldRenderer=t;const n=this._oldOpened!==s;this._oldOpened=s,r&&a&&(this.innerHTML="",delete this._$litPart$),s&&t&&(r||n||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),Ar(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)}}}
3418
3418
  /**
3419
3419
  * @license
3420
3420
  * Copyright (c) 2024 Vaadin Ltd.
@@ -3528,7 +3528,7 @@ const ea=E`
3528
3528
  outline-color: GrayText;
3529
3529
  }
3530
3530
  }
3531
- `,ia=t=>class extends(So(Fo(Bo(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())}}
3531
+ `,ia=t=>class extends(So(jo(Bo(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())}}
3532
3532
  /**
3533
3533
  * @license
3534
3534
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -3538,7 +3538,7 @@ const ea=E`
3538
3538
  * @license
3539
3539
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3540
3540
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3541
- */Ht("vaadin-button",ea,{moduleId:"vaadin-button-styles"});class sa extends(ia(Fs(Zt(Yo(ps))))){static get is(){return"vaadin-button"}static get template(){return ds`
3541
+ */Ht("vaadin-button",ea,{moduleId:"vaadin-button-styles"});class sa extends(ia(js(Zt(Yo(ps))))){static get is(){return"vaadin-button"}static get template(){return ds`
3542
3542
  <div class="vaadin-button-container">
3543
3543
  <span part="prefix" aria-hidden="true">
3544
3544
  <slot name="prefix"></slot>
@@ -3570,7 +3570,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3570
3570
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3571
3571
  Code distributed by Google as part of the polymer project is also
3572
3572
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3573
- */},ma=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=pa()}while(t||e)},va=document.createElement("template");va.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 fa extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(va.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px")}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),ma()}_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=zs.debounce(this._debouncerScrollFinish,xs.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=zs.debounce(this._debouncerUpdateClones,xs.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-${Us()}`,o=document.createElement("slot");o.setAttribute("name",s),o._itemWrapper=i,e.appendChild(o),i.setAttribute("slot",s),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),requestAnimationFrame((()=>{this._finishInit()}))}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach((i=>{t.instance[i]=e[i]}))}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const o=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const r=i._itemWrapper;(!t||this._isVisible(r,e))&&this._updateElement(r.instance,o+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
3573
+ */},ma=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=pa()}while(t||e)},va=document.createElement("template");va.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 fa extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(va.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px")}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),ma()}_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=zs.debounce(this._debouncerScrollFinish,xs.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=zs.debounce(this._debouncerUpdateClones,xs.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-${Ws()}`,o=document.createElement("slot");o.setAttribute("name",s),o._itemWrapper=i,e.appendChild(o),i.setAttribute("slot",s),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),requestAnimationFrame((()=>{this._finishInit()}))}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach((i=>{t.instance[i]=e[i]}))}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const o=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const r=i._itemWrapper;(!t||this._isVisible(r,e))&&this._updateElement(r.instance,o+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
3574
3574
  /**
3575
3575
  * @license
3576
3576
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3621,7 +3621,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3621
3621
  Code distributed by Google as part of the polymer project is also
3622
3622
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3623
3623
  */
3624
- let Ca=null;function Sa(){return Ca}Sa.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Sa,writable:!0}});const Aa=ss(Sa),za=xa(Aa),Ia=ss(class{});class Ta extends Ia{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(!!t!=!!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"),je(je(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&je(je(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 Da=xa(Ta);function Oa(t){let e=t.__dataHost;return e&&e._methodHost||e}function Ea(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring(6),s[i])}}function Pa(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function Ma(t,e,i){if(de&&!Oa(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:Ta)._parseTemplate(t),o=s.templatizeInstanceClass;o||(o=function(t,e,i){let s=i.mutableData?Da:Ta;Ma.mixin&&(s=Ma.mixin(s));let o=class extends s{};return o.prototype.__templatizeOptions=i,o.prototype._bindTemplate(t),function(t,e,i,s){let o=i.hostProps||{};for(let e in s.instanceProps){delete o[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Pa(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in o)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)}})}(o,t,e,i),o}(t,s,i),s.templatizeInstanceClass=o);const r=Oa(t);!function(t,e,i,s){let o=i.forwardHostProp;if(o&&e.hasHostProps){const r="template"==t.localName;let a=e.templatizeTemplateClass;if(!a){if(r){let t=i.mutableData?za:Aa;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:Ea(0,o)}),a.prototype._createNotifyingProperty("_host_"+t);me&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:o}=t,{instanceProps:r}=e;for(let t in o)if(!(s[t]||r&&r[t])){const e=o[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),r)(function(t,e){Ca=t,Object.setPrototypeOf(t,e.prototype),new e,Ca=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,r);let a=class extends o{};return a.prototype._methodHost=r,a.prototype.__dataHost=t,a.prototype.__templatizeOwner=e,a.prototype.__hostProps=s.hostProps,a}
3624
+ let Ca=null;function Sa(){return Ca}Sa.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Sa,writable:!0}});const Aa=ss(Sa),za=xa(Aa),Ia=ss(class{});class Ta extends Ia{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(!!t!=!!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"),Fe(Fe(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&Fe(Fe(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 Da=xa(Ta);function Oa(t){let e=t.__dataHost;return e&&e._methodHost||e}function Ea(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring(6),s[i])}}function Pa(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function Ma(t,e,i){if(de&&!Oa(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:Ta)._parseTemplate(t),o=s.templatizeInstanceClass;o||(o=function(t,e,i){let s=i.mutableData?Da:Ta;Ma.mixin&&(s=Ma.mixin(s));let o=class extends s{};return o.prototype.__templatizeOptions=i,o.prototype._bindTemplate(t),function(t,e,i,s){let o=i.hostProps||{};for(let e in s.instanceProps){delete o[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Pa(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in o)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)}})}(o,t,e,i),o}(t,s,i),s.templatizeInstanceClass=o);const r=Oa(t);!function(t,e,i,s){let o=i.forwardHostProp;if(o&&e.hasHostProps){const r="template"==t.localName;let a=e.templatizeTemplateClass;if(!a){if(r){let t=i.mutableData?za:Aa;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:Ea(0,o)}),a.prototype._createNotifyingProperty("_host_"+t);me&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:o}=t,{instanceProps:r}=e;for(let t in o)if(!(s[t]||r&&r[t])){const e=o[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),r)(function(t,e){Ca=t,Object.setPrototypeOf(t,e.prototype),new e,Ca=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,r);let a=class extends o{};return a.prototype._methodHost=r,a.prototype.__dataHost=t,a.prototype.__templatizeOwner=e,a.prototype.__hostProps=s.hostProps,a}
3625
3625
  /**
3626
3626
  @license
3627
3627
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3641,13 +3641,13 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3641
3641
  Code distributed by Google as part of the polymer project is also
3642
3642
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3643
3643
  */
3644
- const Ba=ka(ps);class Fa extends Ba{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:!we,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(pe&&!ne){if(!Na){Na=!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=je(je(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=Ma(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if(function(t,e){return t===e||Re(t,e)||Ve(t,e)}(this.as,e)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=We(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}}})}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=da.debounce(this.__renderDebouncer,e>0?ri.after(e):ai,t.bind(this)),ua.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),ma()}__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),(!we||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 o;for(o=0;o<e;o++){let e=this.__instances[o],r=i[o],a=t[r];s[r]=o,e?(e._setPendingProperty(this.as,a),e._setPendingProperty(this.indexAs,o),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(a,o,r)}for(let t=this.__instances.length-1;t>=o;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=je(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 o=this.__instances[e+1],r=o?o.children[0]:this;return je(je(this).parentNode).insertBefore(s.root,r),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("."),o=s<0?i:i.substring(0,s);if(o==parseInt(o,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[o]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._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=je(e).parentNode;return null}(this.template,t)}}customElements.define(Fa.is,Fa);
3644
+ const Ba=ka(ps);class ja extends Ba{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:!we,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(pe&&!ne){if(!Na){Na=!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=Fe(Fe(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=Ma(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if(function(t,e){return t===e||Re(t,e)||Ve(t,e)}(this.as,e)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=Ue(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}}})}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=da.debounce(this.__renderDebouncer,e>0?ri.after(e):ai,t.bind(this)),ua.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),ma()}__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),(!we||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 o;for(o=0;o<e;o++){let e=this.__instances[o],r=i[o],a=t[r];s[r]=o,e?(e._setPendingProperty(this.as,a),e._setPendingProperty(this.indexAs,o),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(a,o,r)}for(let t=this.__instances.length-1;t>=o;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=Fe(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 o=this.__instances[e+1],r=o?o.children[0]:this;return Fe(Fe(this).parentNode).insertBefore(s.root,r),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("."),o=s<0?i:i.substring(0,s);if(o==parseInt(o,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[o]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._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=Fe(e).parentNode;return null}(this.template,t)}}customElements.define(ja.is,ja);
3645
3645
  /**
3646
3646
  * @license
3647
3647
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3648
3648
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3649
3649
  */
3650
- const ja=t=>class extends(Bo(t)){static get properties(){return{month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},isDateDisabled:{type:Function,value:()=>!1},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find((t=>ra(t.date,this.focusedDate)))}ready(){super.ready(),mo(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);const o=new Date(0,0);return o.setFullYear(t.getFullYear()),o.setMonth(t.getMonth()+1),o.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||na(s,e,i)||na(o,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:o}=t,r=this._applyFirstDayOfWeek(s,o);return this._applyFirstDayOfWeek(i,o).map(((t,e)=>({weekDay:t,weekDayShort:r[e]}))).slice(0,7)}__focusedDateChanged(t,e){Array.isArray(e)&&e.some((e=>ra(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 ra(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=[],o=i.getMonth(),r=t.getMonth();for(;i.getMonth()===r||i.getMonth()===o;)s.push(i.getMonth()===r?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){
3650
+ const Fa=t=>class extends(Bo(t)){static get properties(){return{month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},isDateDisabled:{type:Function,value:()=>!1},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find((t=>ra(t.date,this.focusedDate)))}ready(){super.ready(),mo(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);const o=new Date(0,0);return o.setFullYear(t.getFullYear()),o.setMonth(t.getMonth()+1),o.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||na(s,e,i)||na(o,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:o}=t,r=this._applyFirstDayOfWeek(s,o);return this._applyFirstDayOfWeek(i,o).map(((t,e)=>({weekDay:t,weekDayShort:r[e]}))).slice(0,7)}__focusedDateChanged(t,e){Array.isArray(e)&&e.some((e=>ra(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 ra(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=[],o=i.getMonth(),r=t.getMonth();for(;i.getMonth()===r||i.getMonth()===o;)s.push(i.getMonth()===r?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){
3651
3651
  /**
3652
3652
  * @license
3653
3653
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3719,7 +3719,7 @@ Ht("vaadin-month-calendar",E`
3719
3719
  outline: 3px solid;
3720
3720
  }
3721
3721
  }
3722
- `,{moduleId:"vaadin-month-calendar-styles"});class La extends(ja(Zt(ps))){static get template(){return ds`
3722
+ `,{moduleId:"vaadin-month-calendar-styles"});class La extends(Fa(Zt(ps))){static get template(){return ds`
3723
3723
  <div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
3724
3724
  <table
3725
3725
  id="monthGrid"
@@ -3869,12 +3869,12 @@ Ht("vaadin-date-picker-overlay-content",E`
3869
3869
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3870
3870
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3871
3871
  */
3872
- const Wa=new WeakMap,Ua=ke((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Wa.has(t)||Wa.set(t,new Set),Wa.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))}))}})),qa=t=>class extends($o(Co(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(),Er||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}))}}
3872
+ const Ua=new WeakMap,Wa=ke((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Ua.has(t)||Ua.set(t,new Set),Ua.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))}))}})),qa=t=>class extends($o(Co(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(),Er||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}))}}
3873
3873
  /**
3874
3874
  * @license
3875
3875
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3876
3876
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3877
- */,Ha=ke((t=>class extends(Lo(sr($o(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.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return!!t||0===t}})),Ga=t=>class extends(Ua(jo(Ha(or(qa(Co(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=zs.debounce(this._preventInputDebouncer,xs.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)}}}
3877
+ */,Ha=ke((t=>class extends(Lo(sr($o(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.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return!!t||0===t}})),Ga=t=>class extends(Wa(Fo(Ha(or(qa(Co(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=zs.debounce(this._preventInputDebouncer,xs.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)}}}
3878
3878
  /**
3879
3879
  * @license
3880
3880
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
@@ -3959,7 +3959,7 @@ const Wa=new WeakMap,Ua=ke((t=>class extends t{get slotStyles(){return{}}connect
3959
3959
  * @license
3960
3960
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3961
3961
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3962
- */const Qa=t=>class extends(Za(Yo(jo(Ha(Co(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=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 o=e+100*Math.floor(t.getFullYear()/100);return t<new Date(o-50,i,s)?o-=100:t>new Date(o+50,i,s)&&(o+=100),o}(this.referenceDate?ca(this.referenceDate):new Date,r,o,s))):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:Dr},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!Io()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new $a(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Xa(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=ca(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(aa(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||na(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),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.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!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",o=t.year;return o<0?(o=-o,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(o,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=ca(t);!t||i?(t?ra(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,o,r,a,n,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=o,t.focusedDate=r,t.selectedDate=a,t.showWeekNumbers=n,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=Lr(this._noInput?t:[s,t])}_getInitialPosition(){const t=ca(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||na(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?la(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly)return t.stopPropagation(),void this._onClearButtonClick(t);""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,ra(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return ca(t)}}
3962
+ */const Qa=t=>class extends(Za(Yo(Fo(Ha(Co(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=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 o=e+100*Math.floor(t.getFullYear()/100);return t<new Date(o-50,i,s)?o-=100:t>new Date(o+50,i,s)&&(o+=100),o}(this.referenceDate?ca(this.referenceDate):new Date,r,o,s))):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:Dr},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!Io()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new $a(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Xa(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=ca(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(aa(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||na(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),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.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!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",o=t.year;return o<0?(o=-o,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(o,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=ca(t);!t||i?(t?ra(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,o,r,a,n,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=o,t.focusedDate=r,t.selectedDate=a,t.showWeekNumbers=n,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=Lr(this._noInput?t:[s,t])}_getInitialPosition(){const t=ca(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||na(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?la(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly)return t.stopPropagation(),void this._onClearButtonClick(t);""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,ra(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return ca(t)}}
3963
3963
  /**
3964
3964
  * @license
3965
3965
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3983,7 +3983,7 @@ Ht("vaadin-date-picker",[Ja,E`
3983
3983
  direction: rtl;
3984
3984
  text-align: left;
3985
3985
  }
3986
- `],{moduleId:"vaadin-date-picker-styles"});class tn extends(Qa(Ga(Zt(Fs(ps))))){static get is(){return"vaadin-date-picker"}static get template(){return ds`
3986
+ `],{moduleId:"vaadin-date-picker-styles"});class tn extends(Qa(Ga(Zt(js(ps))))){static get is(){return"vaadin-date-picker"}static get template(){return ds`
3987
3987
  <div class="vaadin-date-picker-container">
3988
3988
  <div part="label">
3989
3989
  <slot name="label"></slot>
@@ -4047,7 +4047,7 @@ const en=t=>class extends(Ga(t)){static get properties(){return{autocomplete:{ty
4047
4047
  * @license
4048
4048
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
4049
4049
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4050
- */;Ht("vaadin-text-field",Ja,{moduleId:"vaadin-text-field-styles"});class on extends(sn(Zt(Fs(ps)))){static get is(){return"vaadin-text-field"}static get template(){return ds`
4050
+ */;Ht("vaadin-text-field",Ja,{moduleId:"vaadin-text-field-styles"});class on extends(sn(Zt(js(ps)))){static get is(){return"vaadin-text-field"}static get template(){return ds`
4051
4051
  <div class="vaadin-field-container">
4052
4052
  <div part="label">
4053
4053
  <slot name="label"></slot>
@@ -4119,7 +4119,7 @@ Ht("vaadin-password-field-button",ea,{moduleId:"vaadin-password-field-button-sty
4119
4119
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4120
4120
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4121
4121
  */
4122
- const an=t=>class extends(Ua(ko(Bo($o(t))))){static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new qs(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t&&t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}}
4122
+ const an=t=>class extends(Wa(ko(Bo($o(t))))){static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new qs(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t&&t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}}
4123
4123
  /**
4124
4124
  * @license
4125
4125
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -4387,7 +4387,7 @@ function yn(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4387
4387
  * @license
4388
4388
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4389
4389
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4390
- */const An=class{toString(){return""}},zn=t=>class extends t{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Us()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(t){if(!this.__virtualizer||!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const s=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!s||t!==s.index)return;const o=s.getBoundingClientRect(),r=this.getBoundingClientRect(),a=o.bottom-r.bottom+this._viewportTotalPaddingBottom;a>0&&(this.scrollTop+=a)}_isItemSelected(t,e,i){return!(t instanceof An)&&(i&&void 0!==t&&void 0!==e?yn(i,t)===yn(i,e):t===e)}__initVirtualizer(){this.__virtualizer=new Sn({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(t){t&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.requestContentUpdate()}__focusedIndexChanged(t,e){t!==e&&this.requestContentUpdate(),t>=0&&!this.loading&&this.scrollIntoView(t)}__rendererChanged(t,e){(t||e)&&this.requestContentUpdate()}__createElements(t){return[...Array(t)].map((()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t}))}_updateElement(t,e){const i=this.items[e],s=this.focusedIndex,o=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:o,renderer:this.renderer,focused:!this.loading&&s===e}),"function"==typeof this.itemClassNameGenerator?t.className=this.itemClassNameGenerator(i):""!==t.className&&(t.className=""),t.performUpdate&&!t.hasUpdated&&t.performUpdate(),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",o.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof An&&this.__requestItemByIndex(e)}__onItemClick(t){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:t.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(t=>{(0===this.scrollTop&&t.deltaY<0||this.scrollHeight-this.scrollTop-this.clientHeight<=1&&t.deltaY>0)&&t.preventDefault()}))}__requestItemByIndex(t){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
4390
+ */const An=class{toString(){return""}},zn=t=>class extends t{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Ws()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(t){if(!this.__virtualizer||!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const s=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!s||t!==s.index)return;const o=s.getBoundingClientRect(),r=this.getBoundingClientRect(),a=o.bottom-r.bottom+this._viewportTotalPaddingBottom;a>0&&(this.scrollTop+=a)}_isItemSelected(t,e,i){return!(t instanceof An)&&(i&&void 0!==t&&void 0!==e?yn(i,t)===yn(i,e):t===e)}__initVirtualizer(){this.__virtualizer=new Sn({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(t){t&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.requestContentUpdate()}__focusedIndexChanged(t,e){t!==e&&this.requestContentUpdate(),t>=0&&!this.loading&&this.scrollIntoView(t)}__rendererChanged(t,e){(t||e)&&this.requestContentUpdate()}__createElements(t){return[...Array(t)].map((()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t}))}_updateElement(t,e){const i=this.items[e],s=this.focusedIndex,o=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:o,renderer:this.renderer,focused:!this.loading&&s===e}),"function"==typeof this.itemClassNameGenerator?t.className=this.itemClassNameGenerator(i):""!==t.className&&(t.className=""),t.performUpdate&&!t.hasUpdated&&t.performUpdate(),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",o.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof An&&this.__requestItemByIndex(e)}__onItemClick(t){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:t.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(t=>{(0===this.scrollTop&&t.deltaY<0||this.scrollHeight-this.scrollTop-this.clientHeight<=1&&t.deltaY>0)&&t.preventDefault()}))}__requestItemByIndex(t){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
4391
4391
  /**
4392
4392
  * @license
4393
4393
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
@@ -4460,12 +4460,12 @@ const Tn=t=>class extends(Ha(t)){static get properties(){return{pattern:{type:St
4460
4460
  * @license
4461
4461
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4462
4462
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4463
- */function Fn(t){return null!=t}function jn(t,e){return t.findIndex((t=>!(t instanceof An)&&e(t)))}const Ln=t=>class extends(Za(Yo(sr(Bo(Co($o(ko(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),Bn(this),this.addController(new Xa(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,s,o,r,a,n,l,h){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:s,selectedItem:o,itemIdPath:r,focusedIndex:a,renderer:n,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,s){this._overlayOpened=t&&(s||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&Mo(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?!this._isInputFocused()&&!Er&&this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?yn(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?yn(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{Er&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,!this.opened&&!this._isClearButton(t)&&!this.autoOpenDisabled&&(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||(Fn(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){return t&&t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)))}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,s=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&s>=0&&(this.selectedItem=t[s]);const o=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=o>-1?o:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&Fn(e)?jn(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?jn(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),!(t.detail.item instanceof An)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(Io())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){!this.clearElement||t.composedPath()[0]!==this.clearElement||(t.preventDefault(),this._onClearAction())}}
4463
+ */function jn(t){return null!=t}function Fn(t,e){return t.findIndex((t=>!(t instanceof An)&&e(t)))}const Ln=t=>class extends(Za(Yo(sr(Bo(Co($o(ko(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),Bn(this),this.addController(new Xa(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,s,o,r,a,n,l,h){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:s,selectedItem:o,itemIdPath:r,focusedIndex:a,renderer:n,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,s){this._overlayOpened=t&&(s||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&Mo(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?!this._isInputFocused()&&!Er&&this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?yn(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?yn(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{Er&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,!this.opened&&!this._isClearButton(t)&&!this.autoOpenDisabled&&(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||(jn(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){return t&&t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)))}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,s=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&s>=0&&(this.selectedItem=t[s]);const o=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=o>-1?o:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&jn(e)?Fn(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Fn(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),!(t.detail.item instanceof An)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(Io())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){!this.clearElement||t.composedPath()[0]!==this.clearElement||(t.preventDefault(),this._onClearAction())}}
4464
4464
  /**
4465
4465
  * @license
4466
4466
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4467
4467
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4468
- */;Ht("vaadin-combo-box",Ja,{moduleId:"vaadin-combo-box-styles"});class $n extends(Nn(Ln(Tn(Ga(Zt(Fs(ps))))))){static get is(){return"vaadin-combo-box"}static get template(){return ds`
4468
+ */;Ht("vaadin-combo-box",Ja,{moduleId:"vaadin-combo-box-styles"});class $n extends(Nn(Ln(Tn(Ga(Zt(js(ps))))))){static get is(){return"vaadin-combo-box"}static get template(){return ds`
4469
4469
  <style>
4470
4470
  :host([opened]) {
4471
4471
  pointer-events: auto;
@@ -4725,7 +4725,7 @@ Ht("vaadin-multi-select-combo-box-container",E`
4725
4725
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4726
4726
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4727
4727
  */
4728
- class Wn extends(vn(Zt(Ms(ps)))){static get is(){return"vaadin-multi-select-combo-box-item"}static get template(){return ds`
4728
+ class Un extends(vn(Zt(Ms(ps)))){static get is(){return"vaadin-multi-select-combo-box-item"}static get template(){return ds`
4729
4729
  <style>
4730
4730
  :host {
4731
4731
  display: block;
@@ -4739,7 +4739,7 @@ class Wn extends(vn(Zt(Ms(ps)))){static get is(){return"vaadin-multi-select-comb
4739
4739
  <div part="content">
4740
4740
  <slot></slot>
4741
4741
  </div>
4742
- `}}S(Wn),Ht("vaadin-multi-select-combo-box-overlay",[_r,E`
4742
+ `}}S(Un),Ht("vaadin-multi-select-combo-box-overlay",[_r,E`
4743
4743
  #overlay {
4744
4744
  width: var(
4745
4745
  --vaadin-multi-select-combo-box-overlay-width,
@@ -4752,13 +4752,13 @@ class Wn extends(vn(Zt(Ms(ps)))){static get is(){return"vaadin-multi-select-comb
4752
4752
  flex-direction: column;
4753
4753
  height: 100%;
4754
4754
  }
4755
- `],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Un extends(bn(Yr(Ms(Zt(ps))))){static get is(){return"vaadin-multi-select-combo-box-overlay"}static get template(){return ds`
4755
+ `],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Wn extends(bn(Yr(Ms(Zt(ps))))){static get is(){return"vaadin-multi-select-combo-box-overlay"}static get template(){return ds`
4756
4756
  <div id="backdrop" part="backdrop" hidden></div>
4757
4757
  <div part="overlay" id="overlay">
4758
4758
  <div part="loader"></div>
4759
4759
  <div part="content" id="content"><slot></slot></div>
4760
4760
  </div>
4761
- `}}S(Un);
4761
+ `}}S(Wn);
4762
4762
  /**
4763
4763
  * @license
4764
4764
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -4864,7 +4864,7 @@ const Gn=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resiza
4864
4864
  :host([auto-expand-horizontally]) [class$='container'] {
4865
4865
  width: auto;
4866
4866
  }
4867
- `],{moduleId:"vaadin-multi-select-combo-box-styles"});class Kn extends(Yn(Ga(Zt(Fs(ps))))){static get is(){return"vaadin-multi-select-combo-box"}static get template(){return ds`
4867
+ `],{moduleId:"vaadin-multi-select-combo-box-styles"});class Kn extends(Yn(Ga(Zt(js(ps))))){static get is(){return"vaadin-multi-select-combo-box"}static get template(){return ds`
4868
4868
  <div class="vaadin-multi-select-combo-box-container">
4869
4869
  <div part="label">
4870
4870
  <slot name="label"></slot>
@@ -5155,7 +5155,7 @@ const Gn=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resiza
5155
5155
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5156
5156
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5157
5157
  */
5158
- class Jn extends(Gr(Zt(Fs(ps)))){static get template(){return ds`
5158
+ class Jn extends(Gr(Zt(js(ps)))){static get template(){return ds`
5159
5159
  <style>
5160
5160
  :host {
5161
5161
  position: fixed;
@@ -5244,7 +5244,7 @@ class Jn extends(Gr(Zt(Fs(ps)))){static get template(){return ds`
5244
5244
  <slot></slot>
5245
5245
  </div>
5246
5246
  </div>
5247
- `}static get is(){return"vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite")}}class Xn extends(Za(Ft(Fs(ps)))){static get template(){return ds`
5247
+ `}static get is(){return"vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite")}}class Xn extends(Za(jt(js(ps)))){static get template(){return ds`
5248
5248
  <style>
5249
5249
  :host {
5250
5250
  display: none !important;
@@ -5411,7 +5411,7 @@ const sl=t=>class extends(Co(t)){get focused(){return(this._getItems()||[]).find
5411
5411
  * @license
5412
5412
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5413
5413
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5414
- */,ol=t=>class extends(sl(t)){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&"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&&!Eo(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 Vs(t,(()=>{this._setItems(this._filterItems(js(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=zs.debounce(this._searchReset,xs.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(),o=(this.items[t+1]||e).getBoundingClientRect(),r=(this.items[t-1]||e).getBoundingClientRect();let a=0;!this._isRTL&&o[i[1]]>=s[i[1]]||this._isRTL&&o[i[1]]<=s[i[1]]?a=o[i[1]]-s[i[1]]:(!this._isRTL&&r[i[0]]<=s[i[0]]||this._isRTL&&r[i[0]]>=s[i[0]])&&(a=r[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=il(this._scrollerElement,e)+t;!function(t,e,i){t.scrollLeft="rtl"!==e?i:t.clientWidth-t.scrollWidth+i}(this._scrollerElement,e,i)}}}
5414
+ */,ol=t=>class extends(sl(t)){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&"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&&!Eo(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 Vs(t,(()=>{this._setItems(this._filterItems(Fs(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=zs.debounce(this._searchReset,xs.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(),o=(this.items[t+1]||e).getBoundingClientRect(),r=(this.items[t-1]||e).getBoundingClientRect();let a=0;!this._isRTL&&o[i[1]]>=s[i[1]]||this._isRTL&&o[i[1]]<=s[i[1]]?a=o[i[1]]-s[i[1]]:(!this._isRTL&&r[i[0]]<=s[i[0]]||this._isRTL&&r[i[0]]>=s[i[0]])&&(a=r[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=il(this._scrollerElement,e)+t;!function(t,e,i){t.scrollLeft="rtl"!==e?i:t.clientWidth-t.scrollWidth+i}(this._scrollerElement,e,i)}}}
5415
5415
  /**
5416
5416
  * @license
5417
5417
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -5553,12 +5553,12 @@ const hl=E`
5553
5553
  * @license
5554
5554
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5555
5555
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5556
- */const dl=t=>class extends(Za(jo(Lo(Co(or(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}-${Us()}`,this._srLabelController=new er(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 cl(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new $a(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new Hs(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.validate()}__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=!(!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",!!t),void 0!==e&&!this.__dispatchChangePending&&this.validate()}_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.validate());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.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),Ho(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&&(!!(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.validate()}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))}))}__dispatchChange(){return C(this,null,(function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}))}}
5556
+ */const dl=t=>class extends(Za(Fo(Lo(Co(or(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}-${Ws()}`,this._srLabelController=new er(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 cl(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new $a(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new Hs(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.validate()}__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=!(!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",!!t),void 0!==e&&!this.__dispatchChangePending&&this.validate()}_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.validate());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.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),Ho(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&&(!!(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.validate()}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))}))}__dispatchChange(){return C(this,null,(function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}))}}
5557
5557
  /**
5558
5558
  * @license
5559
5559
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5560
5560
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5561
- */;Ht("vaadin-select",[Ya,Ka,hl],{moduleId:"vaadin-select-styles"});class ul extends(dl(Fs(Zt(ps)))){static get is(){return"vaadin-select"}static get template(){return ds`
5561
+ */;Ht("vaadin-select",[Ya,Ka,hl],{moduleId:"vaadin-select-styles"});class ul extends(dl(js(Zt(ps)))){static get is(){return"vaadin-select"}static get template(){return ds`
5562
5562
  <style>
5563
5563
  :host {
5564
5564
  position: relative;
@@ -5984,7 +5984,7 @@ Ht("vaadin-confirm-dialog-overlay",[_r,vl,E`
5984
5984
  </footer>
5985
5985
  </section>
5986
5986
  </div>
5987
- `}ready(){super.ready(),this.setAttribute("has-header",""),this.setAttribute("has-footer","")}}S(bl);class gl extends(fl(ml(Za(Ft(ps))))){static get is(){return"vaadin-confirm-dialog-dialog"}static get template(){return ds`
5987
+ `}ready(){super.ready(),this.setAttribute("has-header",""),this.setAttribute("has-footer","")}}S(bl);class gl extends(fl(ml(Za(jt(ps))))){static get is(){return"vaadin-confirm-dialog-dialog"}static get template(){return ds`
5988
5988
  <style>
5989
5989
  :host {
5990
5990
  display: none;
@@ -6011,12 +6011,12 @@ Ht("vaadin-confirm-dialog-overlay",[_r,vl,E`
6011
6011
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
6012
6012
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6013
6013
  */
6014
- const yl=t=>class extends t{static get properties(){return{accessibleDescriptionRef:{type:String},opened:{type:Boolean,value:!1,notify:!0},header:{type:String,value:""},message:{type:String,value:""},confirmText:{type:String,value:"Confirm"},confirmTheme:{type:String,value:"primary"},noCloseOnEsc:{type:Boolean,value:!1},rejectButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},rejectText:{type:String,value:"Reject"},rejectTheme:{type:String,value:"error tertiary"},cancelButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},cancelText:{type:String,value:"Cancel"},cancelTheme:{type:String,value:"tertiary"},overlayClass:{type:String},_cancelButton:{type:Object},_confirmButton:{type:Object},_headerNode:{type:Object},_messageNodes:{type:Array,value:()=>[]},_overlayElement:{type:Object,sync:!0},_rejectButton:{type:Object},_contentHeight:{type:String},_contentWidth:{type:String}}}static get observers(){return["__updateConfirmButton(_confirmButton, confirmText, confirmTheme)","__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)","__updateHeaderNode(_headerNode, header)","__updateMessageNodes(_messageNodes, message)","__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)","__accessibleDescriptionRefChanged(_overlayElement, _messageNodes, accessibleDescriptionRef)"]}constructor(){super(),this.__cancel=this.__cancel.bind(this),this.__confirm=this.__confirm.bind(this),this.__reject=this.__reject.bind(this)}get __slottedNodes(){return[this._headerNode,...this._messageNodes,this._cancelButton,this._confirmButton,this._rejectButton]}ready(){super.ready(),this._headerController=new qs(this,"header","h3",{initializer:t=>{this._headerNode=t}}),this.addController(this._headerController),this._messageController=new qs(this,"","div",{multiple:!0,observe:!1,initializer:t=>{const e=document.createElement("div");e.style.display="contents";const i=`confirm-dialog-message-${Us()}`;e.id=i,this.appendChild(e),e.appendChild(t),this._messageNodes=[...this._messageNodes,e]}}),this.addController(this._messageController),this._cancelController=new qs(this,"cancel-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("cancel",t)}}),this.addController(this._cancelController),this._rejectController=new qs(this,"reject-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("reject",t)}}),this.addController(this._rejectController),this._confirmController=new qs(this,"confirm-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("confirm",t)}}),this.addController(this._confirmController)}_initOverlay(t){t.addEventListener("vaadin-overlay-escape-press",this._escPressed.bind(this)),t.addEventListener("vaadin-overlay-open",(()=>this.__onDialogOpened())),t.addEventListener("vaadin-overlay-closed",(()=>this.__onDialogClosed())),t.setAttribute("role","alertdialog")}__onDialogOpened(){const t=this._overlayElement;this.__slottedNodes.forEach((e=>{t.appendChild(e)}));const e=t.querySelector('[slot="confirm-button"]');e&&e.focus()}__onDialogClosed(){this.__slottedNodes.forEach((t=>{this.appendChild(t)})),this.dispatchEvent(new CustomEvent("closed"))}__accessibleDescriptionRefChanged(t,e,i){!t||!e||(void 0!==i?Ho(t,"aria-describedby",{newId:i,oldId:this.__oldAccessibleDescriptionRef,fromUser:!0}):e.forEach((e=>{Ho(t,"aria-describedby",{newId:e.id})})),this.__oldAccessibleDescriptionRef=i)}__setupSlottedButton(t,e){const i=`_${t}Button`,s=`__${t}`;this[i]&&this[i]!==e&&this[i].remove(),e.addEventListener("click",this[s]),this[i]=e}__updateCancelButton(t,e,i,s){t&&(t===this._cancelController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!s))}__updateConfirmButton(t,e,i){t&&t===this._confirmController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i))}__updateHeaderNode(t,e){t&&t===this._headerController.defaultNode&&(t.textContent=e)}__updateMessageNodes(t,e){if(t&&t.length>0){const i=t.find((t=>this._messageController.defaultNode&&t===this._messageController.defaultNode.parentElement));i&&(i.firstChild.textContent=e)}}__updateRejectButton(t,e,i,s){t&&(t===this._rejectController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!s))}_escPressed(t){t.defaultPrevented||this.__cancel()}__confirm(){this.dispatchEvent(new CustomEvent("confirm")),this.opened=!1}__cancel(){this.dispatchEvent(new CustomEvent("cancel")),this.opened=!1}__reject(){this.dispatchEvent(new CustomEvent("reject")),this.opened=!1}_getAriaLabel(t){return t||"confirmation"}}
6014
+ const yl=t=>class extends t{static get properties(){return{accessibleDescriptionRef:{type:String},opened:{type:Boolean,value:!1,notify:!0},header:{type:String,value:""},message:{type:String,value:""},confirmText:{type:String,value:"Confirm"},confirmTheme:{type:String,value:"primary"},noCloseOnEsc:{type:Boolean,value:!1},rejectButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},rejectText:{type:String,value:"Reject"},rejectTheme:{type:String,value:"error tertiary"},cancelButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},cancelText:{type:String,value:"Cancel"},cancelTheme:{type:String,value:"tertiary"},overlayClass:{type:String},_cancelButton:{type:Object},_confirmButton:{type:Object},_headerNode:{type:Object},_messageNodes:{type:Array,value:()=>[]},_overlayElement:{type:Object,sync:!0},_rejectButton:{type:Object},_contentHeight:{type:String},_contentWidth:{type:String}}}static get observers(){return["__updateConfirmButton(_confirmButton, confirmText, confirmTheme)","__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)","__updateHeaderNode(_headerNode, header)","__updateMessageNodes(_messageNodes, message)","__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)","__accessibleDescriptionRefChanged(_overlayElement, _messageNodes, accessibleDescriptionRef)"]}constructor(){super(),this.__cancel=this.__cancel.bind(this),this.__confirm=this.__confirm.bind(this),this.__reject=this.__reject.bind(this)}get __slottedNodes(){return[this._headerNode,...this._messageNodes,this._cancelButton,this._confirmButton,this._rejectButton]}ready(){super.ready(),this._headerController=new qs(this,"header","h3",{initializer:t=>{this._headerNode=t}}),this.addController(this._headerController),this._messageController=new qs(this,"","div",{multiple:!0,observe:!1,initializer:t=>{const e=document.createElement("div");e.style.display="contents";const i=`confirm-dialog-message-${Ws()}`;e.id=i,this.appendChild(e),e.appendChild(t),this._messageNodes=[...this._messageNodes,e]}}),this.addController(this._messageController),this._cancelController=new qs(this,"cancel-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("cancel",t)}}),this.addController(this._cancelController),this._rejectController=new qs(this,"reject-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("reject",t)}}),this.addController(this._rejectController),this._confirmController=new qs(this,"confirm-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("confirm",t)}}),this.addController(this._confirmController)}_initOverlay(t){t.addEventListener("vaadin-overlay-escape-press",this._escPressed.bind(this)),t.addEventListener("vaadin-overlay-open",(()=>this.__onDialogOpened())),t.addEventListener("vaadin-overlay-closed",(()=>this.__onDialogClosed())),t.setAttribute("role","alertdialog")}__onDialogOpened(){const t=this._overlayElement;this.__slottedNodes.forEach((e=>{t.appendChild(e)}));const e=t.querySelector('[slot="confirm-button"]');e&&e.focus()}__onDialogClosed(){this.__slottedNodes.forEach((t=>{this.appendChild(t)})),this.dispatchEvent(new CustomEvent("closed"))}__accessibleDescriptionRefChanged(t,e,i){!t||!e||(void 0!==i?Ho(t,"aria-describedby",{newId:i,oldId:this.__oldAccessibleDescriptionRef,fromUser:!0}):e.forEach((e=>{Ho(t,"aria-describedby",{newId:e.id})})),this.__oldAccessibleDescriptionRef=i)}__setupSlottedButton(t,e){const i=`_${t}Button`,s=`__${t}`;this[i]&&this[i]!==e&&this[i].remove(),e.addEventListener("click",this[s]),this[i]=e}__updateCancelButton(t,e,i,s){t&&(t===this._cancelController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!s))}__updateConfirmButton(t,e,i){t&&t===this._confirmController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i))}__updateHeaderNode(t,e){t&&t===this._headerController.defaultNode&&(t.textContent=e)}__updateMessageNodes(t,e){if(t&&t.length>0){const i=t.find((t=>this._messageController.defaultNode&&t===this._messageController.defaultNode.parentElement));i&&(i.firstChild.textContent=e)}}__updateRejectButton(t,e,i,s){t&&(t===this._rejectController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!s))}_escPressed(t){t.defaultPrevented||this.__cancel()}__confirm(){this.dispatchEvent(new CustomEvent("confirm")),this.opened=!1}__cancel(){this.dispatchEvent(new CustomEvent("cancel")),this.opened=!1}__reject(){this.dispatchEvent(new CustomEvent("reject")),this.opened=!1}_getAriaLabel(t){return t||"confirmation"}}
6015
6015
  /**
6016
6016
  * @license
6017
6017
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
6018
6018
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6019
- */;class wl extends(yl(Fs(Ft(Yo(ps))))){static get template(){return ds`
6019
+ */;class wl extends(yl(js(jt(Yo(ps))))){static get template(){return ds`
6020
6020
  <style>
6021
6021
  :host,
6022
6022
  [hidden] {
@@ -6312,7 +6312,7 @@ Ht("vaadin-tab",E`
6312
6312
  border-bottom: 2px solid;
6313
6313
  }
6314
6314
  }
6315
- `,{moduleId:"vaadin-tab-styles"});class xl extends(Fs(Zt(_l(Yo(ps))))){static get template(){return ds`
6315
+ `,{moduleId:"vaadin-tab-styles"});class xl extends(js(Zt(_l(Yo(ps))))){static get template(){return ds`
6316
6316
  <slot></slot>
6317
6317
  <slot name="tooltip"></slot>
6318
6318
  `}static get is(){return"vaadin-tab"}ready(){super.ready(),this._tooltipController=new Hs(this),this.addController(this._tooltipController)}}S(xl),Ht("vaadin-tabs",E`
@@ -6646,7 +6646,7 @@ Ht("vaadin-tabs",E`
6646
6646
  :host([dir='rtl']) [part='forward-button']::after {
6647
6647
  content: '\\25C0';
6648
6648
  }
6649
- `,{moduleId:"vaadin-tabs-styles"});class Cl extends(kl(Fs(Zt(ps)))){static get template(){return ds`
6649
+ `,{moduleId:"vaadin-tabs-styles"});class Cl extends(kl(js(Zt(ps)))){static get template(){return ds`
6650
6650
  <div on-click="_scrollBack" part="back-button" aria-hidden="true"></div>
6651
6651
 
6652
6652
  <div id="scroll" part="tabs">
@@ -6654,4 +6654,4 @@ Ht("vaadin-tabs",E`
6654
6654
  </div>
6655
6655
 
6656
6656
  <div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
6657
- `}static get is(){return"vaadin-tabs"}}S(Cl);const Sl=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.endpoint=void 0,this.gameId=void 0,this.numberOfGrids=1,this.multipleDraws=!0,this.ticketId=void 0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0,this.isLoading=!0,this.hasErrors=!1,this.ticketDone=[],this.isCustomSelect=!1,this.amountInfo={},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.quickPicks=[]}handleLineMultiplierChange(t){this.grids=Array.from({length:t},((t,e)=>e+1)),this.ticketDone=Array.from({length:t},(()=>!1)),this.quickPicks=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]})}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}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 o=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=o.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])u[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{drawCount:this.drawMultiplier,multiplierNum:Number(this.stakeMultiplier),multiplier:this.gameData.rules.stakeMultiplierAvailable,quickPicks:this.quickPicks,betName:this.playType.length>1?this.playType.find((t=>t.value===this.selectedPlayTypeId)).label:this.groupType[this.tabIndex].groupName}),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)],this.quickPicks[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}),this.quickPicks[t]=!0}toggleResetSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!1,...this.ticketDone.slice(t+1)],this.resetSelection.emit({ticketId:this.ticketId,index:t}),this.quickPicks[t]=!1}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}),this.setLineMultiplier(this.boardsAllowed[0])}render(){if(this.isLoading)return i("div",null,i("p",null,p("loading",this.language)));if(this.hasErrors)return i("div",null,i("p",null,p("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"},p("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"},p("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,p("lineName",this.language),s+1),this.resetButton&&this.ticketDone[s]&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection(s)},p("resetButton",this.language))),this.autoPick&&!this.ticketDone[s]&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection(s)},p("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":this.clientStylingUrl,"mb-source":this.mbSource})),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":this.clientStylingUrl,"mb-source":this.mbSource})))))),t.stakeMultiplierAvailable&&i("div",null,i("label",{class:"Label"},p("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"},p("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"},p("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"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Sl.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 Al=["ro","en","fr","ar","hr"],zl={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},Il=(t,e)=>{const i=e;return zl[void 0!==i&&Al.includes(i)?i:"en"][t]},Tl=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.ticketDescription=void 0,this.gameId=void 0,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.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0}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])zl[e][i]=t[e][i]})))}handleClientStylingChange(t,e){t!=e&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&n(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&l(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&l(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))}render(){return i("div",{key:"28756fcff01b738bfe8339114445032a5da757c2",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"18a566d1c97ccbf74cd759215df3a18faf5c43dc","header-title":`${Il("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":this.clientStylingUrl,"mb-source":this.mbSource},i("div",{key:"3a056f64dc8572b66f50cb151adde2caea2cd427",slot:"accordionContent"},i("lottery-ticket",{key:"06a0696b79840c05381429b1b87af94b478b09f0",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":this.clientStylingUrl,"mb-source":this.mbSource}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Tl.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{r as helper_accordion,h as lottery_bullet,c as lottery_grid,Sl as lottery_ticket,Tl as lottery_ticket_controller}
6657
+ `}static get is(){return"vaadin-tabs"}}S(Cl);const Sl=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.endpoint=void 0,this.gameId=void 0,this.numberOfGrids=1,this.multipleDraws=!0,this.ticketId=void 0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0,this.isLoading=!0,this.hasErrors=!1,this.ticketDone=[],this.isCustomSelect=!1,this.amountInfo={},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.quickPicks=[]}handleLineMultiplierChange(t){this.grids=Array.from({length:t},((t,e)=>e+1)),this.ticketDone=Array.from({length:t},(()=>!1)),this.quickPicks=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]})}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}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 o=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=o.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])u[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{drawCount:this.drawMultiplier,multiplierNum:Number(this.stakeMultiplier),multiplier:this.gameData.rules.stakeMultiplierAvailable,quickPicks:this.quickPicks,betName:this.playType.length>1?this.playType.find((t=>t.value===this.selectedPlayTypeId)).label:this.groupType[this.tabIndex].groupName}),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)],this.quickPicks[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}),this.quickPicks[t]=!0}toggleResetSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!1,...this.ticketDone.slice(t+1)],this.resetSelection.emit({ticketId:this.ticketId,index:t}),this.quickPicks[t]=!1}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}),this.setLineMultiplier(this.boardsAllowed[0])}render(){if(this.isLoading)return i("div",null,i("p",null,p("loading",this.language)));if(this.hasErrors)return i("div",null,i("p",null,p("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"},p("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"},p("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,p("lineName",this.language),s+1),this.resetButton&&this.ticketDone[s]&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection(s)},p("resetButton",this.language))),this.autoPick&&!this.ticketDone[s]&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection(s)},p("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":this.clientStylingUrl,"mb-source":this.mbSource})),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":this.clientStylingUrl,"mb-source":this.mbSource})))))),t.stakeMultiplierAvailable&&i("div",null,i("label",{class:"Label"},p("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"},p("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"},p("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"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Sl.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-primary, #009993);margin:0 40px 10px 0;cursor:pointer}.TicketTabs .Active{border-bottom:1px solid var(--emw--color-primary, #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--color-typography, #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--color-typography, #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--color-primary, #009993);background:var(--emw--color-typography-inverse, #fff);color:var(--emw--color-typography, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:var(--emw--color-primary, #009993);color:var(--emw--color-typography-inverse, #fff)}.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--color-typography, #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-typography-inverse, #fff)}.ResetButton:hover{background:var(--emw--color-tertiary, #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-background-secondary, #f5f5f5);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-typography-inverse, #fff);background:var(--emw--color-background, #009993)}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background, #009993)}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid var(--emw--color-background-tertiary, #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-background-tertiary, #ccc);overflow:hidden;background:var(--emw--color-typography-inverse, #fff);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-typography-inverse, #fff)}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:var(--emw--color-background-secondary, #f5f5f5);border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:var(--emw--color-background-tertiary, #ccc);border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:var(--emw--color-background-secondary, #f5f5f5)}';const Al=["ro","en","fr","ar","hr"],zl={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},Il=(t,e)=>{const i=e;return zl[void 0!==i&&Al.includes(i)?i:"en"][t]},Tl=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.ticketDescription=void 0,this.gameId=void 0,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.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0}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])zl[e][i]=t[e][i]})))}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){return i("div",{key:"28756fcff01b738bfe8339114445032a5da757c2",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"18a566d1c97ccbf74cd759215df3a18faf5c43dc","header-title":`${Il("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":this.clientStylingUrl,"mb-source":this.mbSource},i("div",{key:"3a056f64dc8572b66f50cb151adde2caea2cd427",slot:"accordionContent"},i("lottery-ticket",{key:"06a0696b79840c05381429b1b87af94b478b09f0",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":this.clientStylingUrl,"mb-source":this.mbSource}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Tl.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{l as helper_accordion,h as lottery_bullet,c as lottery_grid,Sl as lottery_ticket,Tl as lottery_ticket_controller}