@everymatrix/bonus-elevate-shop 1.48.0 → 1.48.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. package/dist/bonus-elevate-shop/bonus-elevate-shop.esm.js +1 -1
  2. package/dist/bonus-elevate-shop/{p-cfc8ddec.js → p-a63058b5.js} +1 -1
  3. package/dist/bonus-elevate-shop/{p-eaad379c.entry.js → p-b75b3f39.entry.js} +39 -39
  4. package/dist/bonus-elevate-shop/{p-2c8cdf05.entry.js → p-bd27fb68.entry.js} +1 -1
  5. package/dist/bonus-elevate-shop/{p-135a1cfb.entry.js → p-f1b70ec1.entry.js} +1 -1
  6. package/dist/cjs/bonus-elevate-shop_17.cjs.entry.js +27 -12
  7. package/dist/cjs/{player-elevate-card-items-0d4d7d6e.js → player-elevate-card-items-8be6d034.js} +1 -1
  8. package/dist/cjs/player-elevate-card.cjs.entry.js +1 -1
  9. package/dist/cjs/player-elevate-loyaltycard.cjs.entry.js +1 -1
  10. package/dist/collection/components/bonus-elevate-shop/bonus-elevate-shop.js +2 -3
  11. package/dist/esm/bonus-elevate-shop_17.entry.js +27 -12
  12. package/dist/esm/{player-elevate-card-items-f80657b8.js → player-elevate-card-items-dce72e86.js} +1 -1
  13. package/dist/esm/player-elevate-card.entry.js +1 -1
  14. package/dist/esm/player-elevate-loyaltycard.entry.js +1 -1
  15. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/bonus-elevate-shop/.stencil/packages/stencil/bonus-elevate-shop/stencil.config.d.ts +2 -0
  16. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/bonus-elevate-shop/.stencil/packages/stencil/bonus-elevate-shop/stencil.config.dev.d.ts +2 -0
  17. package/package.json +1 -1
  18. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-elevate-shop/.stencil/packages/stencil/bonus-elevate-shop/stencil.config.d.ts +0 -2
  19. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-elevate-shop/.stencil/packages/stencil/bonus-elevate-shop/stencil.config.dev.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- import{h as t,r as e,c as i,g as o,H as s,a as r,F as a}from"./p-67465a46.js";import{_ as n,g as l,s as h,a as c,r as d,t as u,b as p,c as m,d as f,e as v,l as b,f as g,h as y,i as w,j as x,k as _,m as k,n as A,o as C,T as z,P as E,p as T,q as I}from"./p-cfc8ddec.js";async function P(t,e={},i={}){const{endpoint:o,language:s,session:r}=this,a=e;i.method&&"GET"!==i.method||(a.language=s);const n=((t,e={})=>t+"?"+Object.keys(e).map((t=>`${t}=${e[t]}`)).join("&"))(`${o}${t}`,a);i.headers||(i.headers={}),i.headers["x-SessionId"]=r;const l=await(async(t,e={})=>{let i;i=await fetch(t,e),i=await i.text();try{i=JSON.parse(i)}catch(t){console.error(t)}return i})(n,i);return l}const S={en:{Points:"Points",Point:"Point",noContent:"No Content",redeemGift:"Redeem Gift",perPage:"Per Page"}},D=(e,i,o)=>t("div",{class:"Gifts FlexLayout"},e.map((e=>{var s;const r=((t,e)=>{switch(t.available){case"true":return{extraClass:" active",onClick:()=>e(t.id)};case"false":return{extraClass:" deactive",onClick:()=>{}}}})(e,o),a=e.presentation;return t("div",{class:"Gift"},t("div",{class:"ImgContainer",onClick:()=>window.postMessage({type:"BEEShopImgClicked",itemId:e.id},window.location.href),style:Object.assign({},(n=(null===(s=a.assets)||void 0===s?void 0:s.length)>0?a.assets[0]:"",n?{backgroundImage:`url('${n}')`}:{}))}),t("div",{class:"InfoContainer"},t("div",null,t("div",{class:"Point"},e.points," ",1===e.points?i.Point:i.Points),t("div",{class:"Title"},(null==a?void 0:a.displayName)||e.displayName),t("div",{class:"Description"},(null==a?void 0:a.description)||"")),t("div",{class:`AvaliableWrap RedeemButton ${r.extraClass}`,onClick:r.onClick},i.redeemGift)));var n})));var M={};if(function(t){var e=Object.defineProperty,i=Object.defineProperties,o=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,n=(t,i,o)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[i]=o,l=(t,e)=>{for(var i in e||(e={}))r.call(e,i)&&n(t,i,e[i]);if(s)for(var i of s(e))a.call(e,i)&&n(t,i,e[i]);return t},h=(t,e)=>i(t,o(e)),c=(t,e,i)=>n(t,"symbol"!=typeof e?e+"":e,i);function d(){}function u(t){return t()}function p(){return Object.create(null)}function m(t){t.forEach(u)}function f(t){return"function"==typeof t}function v(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function b(t,e,i){t.insertBefore(e,i||null)}function g(t){t.parentNode&&t.parentNode.removeChild(t)}function y(t){return document.createElement(t)}let w;function x(t){w=t}Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const _=[],k=[];let A=[];const C=[],z=Promise.resolve();let E=!1;function T(t){A.push(t)}const I=new Set;let P=0;function S(){if(0!==P)return;const t=w;do{try{for(;P<_.length;){const t=_[P];P++,x(t),D(t.$$)}}catch(t){throw _.length=0,P=0,t}for(x(null),_.length=0,P=0;k.length;)k.pop()();for(let t=0;t<A.length;t+=1){const e=A[t];I.has(e)||(I.add(e),e())}A.length=0}while(_.length);for(;C.length;)C.pop()();E=!1,I.clear(),x(t)}function D(t){if(null!==t.fragment){t.update(),m(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(T)}}const M=new Set;function F(t,e,i,o,s,r,a=null,n=[-1]){const l=w;x(t);const h=t.$$={fragment:null,ctx:[],props:r,update:d,not_equal:s,bound:p(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:p(),dirty:n,skip_bound:!1,root:e.target||l.$$.root};a&&a(h.root);let c=!1;if(h.ctx=i?i(t,e.props||{},((e,i,...o)=>{const r=o.length?o[0]:i;return h.ctx&&s(h.ctx[e],h.ctx[e]=r)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](r),c&&function(t,e){-1===t.$$.dirty[0]&&(_.push(t),E||(E=!0,z.then(S)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),i})):[],h.update(),c=!0,m(h.before_update),h.fragment=!!o&&o(h.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);h.fragment&&h.fragment.l(t),t.forEach(g)}else h.fragment&&h.fragment.c();e.intro&&function(t){t&&t.i&&(M.delete(t),t.i(void 0))}(t.$$.fragment),function(t,e,i){const{fragment:o,after_update:s}=t.$$;o&&o.m(e,i),T((()=>{const e=t.$$.on_mount.map(u).filter(f);t.$$.on_destroy?t.$$.on_destroy.push(...e):m(e),t.$$.on_mount=[]})),s.forEach(T)}(t,e.target,e.anchor),S()}x(l)}let O;function B(t,e,i,o){var s;const r=null==(s=i[t])?void 0:s.type;if(e="Boolean"===r&&"boolean"!=typeof e?null!=e:e,!o||!i[t])return e;if("toAttribute"===o)switch(r){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}"function"==typeof HTMLElement&&(O=class extends HTMLElement{constructor(t,e,i){super(),c(this,"$$ctor"),c(this,"$$s"),c(this,"$$c"),c(this,"$$cn",!1),c(this,"$$d",{}),c(this,"$$r",!1),c(this,"$$p_d",{}),c(this,"$$l",{}),c(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=e,i&&this.attachShadow({mode:"open"})}addEventListener(t,e,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const i=this.$$c.$on(t,e);this.$$l_u.set(e,i)}super.addEventListener(t,e,i)}removeEventListener(t,e,i){if(super.removeEventListener(t,e,i),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}connectedCallback(){return((t,e,i)=>new Promise(((e,o)=>{var s=t=>{try{a(i.next(t))}catch(t){o(t)}},r=t=>{try{a(i.throw(t))}catch(t){o(t)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(s,r);a((i=i.apply(t,null)).next())})))(this,0,(function*(){if(this.$$cn=!0,!this.$$c){let t=function(t){return()=>{let e;return{c:function(){e=y("slot"),"default"!==t&&function(t,e,i){null==i?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}(e,"name",t)},m:function(t,i){b(t,e,i)},d:function(t){t&&g(e)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const e={},i=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const o of this.$$s)o in i&&(e[o]=[t(o)]);for(const t of this.attributes){const e=this.$$g_p(t.name);e in this.$$d||(this.$$d[e]=B(e,t.value,this.$$p_d,"toProp"))}for(const t in this.$$p_d)!(t in this.$$d)&&void 0!==this[t]&&(this.$$d[t]=this[t],delete this[t]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:h(l({},this.$$d),{$$slots:e,$$scope:{ctx:[]}})});const o=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=B(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(this.$$p_d[t].attribute||t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const t in this.$$l)for(const e of this.$$l[t]){const i=this.$$c.$on(t,e);this.$$l_u.set(e,i)}this.$$l={}}}))}attributeChangedCallback(t,e,i){var o;this.$$r||(t=this.$$g_p(t),this.$$d[t]=B(t,i,this.$$p_d,"toProp"),null==(o=this.$$c)||o.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});class N{constructor(){c(this,"$$"),c(this,"$$set")}$destroy(){(function(t,e){const i=t.$$;null!==i.fragment&&(function(t){const e=[],i=[];A.forEach((o=>-1===t.indexOf(o)?e.push(o):i.push(o))),i.forEach((t=>t())),A=e}(i.after_update),m(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])})(this,1),this.$destroy=d}$on(t,e){if(!f(e))return d;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(e),()=>{const t=i.indexOf(e);-1!==t&&i.splice(t,1)}}$set(t){this.$$set&&!function(t){return 0===Object.keys(t).length}(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function L(t){!function(t,e,i){const o=function(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}(t);if(!o.getElementById(e)){const t=y("style");t.id=e,t.textContent=i,function(t,e){!function(t,e){t.appendChild(e)}(t.head||t,e)}(o,t)}}(t,"svelte-gnt082",".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}")}function j(t){let e;return{c(){e=y("div"),e.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>'},m(i,o){b(i,e,o),t[3](e)},p:d,i:d,o:d,d(i){i&&g(e),t[3](null)}}}function R(t,e,i){let o,{clientstyling:s=""}=e,{clientstylingurl:r=""}=e;return t.$$set=t=>{"clientstyling"in t&&i(1,s=t.clientstyling),"clientstylingurl"in t&&i(2,r=t.clientstylingurl)},t.$$.update=()=>{3&t.$$.dirty&&s&&o&&(()=>{let t=document.createElement("style");t.innerHTML=s,o.appendChild(t)})(),5&t.$$.dirty&&r&&o&&(()=>{let t=new URL(r),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{o.appendChild(e)}),1),setTimeout((()=>{}),500)}))})()},[o,s,r,function(t){k[t?"unshift":"push"]((()=>{o=t,i(0,o)}))}]}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");class q extends N{constructor(t){super(),F(this,t,R,j,v,{clientstyling:1,clientstylingurl:2},L)}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),S()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),S()}}!function(t,e,i){let o=class extends O{constructor(){super(t,i,true),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map((t=>(e[t].attribute||t).toLowerCase()))}};Object.keys(e).forEach((t=>{Object.defineProperty(o.prototype,t,{get(){return this.$$c&&t in this.$$c?this.$$c[t]:this.$$d[t]},set(i){var o;i=B(t,i,e),this.$$d[t]=i,null==(o=this.$$c)||o.$set({[t]:i})}})})),[].forEach((t=>{Object.defineProperty(o.prototype,t,{get(){var e;return null==(e=this.$$c)?void 0:e[t]}})})),t.element=o}(q,{clientstyling:{},clientstylingurl:{}},[]),t.default=q}(M),"undefined"!=typeof window){let t=function(t){return function(...e){try{return t.apply(this,e)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=t(customElements.define),Promise.resolve().then((()=>M)).then((({default:t})=>{!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",t.element)}))}const F=class{constructor(t){e(this,t),this.redeemGiftButton=i(this,"redeemGiftButton",7),this.bindedHandler=this.handleMessage.bind(this),this.session=void 0,this.endpoint=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.limit=10,this.navItemAccount=5,this.pageLimitOptions="10,25,50",this.locale=S.en,this.gifts=[],this.total=0,this.offset=0,this.shopListId="elevateShopList",this.isLoading=!0,this.pageLimitSelectOptions=[]}async updateGifts(){if(this.isLoading=!0,this.session){const{data:t,total:e}=await P.bind(this,"/v1/elevate/shop",{offset:this.offset,limit:this.limit}).call();this.gifts=t||[],this.total=e}else this.gifts=[],this.total=0;this.isLoading=!1}redeemGiftConfirm(t){const e=this.gifts.filter((e=>e.id===t))[0];window.postMessage({type:"BEERedeemConfirm",shopItem:e},window.location.href)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}async redeemGift(t){const e=await P.bind(this,"/v1/elevate/redeem",{},{method:"PUT",body:JSON.stringify({giftID:t}),headers:{"Content-Type":"application/json-patch+json"}}).call();e.success?(this.redeemGiftButton.emit(),window.postMessage({type:"BEEGiftRedeem",itemId:t},window.location.href)):window.postMessage({type:"BEEGiftRedeemFailed",itemId:t,err:e},window.location.href)}loadGifts(e){return this.isLoading?t("general-animation-loading",null):0===this.gifts.length?t("div",{class:"NoContent"},this.locale.noContent):e()}setLimit(){try{const t=this.pageLimitOptions.split(",").map((t=>parseInt(t)));t.includes(this.limit)||(this.limit=t[0])}catch(t){console.error("Error when parse PageLimitOptions",t),this.limit=10}}onPageLimitChangedHandler(t){var e;"pageLimits"===(null===(e=t.detail)||void 0===e?void 0:e.name)&&(this.limit=parseInt(t.detail.value||"10"),this.offset=0,this.updateGifts())}reloadPageByTypeHandler(t){var e;if((null===(e=t.detail)||void 0===e?void 0:e.tableId)!=this.shopListId)return;const{limit:i,offset:o}=t.detail;this.limit=i,this.offset=o||0,this.updateGifts()}componentWillLoad(){this.setLimit(),this.pageLimitSelectOptions=this.pageLimitOptions.split(",").map((t=>({label:t,value:t})))}render(){return t("main",{key:"6ae090529a141cba9eacf46eec87ec70aaa3ac9a",class:"MainContainer"},t("general-styling-wrapper",{key:"8223fc8488321753fe15c9c713d78bef3455b1c9",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:S,translationUrl:this.translationUrl}),t("player-elevate-pointcard",{key:"da11ffd5024cee11f0ffe85c6d6bc9556c3427f5",endpoint:this.endpoint,session:this.session,language:this.language,clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,translationUrl:this.translationUrl}),this.loadGifts(D.bind(this,this.gifts,this.locale,this.redeemGiftConfirm.bind(this))),t("div",{key:"2658262e6c6ba257b114662f3173cca8865dfa95",class:"ShopBottom"},t("bonus-pagination-nav",{key:"4e0608b320f2ebacec5abe92864a9e840f7704c7",total:81,offset:this.offset,limit:this.limit,tableId:this.shopListId,"nav-item-account":7,arrowsActive:!1,"display-page-numbers":"true"}),t("general-input",{key:"847d62316c59392722758900bfcdea1544748abb",type:"dropdown",name:"pageLimits",displayName:this.locale.perPage,defaultValue:this.limit,validation:{mandatory:!1},options:this.pageLimitSelectOptions,emitValue:!0,language:this.language})))}handleMessage(t){"bee-redeem-confirmed"===t.data.type&&t.data.id&&this.redeemGift(t.data.id)}async componentDidLoad(){this.updateGifts(),window.addEventListener("message",this.bindedHandler,!1)}static get assetsDirs(){return["static"]}static get watchers(){return{endpoint:["updateGifts"],language:["updateGifts"],session:["updateGifts"]}}};F.style=":host{display:block}svg circle{shape-rendering:crispEdges}.MainContainer{max-width:420px}.MainContainer player-elevate-pointcard{width:100%;height:220px}.MainContainer .ShopBottom{display:flex;flex-direction:row;justify-content:space-between}.Gifts{display:flex;justify-content:space-between;padding:15px;padding-left:-8px;padding-right:-8px;flex:0 0 45.1282051282%;flex-wrap:wrap;justify-content:flex-start;background:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-color-black-150, #000000);font-weight:500;gap:10px;margin-top:-100px;position:relative;min-height:200px}.InfoContainer{display:flex;margin-top:17px;justify-content:space-between;flex-direction:column}.Gift{display:block;margin-bottom:10px;padding:8px;box-shadow:0px 18px 45px 0px var(--emfe-w-color-black-150, rgba(167, 167, 167, 0.2));border-radius:11px;background:var(--emfe-w-color-white, #FFFFFF)}.Gift .ImgContainer{width:160px;height:107px;border-radius:11px;box-shadow:0px 2px 6px 0px var(--emfe-w-color-black-200, rgba(0, 0, 0, 0.2509803922));cursor:pointer;background-size:cover;background-position:center center;background-repeat:no-repeat}.Gift .Point{font-size:20px}.Gift .Title,.Gift .Description{padding-left:3px}.Gift .Title{font-size:14px;margin-top:10px}.Gift .Description{font-size:12px;color:var(--emfe-w-color-black-100, #767171)}.Gift .AvaliableWrap{align-self:self-end}.Gift .AvaliableWrap.active{cursor:pointer}.Gift .AvaliableWrap.deactive{cursor:not-allowed}.Gift .AvaliableWrap span svg{width:var(--emfe-w-elevate-avaliable-button-size, 46px)}.RedeemButton{width:100%;padding:5px 0px;border:2px solid var(--emw--button-border-color, rgba(8, 59, 23, 0.1098039216));text-align:center;color:var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-bold, 700);line-height:var(--emw--font-size-medium, 14px);text-transform:uppercase;border-radius:var(--emw--border-radius-medium, 20px)}.RedeemButton.active{background:var(--emw--color-primary, #18CE51)}.RedeemButton.active:hover{background:var(--mmw--color-main-button-hover, #24B24E)}.RedeemButton.deactive{background:var(--mmw--color-disabled, rgba(153, 153, 153, 0.5019607843))}.NoContent{font-size:16px;color:var(--emfe-w-color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";const O=["pt-br","en","es-mx","hu","hr"],B={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},N=(t,e,i)=>{const o=e;let s=B[void 0!==o&&O.includes(o)?o:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s},L=class{constructor(t){e(this,t),this.reloadPageEmitter=i(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.displayRangeOfTotal=void 0,this.navItemAccount=5,this.endPageIndex=0,this.pagesArray=void 0,this.currentPage=1,this.showAsEllipsisMid=!this.arrowsActive}pageLimitChangedHandler(t){this.limit=t.detail.limit?t.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==t.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(t){"..."==t||0==t||parseInt(t.toString(),10)>this.endPageIndex+1||(this.currentPage=t,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return t("ul",{class:"PaginationArea"},this.pagesArray.map((e=>t("li",{class:"PageItem "+(this.currentPage==e?"Active":""),onClick:()=>{this.goTo(e)}},e))))}renderStylingWrapper(){return t("general-styling-wrapper",{targetTranslations:B,translationUrl:this.translationUrl})}generateNavItemsByType(t,e){if(this.endPageIndex<t)return Array.from({length:this.endPageIndex+1},((t,e)=>e+1));let i=[],o=Math.floor(t/2);const s=this.endPageIndex+1;return e?this.currentPage<o||this.currentPage>s-o+1?(i=Array.from({length:o},((t,e)=>e+1)),i.push("..."),i=i.concat(Array.from({length:o},((t,e)=>this.endPageIndex-1+e)))):this.currentPage==o?(i=Array.from({length:o+1},((t,e)=>e+1)),i.push("..."),i=i.concat(Array.from({length:o-1},((t,e)=>this.endPageIndex+e)))):this.currentPage==s-o+1?(i=Array.from({length:o-1},((t,e)=>e+1)),i.push("..."),i=i.concat(Array.from({length:o+1},((t,e)=>this.endPageIndex-2+e)))):(i=[1,"..."],i=i.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),i=i.concat(["...",s])):this.currentPage<o-1?(i=Array.from({length:t-1},((t,e)=>e+1)),i.push("...")):this.endPageIndex-this.currentPage<o+1?(i=Array.from({length:t-1},((t,e)=>this.endPageIndex-o+e)),i.unshift("...")):(i=Array.from({length:o+1},((t,e)=>this.currentPage+e-1)),i.push("..."),i.unshift("...")),i}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=this.generateNavItemsByType(this.navItemAccount,this.showAsEllipsisMid)}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return t("div",{key:"aa8d14788833b1b0e13ea20943935b03a3b043ac",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&t("span",{key:"a018261b6c598116829d878b8120aee7ae2576c4",class:"PageOfMessage"},N("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),t("div",{key:"64fc17d0b992b30a4b8d712e47442ee6a2d44b82",class:"PageNavigation"},this.arrowsActive&&t("div",{key:"f5f3b562fbdfb9e4b39ffd9755e5dba41e6231ba",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},N("firstPage",this.language)),this.secondaryArrowsActive&&t("span",{key:"39222e258f6c63502bfd3914c673d804edc96b53",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},N("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&t("span",{key:"d6f9a1394debdae49702713ccc59bea710ccd7ae",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},N("nextPage",this.language)),this.arrowsActive&&t("div",{key:"d2bb76f9d40fcfc3dbc6bb5fbfe6d237e77f0ee6",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",N("lastPage",this.language)," "),this.renderStylingWrapper()))}};L.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row;height:100%;align-content:center}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emfe-w-color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emfe-w-color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emfe-w-color-primary, #f5f1f1);background-color:var(--emfe-w-color-secondary, #8c8989);border-radius:0.3rem}";const j={en:{dateError:"The selected date should be between {min} and {max}",dateError2:"The selected date is not within the accepted range",numberLengthError:"The number should be between {min} and {max}",lengthError:"The length should be between {minLength} and {maxLength}",requiredError:"This input is required.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",passwordStrength:"Password strength",passwordStrengthWeak:"is not adequate",passwordStrengthStrong:"is adequate",SpecialCharactersNotAllowed:"Should not contain special characters",InvalidEmailFormat:"Invalid email format.",EmailNotMatching:"Emails not matching!",PasswordNotMatching:"Passwords not matching",MustIncludeNumber:"Password must include a number",MustContainCapital:"Password must include a capital letter",MustIncludePunctation:"Password must include punctuation",OnlyNumbers:"Should contains only numbers."},hu:{dateError:"A választott dátumnak {min} és {max} között kell lennie",numberLengthError:"A számnak {min} és {max} között kell lennie",lengthError:"A hossznak {minLength} és {maxLength} között kell lennie",requiredError:"Ez a beviteli mező kötelező.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",passwordStrength:"Jelszó erőssége",passwordStrengthWeak:"nem megfelelő",passwordStrengthStrong:"megfelelő",SpecialCharactersNotAllowed:"Nem tartalmazhat speciális karaktereket",InvalidEmailFormat:"Érvénytelen e-mail formátum.",EmailNotMatching:"Az e-mailek nem egyeznek!",PasswordNotMatching:"A jelszavak nem egyeznek",MustIncludeNumber:"A jelszónak tartalmaznia kell egy számot",MustContainCapital:"A jelszónak tartalmaznia kell egy nagybetűt",MustIncludePunctation:"A jelszónak tartalmaznia kell írásjelet",OnlyNumbers:"Csak számokat kell tartalmaznia."},hr:{dateError:"Odabrani datum treba biti između {min} i {max}",dateError2:"Odabrani datum nije unutar prihvaćenog raspona",numberLengthError:"Broj bi trebao biti između {min} i {max}",lengthError:"Duljina bi trebala biti između {minLength} i {maxLength}",requiredError:"Ovaj unos je obavezan.",invalidOriginalPasswordError:"Lozinke se ne podudaraju",passwordStrength:"Lozinka",passwordStrengthWeak:"nije dovoljno jaka",passwordStrengthStrong:"je dovoljno jaka",SpecialCharactersNotAllowed:"Ne smije sadržavati posebne znakove",InvalidEmailFormat:"Nevažeći format e-maila",EmailNotMatching:"E-mailovi se ne podudaraju!",PasswordNotMatching:"Lozinke se ne podudaraju",MustIncludeNumber:"Lozinka mora sadržavati broj",MustContainCapital:"Lozinka mora sadržavati veliko slovo",MustIncludePunctation:"Lozinka mora sadržavati barem jedan znak",OnlyNumbers:"Treba sadržavati samo brojeve."},tr:{dateError:"Seçilen tarih {min} ve {max} arasında olmalıdır",dateError2:"Seçilen tarih kabul edilen aralıkta değil",numberLengthError:"Sayı {min} ve {max} arasında olmalıdır",lengthError:"Uzunluk {minLength} ve {maxLength} arasında olmalıdır",requiredError:"Bu alan zorunludur.",invalidOriginalPasswordError:"İlk şifre alanı tüm kriterleri karşılamıyor.",passwordStrength:"Şifre gücü",passwordStrengthWeak:"yetersiz",passwordStrengthStrong:"yeterli",SpecialCharactersNotAllowed:"Özel karakter içermemelidir",InvalidEmailFormat:"Geçersiz e-posta formatı.",EmailNotMatching:"E-postalar uyuşmuyor!",PasswordNotMatching:"Şifreler uyuşmuyor",MustIncludeNumber:"bir sayı içermelidir",MustContainCapital:"büyük harf içermelidir",MustIncludePunctation:"noktalama işareti içermelidir",OnlyNumbers:"Sadece sayılar içermelidir."},"pt-br":{dateError:"A data selecionada deve estar entre {min} e {max}",dateError2:"A data selecionada não está dentro de um intervalo válido",numberLengthError:"O número deve estar entre {min} e {max}",lengthError:"O comprimento deve estar entre {minLength} e {maxLength}",requiredError:"Este campo é obrigatório",invalidOriginalPasswordError:"O campo de senha inicial não faz parte dos critérios válidos",PasswordStrength:"Força da senha",PasswordStrengthWeak:"Não é adequado",PasswordStrengthStrong:"é apropriado",SpecialCharactersNotAllowed:"Não deve conter caracteres especiais",InvalidEmailFormat:"Formato de email inválido",EmailNotMatching:"E-mail não corresponde",PasswordNotMatching:"Senha não corresponde",MustIncludeNumber:"A senha deve incluir um número",MustContainCapital:"A senha deve incluir uma letra maiúscula",MustIncludePunctation:"A senha deve incluir um sinal de pontuação",OnlyNumbers:"Deve conter apenas números"},"es-mx":{dateError:"La fecha seleccionada debe ser entre {min} y {max}",dateError2:"La fecha seleccionada no está dentro de un rango válido",numberLengthError:"El número debe ser entre {min} y {max}",lengthError:"La longitud deber ser entre {minLength} y {maxLength}",requiredError:"Este campo es requerido",invalidOriginalPasswordError:"El campo de contraseña inicial no es parte del criterio válido",PasswordStrength:"La fortaleza de la contraseña",PasswordStrengthWeak:"no es adecuada",PasswordStrengthStrong:"es adecuada",SpecialCharactersNotAllowed:"No debe contener caracteres especiales",InvalidEmailFormat:"Formato inválido de correo",EmailNotMatching:"El correo electrónico no coincide",PasswordNotMatching:"La contraseña no coincide",MustIncludeNumber:"La contraseña debe incluir un número",MustContainCapital:"La contraseña debe incluir una letra mayúscula",MustIncludePunctation:"La contraseña debe incluir un signo de puntuación",OnlyNumbers:"Solo debe contener números"}},R=(t,e,i)=>{let o=j[void 0!==e?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},q='<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="6" cy="6" r="5.5" stroke="#979797"/>\n<rect x="5" y="5" width="2" height="5" fill="#979797"/>\n<circle cx="6" cy="3" r="1" fill="#979797"/>\n</svg>\n';
1
+ import{h as t,r as e,c as i,g as o,H as s,a as r,F as a}from"./p-67465a46.js";import{_ as n,g as l,s as h,a as c,r as d,t as u,b as p,c as m,d as f,e as v,l as b,f as g,h as y,i as w,j as x,k as _,m as k,n as A,o as C,T as z,P as E,p as I,q as T}from"./p-a63058b5.js";async function S(t,e={},i={}){const{endpoint:o,language:s,session:r}=this,a=e;i.method&&"GET"!==i.method||(a.language=s);const n=((t,e={})=>t+"?"+Object.keys(e).map((t=>`${t}=${e[t]}`)).join("&"))(`${o}${t}`,a);i.headers||(i.headers={}),i.headers["x-SessionId"]=r;const l=await(async(t,e={})=>{let i;i=await fetch(t,e),i=await i.text();try{i=JSON.parse(i)}catch(t){console.error(t)}return i})(n,i);return l}const P={en:{Points:"Points",Point:"Point",noContent:"No Content",redeemGift:"Redeem Gift",perPage:"Per Page"}},D=(e,i,o)=>t("div",{class:"Gifts FlexLayout"},e.map((e=>{var s;const r=((t,e)=>{switch(t.available){case"true":return{extraClass:" active",onClick:()=>e(t.id)};case"false":return{extraClass:" deactive",onClick:()=>{}}}})(e,o),a=e.presentation;return t("div",{class:"Gift"},t("div",{class:"ImgContainer",onClick:()=>window.postMessage({type:"BEEShopImgClicked",itemId:e.id},window.location.href),style:Object.assign({},(n=(null===(s=a.assets)||void 0===s?void 0:s.length)>0?a.assets[0]:"",n?{backgroundImage:`url('${n}')`}:{}))}),t("div",{class:"InfoContainer"},t("div",null,t("div",{class:"Point"},e.points," ",1===e.points?i.Point:i.Points),t("div",{class:"Title"},(null==a?void 0:a.displayName)||e.displayName),t("div",{class:"Description"},(null==a?void 0:a.description)||"")),t("div",{class:`AvaliableWrap RedeemButton ${r.extraClass}`,onClick:r.onClick},i.redeemGift)));var n})));var M={};if(function(t){var e=Object.defineProperty,i=Object.defineProperties,o=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,n=(t,i,o)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[i]=o,l=(t,e)=>{for(var i in e||(e={}))r.call(e,i)&&n(t,i,e[i]);if(s)for(var i of s(e))a.call(e,i)&&n(t,i,e[i]);return t},h=(t,e)=>i(t,o(e)),c=(t,e,i)=>n(t,"symbol"!=typeof e?e+"":e,i);function d(){}function u(t){return t()}function p(){return Object.create(null)}function m(t){t.forEach(u)}function f(t){return"function"==typeof t}function v(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function b(t,e,i){t.insertBefore(e,i||null)}function g(t){t.parentNode&&t.parentNode.removeChild(t)}function y(t){return document.createElement(t)}let w;function x(t){w=t}Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const _=[],k=[];let A=[];const C=[],z=Promise.resolve();let E=!1;function I(t){A.push(t)}const T=new Set;let S=0;function P(){if(0!==S)return;const t=w;do{try{for(;S<_.length;){const t=_[S];S++,x(t),D(t.$$)}}catch(t){throw _.length=0,S=0,t}for(x(null),_.length=0,S=0;k.length;)k.pop()();for(let t=0;t<A.length;t+=1){const e=A[t];T.has(e)||(T.add(e),e())}A.length=0}while(_.length);for(;C.length;)C.pop()();E=!1,T.clear(),x(t)}function D(t){if(null!==t.fragment){t.update(),m(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(I)}}const M=new Set;function F(t,e,i,o,s,r,a=null,n=[-1]){const l=w;x(t);const h=t.$$={fragment:null,ctx:[],props:r,update:d,not_equal:s,bound:p(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:p(),dirty:n,skip_bound:!1,root:e.target||l.$$.root};a&&a(h.root);let c=!1;if(h.ctx=i?i(t,e.props||{},((e,i,...o)=>{const r=o.length?o[0]:i;return h.ctx&&s(h.ctx[e],h.ctx[e]=r)&&(!h.skip_bound&&h.bound[e]&&h.bound[e](r),c&&function(t,e){-1===t.$$.dirty[0]&&(_.push(t),E||(E=!0,z.then(P)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(t,e)),i})):[],h.update(),c=!0,m(h.before_update),h.fragment=!!o&&o(h.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);h.fragment&&h.fragment.l(t),t.forEach(g)}else h.fragment&&h.fragment.c();e.intro&&function(t){t&&t.i&&(M.delete(t),t.i(void 0))}(t.$$.fragment),function(t,e,i){const{fragment:o,after_update:s}=t.$$;o&&o.m(e,i),I((()=>{const e=t.$$.on_mount.map(u).filter(f);t.$$.on_destroy?t.$$.on_destroy.push(...e):m(e),t.$$.on_mount=[]})),s.forEach(I)}(t,e.target,e.anchor),P()}x(l)}let O;function B(t,e,i,o){var s;const r=null==(s=i[t])?void 0:s.type;if(e="Boolean"===r&&"boolean"!=typeof e?null!=e:e,!o||!i[t])return e;if("toAttribute"===o)switch(r){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}"function"==typeof HTMLElement&&(O=class extends HTMLElement{constructor(t,e,i){super(),c(this,"$$ctor"),c(this,"$$s"),c(this,"$$c"),c(this,"$$cn",!1),c(this,"$$d",{}),c(this,"$$r",!1),c(this,"$$p_d",{}),c(this,"$$l",{}),c(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=e,i&&this.attachShadow({mode:"open"})}addEventListener(t,e,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const i=this.$$c.$on(t,e);this.$$l_u.set(e,i)}super.addEventListener(t,e,i)}removeEventListener(t,e,i){if(super.removeEventListener(t,e,i),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}connectedCallback(){return((t,e,i)=>new Promise(((e,o)=>{var s=t=>{try{a(i.next(t))}catch(t){o(t)}},r=t=>{try{a(i.throw(t))}catch(t){o(t)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(s,r);a((i=i.apply(t,null)).next())})))(this,0,(function*(){if(this.$$cn=!0,!this.$$c){let t=function(t){return()=>{let e;return{c:function(){e=y("slot"),"default"!==t&&function(t,e,i){null==i?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}(e,"name",t)},m:function(t,i){b(t,e,i)},d:function(t){t&&g(e)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const e={},i=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const o of this.$$s)o in i&&(e[o]=[t(o)]);for(const t of this.attributes){const e=this.$$g_p(t.name);e in this.$$d||(this.$$d[e]=B(e,t.value,this.$$p_d,"toProp"))}for(const t in this.$$p_d)!(t in this.$$d)&&void 0!==this[t]&&(this.$$d[t]=this[t],delete this[t]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:h(l({},this.$$d),{$$slots:e,$$scope:{ctx:[]}})});const o=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=B(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(this.$$p_d[t].attribute||t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const t in this.$$l)for(const e of this.$$l[t]){const i=this.$$c.$on(t,e);this.$$l_u.set(e,i)}this.$$l={}}}))}attributeChangedCallback(t,e,i){var o;this.$$r||(t=this.$$g_p(t),this.$$d[t]=B(t,i,this.$$p_d,"toProp"),null==(o=this.$$c)||o.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});class N{constructor(){c(this,"$$"),c(this,"$$set")}$destroy(){(function(t,e){const i=t.$$;null!==i.fragment&&(function(t){const e=[],i=[];A.forEach((o=>-1===t.indexOf(o)?e.push(o):i.push(o))),i.forEach((t=>t())),A=e}(i.after_update),m(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])})(this,1),this.$destroy=d}$on(t,e){if(!f(e))return d;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(e),()=>{const t=i.indexOf(e);-1!==t&&i.splice(t,1)}}$set(t){this.$$set&&!function(t){return 0===Object.keys(t).length}(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function L(t){!function(t,e,i){const o=function(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}(t);if(!o.getElementById(e)){const t=y("style");t.id=e,t.textContent=i,function(t,e){!function(t,e){t.appendChild(e)}(t.head||t,e)}(o,t)}}(t,"svelte-gnt082",".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}")}function j(t){let e;return{c(){e=y("div"),e.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>'},m(i,o){b(i,e,o),t[3](e)},p:d,i:d,o:d,d(i){i&&g(e),t[3](null)}}}function R(t,e,i){let o,{clientstyling:s=""}=e,{clientstylingurl:r=""}=e;return t.$$set=t=>{"clientstyling"in t&&i(1,s=t.clientstyling),"clientstylingurl"in t&&i(2,r=t.clientstylingurl)},t.$$.update=()=>{3&t.$$.dirty&&s&&o&&(()=>{let t=document.createElement("style");t.innerHTML=s,o.appendChild(t)})(),5&t.$$.dirty&&r&&o&&(()=>{let t=new URL(r),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{o.appendChild(e)}),1),setTimeout((()=>{}),500)}))})()},[o,s,r,function(t){k[t?"unshift":"push"]((()=>{o=t,i(0,o)}))}]}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");class q extends N{constructor(t){super(),F(this,t,R,j,v,{clientstyling:1,clientstylingurl:2},L)}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),P()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),P()}}!function(t,e,i){let o=class extends O{constructor(){super(t,i,true),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map((t=>(e[t].attribute||t).toLowerCase()))}};Object.keys(e).forEach((t=>{Object.defineProperty(o.prototype,t,{get(){return this.$$c&&t in this.$$c?this.$$c[t]:this.$$d[t]},set(i){var o;i=B(t,i,e),this.$$d[t]=i,null==(o=this.$$c)||o.$set({[t]:i})}})})),[].forEach((t=>{Object.defineProperty(o.prototype,t,{get(){var e;return null==(e=this.$$c)?void 0:e[t]}})})),t.element=o}(q,{clientstyling:{},clientstylingurl:{}},[]),t.default=q}(M),"undefined"!=typeof window){let t=function(t){return function(...e){try{return t.apply(this,e)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=t(customElements.define),Promise.resolve().then((()=>M)).then((({default:t})=>{!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",t.element)}))}const F=class{constructor(t){e(this,t),this.redeemGiftButton=i(this,"redeemGiftButton",7),this.bindedHandler=this.handleMessage.bind(this),this.session=void 0,this.endpoint=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.limit=10,this.navItemAccount=5,this.pageLimitOptions="10,25,50",this.locale=P.en,this.gifts=[],this.total=0,this.offset=0,this.shopListId="elevateShopList",this.isLoading=!0,this.pageLimitSelectOptions=[]}async updateGifts(){if(this.isLoading=!0,this.session){const{data:t,total:e}=await S.bind(this,"/v1/elevate/shop",{pagination:`offset=${this.offset},limit=${this.limit}`}).call();this.gifts=t||[],this.total=e}else this.gifts=[],this.total=0;this.isLoading=!1}redeemGiftConfirm(t){const e=this.gifts.filter((e=>e.id===t))[0];window.postMessage({type:"BEERedeemConfirm",shopItem:e},window.location.href)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}async redeemGift(t){const e=await S.bind(this,"/v1/elevate/redeem",{},{method:"PUT",body:JSON.stringify({giftID:t}),headers:{"Content-Type":"application/json-patch+json"}}).call();e.success?(this.redeemGiftButton.emit(),window.postMessage({type:"BEEGiftRedeem",itemId:t},window.location.href)):window.postMessage({type:"BEEGiftRedeemFailed",itemId:t,err:e},window.location.href)}loadGifts(e){return this.isLoading?t("general-animation-loading",null):0===this.gifts.length?t("div",{class:"NoContent"},this.locale.noContent):e()}setLimit(){try{const t=this.pageLimitOptions.split(",").map((t=>parseInt(t)));t.includes(this.limit)||(this.limit=t[0])}catch(t){console.error("Error when parse PageLimitOptions",t),this.limit=10}}onPageLimitChangedHandler(t){var e;"pageLimits"===(null===(e=t.detail)||void 0===e?void 0:e.name)&&(this.limit=parseInt(t.detail.value||"10"),this.offset=0,this.updateGifts())}reloadPageByTypeHandler(t){var e;if((null===(e=t.detail)||void 0===e?void 0:e.tableId)!=this.shopListId)return;const{limit:i,offset:o}=t.detail;this.limit=i,this.offset=o||0,this.updateGifts()}componentWillLoad(){this.setLimit(),this.pageLimitSelectOptions=this.pageLimitOptions.split(",").map((t=>({label:t,value:t})))}render(){return t("main",{key:"135d01ccaa1105641aa2345bd2af27b13f5f1b04",class:"MainContainer"},t("general-styling-wrapper",{key:"c317cb2b2effefe469c799ae3242c1f20d4d8753",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:P,translationUrl:this.translationUrl}),t("player-elevate-pointcard",{key:"bee27d1c5d0a6d62c201cad906367e43eceaa9b1",endpoint:this.endpoint,session:this.session,language:this.language,clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,translationUrl:this.translationUrl}),this.loadGifts(D.bind(this,this.gifts,this.locale,this.redeemGiftConfirm.bind(this))),t("div",{key:"72642c0a3022a878a2411d0af1c7d65fd0488e0e",class:"ShopBottom"},t("bonus-pagination-nav",{key:"259d3b002d552db990cfe1780650080f1400aaba",total:this.total,offset:this.offset,limit:this.limit,tableId:this.shopListId,"nav-item-account":7,arrowsActive:!1,"display-page-numbers":"true"}),t("general-input",{key:"15bd9af43ef59a0c606ab90b5ac0f967507b9edd",type:"dropdown",name:"pageLimits",displayName:this.locale.perPage,defaultValue:this.limit,validation:{mandatory:!1},options:this.pageLimitSelectOptions,emitValue:!0,language:this.language})))}handleMessage(t){"bee-redeem-confirmed"===t.data.type&&t.data.id&&this.redeemGift(t.data.id)}async componentDidLoad(){this.updateGifts(),window.addEventListener("message",this.bindedHandler,!1)}static get assetsDirs(){return["static"]}static get watchers(){return{endpoint:["updateGifts"],language:["updateGifts"],session:["updateGifts"]}}};F.style=":host{display:block}svg circle{shape-rendering:crispEdges}.MainContainer{max-width:420px}.MainContainer player-elevate-pointcard{width:100%;height:220px}.MainContainer .ShopBottom{display:flex;flex-direction:row;justify-content:space-between}.Gifts{display:flex;justify-content:space-between;padding:15px;padding-left:-8px;padding-right:-8px;flex:0 0 45.1282051282%;flex-wrap:wrap;justify-content:flex-start;background:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-color-black-150, #000000);font-weight:500;gap:10px;margin-top:-100px;position:relative;min-height:200px}.InfoContainer{display:flex;margin-top:17px;justify-content:space-between;flex-direction:column}.Gift{display:block;margin-bottom:10px;padding:8px;box-shadow:0px 18px 45px 0px var(--emfe-w-color-black-150, rgba(167, 167, 167, 0.2));border-radius:11px;background:var(--emfe-w-color-white, #FFFFFF)}.Gift .ImgContainer{width:160px;height:107px;border-radius:11px;box-shadow:0px 2px 6px 0px var(--emfe-w-color-black-200, rgba(0, 0, 0, 0.2509803922));cursor:pointer;background-size:cover;background-position:center center;background-repeat:no-repeat}.Gift .Point{font-size:20px}.Gift .Title,.Gift .Description{padding-left:3px}.Gift .Title{font-size:14px;margin-top:10px}.Gift .Description{font-size:12px;color:var(--emfe-w-color-black-100, #767171)}.Gift .AvaliableWrap{align-self:self-end}.Gift .AvaliableWrap.active{cursor:pointer}.Gift .AvaliableWrap.deactive{cursor:not-allowed}.Gift .AvaliableWrap span svg{width:var(--emfe-w-elevate-avaliable-button-size, 46px)}.RedeemButton{width:100%;padding:5px 0px;border:2px solid var(--emw--button-border-color, rgba(8, 59, 23, 0.1098039216));text-align:center;color:var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-bold, 700);line-height:var(--emw--font-size-medium, 14px);text-transform:uppercase;border-radius:var(--emw--border-radius-medium, 20px)}.RedeemButton.active{background:var(--emw--color-primary, #18CE51)}.RedeemButton.active:hover{background:var(--mmw--color-main-button-hover, #24B24E)}.RedeemButton.deactive{background:var(--mmw--color-disabled, rgba(153, 153, 153, 0.5019607843))}.NoContent{font-size:16px;color:var(--emfe-w-color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";const O=["pt-br","en","es-mx","hu","hr"],B={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},N=(t,e,i)=>{const o=e;let s=B[void 0!==o&&O.includes(o)?o:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s},L=class{constructor(t){e(this,t),this.reloadPageEmitter=i(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.displayRangeOfTotal=void 0,this.navItemAccount=5,this.endPageIndex=0,this.pagesArray=void 0,this.currentPage=1,this.showAsEllipsisMid=!this.arrowsActive}pageLimitChangedHandler(t){this.limit=t.detail.limit?t.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==t.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(t){"..."==t||0==t||parseInt(t.toString(),10)>this.endPageIndex+1||(this.currentPage=t,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return t("ul",{class:"PaginationArea"},this.pagesArray.map((e=>t("li",{class:"PageItem "+(this.currentPage==e?"Active":""),onClick:()=>{this.goTo(e)}},e))))}renderStylingWrapper(){return t("general-styling-wrapper",{targetTranslations:B,translationUrl:this.translationUrl})}generateNavItemsByType(t,e){if(this.endPageIndex<t)return Array.from({length:this.endPageIndex+1},((t,e)=>e+1));let i=[],o=Math.floor(t/2);const s=this.endPageIndex+1;return e?this.currentPage<o||this.currentPage>s-o+1?(i=Array.from({length:o},((t,e)=>e+1)),i.push("..."),i=i.concat(Array.from({length:o},((t,e)=>this.endPageIndex-1+e)))):this.currentPage==o?(i=Array.from({length:o+1},((t,e)=>e+1)),i.push("..."),i=i.concat(Array.from({length:o-1},((t,e)=>this.endPageIndex+e)))):this.currentPage==s-o+1?(i=Array.from({length:o-1},((t,e)=>e+1)),i.push("..."),i=i.concat(Array.from({length:o+1},((t,e)=>this.endPageIndex-2+e)))):(i=[1,"..."],i=i.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),i=i.concat(["...",s])):this.currentPage<o-1?(i=Array.from({length:t-1},((t,e)=>e+1)),i.push("...")):this.endPageIndex-this.currentPage<o+1?(i=Array.from({length:t-1},((t,e)=>this.endPageIndex-o+e)),i.unshift("...")):(i=Array.from({length:o+1},((t,e)=>this.currentPage+e-1)),i.push("..."),i.unshift("...")),i}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=this.generateNavItemsByType(this.navItemAccount,this.showAsEllipsisMid)}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return t("div",{key:"aa8d14788833b1b0e13ea20943935b03a3b043ac",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&t("span",{key:"a018261b6c598116829d878b8120aee7ae2576c4",class:"PageOfMessage"},N("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),t("div",{key:"64fc17d0b992b30a4b8d712e47442ee6a2d44b82",class:"PageNavigation"},this.arrowsActive&&t("div",{key:"f5f3b562fbdfb9e4b39ffd9755e5dba41e6231ba",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},N("firstPage",this.language)),this.secondaryArrowsActive&&t("span",{key:"39222e258f6c63502bfd3914c673d804edc96b53",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},N("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&t("span",{key:"d6f9a1394debdae49702713ccc59bea710ccd7ae",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},N("nextPage",this.language)),this.arrowsActive&&t("div",{key:"d2bb76f9d40fcfc3dbc6bb5fbfe6d237e77f0ee6",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",N("lastPage",this.language)," "),this.renderStylingWrapper()))}};L.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row;height:100%;align-content:center}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emfe-w-color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emfe-w-color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emfe-w-color-primary, #f5f1f1);background-color:var(--emfe-w-color-secondary, #8c8989);border-radius:0.3rem}";const j={en:{dateError:"The selected date should be between {min} and {max}",dateError2:"The selected date is not within the accepted range",numberLengthError:"The number should be between {min} and {max}",lengthError:"The length should be between {minLength} and {maxLength}",requiredError:"This input is required.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",passwordStrength:"Password strength",passwordStrengthWeak:"is not adequate",passwordStrengthStrong:"is adequate",SpecialCharactersNotAllowed:"Should not contain special characters",InvalidEmailFormat:"Invalid email format.",EmailNotMatching:"Emails not matching!",PasswordNotMatching:"Passwords not matching",MustIncludeNumber:"Password must include a number",MustContainCapital:"Password must include a capital letter",MustIncludePunctation:"Password must include punctuation",OnlyNumbers:"Should contains only numbers.",InvalidFieldSize:"The length must be exactly 11 digits."},hu:{dateError:"A választott dátumnak {min} és {max} között kell lennie",numberLengthError:"A számnak {min} és {max} között kell lennie",lengthError:"A hossznak {minLength} és {maxLength} között kell lennie",requiredError:"Ez a beviteli mező kötelező.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",passwordStrength:"Jelszó erőssége",passwordStrengthWeak:"nem megfelelő",passwordStrengthStrong:"megfelelő",SpecialCharactersNotAllowed:"Nem tartalmazhat speciális karaktereket",InvalidEmailFormat:"Érvénytelen e-mail formátum.",EmailNotMatching:"Az e-mailek nem egyeznek!",PasswordNotMatching:"A jelszavak nem egyeznek",MustIncludeNumber:"A jelszónak tartalmaznia kell egy számot",MustContainCapital:"A jelszónak tartalmaznia kell egy nagybetűt",MustIncludePunctation:"A jelszónak tartalmaznia kell írásjelet",OnlyNumbers:"Csak számokat kell tartalmaznia.",InvalidFieldSize:"A hosszúságnak pontosan 11 számjegynek kell lennie."},hr:{dateError:"Odabrani datum treba biti između {min} i {max}",dateError2:"Odabrani datum nije unutar prihvaćenog raspona",numberLengthError:"Broj bi trebao biti između {min} i {max}",lengthError:"Duljina bi trebala biti između {minLength} i {maxLength}",requiredError:"Ovaj unos je obavezan.",invalidOriginalPasswordError:"Lozinke se ne podudaraju",passwordStrength:"Lozinka",passwordStrengthWeak:"nije dovoljno jaka",passwordStrengthStrong:"je dovoljno jaka",SpecialCharactersNotAllowed:"Ne smije sadržavati posebne znakove",InvalidEmailFormat:"Nevažeći format e-maila",EmailNotMatching:"E-mailovi se ne podudaraju!",PasswordNotMatching:"Lozinke se ne podudaraju",MustIncludeNumber:"Lozinka mora sadržavati broj",MustContainCapital:"Lozinka mora sadržavati veliko slovo",MustIncludePunctation:"Lozinka mora sadržavati barem jedan znak",OnlyNumbers:"Treba sadržavati samo brojeve.",InvalidFieldSize:"Dužina mora biti točno 11 znamenki."},tr:{dateError:"Seçilen tarih {min} ve {max} arasında olmalıdır",dateError2:"Seçilen tarih kabul edilen aralıkta değil",numberLengthError:"Sayı {min} ve {max} arasında olmalıdır",lengthError:"Uzunluk {minLength} ve {maxLength} arasında olmalıdır",requiredError:"Bu alan zorunludur.",invalidOriginalPasswordError:"İlk şifre alanı tüm kriterleri karşılamıyor.",passwordStrength:"Şifre gücü",passwordStrengthWeak:"yetersiz",passwordStrengthStrong:"yeterli",SpecialCharactersNotAllowed:"Özel karakter içermemelidir",InvalidEmailFormat:"Geçersiz e-posta formatı.",EmailNotMatching:"E-postalar uyuşmuyor!",PasswordNotMatching:"Şifreler uyuşmuyor",MustIncludeNumber:"bir sayı içermelidir",MustContainCapital:"büyük harf içermelidir",MustIncludePunctation:"noktalama işareti içermelidir",OnlyNumbers:"Sadece sayılar içermelidir.",InvalidFieldSize:"Uzunluk tam olarak 11 rakam olmalıdır."},"pt-br":{dateError:"A data selecionada deve estar entre {min} e {max}",dateError2:"A data selecionada não está dentro de um intervalo válido",numberLengthError:"O número deve estar entre {min} e {max}",lengthError:"O comprimento deve estar entre {minLength} e {maxLength}",requiredError:"Este campo é obrigatório",invalidOriginalPasswordError:"O campo de senha inicial não faz parte dos critérios válidos",PasswordStrength:"Força da senha",PasswordStrengthWeak:"Não é adequado",PasswordStrengthStrong:"é apropriado",SpecialCharactersNotAllowed:"Não deve conter caracteres especiais",InvalidEmailFormat:"Formato de email inválido",EmailNotMatching:"E-mail não corresponde",PasswordNotMatching:"Senha não corresponde",MustIncludeNumber:"A senha deve incluir um número",MustContainCapital:"A senha deve incluir uma letra maiúscula",MustIncludePunctation:"A senha deve incluir um sinal de pontuação",OnlyNumbers:"Deve conter apenas números",InvalidFieldSize:"O comprimento deve ser exatamente 11 dígitos."},"es-mx":{dateError:"La fecha seleccionada debe ser entre {min} y {max}",dateError2:"La fecha seleccionada no está dentro de un rango válido",numberLengthError:"El número debe ser entre {min} y {max}",lengthError:"La longitud deber ser entre {minLength} y {maxLength}",requiredError:"Este campo es requerido",invalidOriginalPasswordError:"El campo de contraseña inicial no es parte del criterio válido",PasswordStrength:"La fortaleza de la contraseña",PasswordStrengthWeak:"no es adecuada",PasswordStrengthStrong:"es adecuada",SpecialCharactersNotAllowed:"No debe contener caracteres especiales",InvalidEmailFormat:"Formato inválido de correo",EmailNotMatching:"El correo electrónico no coincide",PasswordNotMatching:"La contraseña no coincide",MustIncludeNumber:"La contraseña debe incluir un número",MustContainCapital:"La contraseña debe incluir una letra mayúscula",MustIncludePunctation:"La contraseña debe incluir un signo de puntuación",OnlyNumbers:"Solo debe contener números",InvalidFieldSize:"La longitud debe ser exactamente de 11 dígitos."}},R=(t,e,i)=>{let o=j[void 0!==e?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},q='<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="6" cy="6" r="5.5" stroke="#979797"/>\n<rect x="5" y="5" width="2" height="5" fill="#979797"/>\n<circle cx="6" cy="3" r="1" fill="#979797"/>\n</svg>\n';
2
2
  /**
3
3
  * @license
4
4
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
@@ -26,7 +26,7 @@ const W=window,G=W.ShadowRoot&&(void 0===W.ShadyCSS||W.ShadyCSS.nativeShadow)&&"
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  */
29
- var nt;at[rt]=!0,at.elementProperties=new Map,at.elementStyles=[],at.shadowRootOptions={mode:"open"},null==et||et({ReactiveElement:at}),(null!==(K=Q.reactiveElementVersions)&&void 0!==K?K:Q.reactiveElementVersions=[]).push("1.6.3");const lt=window,ht=lt.trustedTypes,ct=ht?ht.createPolicy("lit-html",{createHTML:t=>t}):void 0,dt="$lit$",ut=`lit$${(Math.random()+"").slice(9)}$`,pt="?"+ut,mt=`<${pt}>`,ft=document,vt=()=>ft.createComment(""),bt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,gt=Array.isArray,yt="[ \t\n\f\r]",wt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xt=/-->/g,_t=/>/g,kt=RegExp(`>|${yt}(?:([^\\s"'>=/]+)(${yt}*=${yt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),At=/'/g,Ct=/"/g,zt=/^(?:script|style|textarea|title)$/i,Et=Symbol.for("lit-noChange"),Tt=Symbol.for("lit-nothing"),It=new WeakMap,Pt=ft.createTreeWalker(ft,129,null,!1);function St(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==ct?ct.createHTML(e):e}const Dt=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":"",a=wt;for(let e=0;e<i;e++){const i=t[e];let n,l,h=-1,c=0;for(;c<i.length&&(a.lastIndex=c,l=a.exec(i),null!==l);)c=a.lastIndex,a===wt?"!--"===l[1]?a=xt:void 0!==l[1]?a=_t:void 0!==l[2]?(zt.test(l[2])&&(s=RegExp("</"+l[2],"g")),a=kt):void 0!==l[3]&&(a=kt):a===kt?">"===l[0]?(a=null!=s?s:wt,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?kt:'"'===l[3]?Ct:At):a===Ct||a===At?a=kt:a===xt||a===_t?a=wt:(a=kt,s=void 0);const d=a===kt&&t[e+1].startsWith("/>")?" ":"";r+=a===wt?i+mt:h>=0?(o.push(n),i.slice(0,h)+dt+i.slice(h)+ut+d):i+ut+(-2===h?(o.push(void 0),e):d)}return[St(t,r+(t[i]||"<?>")+(2===e?"</svg>":"")),o]};class Mt{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const a=t.length-1,n=this.parts,[l,h]=Dt(t,e);if(this.el=Mt.createElement(l,i),Pt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=Pt.nextNode())&&n.length<a;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(dt)||e.startsWith(ut)){const i=h[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+dt).split(ut),e=/([.?@])?(.*)/.exec(i);n.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?Lt:"?"===e[1]?Rt:"@"===e[1]?qt:Nt})}else n.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(zt.test(o.tagName)){const t=o.textContent.split(ut),e=t.length-1;if(e>0){o.textContent=ht?ht.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],vt()),Pt.nextNode(),n.push({type:2,index:++s});o.append(t[e],vt())}}}else if(8===o.nodeType)if(o.data===pt)n.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(ut,t+1));)n.push({type:7,index:s}),t+=ut.length-1}s++}}static createElement(t,e){const i=ft.createElement("template");return i.innerHTML=t,i}}function Ft(t,e,i=t,o){var s,r,a,n;if(e===Et)return e;let l=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const h=bt(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,o)),void 0!==o?(null!==(a=(n=i)._$Co)&&void 0!==a?a:n._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=Ft(t,l._$AS(t,e.values),l,o)),e}class Ot{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:ft).importNode(i,!0);Pt.currentNode=s;let r=Pt.nextNode(),a=0,n=0,l=o[0];for(;void 0!==l;){if(a===l.index){let e;2===l.type?e=new Bt(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new Vt(r,this,t)),this._$AV.push(e),l=o[++n]}a!==(null==l?void 0:l.index)&&(r=Pt.nextNode(),a++)}return Pt.currentNode=ft,s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Bt{constructor(t,e,i,o){var s;this.type=2,this._$AH=Tt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ft(this,t,e),bt(t)?t===Tt||null==t||""===t?(this._$AH!==Tt&&this._$AR(),this._$AH=Tt):t!==this._$AH&&t!==Et&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>gt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Tt&&bt(this._$AH)?this._$AA.nextSibling.data=t:this.$(ft.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Mt.createElement(St(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new Ot(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=It.get(t.strings);return void 0===e&&It.set(t.strings,e=new Mt(t)),e}T(t){gt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new Bt(this.k(vt()),this.k(vt()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Nt{constructor(t,e,i,o,s){this.type=1,this._$AH=Tt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Tt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=Ft(this,t,e,0),r=!bt(t)||t!==this._$AH&&t!==Et,r&&(this._$AH=t);else{const o=t;let a,n;for(t=s[0],a=0;a<s.length-1;a++)n=Ft(this,o[i+a],e,a),n===Et&&(n=this._$AH[a]),r||(r=!bt(n)||n!==this._$AH[a]),n===Tt?t=Tt:t!==Tt&&(t+=(null!=n?n:"")+s[a+1]),this._$AH[a]=n}r&&!o&&this.j(t)}j(t){t===Tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Lt extends Nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Tt?void 0:t}}const jt=ht?ht.emptyScript:"";class Rt extends Nt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Tt?this.element.setAttribute(this.name,jt):this.element.removeAttribute(this.name)}}class qt extends Nt{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Ft(this,t,e,0))&&void 0!==i?i:Tt)===Et)return;const o=this._$AH,s=t===Tt&&o!==Tt||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==Tt&&(o===Tt||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class Vt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Ft(this,t)}}const Ut=lt.litHtmlPolyfillSupport;
29
+ var nt;at[rt]=!0,at.elementProperties=new Map,at.elementStyles=[],at.shadowRootOptions={mode:"open"},null==et||et({ReactiveElement:at}),(null!==(K=Q.reactiveElementVersions)&&void 0!==K?K:Q.reactiveElementVersions=[]).push("1.6.3");const lt=window,ht=lt.trustedTypes,ct=ht?ht.createPolicy("lit-html",{createHTML:t=>t}):void 0,dt="$lit$",ut=`lit$${(Math.random()+"").slice(9)}$`,pt="?"+ut,mt=`<${pt}>`,ft=document,vt=()=>ft.createComment(""),bt=t=>null===t||"object"!=typeof t&&"function"!=typeof t,gt=Array.isArray,yt="[ \t\n\f\r]",wt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xt=/-->/g,_t=/>/g,kt=RegExp(`>|${yt}(?:([^\\s"'>=/]+)(${yt}*=${yt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),At=/'/g,Ct=/"/g,zt=/^(?:script|style|textarea|title)$/i,Et=Symbol.for("lit-noChange"),It=Symbol.for("lit-nothing"),Tt=new WeakMap,St=ft.createTreeWalker(ft,129,null,!1);function Pt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==ct?ct.createHTML(e):e}const Dt=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":"",a=wt;for(let e=0;e<i;e++){const i=t[e];let n,l,h=-1,c=0;for(;c<i.length&&(a.lastIndex=c,l=a.exec(i),null!==l);)c=a.lastIndex,a===wt?"!--"===l[1]?a=xt:void 0!==l[1]?a=_t:void 0!==l[2]?(zt.test(l[2])&&(s=RegExp("</"+l[2],"g")),a=kt):void 0!==l[3]&&(a=kt):a===kt?">"===l[0]?(a=null!=s?s:wt,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?kt:'"'===l[3]?Ct:At):a===Ct||a===At?a=kt:a===xt||a===_t?a=wt:(a=kt,s=void 0);const d=a===kt&&t[e+1].startsWith("/>")?" ":"";r+=a===wt?i+mt:h>=0?(o.push(n),i.slice(0,h)+dt+i.slice(h)+ut+d):i+ut+(-2===h?(o.push(void 0),e):d)}return[Pt(t,r+(t[i]||"<?>")+(2===e?"</svg>":"")),o]};class Mt{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const a=t.length-1,n=this.parts,[l,h]=Dt(t,e);if(this.el=Mt.createElement(l,i),St.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=St.nextNode())&&n.length<a;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(dt)||e.startsWith(ut)){const i=h[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+dt).split(ut),e=/([.?@])?(.*)/.exec(i);n.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?Lt:"?"===e[1]?Rt:"@"===e[1]?qt:Nt})}else n.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(zt.test(o.tagName)){const t=o.textContent.split(ut),e=t.length-1;if(e>0){o.textContent=ht?ht.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],vt()),St.nextNode(),n.push({type:2,index:++s});o.append(t[e],vt())}}}else if(8===o.nodeType)if(o.data===pt)n.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(ut,t+1));)n.push({type:7,index:s}),t+=ut.length-1}s++}}static createElement(t,e){const i=ft.createElement("template");return i.innerHTML=t,i}}function Ft(t,e,i=t,o){var s,r,a,n;if(e===Et)return e;let l=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const h=bt(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,o)),void 0!==o?(null!==(a=(n=i)._$Co)&&void 0!==a?a:n._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=Ft(t,l._$AS(t,e.values),l,o)),e}class Ot{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:ft).importNode(i,!0);St.currentNode=s;let r=St.nextNode(),a=0,n=0,l=o[0];for(;void 0!==l;){if(a===l.index){let e;2===l.type?e=new Bt(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new Vt(r,this,t)),this._$AV.push(e),l=o[++n]}a!==(null==l?void 0:l.index)&&(r=St.nextNode(),a++)}return St.currentNode=ft,s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Bt{constructor(t,e,i,o){var s;this.type=2,this._$AH=It,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ft(this,t,e),bt(t)?t===It||null==t||""===t?(this._$AH!==It&&this._$AR(),this._$AH=It):t!==this._$AH&&t!==Et&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>gt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==It&&bt(this._$AH)?this._$AA.nextSibling.data=t:this.$(ft.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Mt.createElement(Pt(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new Ot(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=Tt.get(t.strings);return void 0===e&&Tt.set(t.strings,e=new Mt(t)),e}T(t){gt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new Bt(this.k(vt()),this.k(vt()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Nt{constructor(t,e,i,o,s){this.type=1,this._$AH=It,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=It}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=Ft(this,t,e,0),r=!bt(t)||t!==this._$AH&&t!==Et,r&&(this._$AH=t);else{const o=t;let a,n;for(t=s[0],a=0;a<s.length-1;a++)n=Ft(this,o[i+a],e,a),n===Et&&(n=this._$AH[a]),r||(r=!bt(n)||n!==this._$AH[a]),n===It?t=It:t!==It&&(t+=(null!=n?n:"")+s[a+1]),this._$AH[a]=n}r&&!o&&this.j(t)}j(t){t===It?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Lt extends Nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===It?void 0:t}}const jt=ht?ht.emptyScript:"";class Rt extends Nt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==It?this.element.setAttribute(this.name,jt):this.element.removeAttribute(this.name)}}class qt extends Nt{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Ft(this,t,e,0))&&void 0!==i?i:It)===Et)return;const o=this._$AH,s=t===It&&o!==It||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==It&&(o===It||s);s&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class Vt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Ft(this,t)}}const Ut=lt.litHtmlPolyfillSupport;
30
30
  /**
31
31
  * @license
32
32
  * Copyright 2017 Google LLC
@@ -661,7 +661,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
661
661
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
662
662
  Code distributed by Google as part of the polymer project is also
663
663
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
664
- */const pe=!window.ShadyDOM||!window.ShadyDOM.inUse,me=pe&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let fe=window.Polymer&&window.Polymer.rootPath||ue(document.baseURI||window.location.href),ve=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,be=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,ge=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,ye=window.Polymer&&window.Polymer.legacyOptimizations||!1,we=window.Polymer&&window.Polymer.legacyWarnings||!1,xe=window.Polymer&&window.Polymer.syncInitialRender||!1,_e=window.Polymer&&window.Polymer.legacyUndefined||!1,ke=window.Polymer&&window.Polymer.orderedComputed||!1,Ae=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Ce=window.Polymer&&window.Polymer.fastDomIf||!1,ze=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Ee=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,Te=0;const Ie=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=Te++;return function(o){let s=o.__mixinSet;if(s&&s[i])return o;let r=e,a=r.get(o);if(!a){a=t(o),r.set(o,a);let e=Object.create(a.__mixinSet||s||null);e[i]=!0,a.__mixinSet=e}return a}};
664
+ */const pe=!window.ShadyDOM||!window.ShadyDOM.inUse,me=pe&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let fe=window.Polymer&&window.Polymer.rootPath||ue(document.baseURI||window.location.href),ve=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,be=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,ge=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,ye=window.Polymer&&window.Polymer.legacyOptimizations||!1,we=window.Polymer&&window.Polymer.legacyWarnings||!1,xe=window.Polymer&&window.Polymer.syncInitialRender||!1,_e=window.Polymer&&window.Polymer.legacyUndefined||!1,ke=window.Polymer&&window.Polymer.orderedComputed||!1,Ae=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Ce=window.Polymer&&window.Polymer.fastDomIf||!1,ze=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Ee=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,Ie=0;const Te=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=Ie++;return function(o){let s=o.__mixinSet;if(s&&s[i])return o;let r=e,a=r.get(o);if(!a){a=t(o),r.set(o,a);let e=Object.create(a.__mixinSet||s||null);e[i]=!0,a.__mixinSet=e}return a}};
665
665
  /**
666
666
  @license
667
667
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -670,7 +670,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
670
670
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
671
671
  Code distributed by Google as part of the polymer project is also
672
672
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
673
- */let Pe={},Se={};function De(t,e){Pe[t]=Se[t.toLowerCase()]=e}function Me(t){return Pe[t]||Se[t.toLowerCase()]}class Fe extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=Me(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,o){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=ce(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=ue(e)}return this.__assetpath}register(t){if(t=t||this.id){if(be&&void 0!==Me(t))throw De(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,De(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}Fe.prototype.modules=Pe,customElements.define("dom-module",Fe);
673
+ */let Se={},Pe={};function De(t,e){Se[t]=Pe[t.toLowerCase()]=e}function Me(t){return Se[t]||Pe[t.toLowerCase()]}class Fe extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=Me(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,o){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=ce(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=ue(e)}return this.__assetpath}register(t){if(t=t||this.id){if(be&&void 0!==Me(t))throw De(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,De(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}Fe.prototype.modules=Se,customElements.define("dom-module",Fe);
674
674
  /**
675
675
  @license
676
676
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -716,7 +716,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
716
716
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
717
717
  Code distributed by Google as part of the polymer project is also
718
718
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
719
- */let ri=0,ai=0,ni=[],li=0,hi=!1,ci=document.createTextNode("");new window.MutationObserver((function(){hi=!1;const t=ni.length;for(let e=0;e<t;e++){let t=ni[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}ni.splice(0,t),ai+=t})).observe(ci,{characterData:!0});const di={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)}},ui={run:t=>(hi||(hi=!0,ci.textContent=li++),ni.push(t),ri++),cancel(t){const e=t-ai;if(e>=0){if(!ni[e])throw new Error("invalid async handle: "+t);ni[e]=null}}},pi=ui,mi=Ie((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 o=this.__data[t],s=this._shouldPropertyChange(t,e,o);return s&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=o),this.__data[t]=e,this.__dataPending[t]=e),s}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,pi.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,o){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,o)}_attributeToProperty(t,e,i){if(!this.__serializing){const o=this.__dataAttributes,s=o&&o[t]||t;this[s]=this._deserializeValue(e,i||this.constructor.typeForProperty(s))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const o=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=We(t)),void 0===o?t.removeAttribute(i):t.setAttribute(i,""===o&&window.trustedTypes?window.trustedTypes.emptyScript:o)}_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}}})),fi={};let vi=HTMLElement.prototype;for(;vi;){let t=Object.getOwnPropertyNames(vi);for(let e=0;e<t.length;e++)fi[t[e]]=!0;vi=Object.getPrototypeOf(vi)}const bi=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,gi=Ie((t=>{const e=mi(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(oi(t[e]))}static attributeNameForProperty(t){return si(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(bi(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!fi[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),yi={"dom-if":!0,"dom-repeat":!0};let wi=!1,xi=!1;const _i=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,o)=>{const s=i.getAttribute(o);t&&o.startsWith("on-")?e.setAttribute(o,t.createScript(s,o)):e.setAttribute(o,s)}})();function ki(t){let e=t.getAttribute("is");if(e&&yi[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];_i(t,i,e),i.removeAttribute(e)}}return t}function Ai(t,e){let i=e.parentInfo&&Ai(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,o=0;t;t=t.nextSibling)if(e.parentIndex===o++)return t}function Ci(t,e,i,o){o.id&&(e[o.id]=i)}function zi(t,e,i){if(i.events&&i.events.length)for(let o,s=0,r=i.events;s<r.length&&(o=r[s]);s++)t._addMethodEventListenerToNode(e,o.name,o.value,t)}function Ei(t,e,i,o){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=o)}const Ti=Ie((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let o=!1,s=t;return"template"!=s.localName||s.hasAttribute("preserve-content")?"slot"===s.localName&&(e.hasInsertionPoint=!0):o=this._parseTemplateNestedTemplate(s,e,i)||o,function(t){(function(){if(!wi){wi=!0;const t=document.createElement("textarea");t.placeholder="a",xi=t.placeholder===t.textContent}return xi})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(s),s.firstChild&&this._parseTemplateChildNodes(s,e,i),s.hasAttributes&&s.hasAttributes()&&(o=this._parseTemplateNodeAttributes(s,e,i)||o),o||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let o,s=t.firstChild,r=0;s;s=o){if("template"==s.localName&&(s=ki(s)),o=s.nextSibling,s.nodeType===Node.TEXT_NODE){let i=o;for(;i&&i.nodeType===Node.TEXT_NODE;)s.textContent+=i.textContent,o=i.nextSibling,t.removeChild(i),i=o;if(e.stripWhiteSpace&&!s.textContent.trim()){t.removeChild(s);continue}}let a={parentIndex:r,parentInfo:i};this._parseTemplateNode(s,e,a)&&(a.infoIndex=e.nodeInfoList.push(a)-1),s.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let o=t,s=this._parseTemplate(o,e);return(s.content=o.content.ownerDocument.createDocumentFragment()).appendChild(o.content),i.templateInfo=s,!0}static _parseTemplateNodeAttributes(t,e,i){let o=!1,s=Array.from(t.attributes);for(let r,a=s.length-1;r=s[a];a--)o=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||o;return o}static _parseTemplateNodeAttribute(t,e,i,o,s){return"on-"===o.slice(0,3)?(t.removeAttribute(o),i.events=i.events||[],i.events.push({name:o.slice(3),value:s}),!0):"id"===o&&(i.id=s,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,o=document.importNode(e.content||t.content,!0);o.__noInsertionPoint=!e.hasInsertionPoint;let s=o.nodeList=new Array(i.length);o.$={};for(let t,r=0,a=i.length;r<a&&(t=i[r]);r++){let i=s[r]=Ai(o,t);Ci(0,o.$,i,t),Ei(0,i,t,e),zi(this,i,t)}return o}_addMethodEventListenerToNode(t,e,i,o){let s=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(o=o||t,0,i);return this._addEventListenerToNode(t,e,s),s}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
719
+ */let ri=0,ai=0,ni=[],li=0,hi=!1,ci=document.createTextNode("");new window.MutationObserver((function(){hi=!1;const t=ni.length;for(let e=0;e<t;e++){let t=ni[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}ni.splice(0,t),ai+=t})).observe(ci,{characterData:!0});const di={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)}},ui={run:t=>(hi||(hi=!0,ci.textContent=li++),ni.push(t),ri++),cancel(t){const e=t-ai;if(e>=0){if(!ni[e])throw new Error("invalid async handle: "+t);ni[e]=null}}},pi=ui,mi=Te((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 o=this.__data[t],s=this._shouldPropertyChange(t,e,o);return s&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=o),this.__data[t]=e,this.__dataPending[t]=e),s}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,pi.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,o){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,o)}_attributeToProperty(t,e,i){if(!this.__serializing){const o=this.__dataAttributes,s=o&&o[t]||t;this[s]=this._deserializeValue(e,i||this.constructor.typeForProperty(s))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const o=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=We(t)),void 0===o?t.removeAttribute(i):t.setAttribute(i,""===o&&window.trustedTypes?window.trustedTypes.emptyScript:o)}_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}}})),fi={};let vi=HTMLElement.prototype;for(;vi;){let t=Object.getOwnPropertyNames(vi);for(let e=0;e<t.length;e++)fi[t[e]]=!0;vi=Object.getPrototypeOf(vi)}const bi=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,gi=Te((t=>{const e=mi(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(oi(t[e]))}static attributeNameForProperty(t){return si(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(bi(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!fi[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),yi={"dom-if":!0,"dom-repeat":!0};let wi=!1,xi=!1;const _i=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,o)=>{const s=i.getAttribute(o);t&&o.startsWith("on-")?e.setAttribute(o,t.createScript(s,o)):e.setAttribute(o,s)}})();function ki(t){let e=t.getAttribute("is");if(e&&yi[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];_i(t,i,e),i.removeAttribute(e)}}return t}function Ai(t,e){let i=e.parentInfo&&Ai(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,o=0;t;t=t.nextSibling)if(e.parentIndex===o++)return t}function Ci(t,e,i,o){o.id&&(e[o.id]=i)}function zi(t,e,i){if(i.events&&i.events.length)for(let o,s=0,r=i.events;s<r.length&&(o=r[s]);s++)t._addMethodEventListenerToNode(e,o.name,o.value,t)}function Ei(t,e,i,o){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=o)}const Ii=Te((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let o=!1,s=t;return"template"!=s.localName||s.hasAttribute("preserve-content")?"slot"===s.localName&&(e.hasInsertionPoint=!0):o=this._parseTemplateNestedTemplate(s,e,i)||o,function(t){(function(){if(!wi){wi=!0;const t=document.createElement("textarea");t.placeholder="a",xi=t.placeholder===t.textContent}return xi})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(s),s.firstChild&&this._parseTemplateChildNodes(s,e,i),s.hasAttributes&&s.hasAttributes()&&(o=this._parseTemplateNodeAttributes(s,e,i)||o),o||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let o,s=t.firstChild,r=0;s;s=o){if("template"==s.localName&&(s=ki(s)),o=s.nextSibling,s.nodeType===Node.TEXT_NODE){let i=o;for(;i&&i.nodeType===Node.TEXT_NODE;)s.textContent+=i.textContent,o=i.nextSibling,t.removeChild(i),i=o;if(e.stripWhiteSpace&&!s.textContent.trim()){t.removeChild(s);continue}}let a={parentIndex:r,parentInfo:i};this._parseTemplateNode(s,e,a)&&(a.infoIndex=e.nodeInfoList.push(a)-1),s.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let o=t,s=this._parseTemplate(o,e);return(s.content=o.content.ownerDocument.createDocumentFragment()).appendChild(o.content),i.templateInfo=s,!0}static _parseTemplateNodeAttributes(t,e,i){let o=!1,s=Array.from(t.attributes);for(let r,a=s.length-1;r=s[a];a--)o=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||o;return o}static _parseTemplateNodeAttribute(t,e,i,o,s){return"on-"===o.slice(0,3)?(t.removeAttribute(o),i.events=i.events||[],i.events.push({name:o.slice(3),value:s}),!0):"id"===o&&(i.id=s,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,o=document.importNode(e.content||t.content,!0);o.__noInsertionPoint=!e.hasInsertionPoint;let s=o.nodeList=new Array(i.length);o.$={};for(let t,r=0,a=i.length;r<a&&(t=i[r]);r++){let i=s[r]=Ai(o,t);Ci(0,o.$,i,t),Ei(0,i,t,e),zi(this,i,t)}return o}_addMethodEventListenerToNode(t,e,i,o){let s=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(o=o||t,0,i);return this._addEventListenerToNode(t,e,s),s}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
720
720
  /**
721
721
  * @fileoverview
722
722
  * @suppress {checkPrototypalTypes}
@@ -727,7 +727,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
727
727
  * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
728
728
  * Google as part of the polymer project is also subject to an additional IP
729
729
  * rights grant found at http://polymer.github.io/PATENTS.txt
730
- */let Ii=0;const Pi=[],Si={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Di="__computeInfo",Mi=/[A-Z]/;function Fi(t,e,i){let o=t[e];if(o){if(!t.hasOwnProperty(e)&&(o=t[e]=Object.create(t[e]),i))for(let t in o){let e=o[t],i=o[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else o=t[e]={};return o}function Oi(t,e,i,o,s,r){if(e){let a=!1;const n=Ii++;for(let l in i){let h=e[s?He(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===n||s&&!Ni(l,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,l,i,o,e.info,s,r),a=!0)}return a}return!1}function Bi(t,e,i,o,s,r,a,n){let l=!1,h=e[a?He(o):o];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===i||a&&!Ni(o,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,o,s,r,e.info,a,n),l=!0);return l}function Ni(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Ye(i,t))||!(!e.wildcard||!$e(i,t))}return!0}function Li(t,e,i,o,s){let r="string"==typeof s.method?t[s.method]:s.method,a=s.property;r?r.call(t,t.__data[a],o[a]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function ji(t,e,i){let o=He(e);return o!==e&&(Ri(t,si(o)+"-changed",i[e],e),!0)}function Ri(t,e,i,o){let s={value:i,queueProperty:!0};o&&(s.path=o),We(t).dispatchEvent(new CustomEvent(e,{detail:s}))}function qi(t,e,i,o,s,r){let a=(r?He(e):e)!=e?e:null,n=a?Qe(t,a):t.__data[e];a&&void 0===n&&(n=i[e]),Ri(t,s.eventName,n,a)}function Vi(t,e,i,o,s){let r=t.__data[e];ve&&(r=ve(r,s.attrName,"attribute",t)),t._propertyToAttribute(e,s.attrName,r)}const Ui=(t,e,i)=>{let o=0,s=e.length-1,r=-1;for(;o<=s;){const a=o+s>>1,n=i.get(e[a].methodInfo)-i.get(t.methodInfo);if(n<0)o=a+1;else{if(!(n>0)){r=a;break}s=a-1}}r<0&&(r=s+1),e.splice(r,0,t)},Wi=(t,e,i,o,s)=>{const r=e[s?He(t):t];if(r)for(let e=0;e<r.length;e++){const a=r[e];a.info.lastRun===Ii||s&&!Ni(t,a.trigger)||(a.info.lastRun=Ii,Ui(a.info,i,o))}};function Gi(t,e,i,o,s){let r=Qi(t,e,i,0,s);if(r===Pi)return!1;let a=s.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[a]?t._setPendingProperty(a,r,!0):(t[a]=r,!1)}function Hi(t,e,i,o,s,r,a){i.bindings=i.bindings||[];let n={kind:o,target:s,parts:r,literal:a,isCompound:1!==r.length};if(i.bindings.push(n),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(n)){let{event:t,negate:e}=n.parts[0];n.listenerEvent=t||si(s)+"-changed",n.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<n.parts.length;i++){let o=n.parts[i];o.compoundIndex=i,Yi(t,e,n,o,l)}}function Yi(t,e,i,o,s){if(!o.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=o.dependencies,a={index:s,binding:i,part:o,evaluator:t};for(let i=0;i<r.length;i++){let o=r[i];"string"==typeof o&&(o=ro(o),o.wildcard=!0),t._addTemplatePropertyEffect(e,o.rootProperty,{fn:$i,info:a,trigger:o})}}}function $i(t,e,i,o,s,r,a){let n=a[s.index],l=s.binding,h=s.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&n.__isPropertyEffectsClient&&n.__dataHasAccessor&&n.__dataHasAccessor[l.target]){let o=i[e];e=Je(h.source,l.target,e),n._setPendingPropertyOrPath(e,o,!1,!0)&&t._enqueueClient(n)}else{let a=s.evaluator._evaluateBinding(t,h,e,i,o,r);a!==Pi&&function(t,e,i,o,s){if(s=function(t,e,i,o){if(i.isCompound){let s=t.__dataCompoundStorage[i.target];s[o.compoundIndex]=e,e=s.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,s,i,o),ve&&(s=ve(s,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,s,i.target);else{let o=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[o]?e[Si.READ_ONLY]&&e[Si.READ_ONLY][o]||e._setPendingProperty(o,s)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,o,s)}}(t,n,l,h,a)}}function Ji(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),o=e.parts,s=new Array(o.length);for(let t=0;t<o.length;t++)s[t]=o[t].literal;let r=e.target;i[r]=s,e.literal&&"property"==e.kind&&("className"===r&&(t=We(t)),t[r]=e.literal)}}function Zi(t,e,i){if(i.listenerEvent){let o=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,o,s){let r,a=t.detail,n=a&&a.path;n?(o=Je(i,o,n),r=a&&a.value):r=t.currentTarget[i],r=s?!r:r,e[Si.READ_ONLY]&&e[Si.READ_ONLY][o]||!e._setPendingPropertyOrPath(o,r,!0,Boolean(n))||a&&a.queueProperty||e._invalidateProperties()}(t,e,i.target,o.source,o.negate)}))}}function Ki(t,e,i,o,s,r){let a={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let s,r=0;r<e.args.length&&(s=e.args[r]);r++)s.literal||t._addPropertyEffect(s.rootProperty,i,{fn:o,info:a,trigger:s});return r&&t._addPropertyEffect(e.methodName,i,{fn:o,info:a}),a}function Qi(t,e,i,o,s){let r=t._methodHost||t,a=r[s.methodName];if(a){let o=t._marshalArgs(s.args,e,i);return o===Pi?Pi:a.apply(r,o)}s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const Xi=[],to="(?:[a-zA-Z_$][\\w.:$\\-*]*)",eo="(?:("+to+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",io=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+to+"\\s*(?:\\(\\s*(?:(?:"+eo+"(?:,\\s*"+eo+")*)?)\\)\\s*)?)(?:]]|}})","g");function oo(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function so(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Xi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=ro(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function ro(t){let e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},o=e[0];switch("-"===o&&(o=e[1]),o>="0"&&o<="9"&&(o="#"),o){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=He(e),i.structured=Ge(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function ao(t,e,i){let o=Qe(t,i);return void 0===o&&(o=e[i]),o}function no(t,e,i,o){const s={indexSplices:o};_e&&!t._overrideLegacyUndefined&&(e.splices=s),t.notifyPath(i+".splices",s),t.notifyPath(i+".length",e.length),_e&&!t._overrideLegacyUndefined&&(s.indexSplices=[])}function lo(t,e,i,o,s,r){no(t,e,i,[{index:o,addedCount:s,removed:r,object:e,type:"splice"}])}const ho=Ie((t=>{const e=Ti(gi(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(co.length){let t=co[co.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 o=Fi(this,e,!0)[t];o||(o=this[e][t]=[]),o.push(i)}_removePropertyEffect(t,e,i){let o=Fi(this,e,!0)[t],s=o.indexOf(i);s>=0&&o.splice(s,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(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,o){if(o||He(Array.isArray(t)?t[0]:t)!==t){if(!o){let i=Qe(this,t);if(!(t=Xe(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 o=t.__dataLinkedPaths;if(o){let s;for(let r in o){let a=o[r];$e(r,e)?(s=Je(r,a,e),t._setPendingPropertyOrPath(s,i,!0,!0)):$e(a,e)&&(s=Je(a,r,e),t._setPendingPropertyOrPath(s,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=We(t)),t[e]=i)}_setPendingProperty(t,e,i){let o=this.__dataHasPaths&&Ge(t);return!!this._shouldPropertyChange(t,e,(o?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),o?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(o||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 o,s=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,o){let s=t[Si.COMPUTE];if(s)if(ke){Ii++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Si.COMPUTE];let o,{counts:s,ready:r,total:a}=function(t){const e=t[Di],i={},o=t[Si.COMPUTE],s=[];let r=0;for(let t in e){const o=e[t];r+=i[t]=o.args.filter((t=>!t.literal)).length+(o.dynamicFn?1:0)}for(let t in o)e[t]||s.push(t);return{counts:i,ready:s,total:r}}(t);for(;o=r.shift();){e.set(o,e.size);const t=i[o];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--s[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)Wi(t,s,a,r,o);let n;for(;n=a.shift();)Gi(t,"",e,0,n)&&Wi(n.methodInfo,s,a,r,o);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;Oi(t,s,r,i,o);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,s),o=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,s),this._flushClients(),Oi(this,this[Si.REFLECT],e,i,s),Oi(this,this[Si.OBSERVE],e,i,s),o&&function(t,e,i,o,s){let r,a,n=t[Si.NOTIFY],l=Ii++;for(let a in e)e[a]&&(n&&Bi(t,n,l,a,i,o,s)||s&&ji(t,a,i))&&(r=!0);r&&(a=t.__dataHost)&&a._invalidateProperties&&a._invalidateProperties()}(this,o,e,i,s),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Si.PROPAGATE]&&Oi(this,this[Si.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,o){const s=(e,o)=>{Oi(this,t.propertyEffects,e,i,o,t.nodeList);for(let s=t.firstChild;s;s=s.nextSibling)this._runEffectsForTemplate(s,e,i,o)};t.runEffects?t.runEffects(s,e,o):s(e,o)}linkPaths(t,e){t=Ze(t),e=Ze(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Ze(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};no(this,Qe(this,t,i),i.path,e)}get(t,e){return Qe(e||this,t)}set(t,e,i){i?Xe(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:""},o=Qe(this,t,i),s=o.length,r=o.push(...e);return e.length&&lo(this,o,i.path,s,e.length,[]),r}pop(t){let e={path:""},i=Qe(this,t,e),o=Boolean(i.length),s=i.pop();return o&&lo(this,i,e.path,i.length,0,[s]),s}splice(t,e,i,...o){let s,r={path:""},a=Qe(this,t,r);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),s=2===arguments.length?a.splice(e):a.splice(e,i,...o),(o.length||s.length)&&lo(this,a,r.path,e,o.length,s),s}shift(t){let e={path:""},i=Qe(this,t,e),o=Boolean(i.length),s=i.shift();return o&&lo(this,i,e.path,0,0,[s]),s}unshift(t,...e){let i={path:""},o=Qe(this,t,i),s=o.unshift(...e);return e.length&&lo(this,o,i.path,0,e.length,[]),s}notifyPath(t,e){let i;if(1==arguments.length){let o={path:""};e=Qe(this,t,o),i=o.path}else i=Array.isArray(t)?Ze(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,Si.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let o={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,Si.OBSERVE,{fn:Li,info:o,trigger:{name:t}}),i&&this._addPropertyEffect(e,Si.OBSERVE,{fn:Li,info:o,trigger:{name:e}})}_createMethodObserver(t,e){let i=so(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Ki(this,i,Si.OBSERVE,Qi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Si.NOTIFY,{fn:qi,info:{eventName:si(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:Vi,info:{attrName:e}})}_createComputedProperty(t,e,i){let o=so(e);if(!o)throw new Error("Malformed computed expression '"+e+"'");const s=Ki(this,o,Si.COMPUTE,Gi,t,i);Fi(this,Di)[t]=s}_marshalArgs(t,e,i){const o=this.__data,s=[];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=$e(a,e),s=ao(o,i,t?e:a);h={path:t?e:a,value:s,base:t?Qe(o,a):s}}else h=n?ao(o,i,a):o[a];if(_e&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Pi;s[r]=h}return s}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),o=this.__preBoundTemplateInfo==i;if(!o)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=o,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,o=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=o,o?o.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 o=t.propertyEffects=t.propertyEffects||{};(o[e]=o[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),co.push(this);let i=super._stampTemplate(t,e);if(co.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:o}=e;if(o.length)for(let e=0;e<o.length;e++){let s=i[e],r=o[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Ji(s,i),Zi(s,t,i)}s.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:o,parent:s}=e;i?i.nextSibling=o:s&&(s.firstChild=o),o?o.previousSibling=i:s&&(s.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];We(We(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,o){let s=e._parseTemplateNode.call(this,t,i,o);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=oo(e)||" ",Hi(this,i,o,"text","textContent",e),s=!0)}return s}static _parseTemplateNodeAttribute(t,i,o,s,r){let a=this._parseBindings(r,i);if(a){let e=s,r="property";Mi.test(s)?r="attribute":"$"==s[s.length-1]&&(s=s.slice(0,-1),r="attribute");let n=oo(a);return n&&"attribute"==r&&("class"==s&&t.hasAttribute("class")&&(n+=" "+t.getAttribute(s)),t.setAttribute(s,n)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(s,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(s=oi(s)),Hi(this,i,o,r,s,a,n),!0}return e._parseTemplateNodeAttribute.call(this,t,i,o,s,r)}static _parseTemplateNestedTemplate(t,i,o){let s=e._parseTemplateNestedTemplate.call(this,t,i,o);const r=t.parentNode,a=o.templateInfo,n="dom-if"===r.localName;Ae&&(n||"dom-repeat"===r.localName)&&(r.removeChild(t),(o=o.parentInfo).templateInfo=a,o.noted=!0,s=!1);let l=a.hostProps;if(Ce&&n)l&&(i.hostProps=Object.assign(i.hostProps||{},l),Ae||(o.parentInfo.noted=!0));else{let t="{";for(let e in l)Hi(this,i,o,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return s}static _parseBindings(t,e){let i,o=[],s=0;for(;null!==(i=io.exec(t));){i.index>s&&o.push({literal:t.slice(s,i.index)});let r=i[1][0],a=Boolean(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=so(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 o=e.dynamicFns;(o&&o[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(n);o.push({source:n,mode:r,negate:a,customEvent:l,signature:d,dependencies:u,event:h}),s=io.lastIndex}if(s&&s<t.length){let e=t.substring(s);e&&o.push({literal:e})}return o.length?o:null}static _evaluateBinding(t,e,i,o,s,r){let a;return a=e.signature?Qi(t,i,o,0,e.signature):i!=e.source?Qe(t,e.source):r&&Ge(i)?Qe(t,i):t.__data[i],e.negate&&(a=!a),a}}})),co=[],uo=Ie((t=>{const e=mi(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof s?e:null}function o(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
730
+ */let Ti=0;const Si=[],Pi={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Di="__computeInfo",Mi=/[A-Z]/;function Fi(t,e,i){let o=t[e];if(o){if(!t.hasOwnProperty(e)&&(o=t[e]=Object.create(t[e]),i))for(let t in o){let e=o[t],i=o[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else o=t[e]={};return o}function Oi(t,e,i,o,s,r){if(e){let a=!1;const n=Ti++;for(let l in i){let h=e[s?He(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===n||s&&!Ni(l,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,l,i,o,e.info,s,r),a=!0)}return a}return!1}function Bi(t,e,i,o,s,r,a,n){let l=!1,h=e[a?He(o):o];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===i||a&&!Ni(o,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,o,s,r,e.info,a,n),l=!0);return l}function Ni(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Ye(i,t))||!(!e.wildcard||!$e(i,t))}return!0}function Li(t,e,i,o,s){let r="string"==typeof s.method?t[s.method]:s.method,a=s.property;r?r.call(t,t.__data[a],o[a]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function ji(t,e,i){let o=He(e);return o!==e&&(Ri(t,si(o)+"-changed",i[e],e),!0)}function Ri(t,e,i,o){let s={value:i,queueProperty:!0};o&&(s.path=o),We(t).dispatchEvent(new CustomEvent(e,{detail:s}))}function qi(t,e,i,o,s,r){let a=(r?He(e):e)!=e?e:null,n=a?Qe(t,a):t.__data[e];a&&void 0===n&&(n=i[e]),Ri(t,s.eventName,n,a)}function Vi(t,e,i,o,s){let r=t.__data[e];ve&&(r=ve(r,s.attrName,"attribute",t)),t._propertyToAttribute(e,s.attrName,r)}const Ui=(t,e,i)=>{let o=0,s=e.length-1,r=-1;for(;o<=s;){const a=o+s>>1,n=i.get(e[a].methodInfo)-i.get(t.methodInfo);if(n<0)o=a+1;else{if(!(n>0)){r=a;break}s=a-1}}r<0&&(r=s+1),e.splice(r,0,t)},Wi=(t,e,i,o,s)=>{const r=e[s?He(t):t];if(r)for(let e=0;e<r.length;e++){const a=r[e];a.info.lastRun===Ti||s&&!Ni(t,a.trigger)||(a.info.lastRun=Ti,Ui(a.info,i,o))}};function Gi(t,e,i,o,s){let r=Qi(t,e,i,0,s);if(r===Si)return!1;let a=s.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[a]?t._setPendingProperty(a,r,!0):(t[a]=r,!1)}function Hi(t,e,i,o,s,r,a){i.bindings=i.bindings||[];let n={kind:o,target:s,parts:r,literal:a,isCompound:1!==r.length};if(i.bindings.push(n),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(n)){let{event:t,negate:e}=n.parts[0];n.listenerEvent=t||si(s)+"-changed",n.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<n.parts.length;i++){let o=n.parts[i];o.compoundIndex=i,Yi(t,e,n,o,l)}}function Yi(t,e,i,o,s){if(!o.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=o.dependencies,a={index:s,binding:i,part:o,evaluator:t};for(let i=0;i<r.length;i++){let o=r[i];"string"==typeof o&&(o=ro(o),o.wildcard=!0),t._addTemplatePropertyEffect(e,o.rootProperty,{fn:$i,info:a,trigger:o})}}}function $i(t,e,i,o,s,r,a){let n=a[s.index],l=s.binding,h=s.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&n.__isPropertyEffectsClient&&n.__dataHasAccessor&&n.__dataHasAccessor[l.target]){let o=i[e];e=Je(h.source,l.target,e),n._setPendingPropertyOrPath(e,o,!1,!0)&&t._enqueueClient(n)}else{let a=s.evaluator._evaluateBinding(t,h,e,i,o,r);a!==Si&&function(t,e,i,o,s){if(s=function(t,e,i,o){if(i.isCompound){let s=t.__dataCompoundStorage[i.target];s[o.compoundIndex]=e,e=s.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,s,i,o),ve&&(s=ve(s,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,s,i.target);else{let o=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[o]?e[Pi.READ_ONLY]&&e[Pi.READ_ONLY][o]||e._setPendingProperty(o,s)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,o,s)}}(t,n,l,h,a)}}function Ji(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),o=e.parts,s=new Array(o.length);for(let t=0;t<o.length;t++)s[t]=o[t].literal;let r=e.target;i[r]=s,e.literal&&"property"==e.kind&&("className"===r&&(t=We(t)),t[r]=e.literal)}}function Zi(t,e,i){if(i.listenerEvent){let o=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,o,s){let r,a=t.detail,n=a&&a.path;n?(o=Je(i,o,n),r=a&&a.value):r=t.currentTarget[i],r=s?!r:r,e[Pi.READ_ONLY]&&e[Pi.READ_ONLY][o]||!e._setPendingPropertyOrPath(o,r,!0,Boolean(n))||a&&a.queueProperty||e._invalidateProperties()}(t,e,i.target,o.source,o.negate)}))}}function Ki(t,e,i,o,s,r){let a={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let s,r=0;r<e.args.length&&(s=e.args[r]);r++)s.literal||t._addPropertyEffect(s.rootProperty,i,{fn:o,info:a,trigger:s});return r&&t._addPropertyEffect(e.methodName,i,{fn:o,info:a}),a}function Qi(t,e,i,o,s){let r=t._methodHost||t,a=r[s.methodName];if(a){let o=t._marshalArgs(s.args,e,i);return o===Si?Si:a.apply(r,o)}s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const Xi=[],to="(?:[a-zA-Z_$][\\w.:$\\-*]*)",eo="(?:("+to+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",io=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+to+"\\s*(?:\\(\\s*(?:(?:"+eo+"(?:,\\s*"+eo+")*)?)\\)\\s*)?)(?:]]|}})","g");function oo(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function so(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Xi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=ro(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function ro(t){let e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},o=e[0];switch("-"===o&&(o=e[1]),o>="0"&&o<="9"&&(o="#"),o){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=He(e),i.structured=Ge(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function ao(t,e,i){let o=Qe(t,i);return void 0===o&&(o=e[i]),o}function no(t,e,i,o){const s={indexSplices:o};_e&&!t._overrideLegacyUndefined&&(e.splices=s),t.notifyPath(i+".splices",s),t.notifyPath(i+".length",e.length),_e&&!t._overrideLegacyUndefined&&(s.indexSplices=[])}function lo(t,e,i,o,s,r){no(t,e,i,[{index:o,addedCount:s,removed:r,object:e,type:"splice"}])}const ho=Te((t=>{const e=Ii(gi(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Pi}_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(co.length){let t=co[co.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[Pi.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==Pi.READ_ONLY);let o=Fi(this,e,!0)[t];o||(o=this[e][t]=[]),o.push(i)}_removePropertyEffect(t,e,i){let o=Fi(this,e,!0)[t],s=o.indexOf(i);s>=0&&o.splice(s,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Pi.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Pi.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Pi.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Pi.COMPUTE)}_setPendingPropertyOrPath(t,e,i,o){if(o||He(Array.isArray(t)?t[0]:t)!==t){if(!o){let i=Qe(this,t);if(!(t=Xe(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 o=t.__dataLinkedPaths;if(o){let s;for(let r in o){let a=o[r];$e(r,e)?(s=Je(r,a,e),t._setPendingPropertyOrPath(s,i,!0,!0)):$e(a,e)&&(s=Je(a,r,e),t._setPendingPropertyOrPath(s,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=We(t)),t[e]=i)}_setPendingProperty(t,e,i){let o=this.__dataHasPaths&&Ge(t);return!!this._shouldPropertyChange(t,e,(o?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),o?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(o||this[Pi.NOTIFY]&&this[Pi.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[Pi.READ_ONLY]&&this[Pi.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 o,s=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,o){let s=t[Pi.COMPUTE];if(s)if(ke){Ti++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Pi.COMPUTE];let o,{counts:s,ready:r,total:a}=function(t){const e=t[Di],i={},o=t[Pi.COMPUTE],s=[];let r=0;for(let t in e){const o=e[t];r+=i[t]=o.args.filter((t=>!t.literal)).length+(o.dynamicFn?1:0)}for(let t in o)e[t]||s.push(t);return{counts:i,ready:s,total:r}}(t);for(;o=r.shift();){e.set(o,e.size);const t=i[o];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--s[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)Wi(t,s,a,r,o);let n;for(;n=a.shift();)Gi(t,"",e,0,n)&&Wi(n.methodInfo,s,a,r,o);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;Oi(t,s,r,i,o);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,s),o=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,s),this._flushClients(),Oi(this,this[Pi.REFLECT],e,i,s),Oi(this,this[Pi.OBSERVE],e,i,s),o&&function(t,e,i,o,s){let r,a,n=t[Pi.NOTIFY],l=Ti++;for(let a in e)e[a]&&(n&&Bi(t,n,l,a,i,o,s)||s&&ji(t,a,i))&&(r=!0);r&&(a=t.__dataHost)&&a._invalidateProperties&&a._invalidateProperties()}(this,o,e,i,s),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Pi.PROPAGATE]&&Oi(this,this[Pi.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,o){const s=(e,o)=>{Oi(this,t.propertyEffects,e,i,o,t.nodeList);for(let s=t.firstChild;s;s=s.nextSibling)this._runEffectsForTemplate(s,e,i,o)};t.runEffects?t.runEffects(s,e,o):s(e,o)}linkPaths(t,e){t=Ze(t),e=Ze(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Ze(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};no(this,Qe(this,t,i),i.path,e)}get(t,e){return Qe(e||this,t)}set(t,e,i){i?Xe(i,t,e):this[Pi.READ_ONLY]&&this[Pi.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},o=Qe(this,t,i),s=o.length,r=o.push(...e);return e.length&&lo(this,o,i.path,s,e.length,[]),r}pop(t){let e={path:""},i=Qe(this,t,e),o=Boolean(i.length),s=i.pop();return o&&lo(this,i,e.path,i.length,0,[s]),s}splice(t,e,i,...o){let s,r={path:""},a=Qe(this,t,r);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),s=2===arguments.length?a.splice(e):a.splice(e,i,...o),(o.length||s.length)&&lo(this,a,r.path,e,o.length,s),s}shift(t){let e={path:""},i=Qe(this,t,e),o=Boolean(i.length),s=i.shift();return o&&lo(this,i,e.path,0,0,[s]),s}unshift(t,...e){let i={path:""},o=Qe(this,t,i),s=o.unshift(...e);return e.length&&lo(this,o,i.path,0,e.length,[]),s}notifyPath(t,e){let i;if(1==arguments.length){let o={path:""};e=Qe(this,t,o),i=o.path}else i=Array.isArray(t)?Ze(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,Pi.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let o={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,Pi.OBSERVE,{fn:Li,info:o,trigger:{name:t}}),i&&this._addPropertyEffect(e,Pi.OBSERVE,{fn:Li,info:o,trigger:{name:e}})}_createMethodObserver(t,e){let i=so(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Ki(this,i,Pi.OBSERVE,Qi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Pi.NOTIFY,{fn:qi,info:{eventName:si(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,Pi.REFLECT,{fn:Vi,info:{attrName:e}})}_createComputedProperty(t,e,i){let o=so(e);if(!o)throw new Error("Malformed computed expression '"+e+"'");const s=Ki(this,o,Pi.COMPUTE,Gi,t,i);Fi(this,Di)[t]=s}_marshalArgs(t,e,i){const o=this.__data,s=[];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=$e(a,e),s=ao(o,i,t?e:a);h={path:t?e:a,value:s,base:t?Qe(o,a):s}}else h=n?ao(o,i,a):o[a];if(_e&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Si;s[r]=h}return s}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),o=this.__preBoundTemplateInfo==i;if(!o)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=o,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,o=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=o,o?o.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 o=t.propertyEffects=t.propertyEffects||{};(o[e]=o[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),co.push(this);let i=super._stampTemplate(t,e);if(co.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:o}=e;if(o.length)for(let e=0;e<o.length;e++){let s=i[e],r=o[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Ji(s,i),Zi(s,t,i)}s.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:o,parent:s}=e;i?i.nextSibling=o:s&&(s.firstChild=o),o?o.previousSibling=i:s&&(s.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];We(We(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,o){let s=e._parseTemplateNode.call(this,t,i,o);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=oo(e)||" ",Hi(this,i,o,"text","textContent",e),s=!0)}return s}static _parseTemplateNodeAttribute(t,i,o,s,r){let a=this._parseBindings(r,i);if(a){let e=s,r="property";Mi.test(s)?r="attribute":"$"==s[s.length-1]&&(s=s.slice(0,-1),r="attribute");let n=oo(a);return n&&"attribute"==r&&("class"==s&&t.hasAttribute("class")&&(n+=" "+t.getAttribute(s)),t.setAttribute(s,n)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(s,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(s=oi(s)),Hi(this,i,o,r,s,a,n),!0}return e._parseTemplateNodeAttribute.call(this,t,i,o,s,r)}static _parseTemplateNestedTemplate(t,i,o){let s=e._parseTemplateNestedTemplate.call(this,t,i,o);const r=t.parentNode,a=o.templateInfo,n="dom-if"===r.localName;Ae&&(n||"dom-repeat"===r.localName)&&(r.removeChild(t),(o=o.parentInfo).templateInfo=a,o.noted=!0,s=!1);let l=a.hostProps;if(Ce&&n)l&&(i.hostProps=Object.assign(i.hostProps||{},l),Ae||(o.parentInfo.noted=!0));else{let t="{";for(let e in l)Hi(this,i,o,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return s}static _parseBindings(t,e){let i,o=[],s=0;for(;null!==(i=io.exec(t));){i.index>s&&o.push({literal:t.slice(s,i.index)});let r=i[1][0],a=Boolean(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=so(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 o=e.dynamicFns;(o&&o[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(n);o.push({source:n,mode:r,negate:a,customEvent:l,signature:d,dependencies:u,event:h}),s=io.lastIndex}if(s&&s<t.length){let e=t.substring(s);e&&o.push({literal:e})}return o.length?o:null}static _evaluateBinding(t,e,i,o,s,r){let a;return a=e.signature?Qi(t,i,o,0,e.signature):i!=e.source?Qe(t,e.source):r&&Ge(i)?Qe(t,i):t.__data[i],e.negate&&(a=!a),a}}})),co=[],uo=Te((t=>{const e=mi(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof s?e:null}function o(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
731
731
  /**
732
732
  @license
733
733
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -737,7 +737,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
737
737
  Code distributed by Google as part of the polymer project is also
738
738
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
739
739
  */
740
- function(t){const e={};for(let i in t){const o=t[i];e[i]="function"==typeof o?{type:o}:o}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class s extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=o(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,o(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s})),po=window.ShadyCSS&&window.ShadyCSS.cssBuild,mo=Ie((t=>{const e=uo(ho(t));function i(t,e,i,o){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,o)),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,o[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.1"}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):ye||(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 o=0;o<t.length;o++)i._createMethodObserver(t[o],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&&(!be||ge)&&(e=Fe.import(t,"template"),be&&!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=ue(t.url);else{const t=Fe.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=fe,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 o=e[i];"value"in o&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=o)}}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 de(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,o){if(!po){const s=e.content.querySelectorAll("style"),r=Ve(e),a=function(t){let e=Le(t);return e?Ue(e):[]}(i),n=e.content.firstElementChild;for(let i=0;i<a.length;i++){let s=a[i];s.textContent=t._processStyleText(s.textContent,o),e.content.insertBefore(s,n)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],a=s[l];a!==i?(i=i.cloneNode(!0),a.parentNode.insertBefore(i,a)):l++,i.textContent=t._processStyleText(i.textContent,o)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),Ee&&po&&me){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?ce(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=We(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])),xe&&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=ce(this.importPath)),ce(t,e)}static _parseTemplateContent(t,i,o){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,o)}static _addTemplatePropertyEffect(t,i,o){return!we||i in this._properties||o.info.part.signature&&o.info.part.signature.static||o.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,o)}}})),fo=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class vo{constructor(t,e){yo(t,e);const i=e.reduce(((e,i,o)=>e+bo(i)+t[o+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function bo(t){if(t instanceof vo)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const go=function(t,...e){yo(t,e);const i=document.createElement("template");let o=e.reduce(((e,i,o)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof vo)return bo(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[o+1]),t[0]);return fo&&(o=fo.createHTML(o)),i.innerHTML=o,i},yo=(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")},wo=mo(HTMLElement),xo=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,_o=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function ko(t,e){if("function"!=typeof t)return;const i=xo.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function Ao(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(_o?!(_o&&Object.keys(_o).map((t=>_o[t])).filter((t=>t.productionMode)).length>0):!ko((function(){return!0})))}catch(t){return!1}}());
740
+ function(t){const e={};for(let i in t){const o=t[i];e[i]="function"==typeof o?{type:o}:o}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class s extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=o(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,o(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s})),po=window.ShadyCSS&&window.ShadyCSS.cssBuild,mo=Te((t=>{const e=uo(ho(t));function i(t,e,i,o){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,o)),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,o[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.1"}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):ye||(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 o=0;o<t.length;o++)i._createMethodObserver(t[o],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&&(!be||ge)&&(e=Fe.import(t,"template"),be&&!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=ue(t.url);else{const t=Fe.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=fe,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 o=e[i];"value"in o&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=o)}}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 de(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,o){if(!po){const s=e.content.querySelectorAll("style"),r=Ve(e),a=function(t){let e=Le(t);return e?Ue(e):[]}(i),n=e.content.firstElementChild;for(let i=0;i<a.length;i++){let s=a[i];s.textContent=t._processStyleText(s.textContent,o),e.content.insertBefore(s,n)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],a=s[l];a!==i?(i=i.cloneNode(!0),a.parentNode.insertBefore(i,a)):l++,i.textContent=t._processStyleText(i.textContent,o)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),Ee&&po&&me){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?ce(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=We(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])),xe&&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=ce(this.importPath)),ce(t,e)}static _parseTemplateContent(t,i,o){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,o)}static _addTemplatePropertyEffect(t,i,o){return!we||i in this._properties||o.info.part.signature&&o.info.part.signature.static||o.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,o)}}})),fo=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class vo{constructor(t,e){yo(t,e);const i=e.reduce(((e,i,o)=>e+bo(i)+t[o+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function bo(t){if(t instanceof vo)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const go=function(t,...e){yo(t,e);const i=document.createElement("template");let o=e.reduce(((e,i,o)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof vo)return bo(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[o+1]),t[0]);return fo&&(o=fo.createHTML(o)),i.innerHTML=o,i},yo=(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")},wo=mo(HTMLElement),xo=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,_o=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function ko(t,e){if("function"!=typeof t)return;const i=xo.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function Ao(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(_o?!(_o&&Object.keys(_o).map((t=>_o[t])).filter((t=>t.productionMode)).length>0):!ko((function(){return!0})))}catch(t){return!1}}());
741
741
  /**
742
742
  * @license
743
743
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -747,7 +747,7 @@ function(t){const e={};for(let i in t){const o=t[i];e[i]="function"==typeof o?{t
747
747
  * Code distributed by Google as part of the polymer project is also
748
748
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
749
749
  */
750
- let Co=0,zo=0;const Eo=[];let To=!1;const Io={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)}},Po={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},So={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Do={run(t){To||(To=!0,queueMicrotask((()=>function(){To=!1;const t=Eo.length;for(let e=0;e<t;e++){const t=Eo[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Eo.splice(0,t),zo+=t}()))),Eo.push(t);const e=Co;return Co+=1,e},cancel(t){const e=t-zo;if(e>=0){if(!Eo[e])throw new Error(`invalid async handle: ${t}`);Eo[e]=null}}},Mo=new Set;class Fo{static debounce(t,e,i){return t instanceof Fo?t._cancelAsync():t=new Fo,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,Mo.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Mo.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}function Oo(t){Mo.add(t)}function Bo(){const t=Boolean(Mo.size);return Mo.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const No=()=>{let t;do{t=Bo()}while(t)},Lo=[];
750
+ let Co=0,zo=0;const Eo=[];let Io=!1;const To={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)}},So={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},Po={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Do={run(t){Io||(Io=!0,queueMicrotask((()=>function(){Io=!1;const t=Eo.length;for(let e=0;e<t;e++){const t=Eo[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Eo.splice(0,t),zo+=t}()))),Eo.push(t);const e=Co;return Co+=1,e},cancel(t){const e=t-zo;if(e>=0){if(!Eo[e])throw new Error(`invalid async handle: ${t}`);Eo[e]=null}}},Mo=new Set;class Fo{static debounce(t,e,i){return t instanceof Fo?t._cancelAsync():t=new Fo,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,Mo.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Mo.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}function Oo(t){Mo.add(t)}function Bo(){const t=Boolean(Mo.size);return Mo.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const No=()=>{let t;do{t=Bo()}while(t)},Lo=[];
751
751
  /**
752
752
  * @license
753
753
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
@@ -757,7 +757,7 @@ let Co=0,zo=0;const Eo=[];let To=!1;const Io={after:t=>({run:e=>window.setTimeou
757
757
  * @license
758
758
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
759
759
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
760
- */;let Vo;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)ko(t,e)}(Ao)};const Uo=new Set,Wo=t=>class extends(qo(t)){static get version(){return"24.2.9"}static finalize(){super.finalize();const{is:t}=this;t&&!Uo.has(t)&&(window.Vaadin.registrations.push(this),Uo.add(t),window.Vaadin.developmentModeCallback&&(Vo=Fo.debounce(Vo,So,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),Oo(Vo)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
760
+ */;let Vo;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)ko(t,e)}(Ao)};const Uo=new Set,Wo=t=>class extends(qo(t)){static get version(){return"24.2.9"}static finalize(){super.finalize();const{is:t}=this;t&&!Uo.has(t)&&(window.Vaadin.registrations.push(this),Uo.add(t),window.Vaadin.developmentModeCallback&&(Vo=Fo.debounce(Vo,Po,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),Oo(Vo)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
761
761
  /**
762
762
  * @license
763
763
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
@@ -792,12 +792,12 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
792
792
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
793
793
  Code distributed by Google as part of the polymer project is also
794
794
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
795
- */const Xo=!1,ts=t=>t,es="string"==typeof document.head.style.touchAction,is="__polymerGestures",os="__polymerGesturesHandled",ss="__polymerGesturesTouchAction",rs=["mousedown","mousemove","mouseup","click"],as=[0,1,4,2],ns=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function ls(t){return rs.indexOf(t)>-1}let hs=!1;function cs(t){if(!ls(t)&&"touchend"!==t)return es&&hs&&Xo?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){hs=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const ds=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),us={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function ps(t){const e=t.type;if(!ls(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!ns&&(e=as[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const ms={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function fs(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function vs(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const bs=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],gs={},ys=[];function ws(t){const e=bs(t);return e.length>0?e[0]:t.target}function xs(t){const e=t.type,i=t.currentTarget[is];if(!i)return;const o=i[e];if(!o)return;if(!t[os]&&(t[os]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(ms.touch.id=i.identifier),ms.touch.id!==i.identifier)return;es||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)ms.touch.x=e.clientX,ms.touch.y=e.clientY,ms.touch.scrollDecided=!1;else if("touchmove"===i){if(ms.touch.scrollDecided)return;ms.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=bs(t);for(let t,o=0;o<i.length;o++)if(t=i[o],t[ss]){e=t[ss];break}return e}(t);let o=!1;const s=Math.abs(ms.touch.x-e.clientX),r=Math.abs(ms.touch.y-e.clientY);t.cancelable&&("none"===i?o=!0:"pan-x"===i?o=r>s:"pan-y"===i&&(o=s>r)),o?t.preventDefault():zs("track")}}(t)}const s=t[os];if(!s.skip){for(let e,i=0;i<ys.length;i++)e=ys[i],o[e.name]&&!s[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<ys.length;r++)i=ys[r],o[i.name]&&!s[i.name]&&(s[i.name]=!0,i[e](t))}}function _s(t,e,i){return!!gs[e]&&(function(t,e,i){const o=gs[e],s=o.deps,r=o.name;let a=t[is];a||(t[is]=a={});for(let e,i,o=0;o<s.length;o++)e=s[o],ds&&ls(e)&&"click"!==e||(i=a[e],i||(a[e]=i={_count:0}),0===i._count&&t.addEventListener(e,xs,cs(e)),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),o.touchAction&&As(t,o.touchAction)}(t,e,i),!0)}function ks(t){ys.push(t),t.emits.forEach((e=>{gs[e]=t}))}function As(t,e){es&&t instanceof HTMLElement&&Do.run((()=>{t.style.touchAction=e})),t[ss]=e}function Cs(t,e,i){const o=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=i,ts(t).dispatchEvent(o),o.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function zs(t){const e=function(t){for(let e,i=0;i<ys.length;i++){e=ys[i];for(let i,o=0;o<e.emits.length;o++)if(i=e.emits[o],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Es(t,e,i,o){e&&Cs(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:o,prevent:t=>zs(t)})}function Ts(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const o=Math.abs(t.x-e),s=Math.abs(t.y-i);return o>=5||s>=5}function Is(t,e,i){if(!e)return;const o=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1];let r,a=0;o&&(r=s.x-o.x,a=s.y-o.y),Cs(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:s.x-t.x,dy:s.y-t.y,ddx:r,ddy:a,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),o=i;for(;o&&o.shadowRoot&&!window.ShadyDOM;){const s=o;if(o=o.shadowRoot.elementFromPoint(t,e),s===o)break;o&&(i=o)}return i}(i.clientX,i.clientY)})}function Ps(t,e,i){const o=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),r=ws(i||e);!r||us[r.localName]&&r.hasAttribute("disabled")||(isNaN(o)||isNaN(s)||o<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=ws(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),o=t.pageX,s=t.pageY;return!(o>=i.left&&o<=i.right&&s>=i.top&&s<=i.bottom)}return!1}(e))&&(t.prevent||Cs(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
795
+ */const Xo=!1,ts=t=>t,es="string"==typeof document.head.style.touchAction,is="__polymerGestures",os="__polymerGesturesHandled",ss="__polymerGesturesTouchAction",rs=["mousedown","mousemove","mouseup","click"],as=[0,1,4,2],ns=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function ls(t){return rs.indexOf(t)>-1}let hs=!1;function cs(t){if(!ls(t)&&"touchend"!==t)return es&&hs&&Xo?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){hs=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const ds=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),us={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function ps(t){const e=t.type;if(!ls(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!ns&&(e=as[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const ms={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function fs(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function vs(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const bs=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],gs={},ys=[];function ws(t){const e=bs(t);return e.length>0?e[0]:t.target}function xs(t){const e=t.type,i=t.currentTarget[is];if(!i)return;const o=i[e];if(!o)return;if(!t[os]&&(t[os]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(ms.touch.id=i.identifier),ms.touch.id!==i.identifier)return;es||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)ms.touch.x=e.clientX,ms.touch.y=e.clientY,ms.touch.scrollDecided=!1;else if("touchmove"===i){if(ms.touch.scrollDecided)return;ms.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=bs(t);for(let t,o=0;o<i.length;o++)if(t=i[o],t[ss]){e=t[ss];break}return e}(t);let o=!1;const s=Math.abs(ms.touch.x-e.clientX),r=Math.abs(ms.touch.y-e.clientY);t.cancelable&&("none"===i?o=!0:"pan-x"===i?o=r>s:"pan-y"===i&&(o=s>r)),o?t.preventDefault():zs("track")}}(t)}const s=t[os];if(!s.skip){for(let e,i=0;i<ys.length;i++)e=ys[i],o[e.name]&&!s[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<ys.length;r++)i=ys[r],o[i.name]&&!s[i.name]&&(s[i.name]=!0,i[e](t))}}function _s(t,e,i){return!!gs[e]&&(function(t,e,i){const o=gs[e],s=o.deps,r=o.name;let a=t[is];a||(t[is]=a={});for(let e,i,o=0;o<s.length;o++)e=s[o],ds&&ls(e)&&"click"!==e||(i=a[e],i||(a[e]=i={_count:0}),0===i._count&&t.addEventListener(e,xs,cs(e)),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),o.touchAction&&As(t,o.touchAction)}(t,e,i),!0)}function ks(t){ys.push(t),t.emits.forEach((e=>{gs[e]=t}))}function As(t,e){es&&t instanceof HTMLElement&&Do.run((()=>{t.style.touchAction=e})),t[ss]=e}function Cs(t,e,i){const o=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=i,ts(t).dispatchEvent(o),o.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function zs(t){const e=function(t){for(let e,i=0;i<ys.length;i++){e=ys[i];for(let i,o=0;o<e.emits.length;o++)if(i=e.emits[o],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Es(t,e,i,o){e&&Cs(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:o,prevent:t=>zs(t)})}function Is(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const o=Math.abs(t.x-e),s=Math.abs(t.y-i);return o>=5||s>=5}function Ts(t,e,i){if(!e)return;const o=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1];let r,a=0;o&&(r=s.x-o.x,a=s.y-o.y),Cs(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:s.x-t.x,dy:s.y-t.y,ddx:r,ddy:a,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),o=i;for(;o&&o.shadowRoot&&!window.ShadyDOM;){const s=o;if(o=o.shadowRoot.elementFromPoint(t,e),s===o)break;o&&(i=o)}return i}(i.clientX,i.clientY)})}function Ss(t,e,i){const o=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),r=ws(i||e);!r||us[r.localName]&&r.hasAttribute("disabled")||(isNaN(o)||isNaN(s)||o<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=ws(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),o=t.pageX,s=t.pageY;return!(o>=i.left&&o<=i.right&&s>=i.top&&s<=i.bottom)}return!1}(e))&&(t.prevent||Cs(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
796
796
  /**
797
797
  * @license
798
798
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
799
799
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
800
- */ks({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){vs(this.info)},mousedown(t){if(!ps(t))return;const e=ws(t),i=this;fs(this.info,(t=>{ps(t)||(Es("up",e,t),vs(i.info))}),(t=>{ps(t)&&Es("up",e,t),vs(i.info)})),Es("down",e,t)},touchstart(t){Es("down",ws(t),t.changedTouches[0],t)},touchend(t){Es("up",ws(t),t.changedTouches[0],t)}}),ks({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,vs(this.info)},mousedown(t){if(!ps(t))return;const e=ws(t),i=this,o=t=>{const o=t.clientX,s=t.clientY;Ts(i.info,o,s)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&zs("tap"),i.info.addMove({x:o,y:s}),ps(t)||(i.info.state="end",vs(i.info)),e&&Is(i.info,e,t),i.info.started=!0)};fs(this.info,o,(t=>{i.info.started&&o(t),vs(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=ws(t),i=t.changedTouches[0],o=i.clientX,s=i.clientY;Ts(this.info,o,s)&&("start"===this.info.state&&zs("tap"),this.info.addMove({x:o,y:s}),Is(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=ws(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Is(this.info,e,i))}}),ks({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){ps(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){ps(t)&&Ps(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Ps(this.info,t.changedTouches[0],t)}});const Ss=Ie((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),Ds=Ie((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),Ms=t=>class extends(Ss(Ds(t))){get _activeKeys(){return[" "]}ready(){super.ready(),_s(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),_s(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
800
+ */ks({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){vs(this.info)},mousedown(t){if(!ps(t))return;const e=ws(t),i=this;fs(this.info,(t=>{ps(t)||(Es("up",e,t),vs(i.info))}),(t=>{ps(t)&&Es("up",e,t),vs(i.info)})),Es("down",e,t)},touchstart(t){Es("down",ws(t),t.changedTouches[0],t)},touchend(t){Es("up",ws(t),t.changedTouches[0],t)}}),ks({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,vs(this.info)},mousedown(t){if(!ps(t))return;const e=ws(t),i=this,o=t=>{const o=t.clientX,s=t.clientY;Is(i.info,o,s)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&zs("tap"),i.info.addMove({x:o,y:s}),ps(t)||(i.info.state="end",vs(i.info)),e&&Ts(i.info,e,t),i.info.started=!0)};fs(this.info,o,(t=>{i.info.started&&o(t),vs(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=ws(t),i=t.changedTouches[0],o=i.clientX,s=i.clientY;Is(this.info,o,s)&&("start"===this.info.state&&zs("tap"),this.info.addMove({x:o,y:s}),Ts(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=ws(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Ts(this.info,e,i))}}),ks({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){ps(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){ps(t)&&Ss(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Ss(this.info,t.changedTouches[0],t)}});const Ps=Te((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),Ds=Te((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),Ms=t=>class extends(Ps(Ds(t))){get _activeKeys(){return[" "]}ready(){super.ready(),_s(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),_s(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
801
801
  /**
802
802
  * @license
803
803
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
@@ -813,12 +813,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
813
813
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
814
814
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
815
815
  */
816
- const Rs=Ie((t=>class extends t{get _keyboardActive(){return Fs}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}})),qs=t=>class extends(Ss(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)}}
816
+ const Rs=Te((t=>class extends t{get _keyboardActive(){return Fs}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}})),qs=t=>class extends(Ps(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)}}
817
817
  /**
818
818
  * @license
819
819
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
820
820
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
821
- */,Vs=Ie((t=>class extends(Rs(qs(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)}})),Us=Ie((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)}})),Ws=Ie((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}})),Gs=Ie((t=>class extends(Us(Ss(Ws(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}}));
821
+ */,Vs=Te((t=>class extends(Rs(qs(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)}})),Us=Te((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)}})),Ws=Te((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}})),Gs=Te((t=>class extends(Us(Ps(Ws(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}}));
822
822
  /**
823
823
  * @license
824
824
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
@@ -834,7 +834,7 @@ class Hs extends Ko{constructor(t,e){super(t,"input","input",{initializer:(t,i)=
834
834
  * @license
835
835
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
836
836
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
837
- */const Ys=Ie((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}}));
837
+ */const Ys=Te((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}}));
838
838
  /**
839
839
  * @license
840
840
  * Copyright (c) 2022 - 2023 Vaadin Ltd.
@@ -849,7 +849,7 @@ class Hs extends Ko{constructor(t,e){super(t,"input","input",{initializer:(t,i)=
849
849
  * @license
850
850
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
851
851
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
852
- */const Zs=Ie((t=>class extends(Ys(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Js(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}}));
852
+ */const Zs=Te((t=>class extends(Ys(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Js(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}}));
853
853
  /**
854
854
  * @license
855
855
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
@@ -1183,7 +1183,7 @@ class nr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
1183
1183
  * @license
1184
1184
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
1185
1185
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1186
- */const cr=Ie((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}})),dr=t=>class extends(cr(Zs(Ys(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new nr(this),this._helperController=new hr(this),this._errorController=new lr(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
1186
+ */const cr=Te((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}})),dr=t=>class extends(cr(Zs(Ys(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new nr(this),this._helperController=new hr(this),this._errorController=new lr(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
1187
1187
  /**
1188
1188
  * @license
1189
1189
  * Copyright (c) 2018 - 2023 Vaadin Ltd.
@@ -1193,7 +1193,7 @@ class nr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
1193
1193
  * @license
1194
1194
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
1195
1195
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1196
- */class ur extends(dr(Rs(Ss(Wo(ie(wo)))))){static get is(){return"vaadin-checkbox-group"}static get template(){return go`
1196
+ */class ur extends(dr(Rs(Ps(Wo(ie(wo)))))){static get is(){return"vaadin-checkbox-group"}static get template(){return go`
1197
1197
  <style>
1198
1198
  :host {
1199
1199
  display: inline-flex;
@@ -2780,7 +2780,7 @@ const zr=J`
2780
2780
  * @license
2781
2781
  * Copyright (c) 2017 - 2023 Vaadin Ltd.
2782
2782
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2783
- */;Kt("vaadin-button",zr,{moduleId:"vaadin-button-styles"});class Tr extends(Er(Wo(ie(Ys(wo))))){static get is(){return"vaadin-button"}static get template(){return(t=>t`
2783
+ */;Kt("vaadin-button",zr,{moduleId:"vaadin-button-styles"});class Ir extends(Er(Wo(ie(Ys(wo))))){static get is(){return"vaadin-button"}static get template(){return(t=>t`
2784
2784
  <div class="vaadin-button-container">
2785
2785
  <span part="prefix" aria-hidden="true">
2786
2786
  <slot name="prefix"></slot>
@@ -2798,7 +2798,7 @@ const zr=J`
2798
2798
  * @license
2799
2799
  * Copyright (c) 2017 - 2023 Vaadin Ltd.
2800
2800
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2801
- */)(go)}ready(){super.ready(),this._tooltipController=new Qo(this),this.addController(this._tooltipController)}}V(Tr),Kt("vaadin-date-picker-year",J`
2801
+ */)(go)}ready(){super.ready(),this._tooltipController=new Qo(this),this.addController(this._tooltipController)}}V(Ir),Kt("vaadin-date-picker-year",J`
2802
2802
  :host([current]) [part='year-number'] {
2803
2803
  color: var(--lumo-primary-text-color);
2804
2804
  }
@@ -3112,13 +3112,13 @@ const zr=J`
3112
3112
  :host([disabled]) * {
3113
3113
  color: var(--lumo-disabled-text-color) !important;
3114
3114
  }
3115
- `,{moduleId:"lumo-month-calendar"});const Ir=document.createElement("template");Ir.innerHTML="\n <style>\n @keyframes vaadin-date-picker-month-calendar-focus-date {\n 50% {\n box-shadow: 0 0 0 2px transparent;\n }\n }\n </style>\n",document.head.appendChild(Ir.content);
3115
+ `,{moduleId:"lumo-month-calendar"});const Tr=document.createElement("template");Tr.innerHTML="\n <style>\n @keyframes vaadin-date-picker-month-calendar-focus-date {\n 50% {\n box-shadow: 0 0 0 2px transparent;\n }\n }\n </style>\n",document.head.appendChild(Tr.content);
3116
3116
  /**
3117
3117
  * @license
3118
3118
  * Copyright (c) 2017 - 2023 Vaadin Ltd.
3119
3119
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3120
3120
  */
3121
- const Pr=J`
3121
+ const Sr=J`
3122
3122
  [part$='button'] {
3123
3123
  flex: none;
3124
3124
  width: 1em;
@@ -3145,13 +3145,13 @@ const Pr=J`
3145
3145
  font-family: 'lumo-icons';
3146
3146
  display: block;
3147
3147
  }
3148
- `;Kt("",Pr,{moduleId:"lumo-field-button"});
3148
+ `;Kt("",Sr,{moduleId:"lumo-field-button"});
3149
3149
  /**
3150
3150
  * @license
3151
3151
  * Copyright (c) 2017 - 2023 Vaadin Ltd.
3152
3152
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3153
3153
  */
3154
- const Sr=[er,Pr,tr,J`
3154
+ const Pr=[er,Sr,tr,J`
3155
3155
  :host {
3156
3156
  --lumo-text-field-size: var(--lumo-size-m);
3157
3157
  color: var(--lumo-body-text-color);
@@ -3285,7 +3285,7 @@ const Sr=[er,Pr,tr,J`
3285
3285
  [part='clear-button']::before {
3286
3286
  content: var(--lumo-icons-cross);
3287
3287
  }
3288
- `];Kt("",Sr,{moduleId:"lumo-input-field-shared-styles"}),Kt("vaadin-date-picker",[Sr,J`
3288
+ `];Kt("",Pr,{moduleId:"lumo-input-field-shared-styles"}),Kt("vaadin-date-picker",[Pr,J`
3289
3289
  :host {
3290
3290
  outline: none;
3291
3291
  }
@@ -3469,7 +3469,7 @@ Kt("vaadin-date-picker-overlay",[ha,J`
3469
3469
  * @license
3470
3470
  * Copyright (c) 2016 - 2023 Vaadin Ltd.
3471
3471
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3472
- */V(ca);const ba=document.createElement("template");ba.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">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class ga extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(ba.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",jr&&(this.$.scroller.tabIndex=-1))}forceUpdate(){this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel())}_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=Fo.debounce(this._debouncerScrollFinish,Io.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=Fo.debounce(this._debouncerUpdateClones,Io.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 o=`vaadin-infinite-scroller-item-content-${Zo()}`,s=document.createElement("slot");s.setAttribute("name",o),s._itemWrapper=i,e.appendChild(s),i.setAttribute("slot",o),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=~~((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,o)=>{if(!i.updated){const s=this._firstIndex+this.bufferSize*o;[...i.children].forEach(((i,o)=>{const r=i._itemWrapper;t&&!this._isVisible(r,e)||this._updateElement(r.instance,s+o)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
3472
+ */V(ca);const ba=document.createElement("template");ba.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">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class ga extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(ba.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",jr&&(this.$.scroller.tabIndex=-1))}forceUpdate(){this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel())}_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=Fo.debounce(this._debouncerScrollFinish,To.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=Fo.debounce(this._debouncerUpdateClones,To.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 o=`vaadin-infinite-scroller-item-content-${Zo()}`,s=document.createElement("slot");s.setAttribute("name",o),s._itemWrapper=i,e.appendChild(s),i.setAttribute("slot",o),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=~~((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,o)=>{if(!i.updated){const s=this._firstIndex+this.bufferSize*o;[...i.children].forEach(((i,o)=>{const r=i._itemWrapper;t&&!this._isVisible(r,e)||this._updateElement(r.instance,s+o)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
3473
3473
  /**
3474
3474
  * @license
3475
3475
  * Copyright (c) 2016 - 2023 Vaadin Ltd.
@@ -3505,7 +3505,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3505
3505
  Code distributed by Google as part of the polymer project is also
3506
3506
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3507
3507
  */
3508
- function _a(t,e,i,o,s){let r;s&&(r="object"==typeof i&&null!==i,r&&(o=t.__dataTemp[e]));let a=o!==i&&(o==o||i==i);return r&&a&&(t.__dataTemp[e]=i),a}V(xa);const ka=Ie((t=>class extends t{_shouldPropertyChange(t,e,i){return _a(this,t,e,i,!0)}})),Aa=Ie((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return _a(this,t,e,i,this.mutableData)}}));ka._mutablePropertyChange=_a;
3508
+ function _a(t,e,i,o,s){let r;s&&(r="object"==typeof i&&null!==i,r&&(o=t.__dataTemp[e]));let a=o!==i&&(o==o||i==i);return r&&a&&(t.__dataTemp[e]=i),a}V(xa);const ka=Te((t=>class extends t{_shouldPropertyChange(t,e,i){return _a(this,t,e,i,!0)}})),Aa=Te((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return _a(this,t,e,i,this.mutableData)}}));ka._mutablePropertyChange=_a;
3509
3509
  /**
3510
3510
  @license
3511
3511
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3515,7 +3515,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3515
3515
  Code distributed by Google as part of the polymer project is also
3516
3516
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3517
3517
  */
3518
- let Ca=null;function za(){return Ca}za.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:za,writable:!0}});const Ea=ho(za),Ta=ka(Ea),Ia=ho(class{});class Pa 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 o=this.__dataHost.__dataHost;o&&o._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let o=e[i];if(Boolean(t)!=Boolean(o.__hideTemplateChildren__))if(o.nodeType===Node.TEXT_NODE)t?(o.__polymerTextContent__=o.textContent,o.textContent=""):o.textContent=o.__polymerTextContent__;else if("slot"===o.localName)if(t)o.__polymerReplaced__=document.createComment("hidden-slot"),We(We(o).parentNode).replaceChild(o.__polymerReplaced__,o);else{const t=o.__polymerReplaced__;t&&We(We(t).parentNode).replaceChild(o,t)}else o.style&&(t?(o.__polymerDisplay__=o.style.display,o.style.display="none"):o.style.display=o.__polymerDisplay__);o.__hideTemplateChildren__=t,o._showHideChildren&&o._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 Sa=ka(Pa);function Da(t){let e=t.__dataHost;return e&&e._methodHost||e}function Ma(t,e){return function(t,i,o){e.call(t.__templatizeOwner,i.substring(6),o[i])}}function Fa(t,e){return function(t,i,o){e.call(t.__templatizeOwner,t,i,o[i])}}function Oa(t,e,i){if(be&&!Da(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 o=(e?e.constructor:Pa)._parseTemplate(t),s=o.templatizeInstanceClass;s||(s=function(t,e,i){let o=i.mutableData?Sa:Pa;Oa.mixin&&(o=Oa.mixin(o));let s=class extends o{};return s.prototype.__templatizeOptions=i,s.prototype._bindTemplate(t),function(t,e,i,o){let s=i.hostProps||{};for(let e in o.instanceProps){delete s[e];let i=o.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Fa(0,i)})}if(o.forwardHostProp&&e.__dataHost)for(let e in s)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(s,t,e,i),s}(t,o,i),o.templatizeInstanceClass=s);const r=Da(t);!function(t,e,i,o){let s=i.forwardHostProp;if(s&&e.hasHostProps){const r="template"==t.localName;let a=e.templatizeTemplateClass;if(!a){if(r){let t=i.mutableData?Ta:Ea;class o extends t{}a=e.templatizeTemplateClass=o}else{const i=t.constructor;class o extends i{}a=e.templatizeTemplateClass=o}let n=e.hostProps;for(let t in n)a.prototype._addPropertyEffect("_host_"+t,a.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Ma(0,s)}),a.prototype._createNotifyingProperty("_host_"+t);we&&o&&function(t,e,i){const o=i.constructor._properties,{propertyEffects:s}=t,{instanceProps:r}=e;for(let t in s)if(!(o[t]||r&&r[t])){const e=s[t];for(let i=0;i<e.length;i++){const{part:o}=e[i].info;if(!o.signature||!o.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,o)}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,o,i,r);let a=class extends s{};return a.prototype._methodHost=r,a.prototype.__dataHost=t,a.prototype.__templatizeOwner=e,a.prototype.__hostProps=o.hostProps,a}
3518
+ let Ca=null;function za(){return Ca}za.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:za,writable:!0}});const Ea=ho(za),Ia=ka(Ea),Ta=ho(class{});class Sa extends Ta{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 o=this.__dataHost.__dataHost;o&&o._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let o=e[i];if(Boolean(t)!=Boolean(o.__hideTemplateChildren__))if(o.nodeType===Node.TEXT_NODE)t?(o.__polymerTextContent__=o.textContent,o.textContent=""):o.textContent=o.__polymerTextContent__;else if("slot"===o.localName)if(t)o.__polymerReplaced__=document.createComment("hidden-slot"),We(We(o).parentNode).replaceChild(o.__polymerReplaced__,o);else{const t=o.__polymerReplaced__;t&&We(We(t).parentNode).replaceChild(o,t)}else o.style&&(t?(o.__polymerDisplay__=o.style.display,o.style.display="none"):o.style.display=o.__polymerDisplay__);o.__hideTemplateChildren__=t,o._showHideChildren&&o._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 Pa=ka(Sa);function Da(t){let e=t.__dataHost;return e&&e._methodHost||e}function Ma(t,e){return function(t,i,o){e.call(t.__templatizeOwner,i.substring(6),o[i])}}function Fa(t,e){return function(t,i,o){e.call(t.__templatizeOwner,t,i,o[i])}}function Oa(t,e,i){if(be&&!Da(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 o=(e?e.constructor:Sa)._parseTemplate(t),s=o.templatizeInstanceClass;s||(s=function(t,e,i){let o=i.mutableData?Pa:Sa;Oa.mixin&&(o=Oa.mixin(o));let s=class extends o{};return s.prototype.__templatizeOptions=i,s.prototype._bindTemplate(t),function(t,e,i,o){let s=i.hostProps||{};for(let e in o.instanceProps){delete s[e];let i=o.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Fa(0,i)})}if(o.forwardHostProp&&e.__dataHost)for(let e in s)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(s,t,e,i),s}(t,o,i),o.templatizeInstanceClass=s);const r=Da(t);!function(t,e,i,o){let s=i.forwardHostProp;if(s&&e.hasHostProps){const r="template"==t.localName;let a=e.templatizeTemplateClass;if(!a){if(r){let t=i.mutableData?Ia:Ea;class o extends t{}a=e.templatizeTemplateClass=o}else{const i=t.constructor;class o extends i{}a=e.templatizeTemplateClass=o}let n=e.hostProps;for(let t in n)a.prototype._addPropertyEffect("_host_"+t,a.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Ma(0,s)}),a.prototype._createNotifyingProperty("_host_"+t);we&&o&&function(t,e,i){const o=i.constructor._properties,{propertyEffects:s}=t,{instanceProps:r}=e;for(let t in s)if(!(o[t]||r&&r[t])){const e=s[t];for(let i=0;i<e.length;i++){const{part:o}=e[i].info;if(!o.signature||!o.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,o)}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,o,i,r);let a=class extends s{};return a.prototype._methodHost=r,a.prototype.__dataHost=t,a.prototype.__templatizeOwner=e,a.prototype.__hostProps=o.hostProps,a}
3519
3519
  /**
3520
3520
  @license
3521
3521
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3677,7 +3677,7 @@ class Ga{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=t
3677
3677
  * @license
3678
3678
  * Copyright (c) 2016 - 2023 Vaadin Ltd.
3679
3679
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3680
- */const Ha=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){As(this.$.scrollers,"pan-y"),_s(this.$.scrollers,"track",this._track.bind(this)),_s(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),_s(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),_s(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Ga(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new Ko(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),_s(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new Ko(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),_s(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new Ko(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new Ko(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),_s(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,o){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,o))}__updateCalendars(t,e,i,o,s,r,a,n,l){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=o,t.focusedDate=r,t.selectedDate=s,t.showWeekNumbers=a,t.ignoreTaps=n,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const o=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+o,e)}const o=this._monthScroller.position>i,s=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+s-1<i;o?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-s+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=Fo.debounce(this._debouncer,Io.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(ma(t)):i}_onTodayTap(){const t=new Date;Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2);this._scrollToPosition(this._monthScroller.position+e/this._yearScroller.itemHeight*12,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let o=0;const s=this._monthScroller.position,r=t=>{o||(o=t);const e=t-o;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,s,this._targetPosition-s);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:s}})),this._monthScroller.position=this._targetPosition,this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return fa(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){da(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate),this._close(),e=!0;break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&da(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}async focusDate(t,e){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),await this.focusDateElement(!1)}async focusDateElement(t=!0){this.__pendingDateFocus=this.focusedDate,this.calendars.length||await new Promise((t=>{Br(this,(()=>{ja(),t()}))})),t&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(pa(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t)?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate){return(!e||t>=e)&&(!i||t<=i)}_isTodayAllowed(t,e){const i=new Date,o=new Date(0,0);return o.setFullYear(i.getFullYear()),o.setMonth(i.getMonth()),o.setDate(i.getDate()),this._dateAllowed(o,t,e)}}
3680
+ */const Ha=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){As(this.$.scrollers,"pan-y"),_s(this.$.scrollers,"track",this._track.bind(this)),_s(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),_s(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),_s(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Ga(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new Ko(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),_s(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new Ko(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),_s(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new Ko(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new Ko(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),_s(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,o){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,o))}__updateCalendars(t,e,i,o,s,r,a,n,l){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=o,t.focusedDate=r,t.selectedDate=s,t.showWeekNumbers=a,t.ignoreTaps=n,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const o=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+o,e)}const o=this._monthScroller.position>i,s=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+s-1<i;o?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-s+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=Fo.debounce(this._debouncer,To.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(ma(t)):i}_onTodayTap(){const t=new Date;Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2);this._scrollToPosition(this._monthScroller.position+e/this._yearScroller.itemHeight*12,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let o=0;const s=this._monthScroller.position,r=t=>{o||(o=t);const e=t-o;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,s,this._targetPosition-s);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:s}})),this._monthScroller.position=this._targetPosition,this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return fa(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){da(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate),this._close(),e=!0;break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&da(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}async focusDate(t,e){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),await this.focusDateElement(!1)}async focusDateElement(t=!0){this.__pendingDateFocus=this.focusedDate,this.calendars.length||await new Promise((t=>{Br(this,(()=>{ja(),t()}))})),t&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(pa(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t)?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate){return(!e||t>=e)&&(!i||t<=i)}_isTodayAllowed(t,e){const i=new Date,o=new Date(0,0);return o.setFullYear(i.getFullYear()),o.setMonth(i.getMonth()),o.setDate(i.getDate()),this._dateAllowed(o,t,e)}}
3681
3681
  /**
3682
3682
  * @license
3683
3683
  * Copyright (c) 2016 - 2023 Vaadin Ltd.
@@ -3774,12 +3774,12 @@ Kt("vaadin-date-picker-overlay-content",J`
3774
3774
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
3775
3775
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3776
3776
  */
3777
- const $a=new WeakMap,Ja=Ie((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return $a.has(t)||$a.set(t,new Set),$a.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))}))}})),Za=t=>class extends(Ws(Ds(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(),Ur||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this.clear(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
3777
+ const $a=new WeakMap,Ja=Te((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return $a.has(t)||$a.set(t,new Set),$a.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))}))}})),Za=t=>class extends(Ws(Ds(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(),Ur||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this.clear(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
3778
3778
  /**
3779
3779
  * @license
3780
3780
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
3781
3781
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3782
- */,Ka=Ie((t=>class extends(Us(cr(Ws(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),o=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():o&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return Boolean(t)||0===t}})),Qa=t=>class extends(Ja(Vs(Ka(dr(Za(Ds(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.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=Fo.debounce(this._preventInputDebouncer,Io.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)}}}
3782
+ */,Ka=Te((t=>class extends(Us(cr(Ws(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),o=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():o&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return Boolean(t)||0===t}})),Qa=t=>class extends(Ja(Vs(Ka(dr(Za(Ds(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.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=Fo.debounce(this._preventInputDebouncer,To.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)}}}
3783
3783
  /**
3784
3784
  * @license
3785
3785
  * Copyright (c) 2021 - 2023 Vaadin Ltd..
@@ -3930,7 +3930,7 @@ Kt("vaadin-date-picker",[Xa,J`
3930
3930
  ></vaadin-date-picker-overlay>
3931
3931
 
3932
3932
  <slot name="tooltip"></slot>
3933
- `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Hs(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ks(this.inputElement,this._labelController)),this._tooltipController=new Qo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}function rn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=Array(e);i<e;i++)o[i]=t[i];return o}function an(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return rn(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?rn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0,s=function(){};return{s,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,n=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){n=!0,r=t},f:function(){try{a||null==i.return||i.return()}finally{if(n)throw r}}}}function nn(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function ln(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hn(t,e){return hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hn(t,e)}function cn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hn(t,e)}function dn(t){return dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},dn(t)}function un(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(un=function(){return!!t})()}function pn(t){var e=un();return function(){var i,o=dn(t);if(e){var s=dn(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ln(t)}(this,i)}}function mn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fn(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function vn(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,fn(o.key),o)}}function bn(t,e,i){return e&&vn(t.prototype,e),i&&vn(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function gn(t,e,i){return(e=fn(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}V(sn);var yn=function(){function t(){mn(this,t),gn(this,"priority",void 0),gn(this,"subPriority",0)}return bn(t,[{key:"validate",value:function(){return!0}}]),t}(),wn=function(){cn(e,yn);var t=pn(e);function e(i,o,s,r,a){var n;return mn(this,e),(n=t.call(this)).value=i,n.validateValue=o,n.setValue=s,n.priority=r,a&&(n.subPriority=a),n}return bn(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),xn=function(){cn(e,yn);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",10),gn(ln(i),"subPriority",-1),i}return bn(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),_n=function(){function t(){mn(this,t),gn(this,"incompatibleTokens",void 0),gn(this,"priority",void 0),gn(this,"subPriority",void 0)}return bn(t,[{key:"run",value:function(t,e,i,o){var s=this.parse(t,e,i,o);return s?{setter:new wn(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),kn=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",140),gn(ln(i),"incompatibleTokens",["R","u","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),An=36e5,Cn=/^(1[0-2]|0?\d)/,zn=/^(3[0-1]|[0-2]?\d)/,En=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Tn=/^(5[0-3]|[0-4]?\d)/,In=/^(2[0-3]|[0-1]?\d)/,Pn=/^(2[0-4]|[0-1]?\d)/,Sn=/^(1[0-1]|0?\d)/,Dn=/^(1[0-2]|0?\d)/,Mn=/^[0-5]?\d/,Fn=/^[0-5]?\d/,On=/^\d/,Bn=/^\d{1,2}/,Nn=/^\d{1,3}/,Ln=/^\d{1,4}/,jn=/^-?\d+/,Rn=/^-?\d/,qn=/^-?\d{1,2}/,Vn=/^-?\d{1,3}/,Un=/^-?\d{1,4}/,Wn=/^([+-])(\d{2})(\d{2})?|Z/,Gn=/^([+-])(\d{2})(\d{2})|Z/,Hn=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Yn=/^([+-])(\d{2}):(\d{2})|Z/,$n=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Jn(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Zn(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function Kn(t,e){var i=e.match(t);if(!i)return null;if("Z"===i[0])return{value:0,rest:e.slice(1)};var o="+"===i[1]?1:-1,s=i[2]?parseInt(i[2],10):0,r=i[3]?parseInt(i[3],10):0,a=i[5]?parseInt(i[5],10):0;return{value:o*(s*An+6e4*r+1e3*a),rest:e.slice(i[0].length)}}function Qn(t){return Zn(jn,t)}function Xn(t,e){switch(t){case 1:return Zn(On,e);case 2:return Zn(Bn,e);case 3:return Zn(Nn,e);case 4:return Zn(Ln,e);default:return Zn(new RegExp("^\\d{1,"+t+"}"),e)}}function tl(t,e){switch(t){case 1:return Zn(Rn,e);case 2:return Zn(qn,e);case 3:return Zn(Vn,e);case 4:return Zn(Un,e);default:return Zn(new RegExp("^-?\\d{1,"+t+"}"),e)}}function el(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function il(t,e){var i,o=e>0,s=o?e:1-e;if(s<=50)i=t||100;else{var r=s+50;i=t+100*Math.floor(r/100)-(t>=r%100?100:0)}return o?i:1-i}function ol(t){return t%400==0||t%4==0&&t%100!=0}var sl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",130),gn(ln(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Jn(Xn(4,t),o);case"yo":return Jn(i.ordinalNumber(t,{unit:"year"}),o);default:return Jn(Xn(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var o=t.getUTCFullYear();if(i.isTwoDigitYear){var s=il(i.year,o);return t.setUTCFullYear(s,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),rl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",130),gn(ln(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Jn(Xn(4,t),o);case"Yo":return Jn(i.ordinalNumber(t,{unit:"year"}),o);default:return Jn(Xn(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,o){var s=l(t,o);if(i.isTwoDigitYear){var r=il(i.year,s);return t.setUTCFullYear(r,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),h(t,o)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),h(t,o)}}]),e}(),al=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",130),gn(ln(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e){return tl("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var o=new Date(0);return o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0),c(o)}}]),e}(),nl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",130),gn(ln(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e){return tl("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),ll=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",120),gn(ln(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return Xn(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),hl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",120),gn(ln(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return Xn(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),cl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),gn(ln(i),"priority",110),i}return bn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"M":return Jn(Zn(Cn,t),o);case"MM":return Jn(Xn(2,t),o);case"Mo":return Jn(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),dl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",110),gn(ln(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"L":return Jn(Zn(Cn,t),o);case"LL":return Jn(Xn(2,t),o);case"Lo":return Jn(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),ul=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",100),gn(ln(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return Zn(Tn,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,o){return h(function(t,e,i){d(2,arguments);var o=u(t),s=m(e),r=p(o,i)-s;return o.setUTCDate(o.getUTCDate()-7*r),o}(t,i,o),o)}}]),e}(),pl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",100),gn(ln(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return Zn(Tn,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return c(function(t,e){d(2,arguments);var i=u(t),o=m(e),s=f(i)-o;return i.setUTCDate(i.getUTCDate()-7*s),i}(t,i))}}]),e}(),ml=[31,28,31,30,31,30,31,31,30,31,30,31],fl=[31,29,31,30,31,30,31,31,30,31,30,31],vl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",90),gn(ln(i),"subPriority",1),gn(ln(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return Zn(zn,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){var i=ol(t.getUTCFullYear()),o=t.getUTCMonth();return i?e>=1&&e<=fl[o]:e>=1&&e<=ml[o]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),bl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",90),gn(ln(i),"subpriority",1),gn(ln(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return Zn(En,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return ol(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function gl(t,e,i){var o,s,r,a,n,l,h,c;d(2,arguments);var p=v(),f=m(null!==(o=null!==(s=null!==(r=null!==(a=null==i?void 0:i.weekStartsOn)&&void 0!==a?a:null==i||null===(n=i.locale)||void 0===n||null===(l=n.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:p.weekStartsOn)&&void 0!==s?s:null===(h=p.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var b=u(t),g=m(e),y=((g%7+7)%7<f?7:0)+g-b.getUTCDay();return b.setUTCDate(b.getUTCDate()+y),b}var yl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",90),gn(ln(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=gl(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),wl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",90),gn(ln(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i,o){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Jn(Xn(e.length,t),s);case"eo":return Jn(i.ordinalNumber(t,{unit:"day"}),s);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=gl(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),xl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",90),gn(ln(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i,o){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Jn(Xn(e.length,t),s);case"co":return Jn(i.ordinalNumber(t,{unit:"day"}),s);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=gl(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),_l=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",90),gn(ln(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Xn(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Jn(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Jn(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Jn(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return Jn(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){d(2,arguments);var i=m(e);i%7==0&&(i-=7);var o=u(t),s=((i%7+7)%7<1?7:0)+i-o.getUTCDay();return o.setUTCDate(o.getUTCDate()+s),o}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),kl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",80),gn(ln(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(el(i),0,0,0),t}}]),e}(),Al=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",80),gn(ln(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(el(i),0,0,0),t}}]),e}(),Cl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",80),gn(ln(i),"incompatibleTokens",["a","b","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(el(i),0,0,0),t}}]),e}(),zl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",70),gn(ln(i),"incompatibleTokens",["H","K","k","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return Zn(Dn,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:o||12!==i?i:0,0,0,0),t}}]),e}(),El=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",70),gn(ln(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return Zn(In,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Tl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",70),gn(ln(i),"incompatibleTokens",["h","H","k","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return Zn(Sn,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:i,0,0,0),t}}]),e}(),Il=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",70),gn(ln(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return Zn(Pn,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),Pl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",60),gn(ln(i),"incompatibleTokens",["t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return Zn(Mn,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),Sl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",50),gn(ln(i),"incompatibleTokens",["t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return Zn(Fn,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),Dl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",30),gn(ln(i),"incompatibleTokens",["t","T"]),i}return bn(e,[{key:"parse",value:function(t,e){return Jn(Xn(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),Ml=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",10),gn(ln(i),"incompatibleTokens",["t","T","x"]),i}return bn(e,[{key:"parse",value:function(t,e){switch(e){case"X":return Kn(Wn,t);case"XX":return Kn(Gn,t);case"XXXX":return Kn(Hn,t);case"XXXXX":return Kn($n,t);default:return Kn(Yn,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Fl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",10),gn(ln(i),"incompatibleTokens",["t","T","X"]),i}return bn(e,[{key:"parse",value:function(t,e){switch(e){case"x":return Kn(Wn,t);case"xx":return Kn(Gn,t);case"xxxx":return Kn(Hn,t);case"xxxxx":return Kn($n,t);default:return Kn(Yn,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Ol=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",40),gn(ln(i),"incompatibleTokens","*"),i}return bn(e,[{key:"parse",value:function(t){return Qn(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Bl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",20),gn(ln(i),"incompatibleTokens","*"),i}return bn(e,[{key:"parse",value:function(t){return Qn(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Nl={G:new kn,y:new sl,Y:new rl,R:new al,u:new nl,Q:new ll,q:new hl,M:new cl,L:new dl,w:new ul,I:new pl,d:new vl,D:new bl,E:new yl,e:new wl,c:new xl,i:new _l,a:new kl,b:new Al,B:new Cl,h:new zl,H:new El,K:new Tl,k:new Il,m:new Pl,s:new Sl,S:new Dl,X:new Ml,x:new Fl,t:new Ol,T:new Bl},Ll=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Rl=/^'([^]*?)'?$/,ql=/''/g,Vl=/\S/,Ul=/[a-zA-Z]/;function Wl(t,e,i,o){var s,r,a,l,h,c,p,f,A,C,z,E,T,I,P,S,D,M;d(3,arguments);var F=String(t),O=String(e),B=v(),N=null!==(s=null!==(r=null==o?void 0:o.locale)&&void 0!==r?r:B.locale)&&void 0!==s?s:w;if(!N.match)throw new RangeError("locale must contain match property");var L=m(null!==(a=null!==(l=null!==(h=null!==(c=null==o?void 0:o.firstWeekContainsDate)&&void 0!==c?c:null==o||null===(p=o.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==h?h:B.firstWeekContainsDate)&&void 0!==l?l:null===(A=B.locale)||void 0===A||null===(C=A.options)||void 0===C?void 0:C.firstWeekContainsDate)&&void 0!==a?a:1);if(!(L>=1&&L<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=m(null!==(z=null!==(E=null!==(T=null!==(I=null==o?void 0:o.weekStartsOn)&&void 0!==I?I:null==o||null===(P=o.locale)||void 0===P||null===(S=P.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==T?T:B.weekStartsOn)&&void 0!==E?E:null===(D=B.locale)||void 0===D||null===(M=D.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==z?z:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===O)return""===F?u(i):new Date(NaN);var R,q={firstWeekContainsDate:L,weekStartsOn:j,locale:N},V=[new xn],U=O.match(jl).map((function(t){var e=t[0];return e in b?(0,b[e])(t,N.formatLong):t})).join("").match(Ll),W=[],G=an(U);try{var H=function(){var e=R.value;null!=o&&o.useAdditionalWeekYearTokens||!x(e)||_(e,O,t),null!=o&&o.useAdditionalDayOfYearTokens||!k(e)||_(e,O,t);var i=e[0],s=Nl[i];if(s){var r=s.incompatibleTokens;if(Array.isArray(r)){var a=W.find((function(t){return r.includes(t.token)||t.token===i}));if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===s.incompatibleTokens&&W.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));W.push({token:i,fullToken:e});var n=s.run(F,e,N.match,q);if(!n)return{v:new Date(NaN)};V.push(n.setter),F=n.rest}else{if(i.match(Ul))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(Rl)[1].replace(ql,"'")),0!==F.indexOf(e))return{v:new Date(NaN)};F=F.slice(e.length)}};for(G.s();!(R=G.n()).done;){var Y=H();if("object"===n(Y))return Y.v}}catch(t){G.e(t)}finally{G.f()}if(F.length>0&&Vl.test(F))return new Date(NaN);var $=V.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return V.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),J=u(i);if(isNaN(J.getTime()))return new Date(NaN);var Z,K=g(J,y(J)),Q={},X=an($);try{for(X.s();!(Z=X.n()).done;){var tt=Z.value;if(!tt.validate(K,q))return new Date(NaN);var et=tt.set(K,Q,q);Array.isArray(et)?(K=et[0],nn(Q,et[1])):K=et}}catch(t){X.e(t)}finally{X.f()}return K}function Gl(t){d(1,arguments);var e=u(t);return e.setHours(0,0,0,0),e}var Hl={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}};function Yl(t,e){d(2,arguments);var i=u(t),o=u(e);return i.getTime()>o.getTime()}function $l(t,e){d(2,arguments);var i=u(t),o=u(e);return i.getTime()<o.getTime()}const Jl=class{constructor(t){e(this,t),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:o}=t,s=new Date(e,i,o);return A(s,this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=Wl(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.dateFormat=void 0,this.emitOnClick=!1,this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=Wl((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=Wl((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){if(this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker){const t=this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');t&&t.addEventListener("click",(()=>this.handleCalendarIconClick()))}this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleCalendarIconClick(){this.datePicker.opened&&this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=Wl(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!$l(this.valueAsDate,this.minDate)&&!Yl(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return $l(this.valueAsDate,this.minDate)||Yl(this.valueAsDate,this.maxDate)?R("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?R("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?R("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?t("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let e="";return this.touched&&(e=1==this.isValid||null==this.isValid?"":"text__input--invalid"),t("div",{key:"fc9cd0a618c7b6e62962c0800399a470fffa1fc4",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},t("label",{key:"abc7c1715dd2d0c60dd2ac6d028355de910be501",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),t("vaadin-date-picker",{key:"a6b40a978b573d41490457d708f9a7ac78622a6f",id:`${this.name}__input`,type:"date",class:`date__input ${e}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),t("small",{key:"d802ea7b25a64802aca3a7491107fcee7af2a23c",class:"date__error-message"},this.errorMessage),this.tooltip&&t("img",{key:"46edd200a9ce9eba27414a6434c6b3d5e9dc9964",class:"date__tooltip-icon",src:q,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Jl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.date__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:rgba(204, 0, 0, 0.7019607843)}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const Zl=class{constructor(t){e(this,t),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return R(`${i}`,this.language)?R(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return R("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return R("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return R(`${t}`,this.language)?R(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?t("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let e="";return this.touched&&(e=1==this.isValid||null==this.isValid?"":"text__input--invalid"),t("div",{key:"23ac67984ab7a0f4db01e5fe01f4f326b4c6a912",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},t("div",{key:"aa2405e435aea20f1678dd74776a8ce4094bc95b",class:"email__wrapper--flex"},t("label",{key:"970b83bbcf082d1721c1647993fecd076939b65d",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),t("div",{key:"2f03eaf161aab9b45282c1bc0de15bea8455427c",class:"email__wrapper--relative"},this.tooltip&&t("img",{key:"3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b",class:"email__tooltip-icon",src:q,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),t("input",{key:"491f83c0f562893c02e3425b4d54eecc214e3c95",id:`${this.name}__input`,type:"email",class:`email__input ${e}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),t("small",{key:"edb6660d958cc5d0cb41b0db195bd7e847ecbefe",class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Zl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emfe-w-color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.email__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__input::placeholder{color:var(--emfe-w-color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const Kl=class{constructor(t){e(this,t),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])j[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var e;switch(null===(e=this.type)||void 0===e?void 0:e.toLowerCase()){case"text":return t("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"email":return t("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return t("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return t("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return t("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return t("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return t("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick});case"password":return t("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return t("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return t("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return t("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});default:return t("p",null,"The ",this.type," input type is not valid")}}render(){return t(s,{key:"e1c49fc91ead165c05b30c21ac568486e55c8096",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};Kl.style=":host{display:block;height:100%}";const Ql=class{constructor(t){e(this,t),this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.el.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.el.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const t=[];if(this.translationUrl){const o=(e=this.translationUrl,i=this.targetTranslations,new Promise((t=>{fetch(e).then((t=>t.json())).then((e=>{Object.keys(e).forEach((t=>{i[t]=i[t]?i[t]:{};for(let o in e[t])i[t][o]=e[t][o]})),t(!0)}))})));t.push(o)}var e,i;return await Promise.all(t)}render(){return t("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},t("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return o(this)}};Ql.style=":host{display:block}";const Xl=class{constructor(t){e(this,t),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return R(`${i}`,this.language)?R(`${i}`,this.language):o}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?R("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?R("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?t("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let e="";return this.touched&&(e=1==this.isValid||null==this.isValid?"":"text__input--invalid"),t("div",{key:"2032f77ca52b330ae2e8f484d7a0aba60ee7b9d5",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},t("div",{key:"0786901cd928bba86597180f058bff43fba522b6",class:"number__wrapper--flex"},t("label",{key:"ff7f39306cef7aeba3e0e4508df03c5a945e748b",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),t("div",{key:"dced91223621551472fee374d56f1ad7476f4191",class:"number__wrapper--relative"},this.tooltip&&t("img",{key:"a804a983e342e4d117126720a32c4c34a2b267dc",class:"number__tooltip-icon",src:q,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),t("input",{key:"fd59afaedf7d9f761684b057a1809474d735cc26",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${e}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),t("small",{key:"ca11558b5704b69311626736ab84a298449b98d7",class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Xl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emfe-w-color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';
3933
+ `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Hs(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ks(this.inputElement,this._labelController)),this._tooltipController=new Qo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}function rn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=Array(e);i<e;i++)o[i]=t[i];return o}function an(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return rn(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?rn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0,s=function(){};return{s,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,n=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){n=!0,r=t},f:function(){try{a||null==i.return||i.return()}finally{if(n)throw r}}}}function nn(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function ln(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hn(t,e){return hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hn(t,e)}function cn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hn(t,e)}function dn(t){return dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},dn(t)}function un(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(un=function(){return!!t})()}function pn(t){var e=un();return function(){var i,o=dn(t);if(e){var s=dn(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ln(t)}(this,i)}}function mn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fn(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function vn(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,fn(o.key),o)}}function bn(t,e,i){return e&&vn(t.prototype,e),i&&vn(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function gn(t,e,i){return(e=fn(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}V(sn);var yn=function(){function t(){mn(this,t),gn(this,"priority",void 0),gn(this,"subPriority",0)}return bn(t,[{key:"validate",value:function(){return!0}}]),t}(),wn=function(){cn(e,yn);var t=pn(e);function e(i,o,s,r,a){var n;return mn(this,e),(n=t.call(this)).value=i,n.validateValue=o,n.setValue=s,n.priority=r,a&&(n.subPriority=a),n}return bn(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),xn=function(){cn(e,yn);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",10),gn(ln(i),"subPriority",-1),i}return bn(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),_n=function(){function t(){mn(this,t),gn(this,"incompatibleTokens",void 0),gn(this,"priority",void 0),gn(this,"subPriority",void 0)}return bn(t,[{key:"run",value:function(t,e,i,o){var s=this.parse(t,e,i,o);return s?{setter:new wn(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),kn=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",140),gn(ln(i),"incompatibleTokens",["R","u","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),An=36e5,Cn=/^(1[0-2]|0?\d)/,zn=/^(3[0-1]|[0-2]?\d)/,En=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,In=/^(5[0-3]|[0-4]?\d)/,Tn=/^(2[0-3]|[0-1]?\d)/,Sn=/^(2[0-4]|[0-1]?\d)/,Pn=/^(1[0-1]|0?\d)/,Dn=/^(1[0-2]|0?\d)/,Mn=/^[0-5]?\d/,Fn=/^[0-5]?\d/,On=/^\d/,Bn=/^\d{1,2}/,Nn=/^\d{1,3}/,Ln=/^\d{1,4}/,jn=/^-?\d+/,Rn=/^-?\d/,qn=/^-?\d{1,2}/,Vn=/^-?\d{1,3}/,Un=/^-?\d{1,4}/,Wn=/^([+-])(\d{2})(\d{2})?|Z/,Gn=/^([+-])(\d{2})(\d{2})|Z/,Hn=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Yn=/^([+-])(\d{2}):(\d{2})|Z/,$n=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Jn(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Zn(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function Kn(t,e){var i=e.match(t);if(!i)return null;if("Z"===i[0])return{value:0,rest:e.slice(1)};var o="+"===i[1]?1:-1,s=i[2]?parseInt(i[2],10):0,r=i[3]?parseInt(i[3],10):0,a=i[5]?parseInt(i[5],10):0;return{value:o*(s*An+6e4*r+1e3*a),rest:e.slice(i[0].length)}}function Qn(t){return Zn(jn,t)}function Xn(t,e){switch(t){case 1:return Zn(On,e);case 2:return Zn(Bn,e);case 3:return Zn(Nn,e);case 4:return Zn(Ln,e);default:return Zn(new RegExp("^\\d{1,"+t+"}"),e)}}function tl(t,e){switch(t){case 1:return Zn(Rn,e);case 2:return Zn(qn,e);case 3:return Zn(Vn,e);case 4:return Zn(Un,e);default:return Zn(new RegExp("^-?\\d{1,"+t+"}"),e)}}function el(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function il(t,e){var i,o=e>0,s=o?e:1-e;if(s<=50)i=t||100;else{var r=s+50;i=t+100*Math.floor(r/100)-(t>=r%100?100:0)}return o?i:1-i}function ol(t){return t%400==0||t%4==0&&t%100!=0}var sl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",130),gn(ln(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Jn(Xn(4,t),o);case"yo":return Jn(i.ordinalNumber(t,{unit:"year"}),o);default:return Jn(Xn(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var o=t.getUTCFullYear();if(i.isTwoDigitYear){var s=il(i.year,o);return t.setUTCFullYear(s,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),rl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",130),gn(ln(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Jn(Xn(4,t),o);case"Yo":return Jn(i.ordinalNumber(t,{unit:"year"}),o);default:return Jn(Xn(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,o){var s=l(t,o);if(i.isTwoDigitYear){var r=il(i.year,s);return t.setUTCFullYear(r,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),h(t,o)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),h(t,o)}}]),e}(),al=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",130),gn(ln(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e){return tl("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var o=new Date(0);return o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0),c(o)}}]),e}(),nl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",130),gn(ln(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e){return tl("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),ll=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",120),gn(ln(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return Xn(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),hl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",120),gn(ln(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return Xn(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),cl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),gn(ln(i),"priority",110),i}return bn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"M":return Jn(Zn(Cn,t),o);case"MM":return Jn(Xn(2,t),o);case"Mo":return Jn(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),dl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",110),gn(ln(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"L":return Jn(Zn(Cn,t),o);case"LL":return Jn(Xn(2,t),o);case"Lo":return Jn(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),ul=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",100),gn(ln(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return Zn(In,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,o){return h(function(t,e,i){d(2,arguments);var o=u(t),s=m(e),r=p(o,i)-s;return o.setUTCDate(o.getUTCDate()-7*r),o}(t,i,o),o)}}]),e}(),pl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",100),gn(ln(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return Zn(In,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return c(function(t,e){d(2,arguments);var i=u(t),o=m(e),s=f(i)-o;return i.setUTCDate(i.getUTCDate()-7*s),i}(t,i))}}]),e}(),ml=[31,28,31,30,31,30,31,31,30,31,30,31],fl=[31,29,31,30,31,30,31,31,30,31,30,31],vl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",90),gn(ln(i),"subPriority",1),gn(ln(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return Zn(zn,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){var i=ol(t.getUTCFullYear()),o=t.getUTCMonth();return i?e>=1&&e<=fl[o]:e>=1&&e<=ml[o]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),bl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",90),gn(ln(i),"subpriority",1),gn(ln(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return Zn(En,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return ol(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function gl(t,e,i){var o,s,r,a,n,l,h,c;d(2,arguments);var p=v(),f=m(null!==(o=null!==(s=null!==(r=null!==(a=null==i?void 0:i.weekStartsOn)&&void 0!==a?a:null==i||null===(n=i.locale)||void 0===n||null===(l=n.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:p.weekStartsOn)&&void 0!==s?s:null===(h=p.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var b=u(t),g=m(e),y=((g%7+7)%7<f?7:0)+g-b.getUTCDay();return b.setUTCDate(b.getUTCDate()+y),b}var yl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",90),gn(ln(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=gl(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),wl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",90),gn(ln(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i,o){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Jn(Xn(e.length,t),s);case"eo":return Jn(i.ordinalNumber(t,{unit:"day"}),s);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=gl(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),xl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",90),gn(ln(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i,o){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Jn(Xn(e.length,t),s);case"co":return Jn(i.ordinalNumber(t,{unit:"day"}),s);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=gl(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),_l=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",90),gn(ln(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){var o=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Xn(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Jn(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Jn(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Jn(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return Jn(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){d(2,arguments);var i=m(e);i%7==0&&(i-=7);var o=u(t),s=((i%7+7)%7<1?7:0)+i-o.getUTCDay();return o.setUTCDate(o.getUTCDate()+s),o}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),kl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",80),gn(ln(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(el(i),0,0,0),t}}]),e}(),Al=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",80),gn(ln(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(el(i),0,0,0),t}}]),e}(),Cl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",80),gn(ln(i),"incompatibleTokens",["a","b","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(el(i),0,0,0),t}}]),e}(),zl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",70),gn(ln(i),"incompatibleTokens",["H","K","k","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return Zn(Dn,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:o||12!==i?i:0,0,0,0),t}}]),e}(),El=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",70),gn(ln(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return Zn(Tn,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Il=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",70),gn(ln(i),"incompatibleTokens",["h","H","k","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return Zn(Pn,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:i,0,0,0),t}}]),e}(),Tl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",70),gn(ln(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return Zn(Sn,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),Sl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",60),gn(ln(i),"incompatibleTokens",["t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return Zn(Mn,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),Pl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",50),gn(ln(i),"incompatibleTokens",["t","T"]),i}return bn(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return Zn(Fn,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Xn(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),Dl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",30),gn(ln(i),"incompatibleTokens",["t","T"]),i}return bn(e,[{key:"parse",value:function(t,e){return Jn(Xn(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),Ml=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",10),gn(ln(i),"incompatibleTokens",["t","T","x"]),i}return bn(e,[{key:"parse",value:function(t,e){switch(e){case"X":return Kn(Wn,t);case"XX":return Kn(Gn,t);case"XXXX":return Kn(Hn,t);case"XXXXX":return Kn($n,t);default:return Kn(Yn,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Fl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",10),gn(ln(i),"incompatibleTokens",["t","T","X"]),i}return bn(e,[{key:"parse",value:function(t,e){switch(e){case"x":return Kn(Wn,t);case"xx":return Kn(Gn,t);case"xxxx":return Kn(Hn,t);case"xxxxx":return Kn($n,t);default:return Kn(Yn,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Ol=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",40),gn(ln(i),"incompatibleTokens","*"),i}return bn(e,[{key:"parse",value:function(t){return Qn(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Bl=function(){cn(e,_n);var t=pn(e);function e(){var i;mn(this,e);for(var o=arguments.length,s=new Array(o),r=0;r<o;r++)s[r]=arguments[r];return gn(ln(i=t.call.apply(t,[this].concat(s))),"priority",20),gn(ln(i),"incompatibleTokens","*"),i}return bn(e,[{key:"parse",value:function(t){return Qn(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Nl={G:new kn,y:new sl,Y:new rl,R:new al,u:new nl,Q:new ll,q:new hl,M:new cl,L:new dl,w:new ul,I:new pl,d:new vl,D:new bl,E:new yl,e:new wl,c:new xl,i:new _l,a:new kl,b:new Al,B:new Cl,h:new zl,H:new El,K:new Il,k:new Tl,m:new Sl,s:new Pl,S:new Dl,X:new Ml,x:new Fl,t:new Ol,T:new Bl},Ll=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Rl=/^'([^]*?)'?$/,ql=/''/g,Vl=/\S/,Ul=/[a-zA-Z]/;function Wl(t,e,i,o){var s,r,a,l,h,c,p,f,A,C,z,E,I,T,S,P,D,M;d(3,arguments);var F=String(t),O=String(e),B=v(),N=null!==(s=null!==(r=null==o?void 0:o.locale)&&void 0!==r?r:B.locale)&&void 0!==s?s:w;if(!N.match)throw new RangeError("locale must contain match property");var L=m(null!==(a=null!==(l=null!==(h=null!==(c=null==o?void 0:o.firstWeekContainsDate)&&void 0!==c?c:null==o||null===(p=o.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==h?h:B.firstWeekContainsDate)&&void 0!==l?l:null===(A=B.locale)||void 0===A||null===(C=A.options)||void 0===C?void 0:C.firstWeekContainsDate)&&void 0!==a?a:1);if(!(L>=1&&L<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=m(null!==(z=null!==(E=null!==(I=null!==(T=null==o?void 0:o.weekStartsOn)&&void 0!==T?T:null==o||null===(S=o.locale)||void 0===S||null===(P=S.options)||void 0===P?void 0:P.weekStartsOn)&&void 0!==I?I:B.weekStartsOn)&&void 0!==E?E:null===(D=B.locale)||void 0===D||null===(M=D.options)||void 0===M?void 0:M.weekStartsOn)&&void 0!==z?z:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===O)return""===F?u(i):new Date(NaN);var R,q={firstWeekContainsDate:L,weekStartsOn:j,locale:N},V=[new xn],U=O.match(jl).map((function(t){var e=t[0];return e in b?(0,b[e])(t,N.formatLong):t})).join("").match(Ll),W=[],G=an(U);try{var H=function(){var e=R.value;null!=o&&o.useAdditionalWeekYearTokens||!x(e)||_(e,O,t),null!=o&&o.useAdditionalDayOfYearTokens||!k(e)||_(e,O,t);var i=e[0],s=Nl[i];if(s){var r=s.incompatibleTokens;if(Array.isArray(r)){var a=W.find((function(t){return r.includes(t.token)||t.token===i}));if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===s.incompatibleTokens&&W.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));W.push({token:i,fullToken:e});var n=s.run(F,e,N.match,q);if(!n)return{v:new Date(NaN)};V.push(n.setter),F=n.rest}else{if(i.match(Ul))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(Rl)[1].replace(ql,"'")),0!==F.indexOf(e))return{v:new Date(NaN)};F=F.slice(e.length)}};for(G.s();!(R=G.n()).done;){var Y=H();if("object"===n(Y))return Y.v}}catch(t){G.e(t)}finally{G.f()}if(F.length>0&&Vl.test(F))return new Date(NaN);var $=V.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return V.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),J=u(i);if(isNaN(J.getTime()))return new Date(NaN);var Z,K=g(J,y(J)),Q={},X=an($);try{for(X.s();!(Z=X.n()).done;){var tt=Z.value;if(!tt.validate(K,q))return new Date(NaN);var et=tt.set(K,Q,q);Array.isArray(et)?(K=et[0],nn(Q,et[1])):K=et}}catch(t){X.e(t)}finally{X.f()}return K}function Gl(t){d(1,arguments);var e=u(t);return e.setHours(0,0,0,0),e}var Hl={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}};function Yl(t,e){d(2,arguments);var i=u(t),o=u(e);return i.getTime()>o.getTime()}function $l(t,e){d(2,arguments);var i=u(t),o=u(e);return i.getTime()<o.getTime()}const Jl=class{constructor(t){e(this,t),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:o}=t,s=new Date(e,i,o);return A(s,this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=Wl(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.dateFormat=void 0,this.emitOnClick=!1,this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=Wl((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=Wl((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){if(this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker){const t=this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');t&&t.addEventListener("click",(()=>this.handleCalendarIconClick()))}this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleCalendarIconClick(){this.datePicker.opened&&this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=Wl(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!$l(this.valueAsDate,this.minDate)&&!Yl(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return $l(this.valueAsDate,this.minDate)||Yl(this.valueAsDate,this.maxDate)?R("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?R("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?R("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?t("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let e="";return this.touched&&(e=1==this.isValid||null==this.isValid?"":"text__input--invalid"),t("div",{key:"fc9cd0a618c7b6e62962c0800399a470fffa1fc4",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},t("label",{key:"abc7c1715dd2d0c60dd2ac6d028355de910be501",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),t("vaadin-date-picker",{key:"a6b40a978b573d41490457d708f9a7ac78622a6f",id:`${this.name}__input`,type:"date",class:`date__input ${e}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),t("small",{key:"d802ea7b25a64802aca3a7491107fcee7af2a23c",class:"date__error-message"},this.errorMessage),this.tooltip&&t("img",{key:"46edd200a9ce9eba27414a6434c6b3d5e9dc9964",class:"date__tooltip-icon",src:q,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Jl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.date__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:rgba(204, 0, 0, 0.7019607843)}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const Zl=class{constructor(t){e(this,t),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return R(`${i}`,this.language)?R(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return R("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return R("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return R(`${t}`,this.language)?R(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?t("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let e="";return this.touched&&(e=1==this.isValid||null==this.isValid?"":"text__input--invalid"),t("div",{key:"23ac67984ab7a0f4db01e5fe01f4f326b4c6a912",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},t("div",{key:"aa2405e435aea20f1678dd74776a8ce4094bc95b",class:"email__wrapper--flex"},t("label",{key:"970b83bbcf082d1721c1647993fecd076939b65d",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),t("div",{key:"2f03eaf161aab9b45282c1bc0de15bea8455427c",class:"email__wrapper--relative"},this.tooltip&&t("img",{key:"3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b",class:"email__tooltip-icon",src:q,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),t("input",{key:"491f83c0f562893c02e3425b4d54eecc214e3c95",id:`${this.name}__input`,type:"email",class:`email__input ${e}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),t("small",{key:"edb6660d958cc5d0cb41b0db195bd7e847ecbefe",class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Zl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emfe-w-color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.email__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__input::placeholder{color:var(--emfe-w-color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const Kl=class{constructor(t){e(this,t),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])j[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var e;switch(null===(e=this.type)||void 0===e?void 0:e.toLowerCase()){case"text":return t("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"email":return t("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return t("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return t("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return t("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return t("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return t("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick});case"password":return t("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return t("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return t("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return t("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});default:return t("p",null,"The ",this.type," input type is not valid")}}render(){return t(s,{key:"e1c49fc91ead165c05b30c21ac568486e55c8096",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};Kl.style=":host{display:block;height:100%}";const Ql=class{constructor(t){e(this,t),this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.el.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.el.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const t=[];if(this.translationUrl){const o=(e=this.translationUrl,i=this.targetTranslations,new Promise((t=>{fetch(e).then((t=>t.json())).then((e=>{Object.keys(e).forEach((t=>{i[t]=i[t]?i[t]:{};for(let o in e[t])i[t][o]=e[t][o]})),t(!0)}))})));t.push(o)}var e,i;return await Promise.all(t)}render(){return t("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},t("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return o(this)}};Ql.style=":host{display:block}";const Xl=class{constructor(t){e(this,t),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return R(`${i}`,this.language)?R(`${i}`,this.language):o}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?R("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?R("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?t("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let e="";return this.touched&&(e=1==this.isValid||null==this.isValid?"":"text__input--invalid"),t("div",{key:"2032f77ca52b330ae2e8f484d7a0aba60ee7b9d5",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},t("div",{key:"0786901cd928bba86597180f058bff43fba522b6",class:"number__wrapper--flex"},t("label",{key:"ff7f39306cef7aeba3e0e4508df03c5a945e748b",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),t("div",{key:"dced91223621551472fee374d56f1ad7476f4191",class:"number__wrapper--relative"},this.tooltip&&t("img",{key:"a804a983e342e4d117126720a32c4c34a2b267dc",class:"number__tooltip-icon",src:q,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),t("input",{key:"fd59afaedf7d9f761684b057a1809474d735cc26",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${e}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),t("small",{key:"ca11558b5704b69311626736ab84a298449b98d7",class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Xl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emfe-w-color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';
3934
3934
  /**
3935
3935
  * @license
3936
3936
  * Copyright (c) 2017 - 2023 Vaadin Ltd.
@@ -4774,7 +4774,7 @@ const nh=t=>class extends(Qa(t)){static get properties(){return{autocomplete:{ty
4774
4774
  background: transparent;
4775
4775
  outline: none;
4776
4776
  }
4777
- `],{moduleId:"lumo-password-field-button"}),Kt("vaadin-password-field",[Sr,J`
4777
+ `],{moduleId:"lumo-password-field-button"}),Kt("vaadin-password-field",[Pr,J`
4778
4778
  [part='reveal-button']::before {
4779
4779
  content: var(--lumo-icons-eye);
4780
4780
  }
@@ -4798,7 +4798,7 @@ const nh=t=>class extends(Qa(t)){static get properties(){return{autocomplete:{ty
4798
4798
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
4799
4799
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4800
4800
  */
4801
- class extends Tr{static get is(){return"vaadin-password-field-button"}static get template(){return go`
4801
+ class extends Ir{static get is(){return"vaadin-password-field-button"}static get template(){return go`
4802
4802
  <style>
4803
4803
  :host {
4804
4804
  display: block;
@@ -4819,7 +4819,7 @@ const ch=go`
4819
4819
  <div part="reveal-button" slot="suffix">
4820
4820
  <slot name="reveal"></slot>
4821
4821
  </div>
4822
- `;let dh;V(class extends hh{static get is(){return"vaadin-password-field"}static get template(){if(!dh){dh=super.template.cloneNode(!0);const t=ch.content.querySelector('[part="reveal-button"]');dh.content.querySelector('[part="input-field"]').appendChild(t)}return dh}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 Ko(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.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t.base)}_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)}});const uh=class{constructor(t){e(this,t),this.sendOriginalValidityState=i(this,"sendOriginalValidityState",7),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}calculateComplexity(t){this.passwordComplexity=this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern).test(t);return{rule:e.displayName,ruleKey:e.errorKey,passed:i}}))}setValidity(){var t,e;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.isDuplicateInput&&!this.originalValid)return R("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return R(`${i}`,this.language)?R(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return R("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return R("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return R(`${t}`,this.language)?R(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?t("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const e=this.passwordComplexity.length,i=this.passwordComplexity.filter((t=>t.passed)).length/e,o=this.passwordComplexity.every((t=>t.passed));return t("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},t("div",{class:"password__complexity--strength"},t("p",{class:"password__complexity--text"},R("passwordStrength",this.language)," ",t("span",{class:"password__complexity--text-bold"},R(o?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),t("meter",{value:i,min:"0",max:"1"})),t("div",null,this.passwordComplexity.map(((e,i)=>t("div",{key:i},t("input",{class:"password__complexity--checkbox",type:"checkbox",checked:e.passed,disabled:!0}),t("span",null,R(`${e.ruleKey}`,this.language)?R(`${e.ruleKey}`,this.language):e.rule))))))}render(){let e="";return this.touched&&(e=1==this.isValid||null==this.isValid?"":"text__input--invalid"),t("div",{key:"7f6a07f3c7e3aa53e1d97d674cc7a5591c33f7ce",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},t("div",{key:"a487d206585a3eb30441509070a6ab0747b911b4",class:"password__wrapper--flex"},t("label",{key:"e8c471fa0836cb842f529c3733491249400b534c",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),t("div",{key:"4d90f18a711b27a621ebf5043906d5f35387a7e5",class:"password__wrapper--relative"},this.tooltip&&t("img",{key:"c44c2d9bf69b37761da9d0c5485326391627b8b4",class:"password__tooltip-icon",src:q,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),t("vaadin-password-field",{key:"582dde61d4f34b09e8894168c0d09ed5a7b571d8",type:"password",id:`${this.name}__input`,class:`password__input ${e}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),t("small",{key:"6fb3a91b1872805085f4d028c0760be8f6383b10",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};uh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:"Roboto";font-style:normal}.password__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.password__wrapper--autofilled{pointer-events:none}.password__wrapper--autofilled .password__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.password__wrapper--autofilled .password__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.password__wrapper--flex{display:flex;gap:5px}.password__wrapper--relative{position:relative}.password__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.password__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.password__input{width:inherit;border:none}.password__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.password__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.password__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);background-color:var(--emfe-w-color-white, #FFFFFF);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;position:relative;margin-bottom:unset;height:44px;padding:0;width:100%}.password__input::part(reveal-button){position:relative;right:10px}.password__input::part(reveal-button)::before{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.password__input>input{padding:5px 15px}.password__input>input:placeholder-shown{color:var(--emfe-w-color-gray-150, #828282)}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.password__complexity{position:relative;padding:10px;display:flex;flex-direction:column;gap:20px;justify-content:center;margin-top:20px;font-weight:300;background:var(--emfe-w-color-white, #FFFFFF);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:150px;border:1px solid #B0B0B0;}.password__complexity meter{border-color:transparent;}.password__complexity meter[value="1"]::-moz-meter-bar{background-color:var(--emfe-w-color-valid, #48952a)}.password__complexity meter[value="1"]::-webkit-meter-optimum-value{background-color:var(--emfe-w-color-valid, #48952a)}.password__complexity meter:not([value="1"])::-moz-meter-bar{background-color:var(--emfe-w-color-error, #FD2839)}.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value{background-color:var(--emfe-w-color-error, #FD2839)}.password__complexity--strength{display:flex;justify-content:space-evenly;align-items:center}.password__complexity--strength meter::-moz-meter-bar{background:#B0B0B0}.password__complexity--hidden{display:none}.password__complexity--text-bold{font-weight:500}.password__complexity--checkbox{margin-right:5px}.password__complexity:after{content:"";position:absolute;width:25px;height:25px;border-top:1px solid var(--emfe-w-color-gray-150, #828282);border-right:0 solid var(--emfe-w-color-gray-150, #828282);border-left:1px solid var(--emfe-w-color-gray-150, #828282);border-bottom:0 solid var(--emfe-w-color-gray-150, #828282);bottom:92%;left:50%;margin-left:-25px;transform:rotate(45deg);margin-top:-25px;background-color:var(--emfe-w-color-white, #FFFFFF)}.password__tooltip-icon{width:16px;height:auto}.password__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-150, #828282);color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.password__tooltip.visible{opacity:1}';const ph=class{constructor(t){e(this,t),this.playerElevateLeveLoaded=i(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let t=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise(((e,i)=>fetch(t.href,{method:"GET"}).then((t=>t.json())).then((t=>{this.levels=t.data,e(!0)})).catch((t=>{i(t)}))))}calcuatePointsToBeExpired(t){let e="";if(!t||!t.aboutToExpire||0==t.aboutToExpire.length||t.aboutToExpire[0].points<=0)return e;t.aboutToExpire.sort(((t,e)=>$l(new Date(t.expireTime),new Date(e.expireTime))?-1:1));const i=t.aboutToExpire[0],o=function(t,e){d(2,arguments);var i=Gl(t),o=Gl(e),s=i.getTime()-y(i),r=o.getTime()-y(o);return Math.round((s-r)/864e5)}(new Date(i.expireTime),new Date);let s=0,r=0===o?"pointsToBeExpiredDay":"pointsToBeExpired";return 0==o&&(s=function(t,e,i){d(2,arguments);var o,s=function(t,e){return d(2,arguments),u(t).getTime()-u(e).getTime()}(t,e)/An;return((o=null==i?void 0:i.roundingMethod)?Hl[o]:Hl.trunc)(s)}(new Date(i.expireTime),new Date),r=s>1?"pointsToBeExpiredHours":"pointsToBeExpiredHour"),e=C(r,{expirationPoints:i.points,expireDay:o}),e}loadPlayerLevelInfo(){let t=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((e,i)=>fetch(t.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((t=>t.json())).then((t=>{var o,s,r;if(!t.success)return console.error("Exception when fetch user elevateinfo, ",t.errorCode,t.errorMessage),void i(!0);let a=t.data;this.playerElevateLevel=a.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(o=a.spendableWallet)||void 0===o?void 0:o.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const n=null===(s=t.data.spendableWallet)||void 0===s?void 0:s.total,l=null===(r=t.data.loyaltyWallet)||void 0===r?void 0:r.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:n,loyaltyWalletTotal:l});let h=this.calcuatePointsToBeExpired(n),c=this.calcuatePointsToBeExpired(l);(h||c)&&this.playerElevateLeveLoaded.emit({pointExpireString:h,xpExpireString:c}),e(this.playerElevateLevel)})).catch((t=>{console.log("error ",t),i(!0)}))))}setLoyaltyProgress(t){!function(t,e){const i=t.querySelector("#total_level"),o=i.getBBox().width,s=e>1?1:e,r=s*o-17<0?0:s*o-17,a=t.querySelector("#current_level"),n=t.querySelector("#filter_current_level"),l=t.querySelector("#circle_current_level");i.setAttribute("viewbox",`0 0 ${r} 28`),a.setAttribute("width",`${r}`),l.setAttribute("cx",`${r<6.5?6.5:r}`),n.setAttribute("x",""+(r-8));const h=t.querySelector("#lock"),c=t.querySelector("#filter_heart_ball"),d=t.querySelector("#filter_ball"),u=t.querySelector("#filter_heart"),p=t.querySelector("#filter_lock"),m=t.querySelector("#paint0_linear_ball"),f=t.querySelector("#paint1_linear_lock"),v=t.querySelector("#lock_box"),b=t.querySelector("#heart_box"),g=o-10;h.setAttribute("cx",`${g}`),f.setAttribute("x1",`${g}`),f.setAttribute("x2",`${g}`),m.setAttribute("x1",""+(g-6)),m.setAttribute("x2",""+(g-6+11.2)),p.setAttribute("x",""+(g-6)),u.setAttribute("x",""+(g-6-2)),d.setAttribute("x",""+(g-6-2-2)),c.setAttribute("x",""+(g-6-2-2-4)),v.setAttribute("x",""+(g-6)),b.setAttribute("x",""+(g-6)),i.parentElement.style.opacity="1"}(this.loyaltyProgressEle,t)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const t=[];t.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&t.push(this.loadLevels()),Promise.all(t).then((t=>{if(console.log("elevate-init",t),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((t,e)=>t.firstEntryPoints>e.firstEntryPoints?1:-1));const e=this.playerElevateLevel.loyaltyPoints;let i=0;this.levels.forEach(((t,o)=>{e>t.firstEntryPoints&&(i=o)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:i})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return o(this)}static get watchers(){return{params:["onParamsChanged"]}}};ph.style=':host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: "";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);\n}\n.Inner .Row .RedeemButton span {\n color: var(--emfe-w-color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emfe-w-color-red, #9e595f);\n}';const mh=class{constructor(t){e(this,t),this.isPointDetailCard="earningRule"===this.buttonType,this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.cardTitle=void 0,this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0,this.elevateSPTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(t){t.detail&&(t.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=t.detail.elevateLevelWalletTotal,this.elevateSPTotal=t.detail.loyaltyWalletTotal),t.detail.elevateLevel&&(this.playerElevateLevel=t.detail.elevateLevel),t.detail.pointExpireString&&(this.pointExpireString=t.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const e=r("../static/card-ground.svg"),i=r("../static/card-ground-over.svg");return t("div",{key:"4e6e25bdd2a9f795369b39dbfd7e9adbd1523e17",class:`ElevateCardWrapper ${this.theme}`},t("div",{key:"ddeea1e67d51d5c0c8ed56edfd2d8d9c39e85253",class:"PointsCard Outer ",style:{backgroundImage:`url(${e}`}},t("general-styling-wrapper",{key:"c6d6e3a3bc9a54cb99b4268feb3c296527d1ba8c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:z,translationUrl:this.translationUrl}),t("player-elevate-card-data",{key:"4371faac6967c5b3eced57f6251064ea4e1d6a65",params:this.paramProxy}),t("div",{key:"c78235a6fdc2aed90df898f007b5ee091cece8dc",class:"OuterCover Inner",style:{backgroundImage:`url(${i}`}},t("div",{key:"025e779223c1c85c11998be8389a8ff836a31e6c",class:"Content Row"},this.playerElevateLevel&&t(a,{key:"68daa6047dc93d2596d8b2309a26f56960737617"},t("div",{key:"6a2d2b2e7d234bceaf3d9240c5d4f2eb80395319",class:"PlayerImg"},t(E,{key:"aeaf35ad8055ad4f7312922c8600ea58d09be74f",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),t("div",{key:"bd51ce868b4d8a547f40ec55548bbf3cfa416534",class:`LevelInfo ${this.playerElevateLevel.name}`},t("div",{key:"5f4d77a5b43c8efee850b9813bc1c8e61d27d45d",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:T("spendablePoints")),t("div",{key:"bae5dc76d00c98aed803601c19fe3bf1aa4418d5",class:"PointsTxt SPPoints"},t(I,{key:"59d51bd37f44ed23108fc4356af41c01668354e3",spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),t("a",{key:"3a923bea242ae5fa412f4448dca7277b3588621e",class:"TC",onClick:()=>{this.onDetailsClick()}},T("termAndConditions",this.language))),this.pointExpireString&&t("div",{key:"8803ae8d343885da58dfa04b9a4474ff473b5a74",class:"ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};mh.style=":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background:linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}";const fh=class{constructor(t){e(this,t),this.sendInputValue=i(this,"sendInputValue",7),this.sendValidityState=i(this,"sendValidityState",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return R("requiredError",this.language)}renderTooltip(){return this.showTooltip?t("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return t("fieldset",{key:"3d90735f7dc8fef6a96dc85b8f9ba22880cb205f",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},t("legend",{key:"9472ed76f5c7fabb90d2b3d39eeb9e18f05a30dd",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((e=>t("div",{class:"radio__wrapper"},t("input",{type:"radio",class:"radio__input",id:`${e.label}__input`,ref:t=>this.inputReference=t,value:e.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),t("label",{htmlFor:`${e.label}__input`},e.label)))),t("small",{key:"2ae0947580bb8a0a3d889a2d9ebd0b82458fdfd2",class:"radio__error-message"},this.errorMessage),this.tooltip&&t("img",{key:"4f3cbf341f1c559bbdf44ca5d169be7a64d46e97",class:"radio__tooltip-icon",src:q,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};fh.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";
4822
+ `;let dh;V(class extends hh{static get is(){return"vaadin-password-field"}static get template(){if(!dh){dh=super.template.cloneNode(!0);const t=ch.content.querySelector('[part="reveal-button"]');dh.content.querySelector('[part="input-field"]').appendChild(t)}return dh}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 Ko(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.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t.base)}_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)}});const uh=class{constructor(t){e(this,t),this.sendOriginalValidityState=i(this,"sendOriginalValidityState",7),this.sendValidityState=i(this,"sendValidityState",7),this.sendInputValue=i(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.passwordButton.addEventListener("click",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern).test(t);return{rule:e.displayName,ruleKey:e.errorKey,passed:i}}))}setValidity(){var t,e;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.isDuplicateInput&&!this.originalValid)return R("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return R(`${i}`,this.language)?R(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return R("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return R("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return R(`${t}`,this.language)?R(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?t("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const e=this.passwordComplexity.length,i=this.passwordComplexity.filter((t=>t.passed)).length/e,o=this.passwordComplexity.every((t=>t.passed));return t("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},t("div",{class:"password__complexity--strength"},t("p",{class:"password__complexity--text"},R("passwordStrength",this.language)," ",t("span",{class:"password__complexity--text-bold"},R(o?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),t("meter",{value:i,min:"0",max:"1"})),t("div",null,this.passwordComplexity.map(((e,i)=>t("div",{key:i},t("input",{class:"password__complexity--checkbox",type:"checkbox",checked:e.passed,disabled:!0}),t("span",null,R(`${e.ruleKey}`,this.language)?R(`${e.ruleKey}`,this.language):e.rule))))))}render(){let e="";return this.touched&&(e=1==this.isValid||null==this.isValid?"":"text__input--invalid"),t("div",{key:"c704b51efdf53817beb1541b4794e0b11b490a24",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},t("div",{key:"e590afa403084ff95a8735ade400ab81ad16937f",class:"password__wrapper--flex"},t("label",{key:"9d8db00b59c4b9594538aeacee3ef5a0e678c0e9",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),t("div",{key:"bb39f6018cf688fafcd0b5bef91ba079edf09daf",class:"password__wrapper--relative"},this.tooltip&&t("img",{key:"d8dbd086da34a8c7db9b5826654530bdb888c927",class:"password__tooltip-icon",src:q,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),t("vaadin-password-field",{key:"ae1c212d663fe379561b1c514087629409196ac3",type:"password",id:`${this.name}__input`,class:`password__input ${e}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),t("small",{key:"2fa1e25239a7314399c16b2f897873b7a31e9f77",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};uh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:"Roboto";font-style:normal}.password__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.password__wrapper--autofilled{pointer-events:none}.password__wrapper--autofilled .password__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.password__wrapper--autofilled .password__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.password__wrapper--flex{display:flex;gap:5px}.password__wrapper--relative{position:relative}.password__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.password__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.password__input{width:inherit;border:none}.password__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.password__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.password__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);background-color:var(--emfe-w-color-white, #FFFFFF);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;position:relative;margin-bottom:unset;height:44px;padding:0;width:100%}.password__input::part(reveal-button){position:relative;right:10px}.password__input::part(reveal-button)::before{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.password__input>input{padding:5px 15px}.password__input>input:placeholder-shown{color:var(--emfe-w-color-gray-150, #828282)}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.password__complexity{position:relative;padding:10px;display:flex;flex-direction:column;gap:20px;justify-content:center;margin-top:20px;font-weight:300;background:var(--emfe-w-color-white, #FFFFFF);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:150px;border:1px solid #B0B0B0;}.password__complexity meter{border-color:transparent;}.password__complexity meter[value="1"]::-moz-meter-bar{background-color:var(--emfe-w-color-valid, #48952a)}.password__complexity meter[value="1"]::-webkit-meter-optimum-value{background-color:var(--emfe-w-color-valid, #48952a)}.password__complexity meter:not([value="1"])::-moz-meter-bar{background-color:var(--emfe-w-color-error, #FD2839)}.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value{background-color:var(--emfe-w-color-error, #FD2839)}.password__complexity--strength{display:flex;justify-content:space-evenly;align-items:center}.password__complexity--strength meter::-moz-meter-bar{background:#B0B0B0}.password__complexity--hidden{display:none}.password__complexity--text-bold{font-weight:500}.password__complexity--checkbox{margin-right:5px}.password__complexity:after{content:"";position:absolute;width:25px;height:25px;border-top:1px solid var(--emfe-w-color-gray-150, #828282);border-right:0 solid var(--emfe-w-color-gray-150, #828282);border-left:1px solid var(--emfe-w-color-gray-150, #828282);border-bottom:0 solid var(--emfe-w-color-gray-150, #828282);bottom:92%;left:50%;margin-left:-25px;transform:rotate(45deg);margin-top:-25px;background-color:var(--emfe-w-color-white, #FFFFFF)}.password__tooltip-icon{width:16px;height:auto}.password__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-150, #828282);color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.password__tooltip.visible{opacity:1}';const ph=class{constructor(t){e(this,t),this.playerElevateLeveLoaded=i(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let t=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise(((e,i)=>fetch(t.href,{method:"GET"}).then((t=>t.json())).then((t=>{this.levels=t.data,e(!0)})).catch((t=>{i(t)}))))}calcuatePointsToBeExpired(t){let e="";if(!t||!t.aboutToExpire||0==t.aboutToExpire.length||t.aboutToExpire[0].points<=0)return e;t.aboutToExpire.sort(((t,e)=>$l(new Date(t.expireTime),new Date(e.expireTime))?-1:1));const i=t.aboutToExpire[0],o=function(t,e){d(2,arguments);var i=Gl(t),o=Gl(e),s=i.getTime()-y(i),r=o.getTime()-y(o);return Math.round((s-r)/864e5)}(new Date(i.expireTime),new Date);let s=0,r=0===o?"pointsToBeExpiredDay":"pointsToBeExpired";return 0==o&&(s=function(t,e,i){d(2,arguments);var o,s=function(t,e){return d(2,arguments),u(t).getTime()-u(e).getTime()}(t,e)/An;return((o=null==i?void 0:i.roundingMethod)?Hl[o]:Hl.trunc)(s)}(new Date(i.expireTime),new Date),r=s>1?"pointsToBeExpiredHours":"pointsToBeExpiredHour"),e=C(r,{expirationPoints:i.points,expireDay:o}),e}loadPlayerLevelInfo(){let t=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((e,i)=>fetch(t.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((t=>t.json())).then((t=>{var o,s,r;if(!t.success)return console.error("Exception when fetch user elevateinfo, ",t.errorCode,t.errorMessage),void i(!0);let a=t.data;this.playerElevateLevel=a.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(o=a.spendableWallet)||void 0===o?void 0:o.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const n=null===(s=t.data.spendableWallet)||void 0===s?void 0:s.total,l=null===(r=t.data.loyaltyWallet)||void 0===r?void 0:r.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:n,loyaltyWalletTotal:l});let h=this.calcuatePointsToBeExpired(n),c=this.calcuatePointsToBeExpired(l);(h||c)&&this.playerElevateLeveLoaded.emit({pointExpireString:h,xpExpireString:c}),e(this.playerElevateLevel)})).catch((t=>{console.log("error ",t),i(!0)}))))}setLoyaltyProgress(t){!function(t,e){const i=t.querySelector("#total_level"),o=i.getBBox().width,s=e>1?1:e,r=s*o-17<0?0:s*o-17,a=t.querySelector("#current_level"),n=t.querySelector("#filter_current_level"),l=t.querySelector("#circle_current_level");i.setAttribute("viewbox",`0 0 ${r} 28`),a.setAttribute("width",`${r}`),l.setAttribute("cx",`${r<6.5?6.5:r}`),n.setAttribute("x",""+(r-8));const h=t.querySelector("#lock"),c=t.querySelector("#filter_heart_ball"),d=t.querySelector("#filter_ball"),u=t.querySelector("#filter_heart"),p=t.querySelector("#filter_lock"),m=t.querySelector("#paint0_linear_ball"),f=t.querySelector("#paint1_linear_lock"),v=t.querySelector("#lock_box"),b=t.querySelector("#heart_box"),g=o-10;h.setAttribute("cx",`${g}`),f.setAttribute("x1",`${g}`),f.setAttribute("x2",`${g}`),m.setAttribute("x1",""+(g-6)),m.setAttribute("x2",""+(g-6+11.2)),p.setAttribute("x",""+(g-6)),u.setAttribute("x",""+(g-6-2)),d.setAttribute("x",""+(g-6-2-2)),c.setAttribute("x",""+(g-6-2-2-4)),v.setAttribute("x",""+(g-6)),b.setAttribute("x",""+(g-6)),i.parentElement.style.opacity="1"}(this.loyaltyProgressEle,t)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const t=[];t.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&t.push(this.loadLevels()),Promise.all(t).then((t=>{if(console.log("elevate-init",t),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((t,e)=>t.firstEntryPoints>e.firstEntryPoints?1:-1));const e=this.playerElevateLevel.loyaltyPoints;let i=0;this.levels.forEach(((t,o)=>{e>t.firstEntryPoints&&(i=o)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:i})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return o(this)}static get watchers(){return{params:["onParamsChanged"]}}};ph.style=':host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: "";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);\n}\n.Inner .Row .RedeemButton span {\n color: var(--emfe-w-color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emfe-w-color-red, #9e595f);\n}';const mh=class{constructor(t){e(this,t),this.isPointDetailCard="earningRule"===this.buttonType,this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.cardTitle=void 0,this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0,this.elevateSPTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(t){t.detail&&(t.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=t.detail.elevateLevelWalletTotal,this.elevateSPTotal=t.detail.loyaltyWalletTotal),t.detail.elevateLevel&&(this.playerElevateLevel=t.detail.elevateLevel),t.detail.pointExpireString&&(this.pointExpireString=t.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const e=r("../static/card-ground.svg"),i=r("../static/card-ground-over.svg");return t("div",{key:"4e6e25bdd2a9f795369b39dbfd7e9adbd1523e17",class:`ElevateCardWrapper ${this.theme}`},t("div",{key:"ddeea1e67d51d5c0c8ed56edfd2d8d9c39e85253",class:"PointsCard Outer ",style:{backgroundImage:`url(${e}`}},t("general-styling-wrapper",{key:"c6d6e3a3bc9a54cb99b4268feb3c296527d1ba8c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:z,translationUrl:this.translationUrl}),t("player-elevate-card-data",{key:"4371faac6967c5b3eced57f6251064ea4e1d6a65",params:this.paramProxy}),t("div",{key:"c78235a6fdc2aed90df898f007b5ee091cece8dc",class:"OuterCover Inner",style:{backgroundImage:`url(${i}`}},t("div",{key:"025e779223c1c85c11998be8389a8ff836a31e6c",class:"Content Row"},this.playerElevateLevel&&t(a,{key:"68daa6047dc93d2596d8b2309a26f56960737617"},t("div",{key:"6a2d2b2e7d234bceaf3d9240c5d4f2eb80395319",class:"PlayerImg"},t(E,{key:"aeaf35ad8055ad4f7312922c8600ea58d09be74f",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),t("div",{key:"bd51ce868b4d8a547f40ec55548bbf3cfa416534",class:`LevelInfo ${this.playerElevateLevel.name}`},t("div",{key:"5f4d77a5b43c8efee850b9813bc1c8e61d27d45d",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:I("spendablePoints")),t("div",{key:"bae5dc76d00c98aed803601c19fe3bf1aa4418d5",class:"PointsTxt SPPoints"},t(T,{key:"59d51bd37f44ed23108fc4356af41c01668354e3",spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),t("a",{key:"3a923bea242ae5fa412f4448dca7277b3588621e",class:"TC",onClick:()=>{this.onDetailsClick()}},I("termAndConditions",this.language))),this.pointExpireString&&t("div",{key:"8803ae8d343885da58dfa04b9a4474ff473b5a74",class:"ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};mh.style=":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background:linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}";const fh=class{constructor(t){e(this,t),this.sendInputValue=i(this,"sendInputValue",7),this.sendValidityState=i(this,"sendValidityState",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return R("requiredError",this.language)}renderTooltip(){return this.showTooltip?t("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return t("fieldset",{key:"3d90735f7dc8fef6a96dc85b8f9ba22880cb205f",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},t("legend",{key:"9472ed76f5c7fabb90d2b3d39eeb9e18f05a30dd",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((e=>t("div",{class:"radio__wrapper"},t("input",{type:"radio",class:"radio__input",id:`${e.label}__input`,ref:t=>this.inputReference=t,value:e.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),t("label",{htmlFor:`${e.label}__input`},e.label)))),t("small",{key:"2ae0947580bb8a0a3d889a2d9ebd0b82458fdfd2",class:"radio__error-message"},this.errorMessage),this.tooltip&&t("img",{key:"4f3cbf341f1c559bbdf44ca5d169be7a64d46e97",class:"radio__tooltip-icon",src:q,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};fh.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";
4823
4823
  /**
4824
4824
  * @license
4825
4825
  * Copyright (c) 2017 - 2023 Vaadin Ltd.
@@ -5238,7 +5238,7 @@ const gh=J`
5238
5238
  --_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
5239
5239
  --_vaadin-combo-box-items-container-border-style: solid;
5240
5240
  }
5241
- `],{moduleId:"lumo-combo-box-overlay"}),Kt("vaadin-combo-box",[Sr,J`
5241
+ `],{moduleId:"lumo-combo-box-overlay"}),Kt("vaadin-combo-box",[Pr,J`
5242
5242
  :host {
5243
5243
  outline: none;
5244
5244
  }
@@ -5313,12 +5313,12 @@ function Ah(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
5313
5313
  * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
5314
5314
  * Code distributed by Google as part of the polymer project is also
5315
5315
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
5316
- */V(kh);const Ch=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),zh=Ch&&Ch[1]>=8,Eh={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,o)=>{e<this._scrollBottom&&(t=o),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),Do)}},_getReusables(t){let e,i,o;const s=[],r=this._hiddenContentSize*this._ratio,a=this._virtualStart,n=this._virtualEnd,l=this._physicalCount;let h=this._physicalTop+this._scrollOffset;const c=this._scrollPosition,d=this._scrollBottom;for(t?(e=this._physicalStart,i=c-h):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-d);o=this._getPhysicalSizeIncrement(e),i-=o,!(s.length>=l||i<=r);)if(t){if(n+s.length+1>=this._virtualCount)break;if(h+o>=c-this._scrollOffset)break;s.push(e),h+=o,e=(e+1)%l}else{if(a-s.length<=0)break;if(h+this._physicalSize-o<=d)break;s.push(e),h-=o,e=0===e?l-1:e-1}return{indexes:s,physicalTop:h-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),So):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Do))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Po))},_iterateItems(t,e){let i,o,s,r;if(2===arguments.length&&e){for(r=0;r<e.length;r++)if(i=e[r],o=this._computeVidx(i),null!=(s=t.call(this,i,o)))return s}else{for(i=this._physicalStart,o=this._virtualStart;i<this._physicalCount;i++,o++)if(null!=(s=t.call(this,i,o)))return s;for(i=0;i<this._physicalStart;i++,o++)if(null!=(s=t.call(this,i,o)))return s}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!zh&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1)return;if(No(),0===this._physicalCount)return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,o=0;const s=this._hiddenContentSize;for(;i<t&&o<=s;)o+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+o),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),Po)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=Fo.debounce(this._debouncers[t],i,e.bind(this)),Oo(this._debouncers[t])}},Th=1e3;class Ih{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:s,reorderElements:r}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=s||o,this.reorderElements=r,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this.size-this._virtualCount):i<e?t<Th?(i=t,this._vidxOffset=0):(i=Th,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler()}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),No(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o))})),this.__afterElementsUpdated(i)}_updateMetrics(t){No();let e=0,i=0;const o=this._physicalAverageCount,s=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((s*o+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.style.paddingTop&&(t.style.paddingTop=""),this.__preventElementUpdates||t.__lastUpdatedIndex===e&&!i||(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,this.__placeholderClearDebouncer=Fo.debounce(this.__placeholderClearDebouncer,Po,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}}))}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){t!==this.size&&(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__size=t,this._physicalItems?(this._updateScrollerSize(),this._virtualCount=this.items.length,this._render()):(this._itemsChanged({path:"items"}),this.__preventElementUpdates=!0,No(),this.__preventElementUpdates=!1),this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),No())}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=Boolean("rtl"===t.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const o=this._physicalItems[t];o.hidden=i>=this.size,o.hidden?delete o.__lastUpdatedIndex:(o.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(o,o.__virtualIndex),e.push(o))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`}toggleScrollListener(){}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=Fo.debounce(this.__fixInvalidItemPositioningDebouncer,Io.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=Fo.debounce(this.__scrollReorderDebouncer,Io.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalBottom<this._scrollBottom;if(this._physicalTop>this._scrollTop&&0!==this.adjustedFirstVisibleIndex||t&&this.adjustedLastVisibleIndex!==this.size-1){const e=t,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(e?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=Fo.debounce(this.__debouncerWheelAnimationFrame,Po,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=Fo.debounce(this._debouncerIgnoreNewWheel,Io.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage);super._increasePoolIfNeeded(Math.max(t,Math.min(100,e-this._physicalCount)))}else super._increasePoolIfNeeded(t)}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=e.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))||e[0];if(!i)return;const o=i.__virtualIndex-t,s=e.indexOf(i)-o;if(s>0)for(let t=0;t<s;t++)this.elementsContainer.appendChild(e[t]);else if(s<0)for(let t=e.length+s;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(Vr){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const t=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.offsetHeight);this._vidxOffset=Math.round(t*this.size-t*this._virtualCount)}else{const t=this._vidxOffset,e=Th,i=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<e&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset)));const o=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=o,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-e&&this._vidxOffset<o&&(this._vidxOffset+=Math.min(o-this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(Ih.prototype,Eh);class Ph{constructor(t){this.__adapter=new Ih(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}
5316
+ */V(kh);const Ch=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),zh=Ch&&Ch[1]>=8,Eh={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,o)=>{e<this._scrollBottom&&(t=o),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),Do)}},_getReusables(t){let e,i,o;const s=[],r=this._hiddenContentSize*this._ratio,a=this._virtualStart,n=this._virtualEnd,l=this._physicalCount;let h=this._physicalTop+this._scrollOffset;const c=this._scrollPosition,d=this._scrollBottom;for(t?(e=this._physicalStart,i=c-h):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-d);o=this._getPhysicalSizeIncrement(e),i-=o,!(s.length>=l||i<=r);)if(t){if(n+s.length+1>=this._virtualCount)break;if(h+o>=c-this._scrollOffset)break;s.push(e),h+=o,e=(e+1)%l}else{if(a-s.length<=0)break;if(h+this._physicalSize-o<=d)break;s.push(e),h-=o,e=0===e?l-1:e-1}return{indexes:s,physicalTop:h-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),Po):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Do))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,So))},_iterateItems(t,e){let i,o,s,r;if(2===arguments.length&&e){for(r=0;r<e.length;r++)if(i=e[r],o=this._computeVidx(i),null!=(s=t.call(this,i,o)))return s}else{for(i=this._physicalStart,o=this._virtualStart;i<this._physicalCount;i++,o++)if(null!=(s=t.call(this,i,o)))return s;for(i=0;i<this._physicalStart;i++,o++)if(null!=(s=t.call(this,i,o)))return s}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!zh&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1)return;if(No(),0===this._physicalCount)return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,o=0;const s=this._hiddenContentSize;for(;i<t&&o<=s;)o+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+o),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),So)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=Fo.debounce(this._debouncers[t],i,e.bind(this)),Oo(this._debouncers[t])}},Ih=1e3;class Th{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:s,reorderElements:r}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=s||o,this.reorderElements=r,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this.size-this._virtualCount):i<e?t<Ih?(i=t,this._vidxOffset=0):(i=Ih,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler()}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),No(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o))})),this.__afterElementsUpdated(i)}_updateMetrics(t){No();let e=0,i=0;const o=this._physicalAverageCount,s=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((s*o+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.style.paddingTop&&(t.style.paddingTop=""),this.__preventElementUpdates||t.__lastUpdatedIndex===e&&!i||(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,this.__placeholderClearDebouncer=Fo.debounce(this.__placeholderClearDebouncer,So,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}}))}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){t!==this.size&&(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__size=t,this._physicalItems?(this._updateScrollerSize(),this._virtualCount=this.items.length,this._render()):(this._itemsChanged({path:"items"}),this.__preventElementUpdates=!0,No(),this.__preventElementUpdates=!1),this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),No())}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=Boolean("rtl"===t.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const o=this._physicalItems[t];o.hidden=i>=this.size,o.hidden?delete o.__lastUpdatedIndex:(o.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(o,o.__virtualIndex),e.push(o))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`}toggleScrollListener(){}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=Fo.debounce(this.__fixInvalidItemPositioningDebouncer,To.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=Fo.debounce(this.__scrollReorderDebouncer,To.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalBottom<this._scrollBottom;if(this._physicalTop>this._scrollTop&&0!==this.adjustedFirstVisibleIndex||t&&this.adjustedLastVisibleIndex!==this.size-1){const e=t,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(e?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=Fo.debounce(this.__debouncerWheelAnimationFrame,So,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=Fo.debounce(this._debouncerIgnoreNewWheel,To.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage);super._increasePoolIfNeeded(Math.max(t,Math.min(100,e-this._physicalCount)))}else super._increasePoolIfNeeded(t)}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=e.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))||e[0];if(!i)return;const o=i.__virtualIndex-t,s=e.indexOf(i)-o;if(s>0)for(let t=0;t<s;t++)this.elementsContainer.appendChild(e[t]);else if(s<0)for(let t=e.length+s;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(Vr){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const t=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.offsetHeight);this._vidxOffset=Math.round(t*this.size-t*this._virtualCount)}else{const t=this._vidxOffset,e=Ih,i=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<e&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset)));const o=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=o,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-e&&this._vidxOffset<o&&(this._vidxOffset+=Math.min(o-this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(Th.prototype,Eh);class Sh{constructor(t){this.__adapter=new Th(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}
5317
5317
  /**
5318
5318
  * @license
5319
5319
  * Copyright (c) 2015 - 2023 Vaadin Ltd.
5320
5320
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5321
- */const Sh=class{toString(){return""}},Dh=t=>class extends t{static get properties(){return{items:{type:Array,observer:"__itemsChanged"},focusedIndex:{type:Number,observer:"__focusedIndexChanged"},loading:{type:Boolean,observer:"__loadingChanged"},opened:{type:Boolean,observer:"__openedChanged"},selectedItem:{type:Object,observer:"__selectedItemChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,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}-${Zo()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling(),this.__virtualizer=new Ph({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector})}requestContentUpdate(){this.__virtualizer&&this.__virtualizer.update()}scrollIntoView(t){if(!(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 o=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!o||t!==o.index)return;const s=o.getBoundingClientRect(),r=this.getBoundingClientRect(),a=s.bottom-r.bottom+this._viewportTotalPaddingBottom;a>0&&(this.scrollTop+=a)}_isItemSelected(t,e,i){return!(t instanceof Sh)&&(i&&void 0!==t&&void 0!==e?Ah(i,t)===Ah(i,e):t===e)}__itemsChanged(t){this.__virtualizer&&t&&(this.__virtualizer.size=t.length,this.__virtualizer.flush(),this.requestContentUpdate())}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&this.requestContentUpdate()}__selectedItemChanged(){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],o=this.focusedIndex,s=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:s,renderer:this.renderer,focused:!this.loading&&o===e}),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",s.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof Sh&&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,currentScrollerPos:this._oldScrollerPosition}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
5321
+ */const Ph=class{toString(){return""}},Dh=t=>class extends t{static get properties(){return{items:{type:Array,observer:"__itemsChanged"},focusedIndex:{type:Number,observer:"__focusedIndexChanged"},loading:{type:Boolean,observer:"__loadingChanged"},opened:{type:Boolean,observer:"__openedChanged"},selectedItem:{type:Object,observer:"__selectedItemChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,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}-${Zo()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling(),this.__virtualizer=new Sh({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector})}requestContentUpdate(){this.__virtualizer&&this.__virtualizer.update()}scrollIntoView(t){if(!(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 o=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!o||t!==o.index)return;const s=o.getBoundingClientRect(),r=this.getBoundingClientRect(),a=s.bottom-r.bottom+this._viewportTotalPaddingBottom;a>0&&(this.scrollTop+=a)}_isItemSelected(t,e,i){return!(t instanceof Ph)&&(i&&void 0!==t&&void 0!==e?Ah(i,t)===Ah(i,e):t===e)}__itemsChanged(t){this.__virtualizer&&t&&(this.__virtualizer.size=t.length,this.__virtualizer.flush(),this.requestContentUpdate())}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&this.requestContentUpdate()}__selectedItemChanged(){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],o=this.focusedIndex,s=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:s,renderer:this.renderer,focused:!this.loading&&o===e}),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",s.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof Ph&&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,currentScrollerPos:this._oldScrollerPosition}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
5322
5322
  /**
5323
5323
  * @license
5324
5324
  * Copyright (c) 2015 - 2023 Vaadin Ltd.
@@ -5366,7 +5366,7 @@ const Fh=t=>class extends(Ka(t)){static get properties(){return{pattern:{type:St
5366
5366
  * @license
5367
5367
  * Copyright (c) 2015 - 2023 Vaadin Ltd.
5368
5368
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5369
- */,Oh=t=>class extends t{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},size:{type:Number,observer:"_sizeChanged"},dataProvider:{type:Object,observer:"_dataProviderChanged"},_pendingRequests:{value:()=>({})},__placeHolder:{value:new Sh},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}ready(){super.ready(),this._scroller.addEventListener("index-requested",(t=>{const e=t.detail.index,i=t.detail.currentScrollerPos,o=Math.floor(1.5*this.pageSize);if(!this._shouldSkipIndex(e,o,i)&&void 0!==e){const t=this._getPageForIndex(e);this._shouldLoadPage(t)&&this._loadPage(t)}}))}_dataProviderFilterChanged(t){void 0!==this.__previousDataProviderFilter||""!==t?this.__previousDataProviderFilter!==t&&(this.__previousDataProviderFilter=t,this._pendingRequests={},this.loading=this._shouldFetchData(),this.size=void 0,this.clearCache()):this.__previousDataProviderFilter=t}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(t){t&&this._shouldLoadPage(0)&&this._loadPage(0)}_shouldSkipIndex(t,e,i){return 0!==i&&t>=i-e&&t<=i+e}_shouldLoadPage(t){if(!this.filteredItems||this._forceNextRequest)return this._forceNextRequest=!1,!0;const e=this.filteredItems[t*this.pageSize];return void 0!==e?e instanceof Sh:void 0===this.size}_loadPage(t){if(this._pendingRequests[t]||!this.dataProvider)return;const e={page:t,pageSize:this.pageSize,filter:this.filter},i=(o,s)=>{if(this._pendingRequests[t]!==i)return;const r=this.filteredItems?[...this.filteredItems]:[];r.splice(e.page*e.pageSize,o.length,...o),this.filteredItems=r,this.opened||this._isInputFocused()||this._commitValue(),void 0!==s&&(this.size=s),delete this._pendingRequests[t],0===Object.keys(this._pendingRequests).length&&(this.loading=!1)};this._pendingRequests[t]=i,this.loading=!0,this.dataProvider(e,i)}_getPageForIndex(t){return Math.floor(t/this.pageSize)}clearCache(){if(!this.dataProvider)return;this._pendingRequests={};const t=[];for(let e=0;e<(this.size||0);e++)t.push(this.__placeHolder);this.filteredItems=t,this._shouldFetchData()?(this._forceNextRequest=!1,this._loadPage(0)):this._forceNextRequest=!0}_sizeChanged(t=0){const e=(this.filteredItems||[]).slice(0,t);for(let i=0;i<t;i++)e[i]=void 0!==e[i]?e[i]:this.__placeHolder;this.filteredItems=e,this._flushPendingRequests(t)}_pageSizeChanged(t,e){if(Math.floor(t)!==t||t<1)throw this.pageSize=e,new Error("`pageSize` value must be an integer > 0");this.clearCache()}_dataProviderChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.dataProvider=e})),this.clearCache()}_ensureItemsOrDataProvider(t){if(void 0!==this.items&&void 0!==this.dataProvider)throw t(),new Error("Using `items` and `dataProvider` together is not supported");this.dataProvider&&!this.filteredItems&&(this.filteredItems=[])}_warnDataProviderValue(t,e){if(t&&""!==e&&null==this.selectedItem){const t=this.__getItemIndexByValue(this.filteredItems,e);(t<0||!this._getItemLabel(this.filteredItems[t]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}_flushPendingRequests(t){if(this._pendingRequests){const e=Math.ceil(t/this.pageSize);Object.entries(this._pendingRequests).forEach((([i,o])=>{parseInt(i)>=e&&o([],t)}))}}}
5369
+ */,Oh=t=>class extends t{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},size:{type:Number,observer:"_sizeChanged"},dataProvider:{type:Object,observer:"_dataProviderChanged"},_pendingRequests:{value:()=>({})},__placeHolder:{value:new Ph},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}ready(){super.ready(),this._scroller.addEventListener("index-requested",(t=>{const e=t.detail.index,i=t.detail.currentScrollerPos,o=Math.floor(1.5*this.pageSize);if(!this._shouldSkipIndex(e,o,i)&&void 0!==e){const t=this._getPageForIndex(e);this._shouldLoadPage(t)&&this._loadPage(t)}}))}_dataProviderFilterChanged(t){void 0!==this.__previousDataProviderFilter||""!==t?this.__previousDataProviderFilter!==t&&(this.__previousDataProviderFilter=t,this._pendingRequests={},this.loading=this._shouldFetchData(),this.size=void 0,this.clearCache()):this.__previousDataProviderFilter=t}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(t){t&&this._shouldLoadPage(0)&&this._loadPage(0)}_shouldSkipIndex(t,e,i){return 0!==i&&t>=i-e&&t<=i+e}_shouldLoadPage(t){if(!this.filteredItems||this._forceNextRequest)return this._forceNextRequest=!1,!0;const e=this.filteredItems[t*this.pageSize];return void 0!==e?e instanceof Ph:void 0===this.size}_loadPage(t){if(this._pendingRequests[t]||!this.dataProvider)return;const e={page:t,pageSize:this.pageSize,filter:this.filter},i=(o,s)=>{if(this._pendingRequests[t]!==i)return;const r=this.filteredItems?[...this.filteredItems]:[];r.splice(e.page*e.pageSize,o.length,...o),this.filteredItems=r,this.opened||this._isInputFocused()||this._commitValue(),void 0!==s&&(this.size=s),delete this._pendingRequests[t],0===Object.keys(this._pendingRequests).length&&(this.loading=!1)};this._pendingRequests[t]=i,this.loading=!0,this.dataProvider(e,i)}_getPageForIndex(t){return Math.floor(t/this.pageSize)}clearCache(){if(!this.dataProvider)return;this._pendingRequests={};const t=[];for(let e=0;e<(this.size||0);e++)t.push(this.__placeHolder);this.filteredItems=t,this._shouldFetchData()?(this._forceNextRequest=!1,this._loadPage(0)):this._forceNextRequest=!0}_sizeChanged(t=0){const e=(this.filteredItems||[]).slice(0,t);for(let i=0;i<t;i++)e[i]=void 0!==e[i]?e[i]:this.__placeHolder;this.filteredItems=e,this._flushPendingRequests(t)}_pageSizeChanged(t,e){if(Math.floor(t)!==t||t<1)throw this.pageSize=e,new Error("`pageSize` value must be an integer > 0");this.clearCache()}_dataProviderChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.dataProvider=e})),this.clearCache()}_ensureItemsOrDataProvider(t){if(void 0!==this.items&&void 0!==this.dataProvider)throw t(),new Error("Using `items` and `dataProvider` together is not supported");this.dataProvider&&!this.filteredItems&&(this.filteredItems=[])}_warnDataProviderValue(t,e){if(t&&""!==e&&null==this.selectedItem){const t=this.__getItemIndexByValue(this.filteredItems,e);(t<0||!this._getItemLabel(this.filteredItems[t]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}_flushPendingRequests(t){if(this._pendingRequests){const e=Math.ceil(t/this.pageSize);Object.entries(this._pendingRequests).forEach((([i,o])=>{parseInt(i)>=e&&o([],t)}))}}}
5370
5370
  /**
5371
5371
  * @license
5372
5372
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
@@ -5377,7 +5377,7 @@ const Fh=t=>class extends(Ka(t)){static get properties(){return{pattern:{type:St
5377
5377
  * Copyright (c) 2015 - 2023 Vaadin Ltd.
5378
5378
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5379
5379
  */
5380
- function Bh(t){return null!=t}function Nh(t,e){return t.findIndex((t=>!(t instanceof Sh)&&e(t)))}const Lh=t=>class extends(tn(Ys(cr(Rs(Ds(Ws(Ss(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:Function,items:{type:Array,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged"},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1},filter:{type:String,value:"",notify:!0},selectedItem:{type:Object,notify:!0},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged"},itemValuePath:{type:String,value:"value"},itemIdPath:String,_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array},_closeOnBlurIsPrevented:Boolean,_scroller:Object,_overlayOpened:{type:Boolean,observer:"_overlayOpenedChanged"}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, theme)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};var e;this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),e=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`),this.addController(new en(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)}_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=`${this._tagNamePrefix}-scroller`,i=this._overlayElement;i.renderer=t=>{t.firstChild||t.appendChild(document.createElement(e))},i.requestContentUpdate();const o=i.querySelector(e);o.owner=t||this,o.getItemLabel=this._getItemLabel.bind(this),o.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged),this._scroller=o}_updateScroller(t,e,i,o,s,r,a,n,l){t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:o,selectedItem:s,itemIdPath:r,focusedIndex:a,renderer:n,theme:l}))}_openedOrItemsChanged(t,e,i){this._overlayOpened=!(!t||!(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&&Ls(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._openedWithFocusRing=this.hasAttribute("focus-ring"),this._isInputFocused()||Ur||this.inputElement&&this.inputElement.focus(),this._overlayElement.restoreFocusOnClose=!0):(this._onClosed(),this._openedWithFocusRing&&this._isInputFocused()&&this.setAttribute("focus-ring",""));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),"Tab"===t.key?this._overlayElement.restoreFocusOnClose=!1:"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?Ah(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?Ah(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){const e=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;if(!this.allowCustomValue&&e)return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_onEscape(t){this.autoOpenDisabled?this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.clearButtonVisible&&!this.opened&&this.value&&(t.stopPropagation(),this._onClearAction()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{Ur&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}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._inputElementValue=this.selectedItem?this._getItemLabel(this.selectedItem):this.value||"":this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this.filter=""}_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||(Bh(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this.filter="",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,e){this._setDropdownItems(t);const i=e?e[this._focusedIndex]:null,o=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&o>=0&&(this.selectedItem=t[o]);const s=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=s>-1?s:this.__getItemIndexByLabel(this.filteredItems,this.filter)}_filterItems(t,e){if(!t)return t;const i=t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)));return i}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){this._dropdownItems=t}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&Bh(e)?Nh(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Nh(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof Sh||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;this._closeOrCommit()}}_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())}}
5380
+ function Bh(t){return null!=t}function Nh(t,e){return t.findIndex((t=>!(t instanceof Ph)&&e(t)))}const Lh=t=>class extends(tn(Ys(cr(Rs(Ds(Ws(Ps(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:Function,items:{type:Array,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged"},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1},filter:{type:String,value:"",notify:!0},selectedItem:{type:Object,notify:!0},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged"},itemValuePath:{type:String,value:"value"},itemIdPath:String,_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array},_closeOnBlurIsPrevented:Boolean,_scroller:Object,_overlayOpened:{type:Boolean,observer:"_overlayOpenedChanged"}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, theme)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};var e;this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),e=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`),this.addController(new en(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)}_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=`${this._tagNamePrefix}-scroller`,i=this._overlayElement;i.renderer=t=>{t.firstChild||t.appendChild(document.createElement(e))},i.requestContentUpdate();const o=i.querySelector(e);o.owner=t||this,o.getItemLabel=this._getItemLabel.bind(this),o.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged),this._scroller=o}_updateScroller(t,e,i,o,s,r,a,n,l){t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:o,selectedItem:s,itemIdPath:r,focusedIndex:a,renderer:n,theme:l}))}_openedOrItemsChanged(t,e,i){this._overlayOpened=!(!t||!(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&&Ls(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._openedWithFocusRing=this.hasAttribute("focus-ring"),this._isInputFocused()||Ur||this.inputElement&&this.inputElement.focus(),this._overlayElement.restoreFocusOnClose=!0):(this._onClosed(),this._openedWithFocusRing&&this._isInputFocused()&&this.setAttribute("focus-ring",""));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),"Tab"===t.key?this._overlayElement.restoreFocusOnClose=!1:"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?Ah(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?Ah(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){const e=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;if(!this.allowCustomValue&&e)return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_onEscape(t){this.autoOpenDisabled?this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.clearButtonVisible&&!this.opened&&this.value&&(t.stopPropagation(),this._onClearAction()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{Ur&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}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._inputElementValue=this.selectedItem?this._getItemLabel(this.selectedItem):this.value||"":this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this.filter=""}_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||(Bh(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this.filter="",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,e){this._setDropdownItems(t);const i=e?e[this._focusedIndex]:null,o=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&o>=0&&(this.selectedItem=t[o]);const s=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=s>-1?s:this.__getItemIndexByLabel(this.filteredItems,this.filter)}_filterItems(t,e){if(!t)return t;const i=t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)));return i}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){this._dropdownItems=t}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&Bh(e)?Nh(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Nh(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof Ph||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;this._closeOrCommit()}}_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())}}
5381
5381
  /**
5382
5382
  * @license
5383
5383
  * Copyright (c) 2015 - 2023 Vaadin Ltd.