@everymatrix/general-input 1.72.1 → 1.72.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/checkbox-group-input_13.cjs.entry.js +29 -29
- package/dist/collection/components/checkbox-input/checkbox-input.css +19 -9
- package/dist/collection/components/checkbox-input/checkbox-input.js +7 -7
- package/dist/collection/components/date-input/date-input.js +2 -2
- package/dist/collection/components/email-input/email-input.js +2 -2
- package/dist/collection/components/number-input/number-input.js +2 -2
- package/dist/collection/components/password-input/password-input.js +2 -2
- package/dist/collection/components/radio-input/radio-input.js +2 -2
- package/dist/collection/components/select-input/select-input.js +3 -3
- package/dist/collection/components/tel-input/tel-input.js +2 -2
- package/dist/collection/components/text-input/text-input.js +2 -2
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +2 -2
- package/dist/collection/components/twofa-input/twofa-input.js +2 -2
- package/dist/esm/checkbox-group-input_13.entry.js +29 -29
- package/dist/general-input/checkbox-group-input_13.entry.js +38 -38
- package/dist/types/components/checkbox-input/checkbox-input.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as s,H as o}from"./index-ed8fc8f4.js";const r={en:{dateError:"The selected date should be between {min} and {max}",dateError2:"The selected date is not within the accepted range",dateFormatError:"The selected date has a different format then the one required.",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.",invalidPassword:"Password does not meet 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:"The input should contain only digits.",InvalidFieldSize:"The length must be exactly 11 digits.",InvalidDocumentNumber:"Only numerical characters are allowed.",twofaDescription:"<p> We have sent the verification code to <p> {destination}. </p> </p> <p> Please insert the PIN below. </p>",twofaResendMessage:"Didn't receive the verification code?",twofaResendButton:"Resend"},hu:{dateError:"A választott dátumnak {min} és {max} között kell lennie",dateError2:"A kiválasztott dátum nincs az elfogadott tartományon belül",dateFormatError:"A kiválasztott dátum formátuma eltér a szükségestől.",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.",invalidPassword:"A jelszó nem felel meg minden kritériumnak",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ámjegyeket tartalmazhat.",InvalidFieldSize:"A hosszúságnak pontosan 11 számjegynek kell lennie.",InvalidDocumentNumber:"Csak számjegyek engedélyezettek.",twofaDescription:"<p> A megerősítő kódot elküldtük a következő címre: <p> {destination}. </p> </p> <p> Kérjük, írja be az alábbi PIN-kódot. </p>",twofaResendMessage:"Nem kapta meg a megerősítő kódot?",twofaResendButton:"Újraküldés"},hr:{dateError:"Odabrani datum treba biti između {min} i {max}",dateError2:"Odabrani datum nije unutar prihvaćenog raspona",dateFormatError:"Odabrani datum je u drugačijem formatu od potrebnog.",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",invalidPassword:"Lozinka ne zadovoljava sve kriterije",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:"Smije sadržavati samo znamenke.",InvalidFieldSize:"Dužina mora biti točno 11 znamenki.",InvalidDocumentNumber:"Dopušteni su samo numerički znakovi.",twofaDescription:"<p> Poslali smo verifikacijski kod na: <p> {destination}. </p> </p> <p> Molimo unesite PIN ispod. </p>",twofaResendMessage:"Niste primili verifikacijski kod?",twofaResendButton:"Ponovno pošalji"},tr:{dateError:"Seçilen tarih {min} ve {max} arasında olmalıdır",dateError2:"Seçilen tarih kabul edilen aralıkta değil",dateFormatError:"Seçilen tarihin formatı, gereken formattan farklı.",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.",invalidPassword:"Şifre 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:"Yalnızca rakamlar içermelidir.",InvalidFieldSize:"Uzunluk tam olarak 11 rakam olmalıdır.",InvalidDocumentNumber:"Sadece sayısal karakterlere izin verilir.",twofaDescription:"<p> Doğrulama kodunu şu adrese gönderdik: <p> {destination}. </p> </p> <p> Lütfen aşağıya PIN kodunu girin. </p>",twofaResendMessage:"Doğrulama kodunu almadınız mı?",twofaResendButton:"Yeniden gönder"},"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",dateFormatError:"A data selecionada está em um formato diferente do exigido.",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",invalidPassword:"A senha não atende a todos os critérios",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 dígitos.",InvalidFieldSize:"O comprimento deve ser exatamente 11 dígitos.",InvalidDocumentNumber:"Apenas caracteres numéricos são permitidos.",twofaDescription:"<p> Enviamos o código de verificação para: <p> {destination}. </p> </p> <p> Por favor, insira o PIN abaixo. </p>",twofaResendMessage:"Não recebeu o código de verificação?",twofaResendButton:"Reenviar"},"es-mx":{dateError:"La fecha seleccionada debe ser entre {min} y {max}",dateError2:"La fecha seleccionada no está dentro de un rango válido",dateFormatError:"La fecha seleccionada tiene un formato diferente al requerido.",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",invalidPassword:"La contraseña no cumple con todos los criterios",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:"Debe contener solo dígitos.",InvalidFieldSize:"La longitud debe ser exactamente de 11 dígitos.",InvalidDocumentNumber:"Solo se permiten caracteres numéricos.",twofaDescription:"<p> Hemos enviado el código de verificación a: <p> {destination}. </p> </p> <p> Por favor, ingrese el PIN a continuación. </p>",twofaResendMessage:"¿No recibiste el código de verificación?",twofaResendButton:"Reenviar"}},n=(t,e,i)=>{let s=r[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");s=s.replace(i,e)}return s},a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==",l=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value=null,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedValues=[],this.showCheckboxes=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.showCheckboxes=!0,this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){const e=t.target.checked;this.showCheckboxes=e,this.selectedValues=e?this.options.map((t=>t.name)):[]}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return i("div",{key:"2eab716c27576d42a67d791b546022d58e89e21d",class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"9e246685583dd06a156d6b11308b2cb355d37d01",class:"checkboxgroup__wrapper--flex"},i("vaadin-checkbox",{key:"ba6a64bdd1d1141407ed65213684d3b4d643effc",class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&i("img",{key:"2c23ca2dfe4213d9287958b5e6f09f76e9e3b031",class:"checkboxgroup__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("small",{key:"3180a35a47e4b57d8634da2f516d0c5c71ee0e9f",class:"checkboxgroup__error-message"},this.errorMessage),this.showCheckboxes&&i("vaadin-checkbox-group",{key:"b28fee432aa7bffe6aedf708f1ce9603a52833de",theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>i("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return s(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};l.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}';const h=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleClick(){this.value=this.inputReference.checked.toString(),this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"8c80c955bb052558165a4c5b1020d0582ed0af36",class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("input",{key:"89401d543cb30b72ec614b0cd4e95b2e82b2522d",class:"checkbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.inputReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel(),i("small",{key:"d007d8c02dd014a363e2fcc1a0e8df6ffda34bcb",class:"checkbox__error-message"},this.errorMessage),i("div",{key:"c511c07684173359663d4907371efb82289f0433",class:"checkbox__wrapper--relative"},this.tooltip&&i("img",{key:"dd263ce86efd89f34078f3cc24729f43f40e89a6",class:"checkbox__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function c(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function u(t){c(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===d(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function p(t){if(c(1,arguments),!function(t){return c(1,arguments),t instanceof Date||"object"===d(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=u(t);return!isNaN(Number(e))}function m(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function v(t,e){return c(2,arguments),function(t,e){c(2,arguments);var i=u(t).getTime(),s=m(e);return new Date(i+s)}(t,-m(e))}function f(t){c(1,arguments);var e=u(t),i=e.getUTCDay(),s=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-s),e.setUTCHours(0,0,0,0),e}function b(t){c(1,arguments);var e=u(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var o=f(s),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var n=f(r);return e.getTime()>=o.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}h.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.checkbox__label-text{font-size:16px}.checkbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}';function g(t){c(1,arguments);var e=u(t),i=f(e).getTime()-function(t){c(1,arguments);var e=b(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),f(i)}(e).getTime();return Math.round(i/6048e5)+1}var y={};function w(){return y}function _(t,e){var i,s,o,r,n,a,l,h;c(1,arguments);var d=w(),p=m(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==o?o:d.weekStartsOn)&&void 0!==s?s:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=u(t),f=v.getUTCDay(),b=(f<p?7:0)+f-p;return v.setUTCDate(v.getUTCDate()-b),v.setUTCHours(0,0,0,0),v}function x(t,e){var i,s,o,r,n,a,l,h;c(1,arguments);var d=u(t),p=d.getUTCFullYear(),v=w(),f=m(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:v.firstWeekContainsDate)&&void 0!==s?s:null===(l=v.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(p+1,0,f),b.setUTCHours(0,0,0,0);var g=_(b,e),y=new Date(0);y.setUTCFullYear(p,0,f),y.setUTCHours(0,0,0,0);var x=_(y,e);return d.getTime()>=g.getTime()?p+1:d.getTime()>=x.getTime()?p:p-1}function k(t,e){c(1,arguments);var i=u(t),s=_(i,e).getTime()-function(t,e){var i,s,o,r,n,a,l,h;c(1,arguments);var d=w(),u=m(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:d.firstWeekContainsDate)&&void 0!==s?s:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),p=x(t,e),v=new Date(0);return v.setUTCFullYear(p,0,u),v.setUTCHours(0,0,0,0),_(v,e)}(i,e).getTime();return Math.round(s/6048e5)+1}function C(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}const A=function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return C("yy"===e?s%100:s,e.length)},S=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):C(i+1,2)},I=function(t,e){return C(t.getUTCDate(),e.length)},z=function(t,e){return C(t.getUTCHours()%12||12,e.length)},E=function(t,e){return C(t.getUTCHours(),e.length)},T=function(t,e){return C(t.getUTCMinutes(),e.length)},M=function(t,e){return C(t.getUTCSeconds(),e.length)},D=function(t,e){var i=e.length,s=t.getUTCMilliseconds();return C(Math.floor(s*Math.pow(10,i-3)),e.length)};function P(t,e){var i=t>0?"-":"+",s=Math.abs(t),o=Math.floor(s/60),r=s%60;if(0===r)return i+String(o);var n=e||"";return i+String(o)+n+C(r,2)}function O(t,e){return t%60==0?(t>0?"-":"+")+C(Math.abs(t)/60,2):F(t,e)}function F(t,e){var i=e||"",s=t>0?"-":"+",o=Math.abs(t);return s+C(Math.floor(o/60),2)+i+C(o%60,2)}const N={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return A(t,e)},Y:function(t,e,i,s){var o=x(t,s),r=o>0?o:1-o;return"YY"===e?C(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):C(r,e.length)},R:function(t,e){return C(b(t),e.length)},u:function(t,e){return C(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return C(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return C(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return S(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return C(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var o=k(t,s);return"wo"===e?i.ordinalNumber(o,{unit:"week"}):C(o,e.length)},I:function(t,e,i){var s=g(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):C(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):I(t,e)},D:function(t,e,i){var s=function(t){c(1,arguments);var e=u(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):C(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return C(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return C(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),o=0===s?7:s;switch(e){case"i":return String(o);case"ii":return C(o,e.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,o=t.getUTCHours();switch(s=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,o=t.getUTCHours();switch(s=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return z(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):E(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):C(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):C(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):T(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):M(t,e)},S:function(t,e){return D(t,e)},X:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return O(o);case"XXXX":case"XX":return F(o);default:return F(o,":")}},x:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return O(o);case"xxxx":case"xx":return F(o);default:return F(o,":")}},O:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+P(o,":");default:return"GMT"+F(o,":")}},z:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+P(o,":");default:return"GMT"+F(o,":")}},t:function(t,e,i,s){return C(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return C((s._originalDate||t).getTime(),e.length)}};var B=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},V=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},j={p:V,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],o=s[1],r=s[2];if(!r)return B(t,e);switch(o){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",B(o,e)).replace("{{time}}",V(r,e))}};const L=j;function R(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var q=["D","DD"],$=["YY","YYYY"];function H(t){return-1!==q.indexOf(t)}function W(t){return-1!==$.indexOf(t)}function G(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Y={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function U(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var K,Q={date:U({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:U({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:U({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},J={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function X(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):o;s=t.formattingValues[r]||t.formattingValues[o]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[a]||t.values[n]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function Z(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,o=e.match(s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth]);if(!o)return null;var r,n=o[0],a=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(n.length)}}}const tt={code:"en-US",formatDistance:function(t,e,i){var s,o=Y[t];return s="string"==typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:Q,formatRelative:function(t){return J[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:X({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:X({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:X({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:X({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:X({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(K={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(K.matchPattern);if(!i)return null;var s=i[0],o=t.match(K.parsePattern);if(!o)return null;var r=K.valueCallback?K.valueCallback(o[0]):o[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(s.length)}}),era:Z({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Z({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Z({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Z({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Z({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var et=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,it=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,st=/^'([^]*?)'?$/,ot=/''/g,rt=/[a-zA-Z]/;function nt(t,e,i){var s,o,r,n,a,l,h,d,f,b,g,y,_,x,k,C,A,S;c(2,arguments);var I=String(e),z=w(),E=null!==(s=null!==(o=null==i?void 0:i.locale)&&void 0!==o?o:z.locale)&&void 0!==s?s:tt,T=m(null!==(r=null!==(n=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==a?a:z.firstWeekContainsDate)&&void 0!==n?n:null===(f=z.locale)||void 0===f||null===(b=f.options)||void 0===b?void 0:b.firstWeekContainsDate)&&void 0!==r?r:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=m(null!==(g=null!==(y=null!==(_=null!==(x=null==i?void 0:i.weekStartsOn)&&void 0!==x?x:null==i||null===(k=i.locale)||void 0===k||null===(C=k.options)||void 0===C?void 0:C.weekStartsOn)&&void 0!==_?_:z.weekStartsOn)&&void 0!==y?y:null===(A=z.locale)||void 0===A||null===(S=A.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==g?g:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var D=u(t);if(!p(D))throw new RangeError("Invalid time value");var P=v(D,R(D)),O={firstWeekContainsDate:T,weekStartsOn:M,locale:E,_originalDate:D};return I.match(it).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,L[e])(t,E.formatLong):t})).join("").match(et).map((function(s){if("''"===s)return"'";var o,r,n=s[0];if("'"===n)return(r=(o=s).match(st))?r[1].replace(ot,"'"):o;var a=N[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||!W(s)||G(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!H(s)||G(s,e,String(t)),a(P,s,E.localize,O);if(n.match(rt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return s})).join("")}function at(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}function lt(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 at(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)?at(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0,o=function(){};return{s:o,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:o}}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,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw r}}}}function ht(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 dt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ct(t,e){return ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ct(t,e)}function ut(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&&ct(t,e)}function pt(t){return pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pt(t)}function mt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mt=function(){return!!t})()}function vt(t){var e=mt();return function(){var i,s=pt(t);if(e){var o=pt(this).constructor;i=Reflect.construct(s,arguments,o)}else i=s.apply(this,arguments);return function(t,e){if(e&&("object"==d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return dt(t)}(this,i)}}function ft(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bt(t){var e=function(t){if("object"!=d(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=d(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==d(e)?e:e+""}function gt(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,bt(s.key),s)}}function yt(t,e,i){return e&>(t.prototype,e),i&>(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function wt(t,e,i){return(e=bt(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var _t=function(){function t(){ft(this,t),wt(this,"priority",void 0),wt(this,"subPriority",0)}return yt(t,[{key:"validate",value:function(){return!0}}]),t}(),xt=function(){ut(e,_t);var t=vt(e);function e(i,s,o,r,n){var a;return ft(this,e),(a=t.call(this)).value=i,a.validateValue=s,a.setValue=o,a.priority=r,n&&(a.subPriority=n),a}return yt(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}(),kt=function(){ut(e,_t);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",10),wt(dt(i),"subPriority",-1),i}return yt(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}(),Ct=function(){function t(){ft(this,t),wt(this,"incompatibleTokens",void 0),wt(this,"priority",void 0),wt(this,"subPriority",void 0)}return yt(t,[{key:"run",value:function(t,e,i,s){var o=this.parse(t,e,i,s);return o?{setter:new xt(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),At=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",140),wt(dt(i),"incompatibleTokens",["R","u","t","T"]),i}return yt(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}(),St=/^(1[0-2]|0?\d)/,It=/^(3[0-1]|[0-2]?\d)/,zt=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Et=/^(5[0-3]|[0-4]?\d)/,Tt=/^(2[0-3]|[0-1]?\d)/,Mt=/^(2[0-4]|[0-1]?\d)/,Dt=/^(1[0-1]|0?\d)/,Pt=/^(1[0-2]|0?\d)/,Ot=/^[0-5]?\d/,Ft=/^[0-5]?\d/,Nt=/^\d/,Bt=/^\d{1,2}/,Vt=/^\d{1,3}/,jt=/^\d{1,4}/,Lt=/^-?\d+/,Rt=/^-?\d/,qt=/^-?\d{1,2}/,$t=/^-?\d{1,3}/,Ht=/^-?\d{1,4}/,Wt=/^([+-])(\d{2})(\d{2})?|Z/,Gt=/^([+-])(\d{2})(\d{2})|Z/,Yt=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ut=/^([+-])(\d{2}):(\d{2})|Z/,Kt=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Qt(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Jt(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function Xt(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function Zt(t){return Jt(Lt,t)}function te(t,e){switch(t){case 1:return Jt(Nt,e);case 2:return Jt(Bt,e);case 3:return Jt(Vt,e);case 4:return Jt(jt,e);default:return Jt(new RegExp("^\\d{1,"+t+"}"),e)}}function ee(t,e){switch(t){case 1:return Jt(Rt,e);case 2:return Jt(qt,e);case 3:return Jt($t,e);case 4:return Jt(Ht,e);default:return Jt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function ie(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function se(t,e){var i,s=e>0,o=s?e:1-e;if(o<=50)i=t||100;else{var r=o+50;i=t+100*Math.floor(r/100)-(t>=r%100?100:0)}return s?i:1-i}function oe(t){return t%400==0||t%4==0&&t%100!=0}var re=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",130),wt(dt(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Qt(te(4,t),s);case"yo":return Qt(i.ordinalNumber(t,{unit:"year"}),s);default:return Qt(te(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var s=t.getUTCFullYear();if(i.isTwoDigitYear){var o=se(i.year,s);return t.setUTCFullYear(o,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}(),ne=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",130),wt(dt(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Qt(te(4,t),s);case"Yo":return Qt(i.ordinalNumber(t,{unit:"year"}),s);default:return Qt(te(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,s){var o=x(t,s);if(i.isTwoDigitYear){var r=se(i.year,o);return t.setUTCFullYear(r,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),_(t,s)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),_(t,s)}}]),e}(),ae=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",130),wt(dt(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e){return ee("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),f(s)}}]),e}(),le=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",130),wt(dt(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e){return ee("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}(),he=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",120),wt(dt(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return te(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}(),de=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",120),wt(dt(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return te(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}(),ce=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),wt(dt(i),"priority",110),i}return yt(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"M":return Qt(Jt(St,t),s);case"MM":return Qt(te(2,t),s);case"Mo":return Qt(i.ordinalNumber(t,{unit:"month"}),s);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}(),ue=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",110),wt(dt(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"L":return Qt(Jt(St,t),s);case"LL":return Qt(te(2,t),s);case"Lo":return Qt(i.ordinalNumber(t,{unit:"month"}),s);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}(),pe=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",100),wt(dt(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return Jt(Et,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return te(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,s){return _(function(t,e,i){c(2,arguments);var s=u(t),o=m(e),r=k(s,i)-o;return s.setUTCDate(s.getUTCDate()-7*r),s}(t,i,s),s)}}]),e}(),me=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",100),wt(dt(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return Jt(Et,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return te(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return f(function(t,e){c(2,arguments);var i=u(t),s=m(e),o=g(i)-s;return i.setUTCDate(i.getUTCDate()-7*o),i}(t,i))}}]),e}(),ve=[31,28,31,30,31,30,31,31,30,31,30,31],fe=[31,29,31,30,31,30,31,31,30,31,30,31],be=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",90),wt(dt(i),"subPriority",1),wt(dt(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return Jt(It,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return te(e.length,t)}}},{key:"validate",value:function(t,e){var i=oe(t.getUTCFullYear()),s=t.getUTCMonth();return i?e>=1&&e<=fe[s]:e>=1&&e<=ve[s]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),ge=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",90),wt(dt(i),"subpriority",1),wt(dt(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return Jt(zt,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return te(e.length,t)}}},{key:"validate",value:function(t,e){return oe(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 ye(t,e,i){var s,o,r,n,a,l,h,d;c(2,arguments);var p=w(),v=m(null!==(s=null!==(o=null!==(r=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:p.weekStartsOn)&&void 0!==o?o:null===(h=p.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==s?s:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=u(t),b=m(e),g=((b%7+7)%7<v?7:0)+b-f.getUTCDay();return f.setUTCDate(f.getUTCDate()+g),f}var we=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",90),wt(dt(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return yt(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,s){return(t=ye(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),_e=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",90),wt(dt(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i,s){var o=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Qt(te(e.length,t),o);case"eo":return Qt(i.ordinalNumber(t,{unit:"day"}),o);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,s){return(t=ye(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),xe=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",90),wt(dt(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i,s){var o=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Qt(te(e.length,t),o);case"co":return Qt(i.ordinalNumber(t,{unit:"day"}),o);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,s){return(t=ye(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),ke=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",90),wt(dt(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){var s=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return te(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Qt(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return Qt(i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Qt(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);default:return Qt(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"}),s)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){c(2,arguments);var i=m(e);i%7==0&&(i-=7);var s=u(t),o=((i%7+7)%7<1?7:0)+i-s.getUTCDay();return s.setUTCDate(s.getUTCDate()+o),s}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Ce=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",80),wt(dt(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return yt(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(ie(i),0,0,0),t}}]),e}(),Ae=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",80),wt(dt(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return yt(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(ie(i),0,0,0),t}}]),e}(),Se=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",80),wt(dt(i),"incompatibleTokens",["a","b","t","T"]),i}return yt(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(ie(i),0,0,0),t}}]),e}(),Ie=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",70),wt(dt(i),"incompatibleTokens",["H","K","k","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return Jt(Pt,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return te(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:s||12!==i?i:0,0,0,0),t}}]),e}(),ze=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",70),wt(dt(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return Jt(Tt,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return te(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}(),Ee=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",70),wt(dt(i),"incompatibleTokens",["h","H","k","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return Jt(Dt,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return te(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:i,0,0,0),t}}]),e}(),Te=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",70),wt(dt(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return Jt(Mt,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return te(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}(),Me=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",60),wt(dt(i),"incompatibleTokens",["t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return Jt(Ot,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return te(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}(),De=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",50),wt(dt(i),"incompatibleTokens",["t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return Jt(Ft,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return te(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}(),Pe=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",30),wt(dt(i),"incompatibleTokens",["t","T"]),i}return yt(e,[{key:"parse",value:function(t,e){return Qt(te(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}(),Oe=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",10),wt(dt(i),"incompatibleTokens",["t","T","x"]),i}return yt(e,[{key:"parse",value:function(t,e){switch(e){case"X":return Xt(Wt,t);case"XX":return Xt(Gt,t);case"XXXX":return Xt(Yt,t);case"XXXXX":return Xt(Kt,t);default:return Xt(Ut,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Fe=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",10),wt(dt(i),"incompatibleTokens",["t","T","X"]),i}return yt(e,[{key:"parse",value:function(t,e){switch(e){case"x":return Xt(Wt,t);case"xx":return Xt(Gt,t);case"xxxx":return Xt(Yt,t);case"xxxxx":return Xt(Kt,t);default:return Xt(Ut,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Ne=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",40),wt(dt(i),"incompatibleTokens","*"),i}return yt(e,[{key:"parse",value:function(t){return Zt(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Be=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",20),wt(dt(i),"incompatibleTokens","*"),i}return yt(e,[{key:"parse",value:function(t){return Zt(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Ve={G:new At,y:new re,Y:new ne,R:new ae,u:new le,Q:new he,q:new de,M:new ce,L:new ue,w:new pe,I:new me,d:new be,D:new ge,E:new we,e:new _e,c:new xe,i:new ke,a:new Ce,b:new Ae,B:new Se,h:new Ie,H:new ze,K:new Ee,k:new Te,m:new Me,s:new De,S:new Pe,X:new Oe,x:new Fe,t:new Ne,T:new Be},je=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Le=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Re=/^'([^]*?)'?$/,qe=/''/g,$e=/\S/,He=/[a-zA-Z]/;function We(t,e,i,s){var o,r,n,a,l,h,p,f,b,g,y,_,x,k,C,A,S,I;c(3,arguments);var z=String(t),E=String(e),T=w(),M=null!==(o=null!==(r=null==s?void 0:s.locale)&&void 0!==r?r:T.locale)&&void 0!==o?o:tt;if(!M.match)throw new RangeError("locale must contain match property");var D=m(null!==(n=null!==(a=null!==(l=null!==(h=null==s?void 0:s.firstWeekContainsDate)&&void 0!==h?h:null==s||null===(p=s.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==l?l:T.firstWeekContainsDate)&&void 0!==a?a:null===(b=T.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==n?n:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=m(null!==(y=null!==(_=null!==(x=null!==(k=null==s?void 0:s.weekStartsOn)&&void 0!==k?k:null==s||null===(C=s.locale)||void 0===C||null===(A=C.options)||void 0===A?void 0:A.weekStartsOn)&&void 0!==x?x:T.weekStartsOn)&&void 0!==_?_:null===(S=T.locale)||void 0===S||null===(I=S.options)||void 0===I?void 0:I.weekStartsOn)&&void 0!==y?y:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===E)return""===z?u(i):new Date(NaN);var O,F={firstWeekContainsDate:D,weekStartsOn:P,locale:M},N=[new kt],B=E.match(Le).map((function(t){var e=t[0];return e in L?(0,L[e])(t,M.formatLong):t})).join("").match(je),V=[],j=lt(B);try{var q=function(){var e=O.value;null!=s&&s.useAdditionalWeekYearTokens||!W(e)||G(e,E,t),null!=s&&s.useAdditionalDayOfYearTokens||!H(e)||G(e,E,t);var i=e[0],o=Ve[i];if(o){var r=o.incompatibleTokens;if(Array.isArray(r)){var n=V.find((function(t){return r.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===o.incompatibleTokens&&V.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));V.push({token:i,fullToken:e});var a=o.run(z,e,M.match,F);if(!a)return{v:new Date(NaN)};N.push(a.setter),z=a.rest}else{if(i.match(He))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(Re)[1].replace(qe,"'")),0!==z.indexOf(e))return{v:new Date(NaN)};z=z.slice(e.length)}};for(j.s();!(O=j.n()).done;){var $=q();if("object"===d($))return $.v}}catch(t){j.e(t)}finally{j.f()}if(z.length>0&&$e.test(z))return new Date(NaN);var Y=N.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 N.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),U=u(i);if(isNaN(U.getTime()))return new Date(NaN);var K,Q=v(U,R(U)),J={},X=lt(Y);try{for(X.s();!(K=X.n()).done;){var Z=K.value;if(!Z.validate(Q,F))return new Date(NaN);var et=Z.set(Q,J,F);Array.isArray(et)?(Q=et[0],ht(J,et[1])):Q=et}}catch(t){X.e(t)}finally{X.f()}return Q}function Ge(t,e){c(2,arguments);var i=u(t),s=u(e);return i.getTime()>s.getTime()}function Ye(t,e){c(2,arguments);var i=u(t),s=u(e);return i.getTime()<s.getTime()}function Ue(t,e,i){return c(2,arguments),p(We(t,e,new Date,i))}const Ke=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:s}=t;return nt(new Date(e,i,s),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=We(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},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}get formattedValue(){return this.value?nt(We(this.value,"yyyy-MM-dd",new Date),this.dateFormat||"yyyy-MM-dd"):""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=We((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=We((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.addEventListener("opened-changed",(t=>{!0===t.detail.value?this.errorMessage="":(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0)}))}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=We(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!(Ye(this.valueAsDate,this.minDate)||Ge(this.valueAsDate,this.maxDate)||!Ue(this.formattedValue,this.dateFormat))&&this.inputReference.validity.valid}setErrorMessage(){return this.inputReference.validity.valueMissing?n("requiredError",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?n("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):Ye(this.valueAsDate,this.minDate)||Ge(this.valueAsDate,this.maxDate)?n("dateError2",this.language):Ue(this.formattedValue,this.dateFormat)?void 0:n("dateFormatError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"18b85f7647c376d5a99468df4978d178cd19d77b",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{key:"e351963c25eecb2e5758dec54c9c2fb883b85912",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{key:"471bb1c440213f764fe334309b262d44ac2ead7d",id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t)}),i("small",{key:"14e5c4d34a3236907cd701d72a91c06d28b37c7e",class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"c3424b6076ec5a399054bf37eca774e4bd3e3644",class:"date__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return s(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Ke.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.date__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const Qe=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}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===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"8cc90cea4b25fcd2fe05c9b6c609dc37a84d28a1",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"43d0be5a1fecc1fa937323746362c2daa55863a8",class:"email__wrapper--flex"},i("label",{key:"082b86cae6d59f2b2b025801373ae2f9efe7ef7a",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"57a25e865a0bb7376d675195940046be19066caa",class:"email__wrapper--relative"},this.tooltip&&i("img",{key:"8e720b021706191a33a39cc62e29b8acb747e740",class:"email__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"93cbeb1fcc0d5b992b9fb171b4d47b700087f284",id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"0eab5e5e8cd4a525f2160637af1be9c2e4d313c1",class:"email__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Qe.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emw--color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.email__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__input::placeholder{color:var(--emw--color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';var Je=Object.defineProperty,Xe=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,ti=Object.getOwnPropertySymbols,ei=Object.prototype.hasOwnProperty,ii=Object.prototype.propertyIsEnumerable,si=(t,e,i)=>e in t?Je(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,oi=(t,e)=>{for(var i in e||(e={}))ei.call(e,i)&&si(t,i,e[i]);if(ti)for(var i of ti(e))ii.call(e,i)&&si(t,i,e[i]);return t},ri=(t,e)=>Xe(t,Ze(e)),ni=(t,e,i)=>(si(t,"symbol"!=typeof e?e+"":e,i),i),ai=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{a(i.next(t))}catch(t){o(t)}},n=t=>{try{a(i.throw(t))}catch(t){o(t)}},a=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
|
|
1
|
+
import{r as t,c as e,h as i,g as s,H as o}from"./index-ed8fc8f4.js";const r={en:{dateError:"The selected date should be between {min} and {max}",dateError2:"The selected date is not within the accepted range",dateFormatError:"The selected date has a different format then the one required.",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.",invalidPassword:"Password does not meet 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:"The input should contain only digits.",InvalidFieldSize:"The length must be exactly 11 digits.",InvalidDocumentNumber:"Only numerical characters are allowed.",twofaDescription:"<p> We have sent the verification code to <p> {destination}. </p> </p> <p> Please insert the PIN below. </p>",twofaResendMessage:"Didn't receive the verification code?",twofaResendButton:"Resend"},hu:{dateError:"A választott dátumnak {min} és {max} között kell lennie",dateError2:"A kiválasztott dátum nincs az elfogadott tartományon belül",dateFormatError:"A kiválasztott dátum formátuma eltér a szükségestől.",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.",invalidPassword:"A jelszó nem felel meg minden kritériumnak",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ámjegyeket tartalmazhat.",InvalidFieldSize:"A hosszúságnak pontosan 11 számjegynek kell lennie.",InvalidDocumentNumber:"Csak számjegyek engedélyezettek.",twofaDescription:"<p> A megerősítő kódot elküldtük a következő címre: <p> {destination}. </p> </p> <p> Kérjük, írja be az alábbi PIN-kódot. </p>",twofaResendMessage:"Nem kapta meg a megerősítő kódot?",twofaResendButton:"Újraküldés"},hr:{dateError:"Odabrani datum treba biti između {min} i {max}",dateError2:"Odabrani datum nije unutar prihvaćenog raspona",dateFormatError:"Odabrani datum je u drugačijem formatu od potrebnog.",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",invalidPassword:"Lozinka ne zadovoljava sve kriterije",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:"Smije sadržavati samo znamenke.",InvalidFieldSize:"Dužina mora biti točno 11 znamenki.",InvalidDocumentNumber:"Dopušteni su samo numerički znakovi.",twofaDescription:"<p> Poslali smo verifikacijski kod na: <p> {destination}. </p> </p> <p> Molimo unesite PIN ispod. </p>",twofaResendMessage:"Niste primili verifikacijski kod?",twofaResendButton:"Ponovno pošalji"},tr:{dateError:"Seçilen tarih {min} ve {max} arasında olmalıdır",dateError2:"Seçilen tarih kabul edilen aralıkta değil",dateFormatError:"Seçilen tarihin formatı, gereken formattan farklı.",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.",invalidPassword:"Şifre 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:"Yalnızca rakamlar içermelidir.",InvalidFieldSize:"Uzunluk tam olarak 11 rakam olmalıdır.",InvalidDocumentNumber:"Sadece sayısal karakterlere izin verilir.",twofaDescription:"<p> Doğrulama kodunu şu adrese gönderdik: <p> {destination}. </p> </p> <p> Lütfen aşağıya PIN kodunu girin. </p>",twofaResendMessage:"Doğrulama kodunu almadınız mı?",twofaResendButton:"Yeniden gönder"},"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",dateFormatError:"A data selecionada está em um formato diferente do exigido.",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",invalidPassword:"A senha não atende a todos os critérios",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 dígitos.",InvalidFieldSize:"O comprimento deve ser exatamente 11 dígitos.",InvalidDocumentNumber:"Apenas caracteres numéricos são permitidos.",twofaDescription:"<p> Enviamos o código de verificação para: <p> {destination}. </p> </p> <p> Por favor, insira o PIN abaixo. </p>",twofaResendMessage:"Não recebeu o código de verificação?",twofaResendButton:"Reenviar"},"es-mx":{dateError:"La fecha seleccionada debe ser entre {min} y {max}",dateError2:"La fecha seleccionada no está dentro de un rango válido",dateFormatError:"La fecha seleccionada tiene un formato diferente al requerido.",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",invalidPassword:"La contraseña no cumple con todos los criterios",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:"Debe contener solo dígitos.",InvalidFieldSize:"La longitud debe ser exactamente de 11 dígitos.",InvalidDocumentNumber:"Solo se permiten caracteres numéricos.",twofaDescription:"<p> Hemos enviado el código de verificación a: <p> {destination}. </p> </p> <p> Por favor, ingrese el PIN a continuación. </p>",twofaResendMessage:"¿No recibiste el código de verificación?",twofaResendButton:"Reenviar"}},n=(t,e,i)=>{let s=r[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");s=s.replace(i,e)}return s},a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==",l=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value=null,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedValues=[],this.showCheckboxes=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.showCheckboxes=!0,this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){const e=t.target.checked;this.showCheckboxes=e,this.selectedValues=e?this.options.map((t=>t.name)):[]}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return i("div",{key:"2eab716c27576d42a67d791b546022d58e89e21d",class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"9e246685583dd06a156d6b11308b2cb355d37d01",class:"checkboxgroup__wrapper--flex"},i("vaadin-checkbox",{key:"ba6a64bdd1d1141407ed65213684d3b4d643effc",class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&i("img",{key:"2c23ca2dfe4213d9287958b5e6f09f76e9e3b031",class:"checkboxgroup__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("small",{key:"3180a35a47e4b57d8634da2f516d0c5c71ee0e9f",class:"checkboxgroup__error-message"},this.errorMessage),this.showCheckboxes&&i("vaadin-checkbox-group",{key:"b28fee432aa7bffe6aedf708f1ce9603a52833de",theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>i("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return s(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};l.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}';const h=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.vaadinCheckbox.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleCheckbox(t){this.value=t.target.checked.toString(),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"e9dfb4e2a6b99d740eaa7d94d1ff3aea9587bcc9",class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("vaadin-checkbox",{key:"cc2a8d1c131bd04febf221538f01d7334169d92a",class:"checkbox__input",required:this.validation.mandatory,checked:"true"===this.defaultValue,onChange:t=>this.handleCheckbox(t),"error-message":!this.isValid&&this.errorMessage,ref:t=>this.vaadinCheckbox=t},this.renderLabel()),this.tooltip&&i("img",{key:"a94be7eefe15593f0cfa90d89bed1f536bd51103",class:"checkboxgroup__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function c(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function u(t){c(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===d(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function p(t){if(c(1,arguments),!function(t){return c(1,arguments),t instanceof Date||"object"===d(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=u(t);return!isNaN(Number(e))}function m(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function v(t,e){return c(2,arguments),function(t,e){c(2,arguments);var i=u(t).getTime(),s=m(e);return new Date(i+s)}(t,-m(e))}function f(t){c(1,arguments);var e=u(t),i=e.getUTCDay(),s=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-s),e.setUTCHours(0,0,0,0),e}function b(t){c(1,arguments);var e=u(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var o=f(s),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var n=f(r);return e.getTime()>=o.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}h.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal;font-size:15px}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input[indeterminate]::part(checkbox)::after,.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;padding:0px;vertical-align:baseline}.checkbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}.checkbox__input::part(checkbox){background-color:var(--emw--color-white, #FFFFFF);transform:scale(0.8, 0.8);border-radius:var(--emw--border-radius-small, 2px);box-shadow:0 0px 0px 2px var(--emw--color-gray, #7a7a7a)}.checkbox__input::part(required-indicator)::after{content:"*"}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));box-shadow:none}';function g(t){c(1,arguments);var e=u(t),i=f(e).getTime()-function(t){c(1,arguments);var e=b(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),f(i)}(e).getTime();return Math.round(i/6048e5)+1}var y={};function w(){return y}function _(t,e){var i,s,o,r,n,a,l,h;c(1,arguments);var d=w(),p=m(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==o?o:d.weekStartsOn)&&void 0!==s?s:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=u(t),f=v.getUTCDay(),b=(f<p?7:0)+f-p;return v.setUTCDate(v.getUTCDate()-b),v.setUTCHours(0,0,0,0),v}function x(t,e){var i,s,o,r,n,a,l,h;c(1,arguments);var d=u(t),p=d.getUTCFullYear(),v=w(),f=m(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:v.firstWeekContainsDate)&&void 0!==s?s:null===(l=v.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(p+1,0,f),b.setUTCHours(0,0,0,0);var g=_(b,e),y=new Date(0);y.setUTCFullYear(p,0,f),y.setUTCHours(0,0,0,0);var x=_(y,e);return d.getTime()>=g.getTime()?p+1:d.getTime()>=x.getTime()?p:p-1}function k(t,e){c(1,arguments);var i=u(t),s=_(i,e).getTime()-function(t,e){var i,s,o,r,n,a,l,h;c(1,arguments);var d=w(),u=m(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==o?o:d.firstWeekContainsDate)&&void 0!==s?s:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),p=x(t,e),v=new Date(0);return v.setUTCFullYear(p,0,u),v.setUTCHours(0,0,0,0),_(v,e)}(i,e).getTime();return Math.round(s/6048e5)+1}function C(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}const A=function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return C("yy"===e?s%100:s,e.length)},S=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):C(i+1,2)},I=function(t,e){return C(t.getUTCDate(),e.length)},z=function(t,e){return C(t.getUTCHours()%12||12,e.length)},E=function(t,e){return C(t.getUTCHours(),e.length)},T=function(t,e){return C(t.getUTCMinutes(),e.length)},M=function(t,e){return C(t.getUTCSeconds(),e.length)},D=function(t,e){var i=e.length,s=t.getUTCMilliseconds();return C(Math.floor(s*Math.pow(10,i-3)),e.length)};function P(t,e){var i=t>0?"-":"+",s=Math.abs(t),o=Math.floor(s/60),r=s%60;if(0===r)return i+String(o);var n=e||"";return i+String(o)+n+C(r,2)}function O(t,e){return t%60==0?(t>0?"-":"+")+C(Math.abs(t)/60,2):F(t,e)}function F(t,e){var i=e||"",s=t>0?"-":"+",o=Math.abs(t);return s+C(Math.floor(o/60),2)+i+C(o%60,2)}const N={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return A(t,e)},Y:function(t,e,i,s){var o=x(t,s),r=o>0?o:1-o;return"YY"===e?C(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):C(r,e.length)},R:function(t,e){return C(b(t),e.length)},u:function(t,e){return C(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return C(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return C(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return S(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return C(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var o=k(t,s);return"wo"===e?i.ordinalNumber(o,{unit:"week"}):C(o,e.length)},I:function(t,e,i){var s=g(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):C(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):I(t,e)},D:function(t,e,i){var s=function(t){c(1,arguments);var e=u(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):C(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return C(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return C(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),o=0===s?7:s;switch(e){case"i":return String(o);case"ii":return C(o,e.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,o=t.getUTCHours();switch(s=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,o=t.getUTCHours();switch(s=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return z(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):E(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):C(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):C(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):T(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):M(t,e)},S:function(t,e){return D(t,e)},X:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return O(o);case"XXXX":case"XX":return F(o);default:return F(o,":")}},x:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return O(o);case"xxxx":case"xx":return F(o);default:return F(o,":")}},O:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+P(o,":");default:return"GMT"+F(o,":")}},z:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+P(o,":");default:return"GMT"+F(o,":")}},t:function(t,e,i,s){return C(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return C((s._originalDate||t).getTime(),e.length)}};var B=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},V=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},j={p:V,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],o=s[1],r=s[2];if(!r)return B(t,e);switch(o){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",B(o,e)).replace("{{time}}",V(r,e))}};const L=j;function q(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var R=["D","DD"],$=["YY","YYYY"];function H(t){return-1!==R.indexOf(t)}function W(t){return-1!==$.indexOf(t)}function G(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Y={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function U(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var K,Q={date:U({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:U({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:U({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},J={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function X(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):o;s=t.formattingValues[r]||t.formattingValues[o]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[a]||t.values[n]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function Z(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,o=e.match(s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth]);if(!o)return null;var r,n=o[0],a=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(n))return e}(a):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(n))return e}(a);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(n.length)}}}const tt={code:"en-US",formatDistance:function(t,e,i){var s,o=Y[t];return s="string"==typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:Q,formatRelative:function(t){return J[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:X({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:X({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:X({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:X({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:X({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(K={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(K.matchPattern);if(!i)return null;var s=i[0],o=t.match(K.parsePattern);if(!o)return null;var r=K.valueCallback?K.valueCallback(o[0]):o[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(s.length)}}),era:Z({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Z({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Z({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Z({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Z({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var et=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,it=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,st=/^'([^]*?)'?$/,ot=/''/g,rt=/[a-zA-Z]/;function nt(t,e,i){var s,o,r,n,a,l,h,d,f,b,g,y,_,x,k,C,A,S;c(2,arguments);var I=String(e),z=w(),E=null!==(s=null!==(o=null==i?void 0:i.locale)&&void 0!==o?o:z.locale)&&void 0!==s?s:tt,T=m(null!==(r=null!==(n=null!==(a=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==a?a:z.firstWeekContainsDate)&&void 0!==n?n:null===(f=z.locale)||void 0===f||null===(b=f.options)||void 0===b?void 0:b.firstWeekContainsDate)&&void 0!==r?r:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=m(null!==(g=null!==(y=null!==(_=null!==(x=null==i?void 0:i.weekStartsOn)&&void 0!==x?x:null==i||null===(k=i.locale)||void 0===k||null===(C=k.options)||void 0===C?void 0:C.weekStartsOn)&&void 0!==_?_:z.weekStartsOn)&&void 0!==y?y:null===(A=z.locale)||void 0===A||null===(S=A.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==g?g:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var D=u(t);if(!p(D))throw new RangeError("Invalid time value");var P=v(D,q(D)),O={firstWeekContainsDate:T,weekStartsOn:M,locale:E,_originalDate:D};return I.match(it).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,L[e])(t,E.formatLong):t})).join("").match(et).map((function(s){if("''"===s)return"'";var o,r,n=s[0];if("'"===n)return(r=(o=s).match(st))?r[1].replace(ot,"'"):o;var a=N[n];if(a)return null!=i&&i.useAdditionalWeekYearTokens||!W(s)||G(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!H(s)||G(s,e,String(t)),a(P,s,E.localize,O);if(n.match(rt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return s})).join("")}function at(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}function lt(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 at(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)?at(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0,o=function(){};return{s:o,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:o}}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,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw r}}}}function ht(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 dt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ct(t,e){return ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ct(t,e)}function ut(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&&ct(t,e)}function pt(t){return pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pt(t)}function mt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mt=function(){return!!t})()}function vt(t){var e=mt();return function(){var i,s=pt(t);if(e){var o=pt(this).constructor;i=Reflect.construct(s,arguments,o)}else i=s.apply(this,arguments);return function(t,e){if(e&&("object"==d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return dt(t)}(this,i)}}function ft(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bt(t){var e=function(t){if("object"!=d(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=d(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==d(e)?e:e+""}function gt(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,bt(s.key),s)}}function yt(t,e,i){return e&>(t.prototype,e),i&>(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function wt(t,e,i){return(e=bt(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var _t=function(){function t(){ft(this,t),wt(this,"priority",void 0),wt(this,"subPriority",0)}return yt(t,[{key:"validate",value:function(){return!0}}]),t}(),xt=function(){ut(e,_t);var t=vt(e);function e(i,s,o,r,n){var a;return ft(this,e),(a=t.call(this)).value=i,a.validateValue=s,a.setValue=o,a.priority=r,n&&(a.subPriority=n),a}return yt(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}(),kt=function(){ut(e,_t);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",10),wt(dt(i),"subPriority",-1),i}return yt(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}(),Ct=function(){function t(){ft(this,t),wt(this,"incompatibleTokens",void 0),wt(this,"priority",void 0),wt(this,"subPriority",void 0)}return yt(t,[{key:"run",value:function(t,e,i,s){var o=this.parse(t,e,i,s);return o?{setter:new xt(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),At=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",140),wt(dt(i),"incompatibleTokens",["R","u","t","T"]),i}return yt(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}(),St=/^(1[0-2]|0?\d)/,It=/^(3[0-1]|[0-2]?\d)/,zt=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Et=/^(5[0-3]|[0-4]?\d)/,Tt=/^(2[0-3]|[0-1]?\d)/,Mt=/^(2[0-4]|[0-1]?\d)/,Dt=/^(1[0-1]|0?\d)/,Pt=/^(1[0-2]|0?\d)/,Ot=/^[0-5]?\d/,Ft=/^[0-5]?\d/,Nt=/^\d/,Bt=/^\d{1,2}/,Vt=/^\d{1,3}/,jt=/^\d{1,4}/,Lt=/^-?\d+/,qt=/^-?\d/,Rt=/^-?\d{1,2}/,$t=/^-?\d{1,3}/,Ht=/^-?\d{1,4}/,Wt=/^([+-])(\d{2})(\d{2})?|Z/,Gt=/^([+-])(\d{2})(\d{2})|Z/,Yt=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ut=/^([+-])(\d{2}):(\d{2})|Z/,Kt=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Qt(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Jt(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function Xt(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function Zt(t){return Jt(Lt,t)}function te(t,e){switch(t){case 1:return Jt(Nt,e);case 2:return Jt(Bt,e);case 3:return Jt(Vt,e);case 4:return Jt(jt,e);default:return Jt(new RegExp("^\\d{1,"+t+"}"),e)}}function ee(t,e){switch(t){case 1:return Jt(qt,e);case 2:return Jt(Rt,e);case 3:return Jt($t,e);case 4:return Jt(Ht,e);default:return Jt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function ie(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function se(t,e){var i,s=e>0,o=s?e:1-e;if(o<=50)i=t||100;else{var r=o+50;i=t+100*Math.floor(r/100)-(t>=r%100?100:0)}return s?i:1-i}function oe(t){return t%400==0||t%4==0&&t%100!=0}var re=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",130),wt(dt(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Qt(te(4,t),s);case"yo":return Qt(i.ordinalNumber(t,{unit:"year"}),s);default:return Qt(te(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var s=t.getUTCFullYear();if(i.isTwoDigitYear){var o=se(i.year,s);return t.setUTCFullYear(o,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}(),ne=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",130),wt(dt(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Qt(te(4,t),s);case"Yo":return Qt(i.ordinalNumber(t,{unit:"year"}),s);default:return Qt(te(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,s){var o=x(t,s);if(i.isTwoDigitYear){var r=se(i.year,o);return t.setUTCFullYear(r,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),_(t,s)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),_(t,s)}}]),e}(),ae=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",130),wt(dt(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e){return ee("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),f(s)}}]),e}(),le=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",130),wt(dt(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e){return ee("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}(),he=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",120),wt(dt(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return te(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}(),de=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",120),wt(dt(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return te(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}(),ce=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),wt(dt(i),"priority",110),i}return yt(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"M":return Qt(Jt(St,t),s);case"MM":return Qt(te(2,t),s);case"Mo":return Qt(i.ordinalNumber(t,{unit:"month"}),s);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}(),ue=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",110),wt(dt(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"L":return Qt(Jt(St,t),s);case"LL":return Qt(te(2,t),s);case"Lo":return Qt(i.ordinalNumber(t,{unit:"month"}),s);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}(),pe=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",100),wt(dt(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return Jt(Et,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return te(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,s){return _(function(t,e,i){c(2,arguments);var s=u(t),o=m(e),r=k(s,i)-o;return s.setUTCDate(s.getUTCDate()-7*r),s}(t,i,s),s)}}]),e}(),me=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",100),wt(dt(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return Jt(Et,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return te(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return f(function(t,e){c(2,arguments);var i=u(t),s=m(e),o=g(i)-s;return i.setUTCDate(i.getUTCDate()-7*o),i}(t,i))}}]),e}(),ve=[31,28,31,30,31,30,31,31,30,31,30,31],fe=[31,29,31,30,31,30,31,31,30,31,30,31],be=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",90),wt(dt(i),"subPriority",1),wt(dt(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return Jt(It,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return te(e.length,t)}}},{key:"validate",value:function(t,e){var i=oe(t.getUTCFullYear()),s=t.getUTCMonth();return i?e>=1&&e<=fe[s]:e>=1&&e<=ve[s]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),ge=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",90),wt(dt(i),"subpriority",1),wt(dt(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return Jt(zt,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return te(e.length,t)}}},{key:"validate",value:function(t,e){return oe(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 ye(t,e,i){var s,o,r,n,a,l,h,d;c(2,arguments);var p=w(),v=m(null!==(s=null!==(o=null!==(r=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:p.weekStartsOn)&&void 0!==o?o:null===(h=p.locale)||void 0===h||null===(d=h.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==s?s:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=u(t),b=m(e),g=((b%7+7)%7<v?7:0)+b-f.getUTCDay();return f.setUTCDate(f.getUTCDate()+g),f}var we=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",90),wt(dt(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return yt(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,s){return(t=ye(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),_e=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",90),wt(dt(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i,s){var o=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Qt(te(e.length,t),o);case"eo":return Qt(i.ordinalNumber(t,{unit:"day"}),o);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,s){return(t=ye(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),xe=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",90),wt(dt(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i,s){var o=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Qt(te(e.length,t),o);case"co":return Qt(i.ordinalNumber(t,{unit:"day"}),o);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,s){return(t=ye(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),ke=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",90),wt(dt(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){var s=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return te(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Qt(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return Qt(i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Qt(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);default:return Qt(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"}),s)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){c(2,arguments);var i=m(e);i%7==0&&(i-=7);var s=u(t),o=((i%7+7)%7<1?7:0)+i-s.getUTCDay();return s.setUTCDate(s.getUTCDate()+o),s}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Ce=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",80),wt(dt(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return yt(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(ie(i),0,0,0),t}}]),e}(),Ae=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",80),wt(dt(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return yt(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(ie(i),0,0,0),t}}]),e}(),Se=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",80),wt(dt(i),"incompatibleTokens",["a","b","t","T"]),i}return yt(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(ie(i),0,0,0),t}}]),e}(),Ie=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",70),wt(dt(i),"incompatibleTokens",["H","K","k","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return Jt(Pt,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return te(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:s||12!==i?i:0,0,0,0),t}}]),e}(),ze=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",70),wt(dt(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return Jt(Tt,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return te(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}(),Ee=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",70),wt(dt(i),"incompatibleTokens",["h","H","k","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return Jt(Dt,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return te(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:i,0,0,0),t}}]),e}(),Te=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",70),wt(dt(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return Jt(Mt,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return te(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}(),Me=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",60),wt(dt(i),"incompatibleTokens",["t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return Jt(Ot,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return te(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}(),De=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",50),wt(dt(i),"incompatibleTokens",["t","T"]),i}return yt(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return Jt(Ft,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return te(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}(),Pe=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",30),wt(dt(i),"incompatibleTokens",["t","T"]),i}return yt(e,[{key:"parse",value:function(t,e){return Qt(te(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}(),Oe=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",10),wt(dt(i),"incompatibleTokens",["t","T","x"]),i}return yt(e,[{key:"parse",value:function(t,e){switch(e){case"X":return Xt(Wt,t);case"XX":return Xt(Gt,t);case"XXXX":return Xt(Yt,t);case"XXXXX":return Xt(Kt,t);default:return Xt(Ut,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Fe=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",10),wt(dt(i),"incompatibleTokens",["t","T","X"]),i}return yt(e,[{key:"parse",value:function(t,e){switch(e){case"x":return Xt(Wt,t);case"xx":return Xt(Gt,t);case"xxxx":return Xt(Yt,t);case"xxxxx":return Xt(Kt,t);default:return Xt(Ut,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Ne=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",40),wt(dt(i),"incompatibleTokens","*"),i}return yt(e,[{key:"parse",value:function(t){return Zt(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Be=function(){ut(e,Ct);var t=vt(e);function e(){var i;ft(this,e);for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];return wt(dt(i=t.call.apply(t,[this].concat(o))),"priority",20),wt(dt(i),"incompatibleTokens","*"),i}return yt(e,[{key:"parse",value:function(t){return Zt(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Ve={G:new At,y:new re,Y:new ne,R:new ae,u:new le,Q:new he,q:new de,M:new ce,L:new ue,w:new pe,I:new me,d:new be,D:new ge,E:new we,e:new _e,c:new xe,i:new ke,a:new Ce,b:new Ae,B:new Se,h:new Ie,H:new ze,K:new Ee,k:new Te,m:new Me,s:new De,S:new Pe,X:new Oe,x:new Fe,t:new Ne,T:new Be},je=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Le=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qe=/^'([^]*?)'?$/,Re=/''/g,$e=/\S/,He=/[a-zA-Z]/;function We(t,e,i,s){var o,r,n,a,l,h,p,f,b,g,y,_,x,k,C,A,S,I;c(3,arguments);var z=String(t),E=String(e),T=w(),M=null!==(o=null!==(r=null==s?void 0:s.locale)&&void 0!==r?r:T.locale)&&void 0!==o?o:tt;if(!M.match)throw new RangeError("locale must contain match property");var D=m(null!==(n=null!==(a=null!==(l=null!==(h=null==s?void 0:s.firstWeekContainsDate)&&void 0!==h?h:null==s||null===(p=s.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==l?l:T.firstWeekContainsDate)&&void 0!==a?a:null===(b=T.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==n?n:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=m(null!==(y=null!==(_=null!==(x=null!==(k=null==s?void 0:s.weekStartsOn)&&void 0!==k?k:null==s||null===(C=s.locale)||void 0===C||null===(A=C.options)||void 0===A?void 0:A.weekStartsOn)&&void 0!==x?x:T.weekStartsOn)&&void 0!==_?_:null===(S=T.locale)||void 0===S||null===(I=S.options)||void 0===I?void 0:I.weekStartsOn)&&void 0!==y?y:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===E)return""===z?u(i):new Date(NaN);var O,F={firstWeekContainsDate:D,weekStartsOn:P,locale:M},N=[new kt],B=E.match(Le).map((function(t){var e=t[0];return e in L?(0,L[e])(t,M.formatLong):t})).join("").match(je),V=[],j=lt(B);try{var R=function(){var e=O.value;null!=s&&s.useAdditionalWeekYearTokens||!W(e)||G(e,E,t),null!=s&&s.useAdditionalDayOfYearTokens||!H(e)||G(e,E,t);var i=e[0],o=Ve[i];if(o){var r=o.incompatibleTokens;if(Array.isArray(r)){var n=V.find((function(t){return r.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===o.incompatibleTokens&&V.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));V.push({token:i,fullToken:e});var a=o.run(z,e,M.match,F);if(!a)return{v:new Date(NaN)};N.push(a.setter),z=a.rest}else{if(i.match(He))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(qe)[1].replace(Re,"'")),0!==z.indexOf(e))return{v:new Date(NaN)};z=z.slice(e.length)}};for(j.s();!(O=j.n()).done;){var $=R();if("object"===d($))return $.v}}catch(t){j.e(t)}finally{j.f()}if(z.length>0&&$e.test(z))return new Date(NaN);var Y=N.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 N.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),U=u(i);if(isNaN(U.getTime()))return new Date(NaN);var K,Q=v(U,q(U)),J={},X=lt(Y);try{for(X.s();!(K=X.n()).done;){var Z=K.value;if(!Z.validate(Q,F))return new Date(NaN);var et=Z.set(Q,J,F);Array.isArray(et)?(Q=et[0],ht(J,et[1])):Q=et}}catch(t){X.e(t)}finally{X.f()}return Q}function Ge(t,e){c(2,arguments);var i=u(t),s=u(e);return i.getTime()>s.getTime()}function Ye(t,e){c(2,arguments);var i=u(t),s=u(e);return i.getTime()<s.getTime()}function Ue(t,e,i){return c(2,arguments),p(We(t,e,new Date,i))}const Ke=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:s}=t;return nt(new Date(e,i,s),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=We(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},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}get formattedValue(){return this.value?nt(We(this.value,"yyyy-MM-dd",new Date),this.dateFormat||"yyyy-MM-dd"):""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=We((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=We((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.addEventListener("opened-changed",(t=>{!0===t.detail.value?this.errorMessage="":(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0)}))}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=We(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!(Ye(this.valueAsDate,this.minDate)||Ge(this.valueAsDate,this.maxDate)||!Ue(this.formattedValue,this.dateFormat))&&this.inputReference.validity.valid}setErrorMessage(){return this.inputReference.validity.valueMissing?n("requiredError",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?n("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):Ye(this.valueAsDate,this.minDate)||Ge(this.valueAsDate,this.maxDate)?n("dateError2",this.language):Ue(this.formattedValue,this.dateFormat)?void 0:n("dateFormatError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"2598dc4b54afe7b871bbff237dacc02a04f109a1",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{key:"e8e08599b7d713df237041a5c2a95ae78d7a955d",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{key:"42ae32529da3f7d2bb63b9d92167a0062464f0f5",id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t)}),i("small",{key:"6b6a7b2f369fc06001b22a4cff9835e0741ce33d",class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"930e536f3fd7dae8959c3caea374706bc2dcd805",class:"date__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return s(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Ke.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.date__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const Qe=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}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===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"532d12855e6014b6c5a81cd11f4c7d83596361c3",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"80f2e930c6360e1e4e27f29b1de3d3c49a3bb47f",class:"email__wrapper--flex"},i("label",{key:"68189c133403e6dada30c376bd84b60b35ca56e4",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"b62dd9a877825d51f6735e9b3ca6b3bb3fc21c28",class:"email__wrapper--relative"},this.tooltip&&i("img",{key:"ff76c31db244e06af60db2855b907c90ecde2fe2",class:"email__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"137af683d11c63b2bd881fa3110dd1522ead8774",id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"573a357c4e8464f20d9e60a5fd3a2d0c4ae69e3c",class:"email__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Qe.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emw--color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.email__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__input::placeholder{color:var(--emw--color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';var Je=Object.defineProperty,Xe=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,ti=Object.getOwnPropertySymbols,ei=Object.prototype.hasOwnProperty,ii=Object.prototype.propertyIsEnumerable,si=(t,e,i)=>e in t?Je(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,oi=(t,e)=>{for(var i in e||(e={}))ei.call(e,i)&&si(t,i,e[i]);if(ti)for(var i of ti(e))ii.call(e,i)&&si(t,i,e[i]);return t},ri=(t,e)=>Xe(t,Ze(e)),ni=(t,e,i)=>(si(t,"symbol"!=typeof e?e+"":e,i),i),ai=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{a(i.next(t))}catch(t){o(t)}},n=t=>{try{a(i.throw(t))}catch(t){o(t)}},a=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -25,7 +25,7 @@ const hi=globalThis,di=hi.ShadowRoot&&(void 0===hi.ShadyCSS||hi.ShadyCSS.nativeS
|
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
27
|
*/
|
|
28
|
-
const Di=globalThis,Pi=Di.trustedTypes,Oi=Pi?Pi.createPolicy("lit-html",{createHTML:t=>t}):void 0,Fi="$lit$",Ni=`lit$${Math.random().toFixed(9).slice(2)}$`,Bi="?"+Ni,Vi=`<${Bi}>`,ji=document,Li=()=>ji.createComment(""),
|
|
28
|
+
const Di=globalThis,Pi=Di.trustedTypes,Oi=Pi?Pi.createPolicy("lit-html",{createHTML:t=>t}):void 0,Fi="$lit$",Ni=`lit$${Math.random().toFixed(9).slice(2)}$`,Bi="?"+Ni,Vi=`<${Bi}>`,ji=document,Li=()=>ji.createComment(""),qi=t=>null===t||"object"!=typeof t&&"function"!=typeof t,Ri=Array.isArray,$i="[ \t\n\f\r]",Hi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wi=/-->/g,Gi=/>/g,Yi=RegExp(`>|${$i}(?:([^\\s"'>=/]+)(${$i}*=${$i}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Ui=/'/g,Ki=/"/g,Qi=/^(?:script|style|textarea|title)$/i,Ji=Symbol.for("lit-noChange"),Xi=Symbol.for("lit-nothing"),Zi=new WeakMap,ts=ji.createTreeWalker(ji,129);function es(t,e){if(!Ri(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Oi?Oi.createHTML(e):e}class is{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[l,h]=((t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=Hi;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,d=0;for(;d<i.length&&(n.lastIndex=d,l=n.exec(i),null!==l);)d=n.lastIndex,n===Hi?"!--"===l[1]?n=Wi:void 0!==l[1]?n=Gi:void 0!==l[2]?(Qi.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=Yi):void 0!==l[3]&&(n=Yi):n===Yi?">"===l[0]?(n=null!=o?o:Hi,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?Yi:'"'===l[3]?Ki:Ui):n===Ki||n===Ui?n=Yi:n===Wi||n===Gi?n=Hi:(n=Yi,o=void 0);const c=n===Yi&&t[e+1].startsWith("/>")?" ":"";r+=n===Hi?i+Vi:h>=0?(s.push(a),i.slice(0,h)+Fi+i.slice(h)+Ni+c):i+Ni+(-2===h?e:c)}return[es(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=is.createElement(l,i),ts.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=ts.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(Fi)){const e=h[r++],i=s.getAttribute(t).split(Ni),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?as:"?"===n[1]?ls:"@"===n[1]?hs:ns}),s.removeAttribute(t)}else t.startsWith(Ni)&&(a.push({type:6,index:o}),s.removeAttribute(t));if(Qi.test(s.tagName)){const t=s.textContent.split(Ni),e=t.length-1;if(e>0){s.textContent=Pi?Pi.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],Li()),ts.nextNode(),a.push({type:2,index:++o});s.append(t[e],Li())}}}else if(8===s.nodeType)if(s.data===Bi)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(Ni,t+1));)a.push({type:7,index:o}),t+=Ni.length-1}o++}}static createElement(t,e){const i=ji.createElement("template");return i.innerHTML=t,i}}function ss(t,e,i=t,s){var o,r,n;if(e===Ji)return e;let a=void 0!==s?null==(o=i._$Co)?void 0:o[s]:i._$Cl;const l=qi(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==l&&(null==(r=null==a?void 0:a._$AO)||r.call(a,!1),void 0===l?a=void 0:(a=new l(t),a._$AT(t,i,s)),void 0!==s?(null!=(n=i._$Co)?n:i._$Co=[])[s]=a:i._$Cl=a),void 0!==a&&(e=ss(t,a._$AS(t,e.values),a,s)),e}class os{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:s}=this._$AD,o=(null!=(e=null==t?void 0:t.creationScope)?e:ji).importNode(i,!0);ts.currentNode=o;let r=ts.nextNode(),n=0,a=0,l=s[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new rs(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new ds(r,this,t)),this._$AV.push(e),l=s[++a]}n!==(null==l?void 0:l.index)&&(r=ts.nextNode(),n++)}return ts.currentNode=ji,o}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class rs{get _$AU(){var t,e;return null!=(e=null==(t=this._$AM)?void 0:t._$AU)?e:this._$Cv}constructor(t,e,i,s){var o;this.type=2,this._$AH=Xi,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=null==(o=null==s?void 0:s.isConnected)||o}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){var i;t=ss(this,t,e),qi(t)?t===Xi||null==t||""===t?(this._$AH!==Xi&&this._$AR(),this._$AH=Xi):t!==this._$AH&&t!==Ji&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):Ri(i=t)||"function"==typeof(null==i?void 0:i[Symbol.iterator])?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Xi&&qi(this._$AH)?this._$AA.nextSibling.data=t:this.T(ji.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=is.createElement(es(s.h,s.h[0]),this.options)),s);if((null==(e=this._$AH)?void 0:e._$AD)===o)this._$AH.p(i);else{const t=new os(o,this),e=t.u(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=Zi.get(t.strings);return void 0===e&&Zi.set(t.strings,e=new is(t)),e}k(t){Ri(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new rs(this.O(Li()),this.O(Li()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null==(i=this._$AP)||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._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class ns{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=Xi,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Xi}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=ss(this,t,e,0),r=!qi(t)||t!==this._$AH&&t!==Ji,r&&(this._$AH=t);else{const s=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=ss(this,s[i+n],e,n),a===Ji&&(a=this._$AH[n]),r||(r=!qi(a)||a!==this._$AH[n]),a===Xi?t=Xi:t!==Xi&&(t+=(null!=a?a:"")+o[n+1]),this._$AH[n]=a}r&&!s&&this.j(t)}j(t){t===Xi?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class as extends ns{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Xi?void 0:t}}class ls extends ns{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Xi)}}class hs extends ns{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!=(i=ss(this,t,e,0))?i:Xi)===Ji)return;const s=this._$AH,o=t===Xi&&s!==Xi||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==Xi&&(s===Xi||o);o&&this.element.removeEventListener(this.name,this,s),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.host)?i:this.element,t):this._$AH.handleEvent(t)}}class ds{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){ss(this,t)}}const cs=Di.litHtmlPolyfillSupport;var us;null==cs||cs(is,rs),(null!=(us=Di.litHtmlVersions)?us:Di.litHtmlVersions=[]).push("3.3.0");const ps=(t,e,i)=>{var s,o;const r=null!=(s=null==i?void 0:i.renderBefore)?s:e;let n=r._$litPart$;if(void 0===n){const t=null!=(o=null==i?void 0:i.renderBefore)?o:null;r._$litPart$=n=new rs(e.insertBefore(Li(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n
|
|
29
29
|
/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
@@ -882,7 +882,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
882
882
|
Code distributed by Google as part of the polymer project is also
|
|
883
883
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
884
884
|
*/
|
|
885
|
-
let Ns,Bs,Vs=/(url\()([^)]*)(\))/g,js=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Ls(t,e){if(t&&js.test(t)||"//"===t)return t;if(void 0===Ns){Ns=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Ns="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Ns)try{return new URL(t,e).href}catch(e){return t}return Bs||(Bs=document.implementation.createHTMLDocument("temp"),Bs.base=Bs.createElement("base"),Bs.head.appendChild(Bs.base),Bs.anchor=Bs.createElement("a"),Bs.body.appendChild(Bs.anchor)),Bs.base.href=e,Bs.anchor.href=t,Bs.anchor.href||t}function
|
|
885
|
+
let Ns,Bs,Vs=/(url\()([^)]*)(\))/g,js=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Ls(t,e){if(t&&js.test(t)||"//"===t)return t;if(void 0===Ns){Ns=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Ns="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Ns)try{return new URL(t,e).href}catch(e){return t}return Bs||(Bs=document.implementation.createHTMLDocument("temp"),Bs.base=Bs.createElement("base"),Bs.head.appendChild(Bs.base),Bs.anchor=Bs.createElement("a"),Bs.body.appendChild(Bs.anchor)),Bs.base.href=e,Bs.anchor.href=t,Bs.anchor.href||t}function qs(t,e){return t.replace(Vs,(function(t,i,s,o){return i+"'"+Ls(s.replace(/["']/g,""),e)+"'"+o}))}function Rs(t){return t.substring(0,t.lastIndexOf("/")+1)}
|
|
886
886
|
/**
|
|
887
887
|
@license
|
|
888
888
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -891,7 +891,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
891
891
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
892
892
|
Code distributed by Google as part of the polymer project is also
|
|
893
893
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
894
|
-
*/const $s=!window.ShadyDOM||!window.ShadyDOM.inUse,Hs=$s&&"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 Ws=window.Polymer&&window.Polymer.rootPath||
|
|
894
|
+
*/const $s=!window.ShadyDOM||!window.ShadyDOM.inUse,Hs=$s&&"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 Ws=window.Polymer&&window.Polymer.rootPath||Rs(document.baseURI||window.location.href),Gs=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Ys=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Us=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Ks=window.Polymer&&window.Polymer.legacyOptimizations||!1,Qs=window.Polymer&&window.Polymer.legacyWarnings||!1,Js=window.Polymer&&window.Polymer.syncInitialRender||!1,Xs=window.Polymer&&window.Polymer.legacyUndefined||!1,Zs=window.Polymer&&window.Polymer.orderedComputed||!1,to=window.Polymer&&window.Polymer.removeNestedTemplates||!1,eo=window.Polymer&&window.Polymer.fastDomIf||!1,io=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,so=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,oo=0;const ro=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=oo++;return function(s){let o=s.__mixinSet;if(o&&o[i])return s;let r=e,n=r.get(s);if(!n){n=t(s),r.set(s,n);let e=Object.create(n.__mixinSet||o||null);e[i]=!0,n.__mixinSet=e}return n}};
|
|
895
895
|
/**
|
|
896
896
|
@license
|
|
897
897
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -900,7 +900,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
900
900
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
901
901
|
Code distributed by Google as part of the polymer project is also
|
|
902
902
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
903
|
-
*/let no={},ao={};function lo(t,e){no[t]=ao[t.toLowerCase()]=e}function ho(t){return no[t]||ao[t.toLowerCase()]}class co extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=ho(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Ls(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=
|
|
903
|
+
*/let no={},ao={};function lo(t,e){no[t]=ao[t.toLowerCase()]=e}function ho(t){return no[t]||ao[t.toLowerCase()]}class co extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=ho(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Ls(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Rs(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Ys&&void 0!==ho(t))throw lo(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,lo(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}co.prototype.modules=no,customElements.define("dom-module",co);
|
|
904
904
|
/**
|
|
905
905
|
@license
|
|
906
906
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -910,7 +910,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
910
910
|
Code distributed by Google as part of the polymer project is also
|
|
911
911
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
912
912
|
*/
|
|
913
|
-
const uo="link[rel=import][type~=css]",po="include",mo="shady-unscoped";function vo(t){return co.import(t)}function fo(t){const e=
|
|
913
|
+
const uo="link[rel=import][type~=css]",po="include",mo="shady-unscoped";function vo(t){return co.import(t)}function fo(t){const e=qs((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function bo(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...go(e[t]));return i}function go(t){const e=vo(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...wo(e));const i=e.querySelector("template");i&&t.push(...yo(i,e.assetpath)),e._styles=t}return e._styles}function yo(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute(po);r&&i.push(...bo(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=qs(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function wo(t){const e=[],i=t.querySelectorAll(uo);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(mo);if(i&&!t._unscopedStyle){const e=fo(t);e.setAttribute(mo,""),t._unscopedStyle=e}else t._style||(t._style=fo(t));e.push(i?t._unscopedStyle:t._style)}}return e}
|
|
914
914
|
/**
|
|
915
915
|
@license
|
|
916
916
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -946,7 +946,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
946
946
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
947
947
|
Code distributed by Google as part of the polymer project is also
|
|
948
948
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
949
|
-
*/let No=0,Bo=0,Vo=[],jo=0,Lo=!1,
|
|
949
|
+
*/let No=0,Bo=0,Vo=[],jo=0,Lo=!1,qo=document.createTextNode("");new window.MutationObserver((function(){Lo=!1;const t=Vo.length;for(let e=0;e<t;e++){let t=Vo[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Vo.splice(0,t),Bo+=t})).observe(qo,{characterData:!0});const Ro={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)}},$o={run:t=>(Lo||(Lo=!0,qo.textContent=jo++),Vo.push(t),No++),cancel(t){const e=t-Bo;if(e>=0){if(!Vo[e])throw new Error("invalid async handle: "+t);Vo[e]=null}}},Ho=$o,Wo=ro((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Ho.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return!!e}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);("class"===i||"name"===i||"slot"===i)&&(t=_o(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Go={};
|
|
950
950
|
/**
|
|
951
951
|
@license
|
|
952
952
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -966,7 +966,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
966
966
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
967
967
|
* Google as part of the polymer project is also subject to an additional IP
|
|
968
968
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
969
|
-
*/let nr=0;const ar=[],lr={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},hr="__computeInfo",dr=/[A-Z]/;function cr(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function ur(t,e,i,s,o,r){if(e){let n=!1;const a=nr++;for(let l in i){let h=e[o?ko(l):l];if(h)for(let e,d=0,c=h.length;d<c&&(e=h[d]);d++)(!e.info||e.info.lastRun!==a)&&(!o||mr(l,e.trigger))&&(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function pr(t,e,i,s,o,r,n,a){let l=!1,h=e[n?ko(s):s];if(h)for(let e,d=0,c=h.length;d<c&&(e=h[d]);d++)(!e.info||e.info.lastRun!==i)&&(!n||mr(s,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function mr(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Co(i,t))||!(!e.wildcard||!Ao(i,t))}return!0}function vr(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function fr(t,e,i){let s=ko(e);return s!==e&&(br(t,Fo(s)+"-changed",i[e],e),!0)}function br(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),_o(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function gr(t,e,i,s,o,r){let n=(r?ko(e):e)!=e?e:null,a=n?Eo(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),br(t,o.eventName,a,n)}function yr(t,e,i,s,o){let r=t.__data[e];Gs&&(r=Gs(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const wr=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},_r=(t,e,i,s,o)=>{const r=e[o?ko(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun!==nr&&(!o||mr(t,n.trigger))&&(n.info.lastRun=nr,wr(n.info,i,s))}};function xr(t,e,i,s,o){let r=Er(t,e,i,0,o);if(r===ar)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function kr(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return!!t.target&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Fo(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,Cr(t,e,a,s,l)}}function Cr(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Nr(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Ar,info:n,trigger:s})}}}function Ar(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=So(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==ar&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,o,i,s),Gs&&(o=Gs(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?(!e[lr.READ_ONLY]||!e[lr.READ_ONLY][s])&&e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function Sr(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=_o(t)),t[r]=e.literal)}}function Ir(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=So(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,(!e[lr.READ_ONLY]||!e[lr.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,r,!0,!!a)&&(!n||!n.queueProperty)&&e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function zr(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function Er(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===ar?ar:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Tr=[],Mr="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Dr="(?:("+Mr+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Pr=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Mr+"\\s*(?:\\(\\s*(?:(?:"+Dr+"(?:,\\s*"+Dr+")*)?)\\)\\s*)?)(?:]]|}})","g");function Or(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Fr(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Tr};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Nr(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Nr(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=ko(e),i.structured=xo(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Br(t,e,i){let s=Eo(t,i);return void 0===s&&(s=e[i]),s}function Vr(t,e,i,s){const o={indexSplices:s};Xs&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),Xs&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function jr(t,e,i,s,o,r){Vr(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const Lr=ro((t=>{const e=rr(Ko(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return lr}_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(Rr.length){let t=Rr[Rr.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[lr.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==lr.READ_ONLY);let s=cr(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=cr(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,lr.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,lr.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,lr.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,lr.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||ko(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Eo(this,t);if(!(t=To(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];Ao(r,e)?(o=So(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):Ao(n,e)&&(o=So(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){(i!==t[e]||"object"==typeof i)&&("className"===e&&(t=_o(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&xo(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[lr.NOTIFY]&&this[lr.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[lr.READ_ONLY]||!this[lr.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[lr.COMPUTE];if(o)if(Zs){nr++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[lr.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t[hr],i={},s=t[lr.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)_r(t,o,n,r,s);let a;for(;a=n.shift();)xr(t,"",e,0,a)&&_r(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;ur(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),ur(this,this[lr.REFLECT],e,i,o),ur(this,this[lr.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[lr.NOTIFY],l=nr++;for(let n in e)e[n]&&(a&&pr(t,a,l,n,i,s,o)||o&&fr(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[lr.PROPAGATE]&&ur(this,this[lr.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{ur(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Io(t),e=Io(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Io(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Vr(this,Eo(this,t,i),i.path,e)}get(t,e){return Eo(e||this,t)}set(t,e,i){i?To(i,t,e):(!this[lr.READ_ONLY]||!this[lr.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Eo(this,t,i),o=s.length,r=s.push(...e);return e.length&&jr(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=Eo(this,t,e),s=!!i.length,o=i.pop();return s&&jr(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=Eo(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&jr(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=Eo(this,t,e),s=!!i.length,o=i.shift();return s&&jr(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=Eo(this,t,i),o=s.unshift(...e);return e.length&&jr(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Eo(this,t,s),i=s.path}else i=Array.isArray(t)?Io(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,lr.READ_ONLY),e&&(this["_set"+function(t){return t[0].toUpperCase()+t.substring(1)}(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,lr.OBSERVE,{fn:vr,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,lr.OBSERVE,{fn:vr,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Fr(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");zr(this,i,lr.OBSERVE,Er,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,lr.NOTIFY,{fn:gr,info:{eventName:Fo(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,lr.REFLECT,{fn:yr,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Fr(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=zr(this,s,lr.COMPUTE,xr,t,i);cr(this,hr)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:d}=t[r];if(!d)if(l){const t=Ao(n,e),o=Br(s,i,t?e:n);h={path:t?e:n,value:o,base:t?Eo(s,n):o}}else h=a?Br(s,i,n):s[n];if(Xs&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return ar;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Rr.push(this);let i=super._stampTemplate(t,e);if(Rr.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Sr(o,i),Ir(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];_o(_o(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Or(e)||" ",kr(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";dr.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=Or(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Oo(o)),kr(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;to&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if(eo&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),to||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)kr(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=Pr.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=!!i[2],a=i[3].trim(),l=!1,h="",d=-1;"{"==r&&(d=a.indexOf("::"))>0&&(h=a.substring(d+2),a=a.substring(0,d),l=!0);let c=Fr(a),u=[];if(c){let{args:t,methodName:i}=c;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||c.static)&&(u.push(i),c.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:c,dependencies:u,event:h}),o=Pr.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?Er(t,i,s,0,e.signature):i!=e.source?Eo(t,e.source):r&&xo(i)?Eo(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Rr=[],qr=ro((t=>{const e=Wo(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
969
|
+
*/let nr=0;const ar=[],lr={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},hr="__computeInfo",dr=/[A-Z]/;function cr(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function ur(t,e,i,s,o,r){if(e){let n=!1;const a=nr++;for(let l in i){let h=e[o?ko(l):l];if(h)for(let e,d=0,c=h.length;d<c&&(e=h[d]);d++)(!e.info||e.info.lastRun!==a)&&(!o||mr(l,e.trigger))&&(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function pr(t,e,i,s,o,r,n,a){let l=!1,h=e[n?ko(s):s];if(h)for(let e,d=0,c=h.length;d<c&&(e=h[d]);d++)(!e.info||e.info.lastRun!==i)&&(!n||mr(s,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function mr(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Co(i,t))||!(!e.wildcard||!Ao(i,t))}return!0}function vr(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function fr(t,e,i){let s=ko(e);return s!==e&&(br(t,Fo(s)+"-changed",i[e],e),!0)}function br(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),_o(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function gr(t,e,i,s,o,r){let n=(r?ko(e):e)!=e?e:null,a=n?Eo(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),br(t,o.eventName,a,n)}function yr(t,e,i,s,o){let r=t.__data[e];Gs&&(r=Gs(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const wr=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},_r=(t,e,i,s,o)=>{const r=e[o?ko(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun!==nr&&(!o||mr(t,n.trigger))&&(n.info.lastRun=nr,wr(n.info,i,s))}};function xr(t,e,i,s,o){let r=Er(t,e,i,0,o);if(r===ar)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function kr(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return!!t.target&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Fo(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,Cr(t,e,a,s,l)}}function Cr(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Nr(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Ar,info:n,trigger:s})}}}function Ar(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=So(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==ar&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,o,i,s),Gs&&(o=Gs(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?(!e[lr.READ_ONLY]||!e[lr.READ_ONLY][s])&&e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function Sr(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=_o(t)),t[r]=e.literal)}}function Ir(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=So(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,(!e[lr.READ_ONLY]||!e[lr.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,r,!0,!!a)&&(!n||!n.queueProperty)&&e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function zr(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function Er(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===ar?ar:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Tr=[],Mr="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Dr="(?:("+Mr+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Pr=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Mr+"\\s*(?:\\(\\s*(?:(?:"+Dr+"(?:,\\s*"+Dr+")*)?)\\)\\s*)?)(?:]]|}})","g");function Or(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Fr(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Tr};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Nr(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Nr(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=ko(e),i.structured=xo(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Br(t,e,i){let s=Eo(t,i);return void 0===s&&(s=e[i]),s}function Vr(t,e,i,s){const o={indexSplices:s};Xs&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),Xs&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function jr(t,e,i,s,o,r){Vr(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const Lr=ro((t=>{const e=rr(Ko(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return lr}_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(qr.length){let t=qr[qr.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[lr.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==lr.READ_ONLY);let s=cr(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=cr(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,lr.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,lr.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,lr.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,lr.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||ko(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Eo(this,t);if(!(t=To(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];Ao(r,e)?(o=So(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):Ao(n,e)&&(o=So(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){(i!==t[e]||"object"==typeof i)&&("className"===e&&(t=_o(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&xo(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[lr.NOTIFY]&&this[lr.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[lr.READ_ONLY]||!this[lr.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[lr.COMPUTE];if(o)if(Zs){nr++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[lr.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t[hr],i={},s=t[lr.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)_r(t,o,n,r,s);let a;for(;a=n.shift();)xr(t,"",e,0,a)&&_r(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;ur(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),ur(this,this[lr.REFLECT],e,i,o),ur(this,this[lr.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[lr.NOTIFY],l=nr++;for(let n in e)e[n]&&(a&&pr(t,a,l,n,i,s,o)||o&&fr(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[lr.PROPAGATE]&&ur(this,this[lr.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{ur(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Io(t),e=Io(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Io(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Vr(this,Eo(this,t,i),i.path,e)}get(t,e){return Eo(e||this,t)}set(t,e,i){i?To(i,t,e):(!this[lr.READ_ONLY]||!this[lr.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Eo(this,t,i),o=s.length,r=s.push(...e);return e.length&&jr(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=Eo(this,t,e),s=!!i.length,o=i.pop();return s&&jr(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=Eo(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&jr(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=Eo(this,t,e),s=!!i.length,o=i.shift();return s&&jr(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=Eo(this,t,i),o=s.unshift(...e);return e.length&&jr(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Eo(this,t,s),i=s.path}else i=Array.isArray(t)?Io(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,lr.READ_ONLY),e&&(this["_set"+function(t){return t[0].toUpperCase()+t.substring(1)}(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,lr.OBSERVE,{fn:vr,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,lr.OBSERVE,{fn:vr,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Fr(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");zr(this,i,lr.OBSERVE,Er,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,lr.NOTIFY,{fn:gr,info:{eventName:Fo(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,lr.REFLECT,{fn:yr,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Fr(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=zr(this,s,lr.COMPUTE,xr,t,i);cr(this,hr)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:d}=t[r];if(!d)if(l){const t=Ao(n,e),o=Br(s,i,t?e:n);h={path:t?e:n,value:o,base:t?Eo(s,n):o}}else h=a?Br(s,i,n):s[n];if(Xs&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return ar;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),qr.push(this);let i=super._stampTemplate(t,e);if(qr.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Sr(o,i),Ir(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];_o(_o(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Or(e)||" ",kr(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";dr.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=Or(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Oo(o)),kr(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;to&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if(eo&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),to||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)kr(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=Pr.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=!!i[2],a=i[3].trim(),l=!1,h="",d=-1;"{"==r&&(d=a.indexOf("::"))>0&&(h=a.substring(d+2),a=a.substring(0,d),l=!0);let c=Fr(a),u=[];if(c){let{args:t,methodName:i}=c;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||c.static)&&(u.push(i),c.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:c,dependencies:u,event:h}),o=Pr.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?Er(t,i,s,0,e.signature):i!=e.source?Eo(t,e.source):r&&xo(i)?Eo(t,i):t.__data[i],e.negate&&(n=!n),n}}})),qr=[],Rr=ro((t=>{const e=Wo(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
970
970
|
/**
|
|
971
971
|
@license
|
|
972
972
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -985,7 +985,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
985
985
|
Code distributed by Google as part of the polymer project is also
|
|
986
986
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
987
987
|
*/
|
|
988
|
-
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),$r=window.ShadyCSS&&window.ShadyCSS.cssBuild,Hr=ro((t=>{const e=
|
|
988
|
+
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),$r=window.ShadyCSS&&window.ShadyCSS.cssBuild,Hr=ro((t=>{const e=Rr(Lr(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Ks||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!Ys||Us)&&(e=co.import(t,"template"),Ys&&!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=Rs(t.url);else{const t=co.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=Ws,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return qs(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,s){if(!$r){const o=e.content.querySelectorAll("style"),r=yo(e),n=function(t){let e=vo(t);return e?wo(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let o=n[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,a)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],n=o[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),so&&$r&&Hs){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?Ls(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=_o(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])),Js&&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=Ls(this.importPath)),Ls(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return Qs&&!(i in this._properties)&&!(s.info.part.signature&&s.info.part.signature.static)&&!s.info.part.hostProp&&!t.nestedTemplate&&console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,s)}}})),Wr=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Gr{constructor(t,e){Kr(t,e);const i=e.reduce(((e,i,s)=>e+Yr(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Yr(t){if(t instanceof Gr)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Ur=function(t,...e){Kr(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Gr)return Yr(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Wr&&(s=Wr.createHTML(s)),i.innerHTML=s,i},Kr=(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")},Qr=Hr(HTMLElement),Jr=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Xr=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;
|
|
989
989
|
/**
|
|
990
990
|
@license
|
|
991
991
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1537,7 +1537,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
1537
1537
|
Code distributed by Google as part of the polymer project is also
|
|
1538
1538
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1539
1539
|
*/
|
|
1540
|
-
const Dn=t=>t,Pn="string"==typeof document.head.style.touchAction,On="__polymerGestures",Fn="__polymerGesturesHandled",Nn="__polymerGesturesTouchAction",Bn=["mousedown","mousemove","mouseup","click"],Vn=[0,1,4,2],jn=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Ln(t){return Bn.indexOf(t)>-1}!function(){try{const t=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const
|
|
1540
|
+
const Dn=t=>t,Pn="string"==typeof document.head.style.touchAction,On="__polymerGestures",Fn="__polymerGesturesHandled",Nn="__polymerGesturesTouchAction",Bn=["mousedown","mousemove","mouseup","click"],Vn=[0,1,4,2],jn=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Ln(t){return Bn.indexOf(t)>-1}!function(){try{const t=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const qn=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Rn={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function $n(t){const e=t.type;if(!Ln(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!jn&&(e=Vn[t.which]||0),!!(1&e)}return 0===(void 0===t.button?0:t.button)}const Hn={touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Wn(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Gn(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Yn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Un={},Kn=[];function Qn(t){const e=Yn(t);return e.length>0?e[0]:t.target}function Jn(t){const e=t.type,i=t.currentTarget[On];if(!i)return;const s=i[e];if(!s)return;if(!t[Fn]&&(t[Fn]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Hn.touch.id=i.identifier),Hn.touch.id!==i.identifier)return;Pn||("touchstart"===e||"touchmove"===e)&&function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Hn.touch.x=e.clientX,Hn.touch.y=e.clientY,Hn.touch.scrollDecided=!1;else if("touchmove"===i){if(Hn.touch.scrollDecided)return;Hn.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Yn(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[Nn]){e=t[Nn];break}return e}(t);let s=!1;const o=Math.abs(Hn.touch.x-e.clientX),r=Math.abs(Hn.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=r>o:"pan-y"===i&&(s=o>r)),s?t.preventDefault():ia("track")}}(t)}const o=t[Fn];if(!o.skip){for(let e,i=0;i<Kn.length;i++)e=Kn[i],s[e.name]&&!o[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<Kn.length;r++)i=Kn[r],s[i.name]&&!o[i.name]&&(o[i.name]=!0,i[e](t))}}function Xn(t,e,i){return!!Un[e]&&(function(t,e,i){const s=Un[e],o=s.deps,r=s.name;let n=t[On];n||(t[On]=n={});for(let e,i,s=0;s<o.length;s++)e=o[s],(!qn||!Ln(e)||"click"===e)&&(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Jn,void 0),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&ta(t,s.touchAction)}(t,e,i),!0)}function Zn(t){Kn.push(t),t.emits.forEach((e=>{Un[e]=t}))}function ta(t,e){Pn&&t instanceof HTMLElement&&dn.run((()=>{t.style.touchAction=e})),t[Nn]=e}function ea(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,Dn(t).dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function ia(t){const e=function(t){for(let e,i=0;i<Kn.length;i++){e=Kn[i];for(let i,s=0;s<e.emits.length;s++)if(i=e.emits[s],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function sa(t,e,i,s){e&&ea(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>ia(t)})}function oa(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),o=Math.abs(t.y-i);return s>=5||o>=5}function ra(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1];let r,n=0;s&&(r=o.x-s.x,n=o.y-s.y),ea(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o.x-t.x,dy:o.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const o=s;if(s=s.shadowRoot.elementFromPoint(t,e),o===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function na(t,e,i){const s=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),r=Qn(i||e);!r||Rn[r.localName]&&r.hasAttribute("disabled")||(isNaN(s)||isNaN(o)||s<=25&&o<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Qn(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,o=t.pageY;return!(s>=i.left&&s<=i.right&&o>=i.top&&o<=i.bottom)}return!1}(e))&&(t.prevent||ea(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
|
|
1541
1541
|
/**
|
|
1542
1542
|
* @license
|
|
1543
1543
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1601,7 +1601,7 @@ let Fa=class extends Tn{constructor(t,e,i,s={}){super(t,e,i,ri(oi({},s),{useUniq
|
|
|
1601
1601
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1602
1602
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1603
1603
|
*/
|
|
1604
|
-
const ja=ro((t=>class extends(Da(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Va(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)}})),La=ro((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}})),
|
|
1604
|
+
const ja=ro((t=>class extends(Da(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Va(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)}})),La=ro((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}})),qa=t=>class extends(La(ja(Da(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 Ma(this),this._helperController=new Ba(this),this._errorController=new Na(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)}))}}
|
|
1605
1605
|
/**
|
|
1606
1606
|
* @license
|
|
1607
1607
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1611,7 +1611,7 @@ const ja=ro((t=>class extends(Da(t)){static get properties(){return{label:{type:
|
|
|
1611
1611
|
* @license
|
|
1612
1612
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1613
1613
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1614
|
-
*/let
|
|
1614
|
+
*/let Ra=class extends Tn{constructor(t,e,i={}){const{uniqueIdPrefix:s}=i;super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0,uniqueIdPrefix:s})}},$a=class{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}};
|
|
1615
1615
|
/**
|
|
1616
1616
|
* @license
|
|
1617
1617
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1622,7 +1622,7 @@ const ja=ro((t=>class extends(Da(t)){static get properties(){return{label:{type:
|
|
|
1622
1622
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1623
1623
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1624
1624
|
*/
|
|
1625
|
-
const Ha=t=>class extends(
|
|
1625
|
+
const Ha=t=>class extends(qa(Aa(xa(ha(t))))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get observers(){return["__readonlyChanged(readonly, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name","invalid","required"]}constructor(){super(),this._setType("checkbox"),this._boundOnInputClick=this._onInputClick.bind(this),this.value="on"}ready(){super.ready(),this.addController(new Ra(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new $a(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)")}_shouldSetActive(t){return!this.readonly&&"a"!==t.target.localName&&t.target!==this._helperNode&&t.target!==this._errorNode&&super._shouldSetActive(t)}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("click",this._boundOnInputClick)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("click",this._boundOnInputClick)}_onInputClick(t){this.readonly&&t.preventDefault()}__readonlyChanged(t,e){e&&(t?e.setAttribute("aria-readonly","true"):e.removeAttribute("aria-readonly"))}_toggleChecked(t){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(t)}checkValidity(){return!this.required||!!this.checked}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_checkedChanged(t){(t||this.__oldChecked)&&this.validate(),this.__oldChecked=t}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}_onRequiredIndicatorClick(){this._labelNode.click()}}
|
|
1626
1626
|
/**
|
|
1627
1627
|
* @license
|
|
1628
1628
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -1965,7 +1965,7 @@ const Ga=mi`
|
|
|
1965
1965
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
1966
1966
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1967
1967
|
*/
|
|
1968
|
-
const Ua=t=>class extends(
|
|
1968
|
+
const Ua=t=>class extends(qa(wa(aa(t)))){static get properties(){return{value:{type:Array,value:()=>[],notify:!0,sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__readonlyChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new Mn(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new In(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),s=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),s.forEach(this.__unregisterCheckbox);const o=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(o),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(t){return t.filter((t=>t.nodeType===Node.ELEMENT_NODE&&"vaadin-checkbox"===t.localName))}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),this.readonly&&(t.readonly=!0),t.checked?this.__addCheckboxToValue(t.value):this.value&&this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value?this.value.includes(t)||(this.value=[...this.value,t]):this.value=[t]}__removeCheckboxFromValue(t){this.value&&this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){t&&0===t.length&&void 0===e||(this.toggleAttribute("has-value",t&&t.length>0),this.__checkboxes.forEach((e=>{e.checked=t&&t.includes(e.value)})),void 0!==e&&this.validate())}__readonlyChanged(t,e){(t||e)&&this.__checkboxes.forEach((e=>{e.readonly=t}))}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}
|
|
1969
1969
|
/**
|
|
1970
1970
|
* @license
|
|
1971
1971
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
@@ -3545,7 +3545,7 @@ const Bl=mi`
|
|
|
3545
3545
|
</span>
|
|
3546
3546
|
</div>
|
|
3547
3547
|
<slot name="tooltip"></slot>
|
|
3548
|
-
`}ready(){super.ready(),this._tooltipController=new Mn(this),this.addController(this._tooltipController)}}function Ll(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function
|
|
3548
|
+
`}ready(){super.ready(),this._tooltipController=new Mn(this),this.addController(this._tooltipController)}}function Ll(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function ql(t,e,i=Ll){return t instanceof Date&&e instanceof Date&&i(t).getTime()===i(e).getTime()}function Rl(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function $l(t,e,i,s){let o=!1;return"function"==typeof s&&t&&(o=s(Rl(t))),(!e||t>=e)&&(!i||t<=i)&&!o}function Hl(t,e){return e.filter((t=>void 0!==t)).reduce(((e,i)=>i?e?Math.abs(t.getTime()-i.getTime())<Math.abs(e.getTime()-t.getTime())?i:e:i:e))}function Wl(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function Gl(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(t);if(!e)return;const i=new Date(0,0);return i.setFullYear(parseInt(e[1],10)),i.setMonth(parseInt(e[2],10)-1),i.setDate(parseInt(e[3],10)),i}li(jl);
|
|
3549
3549
|
/**
|
|
3550
3550
|
@license
|
|
3551
3551
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3635,13 +3635,13 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3635
3635
|
Code distributed by Google as part of the polymer project is also
|
|
3636
3636
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3637
3637
|
*/
|
|
3638
|
-
const gh=rh(Qr);class yh extends gh{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!io,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(Ks&&!$s){if(!bh){bh=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=_o(_o(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=fh(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if(function(t,e){return t===e||Co(t,e)||Ao(t,e)}(this.as,e)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=So(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=Yl.debounce(this.__renderDebouncer,e>0?
|
|
3638
|
+
const gh=rh(Qr);class yh extends gh{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!io,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(Ks&&!$s){if(!bh){bh=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=_o(_o(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=fh(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if(function(t,e){return t===e||Co(t,e)||Ao(t,e)}(this.as,e)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=So(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=Yl.debounce(this.__renderDebouncer,e>0?Ro.after(e):$o,t.bind(this)),Ul.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),Ql()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),i=this.__calculateLimit(e.length);this.__updateInstances(t,i,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null,this.__continueChunking()}))),this._setRenderedItemCount(this.__instances.length),(!io||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let o;for(o=0;o<e;o++){let e=this.__instances[o],r=i[o],n=t[r];s[r]=o,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,o),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(n,o,r)}for(let t=this.__instances.length-1;t>=o;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=_o(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let o=this.__instances[e+1],r=o?o.children[0]:this;return _o(_o(this).parentNode).insertBefore(s.root,r),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),o=s<0?i:i.substring(0,s);if(o==parseInt(o,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[o]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=_o(e).parentNode;return null}(this.template,t)}}customElements.define(yh.is,yh);
|
|
3639
3639
|
/**
|
|
3640
3640
|
* @license
|
|
3641
3641
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3642
3642
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3643
3643
|
*/
|
|
3644
|
-
const wh=t=>class extends(wa(t)){static get properties(){return{month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},isDateDisabled:{type:Function,value:()=>!1},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find((t=>
|
|
3644
|
+
const wh=t=>class extends(wa(t)){static get properties(){return{month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},isDateDisabled:{type:Function,value:()=>!1},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find((t=>ql(t.date,this.focusedDate)))}ready(){super.ready(),Xn(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);const o=new Date(0,0);return o.setFullYear(t.getFullYear()),o.setMonth(t.getMonth()+1),o.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||$l(s,e,i)||$l(o,e,i))}_getTitle(t,e){if(void 0!==t&&void 0!==e)return e.formatTitle(e.monthNames[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300)}_dateAdd(t,e){t.setDate(t.getDate()+e)}_applyFirstDayOfWeek(t,e){if(void 0!==t&&void 0!==e)return t.slice(e).concat(t.slice(0,e))}_getWeekDayNames(t,e){if(void 0===t||void 0===e)return[];const{weekdays:i,weekdaysShort:s,firstDayOfWeek:o}=t,r=this._applyFirstDayOfWeek(s,o);return this._applyFirstDayOfWeek(i,o).map(((t,e)=>({weekDay:t,weekDayShort:r[e]}))).slice(0,7)}__focusedDateChanged(t,e){Array.isArray(e)&&e.some((e=>ql(e,t)))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(t){return t?t.getDate():""}_showWeekSeparator(t,e){return t&&e&&1===e.firstDayOfWeek}_isToday(t){return ql(new Date,t)}_getDays(t,e){if(void 0===t||void 0===e)return[];const i=new Date(0,0);for(i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(1);i.getDay()!==e.firstDayOfWeek;)this._dateAdd(i,-1);const s=[],o=i.getMonth(),r=t.getMonth();for(;i.getMonth()===r||i.getMonth()===o;)s.push(i.getMonth()===r?new Date(i.getTime()):null),this._dateAdd(i,1);return s}_getWeeks(t){return t.reduce(((t,e,i)=>(i%7==0&&t.push([]),t[t.length-1].push(e),t)),[])}_handleTap(t){!this.ignoreTaps&&!this._notTapping&&t.target.date&&!t.target.hasAttribute("disabled")&&(this.selectedDate=t.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:!0,composed:!0})))}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){
|
|
3645
3645
|
/**
|
|
3646
3646
|
* @license
|
|
3647
3647
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3755,7 +3755,7 @@ zs("vaadin-month-calendar",mi`
|
|
|
3755
3755
|
</template>
|
|
3756
3756
|
</tbody>
|
|
3757
3757
|
</table>
|
|
3758
|
-
`}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,i,s,o,r){const n=["date"],a=t>Ll(new Date),l=t<Ll(new Date);return this.__isDayDisabled(t,s,o,r)&&n.push("disabled"),this.__isDayFocused(t,e)&&n.push("focused"),this.__isDaySelected(t,i)&&n.push("selected"),this._isToday(t)&&n.push("today"),l&&n.push("past"),a&&n.push("future"),n.join(" ")}__isDayFocused(t,e){return
|
|
3758
|
+
`}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,i,s,o,r){const n=["date"],a=t>Ll(new Date),l=t<Ll(new Date);return this.__isDayDisabled(t,s,o,r)&&n.push("disabled"),this.__isDayFocused(t,e)&&n.push("focused"),this.__isDaySelected(t,i)&&n.push("selected"),this._isToday(t)&&n.push("today"),l&&n.push("past"),a&&n.push("future"),n.join(" ")}__isDayFocused(t,e){return ql(t,e)}__isDaySelected(t,e){return ql(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i,s){return!$l(t,e,i,s)}__getDayAriaDisabled(t,e,i,s){if(void 0!==t&&(void 0!==e||void 0!==i||void 0!==s)&&this.__isDayDisabled(t,e,i,s))return"true"}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}li(_h);
|
|
3759
3759
|
/**
|
|
3760
3760
|
* @license
|
|
3761
3761
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -3766,7 +3766,7 @@ class xh{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=t
|
|
|
3766
3766
|
* @license
|
|
3767
3767
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3768
3768
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3769
|
-
*/const kh=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){ta(this.$.scrollers,"pan-y"),Xn(this.$.scrollers,"track",this._track.bind(this)),Xn(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Xn(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Xn(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new xh(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new Tn(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Xn(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new Tn(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Xn(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 Tn(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 Tn(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Xn(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,s,o){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,o))}__updateCalendars(t,e,i,s,o,r,n,a,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=h,t.focusedDate=r,t.selectedDate=o,t.showWeekNumbers=n,t.ignoreTaps=a,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this._monthScroller.position>i,o=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+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=un.debounce(this._debouncer,an.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(ql(t)):i}_onTodayTap(){const t=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=(t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+12*e,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let s=0;const o=this._monthScroller.position,r=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,o,this._targetPosition-o);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:o}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(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 Wl(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){Rl(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&&Rl(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}focusDate(t,e){return ai(this,null,(function*(){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),yield this.focusDateElement(!1)}))}focusDateElement(t=!0){return ai(this,null,(function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise((t=>{ll(this,(()=>{Ql(),t()}))}))),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()}))}_focusClosestDate(t){this.focusDate(Hl(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,s=this.isDateDisabled){return $l(t,e,i,s)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
|
|
3769
|
+
*/const kh=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){ta(this.$.scrollers,"pan-y"),Xn(this.$.scrollers,"track",this._track.bind(this)),Xn(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Xn(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Xn(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new xh(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new Tn(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Xn(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new Tn(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Xn(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 Tn(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 Tn(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Xn(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,s,o){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,o))}__updateCalendars(t,e,i,s,o,r,n,a,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=h,t.focusedDate=r,t.selectedDate=o,t.showWeekNumbers=n,t.ignoreTaps=a,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this._monthScroller.position>i,o=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+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=un.debounce(this._debouncer,an.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(Rl(t)):i}_onTodayTap(){const t=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=(t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+12*e,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let s=0;const o=this._monthScroller.position,r=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,o,this._targetPosition-o);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:o}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(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 Wl(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){ql(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&&ql(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}focusDate(t,e){return ai(this,null,(function*(){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),yield this.focusDateElement(!1)}))}focusDateElement(t=!0){return ai(this,null,(function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise((t=>{ll(this,(()=>{Ql(),t()}))}))),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()}))}_focusClosestDate(t){this.focusDate(Hl(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,s=this.isDateDisabled){return $l(t,e,i,s)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
|
|
3770
3770
|
/**
|
|
3771
3771
|
* @license
|
|
3772
3772
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -3868,7 +3868,7 @@ const Ah=new WeakMap,Sh=ro((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3868
3868
|
* @license
|
|
3869
3869
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3870
3870
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3871
|
-
*/,zh=ro((t=>class extends(ka(La(Ca(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return!!t||0===t}})),Eh=t=>class extends(Sh(xa(zh(
|
|
3871
|
+
*/,zh=ro((t=>class extends(ka(La(Ca(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return!!t||0===t}})),Eh=t=>class extends(Sh(xa(zh(qa(Ih(la(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=un.debounce(this._preventInputDebouncer,an.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)}}}
|
|
3872
3872
|
/**
|
|
3873
3873
|
* @license
|
|
3874
3874
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
@@ -3953,7 +3953,7 @@ const Ah=new WeakMap,Sh=ro((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3953
3953
|
* @license
|
|
3954
3954
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3955
3955
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3956
|
-
*/const Fh=t=>class extends(Ph(Da(xa(zh(la(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let o=e+100*Math.floor(t.getFullYear()/100);return t<new Date(o-50,i,s)?o-=100:t>new Date(o+50,i,s)&&(o+=100),o}(this.referenceDate?Gl(this.referenceDate):new Date,r,o,s))):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:ul},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!ua()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new xh(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Oh(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=Gl(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(ql(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||$l(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),e&&i&&s}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!s.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",o=t.year;return o<0?(o=-o,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(o,s),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0===t||void 0===e||(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0===t||void 0===e||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(t)}_valueChanged(t,e){const i=Gl(t);!t||i?(t?Rl(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,o,r,n,a,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=o,t.focusedDate=r,t.selectedDate=n,t.showWeekNumbers=a,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=_l(this._noInput?t:[s,t])}_getInitialPosition(){const t=Gl(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||$l(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?Hl(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly)return t.stopPropagation(),void this._onClearButtonClick(t);""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,Rl(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return Gl(t)}}
|
|
3956
|
+
*/const Fh=t=>class extends(Ph(Da(xa(zh(la(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let o=e+100*Math.floor(t.getFullYear()/100);return t<new Date(o-50,i,s)?o-=100:t>new Date(o+50,i,s)&&(o+=100),o}(this.referenceDate?Gl(this.referenceDate):new Date,r,o,s))):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:ul},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!ua()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new xh(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Oh(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=Gl(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(Rl(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||$l(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),e&&i&&s}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!s.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",o=t.year;return o<0?(o=-o,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(o,s),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0===t||void 0===e||(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0===t||void 0===e||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(t)}_valueChanged(t,e){const i=Gl(t);!t||i?(t?ql(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,o,r,n,a,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=o,t.focusedDate=r,t.selectedDate=n,t.showWeekNumbers=a,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=_l(this._noInput?t:[s,t])}_getInitialPosition(){const t=Gl(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||$l(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?Hl(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly)return t.stopPropagation(),void this._onClearButtonClick(t);""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,ql(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return Gl(t)}}
|
|
3957
3957
|
/**
|
|
3958
3958
|
* @license
|
|
3959
3959
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
@@ -4019,7 +4019,7 @@ zs("vaadin-date-picker",[Dh,mi`
|
|
|
4019
4019
|
></vaadin-date-picker-overlay>
|
|
4020
4020
|
|
|
4021
4021
|
<slot name="tooltip"></slot>
|
|
4022
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new
|
|
4022
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ra(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new $a(this.inputElement,this._labelController)),this._tooltipController=new Mn(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}}li(Nh),
|
|
4023
4023
|
/**
|
|
4024
4024
|
* @license
|
|
4025
4025
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -4036,7 +4036,7 @@ const Bh=t=>class extends(Eh(t)){static get properties(){return{autocomplete:{ty
|
|
|
4036
4036
|
* @license
|
|
4037
4037
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4038
4038
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4039
|
-
*/,Vh=t=>class extends(Bh(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new
|
|
4039
|
+
*/,Vh=t=>class extends(Bh(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ra(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new $a(this.inputElement,this._labelController))}}
|
|
4040
4040
|
/**
|
|
4041
4041
|
* @license
|
|
4042
4042
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -4113,16 +4113,16 @@ zs("vaadin-password-field-button",Bl,{moduleId:"vaadin-password-field-button-sty
|
|
|
4113
4113
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4114
4114
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4115
4115
|
*/
|
|
4116
|
-
const
|
|
4116
|
+
const qh=t=>class extends(Sh(aa(wa(Ca(t))))){static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new Tn(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t&&t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}}
|
|
4117
4117
|
/**
|
|
4118
4118
|
* @license
|
|
4119
4119
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4120
4120
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4121
|
-
*/,
|
|
4121
|
+
*/,Rh=Ur`
|
|
4122
4122
|
<div part="reveal-button" slot="suffix">
|
|
4123
4123
|
<slot name="reveal"></slot>
|
|
4124
4124
|
</div>
|
|
4125
|
-
`;let $h;class Hh extends(
|
|
4125
|
+
`;let $h;class Hh extends(qh(jh)){static get is(){return"vaadin-password-field"}static get template(){if(!$h){$h=super.template.cloneNode(!0);const t=Rh.content.querySelector('[part="reveal-button"]');$h.content.querySelector('[part="input-field"]').appendChild(t)}return $h}}li(Hh);const Wh=mi`
|
|
4126
4126
|
:host {
|
|
4127
4127
|
display: flex;
|
|
4128
4128
|
align-items: center;
|
|
@@ -4499,7 +4499,7 @@ const ud=t=>class extends t{static get properties(){return{pageSize:{type:Number
|
|
|
4499
4499
|
></vaadin-combo-box-overlay>
|
|
4500
4500
|
|
|
4501
4501
|
<slot name="tooltip"></slot>
|
|
4502
|
-
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new
|
|
4502
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ra(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new $a(this.inputElement,this._labelController)),this._tooltipController=new Mn(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}var gd;li(bd),
|
|
4503
4503
|
/**
|
|
4504
4504
|
* @license
|
|
4505
4505
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
@@ -5424,7 +5424,7 @@ const jd=mi`
|
|
|
5424
5424
|
width: var(--lumo-icon-size-m);
|
|
5425
5425
|
height: var(--lumo-icon-size-m);
|
|
5426
5426
|
}
|
|
5427
|
-
`;Md("vaadin-item",Ld,{moduleId:"lumo-item"});const
|
|
5427
|
+
`;Md("vaadin-item",Ld,{moduleId:"lumo-item"});const qd=mi`
|
|
5428
5428
|
:host {
|
|
5429
5429
|
transition: background-color 100ms;
|
|
5430
5430
|
overflow: hidden;
|
|
@@ -5436,13 +5436,13 @@ const jd=mi`
|
|
|
5436
5436
|
:host([focused]:not([disabled])) {
|
|
5437
5437
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
5438
5438
|
}
|
|
5439
|
-
`;Md("vaadin-combo-box-item",[Ld,
|
|
5439
|
+
`;Md("vaadin-combo-box-item",[Ld,qd],{moduleId:"lumo-combo-box-item"});
|
|
5440
5440
|
/**
|
|
5441
5441
|
* @license
|
|
5442
5442
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
5443
5443
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5444
5444
|
*/
|
|
5445
|
-
const
|
|
5445
|
+
const Rd=mi`
|
|
5446
5446
|
[part~='loader'] {
|
|
5447
5447
|
box-sizing: border-box;
|
|
5448
5448
|
width: var(--lumo-icon-size-s);
|
|
@@ -5681,7 +5681,7 @@ const Hd=mi`
|
|
|
5681
5681
|
top: var(--lumo-space-s);
|
|
5682
5682
|
margin-inline: auto 0;
|
|
5683
5683
|
}
|
|
5684
|
-
`;Md("vaadin-combo-box-overlay",[$d,Hd,Wd,
|
|
5684
|
+
`;Md("vaadin-combo-box-overlay",[$d,Hd,Wd,Rd,Gd,mi`
|
|
5685
5685
|
:host {
|
|
5686
5686
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
5687
5687
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
@@ -6019,14 +6019,14 @@ const Kd=[Ud,jd,Yd,mi`
|
|
|
6019
6019
|
[part='clear-button']::before {
|
|
6020
6020
|
content: var(--lumo-icons-cross);
|
|
6021
6021
|
}
|
|
6022
|
-
`];Md("",Kd,{moduleId:"lumo-input-field-shared-styles"}),Md("vaadin-multi-select-combo-box-item",[Ld,
|
|
6022
|
+
`];Md("",Kd,{moduleId:"lumo-input-field-shared-styles"}),Md("vaadin-multi-select-combo-box-item",[Ld,qd,mi`
|
|
6023
6023
|
@media (any-hover: hover) {
|
|
6024
6024
|
:host(:hover[readonly]) {
|
|
6025
6025
|
background-color: transparent;
|
|
6026
6026
|
cursor: default;
|
|
6027
6027
|
}
|
|
6028
6028
|
}
|
|
6029
|
-
`],{moduleId:"lumo-multi-select-combo-box-item"}),Md("vaadin-multi-select-combo-box-overlay",[$d,Hd,Wd,
|
|
6029
|
+
`],{moduleId:"lumo-multi-select-combo-box-item"}),Md("vaadin-multi-select-combo-box-overlay",[$d,Hd,Wd,Rd,Gd,mi`
|
|
6030
6030
|
:host {
|
|
6031
6031
|
--_vaadin-multi-select-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
6032
6032
|
--_vaadin-multi-select-combo-box-items-container-border-style: solid;
|
|
@@ -6363,7 +6363,7 @@ function(t,e){let i=null;const s=document.documentElement;function o(){i&&i.disc
|
|
|
6363
6363
|
* @license
|
|
6364
6364
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
6365
6365
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6366
|
-
*/,
|
|
6366
|
+
*/,qc=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Rc=()=>qc().filter((t=>t.$.overlay)),$c=new WeakMap,Hc=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return((t,e=(()=>!0))=>this===Rc().filter(e).pop())()}bringToFront(){let t="";const e=qc().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex),$c.has(this)&&$c.get(this).bringToFront()}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Rc().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Rc();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
|
|
6367
6367
|
/**
|
|
6368
6368
|
* @license
|
|
6369
6369
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
@@ -6702,12 +6702,12 @@ window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.re
|
|
|
6702
6702
|
* @license
|
|
6703
6703
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6704
6704
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6705
|
-
*/],
|
|
6705
|
+
*/],qu=document.createElement("div");let Ru;function $u(t,e={}){const i=e.mode||"polite",s=void 0===e.timeout?150:e.timeout;"alert"===i?(qu.removeAttribute("aria-live"),qu.removeAttribute("role"),Ru=nu.debounce(Ru,iu,(()=>{qu.setAttribute("role","alert")}))):(Ru&&Ru.cancel(),qu.removeAttribute("role"),qu.setAttribute("aria-live",i)),qu.textContent="",setTimeout((()=>{qu.textContent=t}),s)}
|
|
6706
6706
|
/**
|
|
6707
6707
|
* @license
|
|
6708
6708
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
6709
6709
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6710
|
-
*/
|
|
6710
|
+
*/qu.style.position="fixed",qu.style.clip="rect(0px, 0px, 0px, 0px)",qu.setAttribute("aria-live","polite"),document.body.appendChild(qu);const Hu=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.isConnected&&(t.target.resizables?t.target.resizables.forEach((e=>{e._onResize(t.contentRect)})):t.target._onResize(t.contentRect))}))}))})),Wu=ro((t=>class extends t{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),Hu.observe(this),this._observeParent){const t=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;t.resizables||(t.resizables=new Set,Hu.observe(t)),t.resizables.add(this),this.__parent=t}}disconnectedCallback(){super.disconnectedCallback(),Hu.unobserve(this);const t=this.__parent;if(this._observeParent&&t){const e=t.resizables;e&&(e.delete(this),0===e.size&&Hu.unobserve(t)),this.__parent=null}}_onResize(t){}}));
|
|
6711
6711
|
/**
|
|
6712
6712
|
* @license
|
|
6713
6713
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
@@ -7487,7 +7487,7 @@ const Mp=mi`
|
|
|
7487
7487
|
* @license
|
|
7488
7488
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7489
7489
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7490
|
-
*/const Pp=t=>class extends(Ph(xa(ka(la(
|
|
7490
|
+
*/const Pp=t=>class extends(Ph(xa(ka(la(qa(t)))))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${En()}`,this._srLabelController=new Va(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new Dp(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new xh(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new Mn(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}__itemsChanged(t,e){(t||e)&&this.requestContentUpdate()}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",(()=>{this.__initMenuItems(t)})),t.addEventListener("selected-changed",(()=>this.__updateValueButton())),t.addEventListener("keydown",(t=>this._onKeyDownInside(t)),!0),t.addEventListener("click",(t=>{const e=t.composedPath().find((t=>t._hasVaadinItemMixin));this.__dispatchChangePending=!(!e||void 0===e.value||e.value===this.value),this.opened=!1}),!0),this.__lastMenuElement=t)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,e){this.toggleAttribute("has-value",!!t),void 0!==e&&!this.__dispatchChangePending&&this.validate()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onToggleMouseDown(t){t.preventDefault()}_onKeyDown(t){if(t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){const e=this._menuElement.selected,i=this._menuElement._searchKey(void 0!==e?e:-1,t.key);i>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=i)}}_onKeyDownInside(t){/^(Tab)$/u.test(t.key)&&(this.opened=!1)}_openedChanged(t,e,i){if(e&&i){if(t){if(this.disabled||this.readonly)return void(this.opened=!1);this._updateAriaLive(!1),e.style.setProperty("--vaadin-select-text-field-width",`${i.offsetWidth}px`);const t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=t}}_updateAriaExpanded(t,e){e&&e.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&(t?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(t){let e;const i=t.getAttribute("label");e=i?this.__createItemElement({label:i}):t.cloneNode(!0),e._sourceItem=t,this.__appendValueItemElement(e,this.focusElement),e.selected=!0}__createItemElement(t){const e=document.createElement(t.component||"vaadin-select-item");return t.label&&(e.textContent=t.label),t.value&&(e.value=t.value),t.disabled&&(e.disabled=t.disabled),t.className&&(e.className=t.className),e}__appendValueItemElement(t,e){e.appendChild(t),t.removeAttribute("tabindex"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}_accessibleNameChanged(t){this._srLabelController.setLabel(t),this._setCustomAriaLabelledBy(t?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(t){this._setCustomAriaLabelledBy(t)}_setCustomAriaLabelledBy(t){const e=this._getLabelIdWithItemId(t);this._fieldAriaController.setLabelId(e,!0)}_getLabelIdWithItemId(t){return t?`${t} ${this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:""}`.trim():null}__updateValueButton(){const t=this.focusElement;if(!t)return;t.innerHTML="";const e=this._items[this._menuElement.selected];if(t.removeAttribute("placeholder"),this._hasContent(e))this.__attachSelectedItem(e);else if(this.placeholder){const e=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(e,t),t.setAttribute("placeholder","")}!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),Ta(t,"aria-labelledby",e||this.placeholder?{newId:this._itemId}:{oldId:this._itemId}),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(t){return!!t&&(!!(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim())||t.childElementCount>0)}_updateSelectedItem(t,e){if(e){const i=null==t?t:t.toString();this._menuElement.selected=e.reduce(((t,e,s)=>void 0===t&&e.value===i?s:t),void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}}_shouldRemoveFocus(){return!this.opened}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,e){if(!this.items||0===this.items.length)return void(t.textContent="");let i=t.firstElementChild;i||(i=document.createElement("vaadin-select-list-box"),t.appendChild(i)),i.textContent="",this.items.forEach((t=>{i.appendChild(this.__createItemElement(t))}))}__dispatchChange(){return ai(this,null,(function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}))}}
|
|
7491
7491
|
/**
|
|
7492
7492
|
* @license
|
|
7493
7493
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -7545,4 +7545,4 @@ const Mp=mi`
|
|
|
7545
7545
|
<div class="sr-only">
|
|
7546
7546
|
<slot name="sr-label"></slot>
|
|
7547
7547
|
</div>
|
|
7548
|
-
`}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),pd(this)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}li(Op);const Fp=class{constructor(e){t(this,e),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.hidePasswordComplexity=!1,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1,this.twofaDestination=void 0,this.twofaResendIntervalSeconds=60}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])r[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return i("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 i("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 i("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 i("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 i("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 i("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 i("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 i("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,hidePasswordComplexity:this.hidePasswordComplexity,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("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 i("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 i("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});case"twofa":return i("twofa-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,destination:this.twofaDestination,"resend-interval-seconds":this.twofaResendIntervalSeconds});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(o,{key:"575526a74f8739d530e0094238357e2a744cc463",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};Fp.style=":host{display:block;height:100%}";const Np=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow)return n("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}});if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"414aaa50eb36153d2879bc9c6d1024dd1def2712",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"b607615d56849a46aa0a33c47795a43c0b4f0d3f",class:"number__wrapper--flex"},i("label",{key:"109e742b76a4bdc539fb0299d9249ee7eddb088d",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"951f79012890dc185e9eb27e30f107a77df7fa09",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"7f9721c37bfb782bfd43ce948f94c113333a0e4d",class:"number__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"58f9b28983789f1a7525b3a9c30ab4c1fbaa9ab1",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"800f10c617221358f2d349b39e7831116f931f08",class:"number__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Np.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emw--color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';const Bp=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.passwordButton.addEventListener("click",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern).test(t);return{rule:e.displayName,ruleKey:e.errorKey,passed:i}}))}setValidity(){var t,e;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s,o;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.isDuplicateInput&&!this.originalValid)return n("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,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}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===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}return(null===(o=this.passwordComplexity)||void 0===o?void 0:o.every((t=>t.passed)))||this.showPopup?void 0:n("invalidPassword",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,s=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},n("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},n(s?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,n(`${t.ruleKey}`,this.language)?n(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"766952d14b7d51c8d7a498f1f42a2ef4bf82a91b",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"c2dbef6f7c3d0e46577fc5ac0faf27abec2b142b",class:"password__wrapper--flex"},i("label",{key:"8b8ec603082044efe5740f0d21d246a9fb840e60",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"239c16b0dc29241bd1c5fbe27346564171900d5d",class:"password__wrapper--relative"},this.tooltip&&i("img",{key:"0e4d62a2d4b3a1284b83d5bae49c258498e8f6c6",class:"password__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{key:"11fb5b618a2cf87e54e7cae6c5e1b8846ed45455",type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),i("small",{key:"af31d4e3623d1f57161190cb939fd7b368f63b59",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.hidePasswordComplexity&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return s(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};Bp.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.password {\n font-family: "Roboto";\n font-style: normal;\n}\n.password__wrapper {\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n container-type: inline-size;\n}\n.password__wrapper--autofilled {\n pointer-events: none;\n}\n.password__wrapper--autofilled .password__label {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__wrapper--autofilled .password__input::part(input-field) {\n color: var(--emw--color-black, #000000);\n}\n.password__wrapper--flex {\n display: flex;\n gap: 5px;\n}\n.password__wrapper--relative {\n position: relative;\n}\n.password__label {\n font-family: inherit;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 20px;\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__label--required::after {\n content: "*";\n font-family: inherit;\n color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n margin-left: 2px;\n}\n.password__input {\n width: inherit;\n border: none;\n}\n.password__input[focused]::part(input-field) {\n border-color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n}\n.password__input[invalid]::part(input-field) {\n border: 1px solid var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__input::part(input-field) {\n border-radius: 4px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-100, #E6E6E6);\n color: var(--emw--color-black, #000000);\n background-color: var(--emw--color-white, #FFFFFF);\n font-family: inherit;\n font-style: normal;\n font-weight: 300;\n font-size: 16px;\n line-height: 1.5;\n position: relative;\n margin-bottom: unset;\n height: 44px;\n padding: 0;\n width: 100%;\n}\n.password__input::part(reveal-button) {\n position: relative;\n right: 10px;\n}\n.password__input::part(reveal-button)::before {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__input > input {\n padding: 5px 15px;\n}\n.password__input > input:placeholder-shown {\n color: var(--emw--color-gray-150, #828282);\n}\n.password__error-message {\n position: absolute;\n top: calc(100% + 5px);\n left: 0;\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__complexity {\n height: 150px;\n position: relative;\n padding: 10px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n justify-content: center;\n margin-top: 20px;\n font-weight: 300;\n background: var(--emw--color-white, #FFFFFF);\n -webkit-border-radius: 5px;\n -moz-border-radius: 5px;\n border-radius: 5px;\n border: 1px solid #B0B0B0;\n box-sizing: content-box;\n /* works only in this order */\n}\n.password__complexity meter {\n border-color: transparent; /* Needed for Safari */\n}\n.password__complexity meter[value="1"]::-moz-meter-bar {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter[value="1"]::-webkit-meter-optimum-value {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter:not([value="1"])::-moz-meter-bar {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity--strength {\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.password__complexity--strength meter::-moz-meter-bar { /* Firefox Pseudo Class */\n background: #B0B0B0;\n}\n.password__complexity--hidden {\n display: none;\n}\n.password__complexity--text-bold {\n font-weight: 500;\n}\n.password__complexity--checkbox {\n margin-right: 5px;\n}\n.password__complexity:after {\n content: "";\n position: absolute;\n width: 25px;\n height: 25px;\n border-top: 1px solid var(--emw--color-gray-150, #828282);\n border-right: 0 solid var(--emw--color-gray-150, #828282);\n border-left: 1px solid var(--emw--color-gray-150, #828282);\n border-bottom: 0 solid var(--emw--color-gray-150, #828282);\n bottom: 92%;\n left: 50%;\n margin-left: -25px;\n transform: rotate(45deg);\n margin-top: -25px;\n background-color: var(--emw--color-white, #FFFFFF);\n}\n@container (max-width: 300px) {\n .password__complexity {\n height: 190px;\n }\n .password__complexity:after {\n width: 14px;\n height: 14px;\n bottom: 96%;\n left: 57%;\n }\n}\n.password__tooltip-icon {\n width: 16px;\n height: auto;\n}\n.password__tooltip {\n position: absolute;\n top: 0;\n left: 20px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-150, #828282);\n color: #2B2D3F;\n padding: 10px;\n border-radius: 5px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n z-index: 10;\n}\n.password__tooltip.visible {\n opacity: 1;\n}';const Vp=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{key:"29ff8fcc910622397750532629ac0c202c9726ba",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{key:"cdab5b331863f3d31aab50c1d95b5a8845d53329",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{key:"bd6cd89510e7ace1348b391f3ce9ba334a03e695",class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"27036c51c89612dbb87e5248355d3a5466c49705",class:"radio__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Vp.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";const jp=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.handleComboChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=t=>{const e=t.currentTarget;e.opened||(this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}))},this.handleSelectChange=t=>{this.touched=!0,this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!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.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t;this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value}))),this.isComboBox=(null===(t=this.displayedOptions)||void 0===t?void 0:t.length)>6}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{var e;const i=Object.keys(t)[0];this.displayedOptions=t[i].map((t=>({label:t.Name,value:t.Alpha2Code}))),this.isComboBox=(null===(e=this.displayedOptions)||void 0===e?void 0:e.length)>6}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){if(this.inputReference=this.vaadinCombo.querySelector("input"),this.defaultValue){const t=this.displayedOptions.find((t=>t.value.toUpperCase()===this.defaultValue.toUpperCase()));this.value=t.value,this.valueHandler({name:this.name,value:this.value}),this.inputReference.value=this.value}this.isValid=this.setValidity(),!this.isComboBox&&this.vaadinCombo&&this.vaadinCombo.addEventListener("opened-changed",(t=>{if(!0===t.detail.value)this.errorMessage="";else{const e=t.currentTarget;this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})}}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){var t;return!(null===(t=this.validation)||void 0===t?void 0:t.mandatory)||!!this.value}setErrorMessage(){var t,e,i;if((null===(e=null===(t=this.inputReference)||void 0===t?void 0:t.validity)||void 0===e?void 0:e.valueMissing)||(null===(i=this.vaadinCombo)||void 0===i?void 0:i.invalid))return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t,e;let s="";return this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"3afb8c4c104469a78ca982d3815aa4241364674a",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"447c4ad85d8a1b47e0485c0f1fecaea998790008",class:"select__wrapper--flex"},i("label",{key:"f2e7923d0f0d260608ae61bd6d4a56929c57fdad",class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{key:"22b8e5868a411944ecd49397d17aa2f99aa5c660",class:"select__wrapper--relative"},this.tooltip&&i("img",{key:"dd1a0150c672ed991266dcce2808f8b6b6c0e954",class:"select__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),this.isComboBox?i("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(t=this.validation)||void 0===t?void 0:t.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleComboChange,onBlur:this.handleBlur}):i("vaadin-select",{name:this.name,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(e=this.validation)||void 0===e?void 0:e.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleSelectChange}),i("small",{key:"77ed680bd30fdc9193b502136387e828fd88e162",class:"select__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};jp.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%;--_invalid-hover-highlight:transparent;--vaadin-input-field-invalid-hover-highlight:transparent}vaadin-combo-box>input{background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emw--color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]:not(.text__input--invalid)::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.select__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emw--color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const Lp=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.phoneValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.touched||(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.showLabels=void 0,this.action=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.phoneValue=this.defaultValue.phone||null)}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>"object"==typeof t&&t.Prefix?{label:t.Prefix,value:t.Prefix}:{label:t,value:t}))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?n("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"a38531b8b0fa40e745a3a2b8ac39a56d0001c09f",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"70c35c825dafc0aee70835e87aeadab141dc22d3",class:"tel__wrapper--flex-label"},i("label",{key:"5ff2f5df35dcec4ea76f3b9496b193183c03188d",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"dc1625d8c724596b05ca2b0069f492ef9172bc10",class:"tel__wrapper--relative"},this.tooltip&&i("img",{key:"a6e94e7598b6734b4c83d95e13a113d6f835d755",class:"tel__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"d3865c4a88ea5b6de6791883b3b6955b6b3a0c15",class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{key:"6d845d492057a29590bffb86c509d3f8cfbf6260",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{key:"0cb8fe81d26828c0997379352ee25e5a416b5675",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:this.phoneValue,placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{key:"1de6d39f83643e86d76659946d2996cc6e82c495",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Lp.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emw--color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);overflow:hidden}.tel__wrapper--flex:focus-within{border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__wrapper .text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 5px 5px 0;background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emw--color-white, #FFFFFF)}.tel__prefix::part(toggle-button){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emw--registration-typography, var(--emw--color-black, #000000));background-color:var(--emw--color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emw--color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const Rp=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleValidationChange(t){t.detail.field===this.name&&(this.validation=t.detail.validation,this.validationPattern=this.setPattern(),this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()))}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.isValid=this.setValidity()}setValidity(){if(this.isDuplicateInput&&this.duplicateInputValue!==this.value)return!1;if(!this.inputReference)return!1;const t=this.inputReference.validity.valid,e=!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern);return t&&e}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,s;if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)||s}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===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"65f086c89daa3c3ebc40e6f0c58fbd24ff6e9050",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"970d4aa2de6419ab7904e1315c669aadc7f462b3",class:"text__wrapper--flex"},i("label",{key:"6e3d033ebcf3ecd4a8c3f3a3a35f1e2e4bc8261a",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"7247b4e12c1caf287534541d0cf019ddeaa78182",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"3b96da6c25789e12cbbc3408246650d6d1c72712",class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"8fc695313a9e2e19898380dfff97ee76b6e509df",name:this.name,id:`${this.name}__input`,value:this.defaultValue,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"90f0552125dbf888c915aa1b2e20446df6a48b9c",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Rp.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}';const qp=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.callBackObject={},this.subFieldsObject={},this.value="",this.handleRevealField=(t,e)=>{t.stopPropagation(),window.postMessage({type:`registration${e}Clicked`},window.location.href)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.options=void 0,this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.showFields="true"===this.defaultValue}handleStylingChange(t,e){t!==e&&this.setClientStyling()}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)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){0!==this.options.length&&this.options.forEach((t=>{this.callBackObject[t.name]=e=>{this.handleRevealField(e,t.name)},this.subFieldsObject[t.name].addEventListener("click",this.callBackObject[t.name])}))}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.valueHandler({name:this.name,value:this.checkboxReference.checked?"true":"false",type:"toggle"})}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return n("requiredError",this.language)}disconnectedCallback(){this.options.forEach((t=>{this.subFieldsObject[t.name].removeEventListener("click",this.callBackObject[t.name])}))}renderLabel(){return i("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},i("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"1f359a8390bb4296e94573131009eeff1bd2293c",class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"76033e62f8d111e3071b1a09a6d8f9b909a05244",class:"togglecheckbox__wrapper--flex"},i("input",{key:"6d944818346ce6e62117856ff5dfd2278c1ccad4",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.checkboxReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),i("small",{key:"7e2b7612f6dc179035027b551a6ac9801a1ba3c5",class:"togglecheckbox__error-message"},this.errorMessage),i("div",{key:"3a77da5b3544107d49137e6024888f8e774be170",class:"togglecheckbox__wrapper--relative"},this.tooltip&&i("img",{key:"7edd9a8cce9d66e7f6fb2d61a4513754df62d5df",class:"togglecheckbox__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("div",{key:"49de8d42d4b9f4c5668de6379f015c92098578a6",class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,ref:e=>this.subFieldsObject[t.name]=e})))))}static get watchers(){return{clientStyling:["handleStylingChange"]}}};qp.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';const $p=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.resendCode=e(this,"resendCode",7),this.validationPattern="",this.stylingContainer=null,this.tooltipReference=null,this.tooltipIconReference=null,this.inputRefs=[],this.containerRef=null,this.resendInterval=null,this.resendCodeHandler=()=>{this.triggerResendInterval(),this.resendCode.emit()},this.setInputRef=(t,e)=>{t&&(this.inputRefs[e]=t)},this.setContainerRef=t=>{t&&(this.containerRef=t)},this.triggerResendInterval=()=>{this.isResendButtonAvailable=!1,this.resendInterval&&clearInterval(this.resendInterval),this.resendInterval=setInterval((()=>{--this.resendIntervalSecondsLeft<=0&&(clearInterval(this.resendInterval),this.resendIntervalSecondsLeft=this.resendIntervalSeconds,this.isResendButtonAvailable=!0)}),1e3)},this.formatTime=()=>{const t=String(Math.floor(this.resendIntervalSecondsLeft/60));let e=String(this.resendIntervalSecondsLeft%60);return 1===e.length&&(e="0"+e),`${t}:${e}`},this.handleInput=(t,e)=>{const i=t.target,s=i.value;if(i.value=s.charAt(s.length>1?1:0),!s)return;this.code[e]=i.value;const o=this.inputRefs[e+1];o&&o.focus(),this.setValidity(),this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name="",this.displayName="",this.placeholder="",this.validation=void 0,this.tooltip="",this.language="en",this.emitValue=!0,this.destination="",this.resendIntervalSeconds=60,this.clientStyling="",this.limitStylingAppends=!1,this.isValid=!1,this.isResendButtonAvailable=!0,this.showTooltip=!1,this.errorMessage="",this.code=[],this.resendIntervalSecondsLeft=this.resendIntervalSeconds}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.code.join("")})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.code.join("")})}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)}connectedCallback(){this.validationPattern=this.setPattern(),this.code=new Array(this.validation.maxLength).fill("")}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.setValidity()}handleKeyDown(t,e){if("Backspace"===t.key){this.code[e]="",this.inputRefs[e]&&(this.inputRefs[e].value="");const t=this.inputRefs[e-1];t&&(null==t||t.focus())}this.setValidity(),this.setErrorMessage()}handlePaste(t){var e;t.preventDefault();const i=null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text").trim();if(!i)return;const s=i.slice(0,this.validation.maxLength).split("");this.code=[...s,...new Array(this.validation.maxLength-s.length).fill("")],s.forEach(((t,e)=>{this.inputRefs[e].value=t}));const o=this.inputRefs[Math.min(s.length,this.inputRefs.length-1)];o&&o.focus(),this.setValidity(),this.setErrorMessage()}setValidity(){const t=this.code.join(""),e=t.length===this.validation.maxLength,i=null!==t.match(this.validationPattern);this.isValid=e&&i}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;if(null!==this.code.join("").match(this.validationPattern))this.errorMessage="";else{const e=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey;e&&(this.errorMessage=n(e,this.language))}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"cc140f18806c0cc8e4ff614a1a3448dbca667fa7",class:"twofa"},i("div",{key:"fc3b603e1d1a7187417301dfebe80dabfd8cda67",class:"twofa__error-message"},i("p",{key:"60e2cff194ec862de20aa443864861d784b8dc01"},this.errorMessage)),i("div",{key:"244505408204938069dca1f60dbe051716f66f85",class:"twofa__description",innerHTML:n("twofaDescription",this.language,{values:{destination:this.destination}})}),i("div",{key:"acb6b8e1676a884d1c7ceced800f6ba3a2e80bc7",class:"twofa__input-wrapper",ref:this.setContainerRef},this.code.map(((t,e)=>i("input",{key:e,ref:t=>this.setInputRef(t,e),id:`otp-input-${e}`,type:"text",maxLength:2,value:t,onInput:t=>this.handleInput(t,e),onKeyDown:t=>this.handleKeyDown(t,e),onPaste:t=>this.handlePaste(t)})))),i("div",{key:"446eba5a8fe3fb0ede66869642d395bac9c6b8d6",class:"twofa__button-wrapper"},i("p",{key:"9f205fd87920d866d49eb98b2a8ab6f3764fd274",class:"twofa__resend-message"},n("twofaResendMessage",this.language)),i("button",{key:"efd2294b1d85a78c0d65262cc2004b5e63a898ab",class:"twofa__resend-button",onClick:this.resendCodeHandler,disabled:!this.isResendButtonAvailable},this.isResendButtonAvailable?n("twofaResendButton",this.language):this.formatTime())))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};$p.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.twofa{display:flex;flex-direction:column;gap:10px}.twofa__description{display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center}.twofa__error-message{text-align:center;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.twofa__input-wrapper{display:flex;justify-content:center}.twofa__input-wrapper input{width:35px;height:35px;padding:10px;text-align:center;border-radius:var(--emw--border-radius-small, 5px);margin-left:5px;margin-right:5px;border:2px solid var(--emw--otp-border-color, #55525c);font-weight:var(--emw-font-weight-bold, 800);outline:none;transition:all 0.1s}.twofa__input-wrapper input:focus{border:2px solid var(--emw--color-primary, #22B04E);box-shadow:0 0 2px 2px var(--emw--color-primary, #22B04E)}.twofa__button-wrapper{justify-content:center;text-align:center}.twofa__button-wrapper button{border:none;background:none;font-weight:var(--emw-font-weight-bold, 800);color:var(--emw--color-primary, #22B04E);cursor:pointer}";export{l as checkbox_group_input,h as checkbox_input,Ke as date_input,Qe as email_input,Fp as general_input,Np as number_input,Bp as password_input,Vp as radio_input,jp as select_input,Lp as tel_input,Rp as text_input,qp as toggle_checkbox_input,$p as twofa_input}
|
|
7548
|
+
`}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),pd(this)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}li(Op);const Fp=class{constructor(e){t(this,e),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.hidePasswordComplexity=!1,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1,this.twofaDestination=void 0,this.twofaResendIntervalSeconds=60}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])r[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return i("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 i("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 i("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 i("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 i("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 i("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 i("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 i("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,hidePasswordComplexity:this.hidePasswordComplexity,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("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 i("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 i("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});case"twofa":return i("twofa-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,destination:this.twofaDestination,"resend-interval-seconds":this.twofaResendIntervalSeconds});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(o,{key:"575526a74f8739d530e0094238357e2a744cc463",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};Fp.style=":host{display:block;height:100%}";const Np=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow)return n("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}});if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"a6e6a37c0b82e75bc66e26b104f343178deb8b81",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"41d8e03f598ccab9d175dacc27ede808ec017717",class:"number__wrapper--flex"},i("label",{key:"e2eb89c31bdc2c7e7e80546ea5844bb13d34c759",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"91de685f2da7b9ba3ddaf48a978f5e95a40594be",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"737d9ad4e1c74a03b140d48988e688a1898f9e57",class:"number__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"58d140746eaaf09aca69c5c4d698983c853e5b5f",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"74bda2b23c57d2ca88613c00e4d6ed63ea86daad",class:"number__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Np.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emw--color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';const Bp=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.passwordButton.addEventListener("click",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern).test(t);return{rule:e.displayName,ruleKey:e.errorKey,passed:i}}))}setValidity(){var t,e;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s,o;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.isDuplicateInput&&!this.originalValid)return n("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,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}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===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}return(null===(o=this.passwordComplexity)||void 0===o?void 0:o.every((t=>t.passed)))||this.showPopup?void 0:n("invalidPassword",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,s=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},n("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},n(s?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,n(`${t.ruleKey}`,this.language)?n(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"c6a672c226569d500598f34c6155279e75fdc79c",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"44b8bee769b7b6ce86797f0f62b6af033bf2d0cd",class:"password__wrapper--flex"},i("label",{key:"b6d573c6a70f26471cea2e576c8286719f58b47f",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"76698abedf907fa52940bc8e278fff4aeda1912f",class:"password__wrapper--relative"},this.tooltip&&i("img",{key:"7116b9ed6eb06b6b03c336b6d216d40571b54f55",class:"password__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{key:"b85d0ba5396b3ab6fcf21d1053dba22fdb94c7f9",type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),i("small",{key:"c30bbcb8e49fcdb1dd8cb41bafd56d64b609be86",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.hidePasswordComplexity&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return s(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};Bp.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.password {\n font-family: "Roboto";\n font-style: normal;\n}\n.password__wrapper {\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n container-type: inline-size;\n}\n.password__wrapper--autofilled {\n pointer-events: none;\n}\n.password__wrapper--autofilled .password__label {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__wrapper--autofilled .password__input::part(input-field) {\n color: var(--emw--color-black, #000000);\n}\n.password__wrapper--flex {\n display: flex;\n gap: 5px;\n}\n.password__wrapper--relative {\n position: relative;\n}\n.password__label {\n font-family: inherit;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 20px;\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__label--required::after {\n content: "*";\n font-family: inherit;\n color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n margin-left: 2px;\n}\n.password__input {\n width: inherit;\n border: none;\n}\n.password__input[focused]::part(input-field) {\n border-color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n}\n.password__input[invalid]::part(input-field) {\n border: 1px solid var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__input::part(input-field) {\n border-radius: 4px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-100, #E6E6E6);\n color: var(--emw--color-black, #000000);\n background-color: var(--emw--color-white, #FFFFFF);\n font-family: inherit;\n font-style: normal;\n font-weight: 300;\n font-size: 16px;\n line-height: 1.5;\n position: relative;\n margin-bottom: unset;\n height: 44px;\n padding: 0;\n width: 100%;\n}\n.password__input::part(reveal-button) {\n position: relative;\n right: 10px;\n}\n.password__input::part(reveal-button)::before {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__input > input {\n padding: 5px 15px;\n}\n.password__input > input:placeholder-shown {\n color: var(--emw--color-gray-150, #828282);\n}\n.password__error-message {\n position: absolute;\n top: calc(100% + 5px);\n left: 0;\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__complexity {\n height: 150px;\n position: relative;\n padding: 10px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n justify-content: center;\n margin-top: 20px;\n font-weight: 300;\n background: var(--emw--color-white, #FFFFFF);\n -webkit-border-radius: 5px;\n -moz-border-radius: 5px;\n border-radius: 5px;\n border: 1px solid #B0B0B0;\n box-sizing: content-box;\n /* works only in this order */\n}\n.password__complexity meter {\n border-color: transparent; /* Needed for Safari */\n}\n.password__complexity meter[value="1"]::-moz-meter-bar {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter[value="1"]::-webkit-meter-optimum-value {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter:not([value="1"])::-moz-meter-bar {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity--strength {\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.password__complexity--strength meter::-moz-meter-bar { /* Firefox Pseudo Class */\n background: #B0B0B0;\n}\n.password__complexity--hidden {\n display: none;\n}\n.password__complexity--text-bold {\n font-weight: 500;\n}\n.password__complexity--checkbox {\n margin-right: 5px;\n}\n.password__complexity:after {\n content: "";\n position: absolute;\n width: 25px;\n height: 25px;\n border-top: 1px solid var(--emw--color-gray-150, #828282);\n border-right: 0 solid var(--emw--color-gray-150, #828282);\n border-left: 1px solid var(--emw--color-gray-150, #828282);\n border-bottom: 0 solid var(--emw--color-gray-150, #828282);\n bottom: 92%;\n left: 50%;\n margin-left: -25px;\n transform: rotate(45deg);\n margin-top: -25px;\n background-color: var(--emw--color-white, #FFFFFF);\n}\n@container (max-width: 300px) {\n .password__complexity {\n height: 190px;\n }\n .password__complexity:after {\n width: 14px;\n height: 14px;\n bottom: 96%;\n left: 57%;\n }\n}\n.password__tooltip-icon {\n width: 16px;\n height: auto;\n}\n.password__tooltip {\n position: absolute;\n top: 0;\n left: 20px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-150, #828282);\n color: #2B2D3F;\n padding: 10px;\n border-radius: 5px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n z-index: 10;\n}\n.password__tooltip.visible {\n opacity: 1;\n}';const Vp=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{key:"7dd3f10103c696ef18202154d5ede9cc10b32d0c",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{key:"304af4ecd36e8831c1fc76abfaae1767a1005ae5",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{key:"55bb2cc7060fda4774d337c8a570c78d90912da7",class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"b3b7093e2c4b5d6f727f5346562ed3fe274bd431",class:"radio__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Vp.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";const jp=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.handleComboChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=t=>{const e=t.currentTarget;e.opened||(this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}))},this.handleSelectChange=t=>{this.touched=!0,this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!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.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t;this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value}))),this.isComboBox=(null===(t=this.displayedOptions)||void 0===t?void 0:t.length)>6}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{var e;const i=Object.keys(t)[0];this.displayedOptions=t[i].map((t=>({label:t.Name,value:t.Alpha2Code}))),this.isComboBox=(null===(e=this.displayedOptions)||void 0===e?void 0:e.length)>6}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){if(this.inputReference=this.vaadinCombo.querySelector("input"),this.defaultValue){const t=this.displayedOptions.find((t=>t.value.toUpperCase()===this.defaultValue.toUpperCase()));this.value=t.value,this.valueHandler({name:this.name,value:this.value}),this.inputReference.value=this.value}this.isValid=this.setValidity(),!this.isComboBox&&this.vaadinCombo&&this.vaadinCombo.addEventListener("opened-changed",(t=>{if(!0===t.detail.value)this.errorMessage="";else{const e=t.currentTarget;this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})}}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){var t;return!(null===(t=this.validation)||void 0===t?void 0:t.mandatory)||!!this.value}setErrorMessage(){var t,e,i;if((null===(e=null===(t=this.inputReference)||void 0===t?void 0:t.validity)||void 0===e?void 0:e.valueMissing)||(null===(i=this.vaadinCombo)||void 0===i?void 0:i.invalid))return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t,e;let s="";return this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"7e90e23b53a72cda885485ccf4110631cede2b8f",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"9a841ccebeb828fc75ed1f708a4a43d4fc7a193f",class:"select__wrapper--flex"},i("label",{key:"92c70fa56518d6d015d756b693306dab80ab0f57",class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{key:"cfbeb4b4969adc1f9944eb60291d8f586dcc29db",class:"select__wrapper--relative"},this.tooltip&&i("img",{key:"13a340313095bc653a1741115bae128d538dcf30",class:"select__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),this.isComboBox?i("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(t=this.validation)||void 0===t?void 0:t.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleComboChange,onBlur:this.handleBlur}):i("vaadin-select",{name:this.name,popover:!1,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(e=this.validation)||void 0===e?void 0:e.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleSelectChange,"no-vertical-overlap":!0,noVerticalOverlap:!0}),i("small",{key:"6ffb5459f648208106c6bfc8a78f5cf379f7f11b",class:"select__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};jp.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%;--_invalid-hover-highlight:transparent;--vaadin-input-field-invalid-hover-highlight:transparent}vaadin-combo-box>input{background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emw--color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]:not(.text__input--invalid)::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.select__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emw--color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const Lp=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.phoneValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.touched||(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.showLabels=void 0,this.action=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.phoneValue=this.defaultValue.phone||null)}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>"object"==typeof t&&t.Prefix?{label:t.Prefix,value:t.Prefix}:{label:t,value:t}))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?n("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"07279e9146394ad96ca0ce1b3e059f09fce2937a",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"c4eedb1dba6a3fabd4dcc95e767813f95b83346a",class:"tel__wrapper--flex-label"},i("label",{key:"093a445bc6a9144673386abf92263faa2f33a62a",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"76abd68488a0f78e3fbd46328fa338d8c05b9601",class:"tel__wrapper--relative"},this.tooltip&&i("img",{key:"8238860af5dbc417c2cd853b55fd79f67f51649d",class:"tel__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"235b2146fc4c70107d5c077071e1fa52ac1c56d3",class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{key:"73e51576aad82c2bc6895a62b0c19351a1eb917b",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{key:"d714d757cd08e3d700cec86f9d6ce4ff680dd2e9",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:this.phoneValue,placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{key:"f6ced1b252990cd3ecc18c9c5ad3546654006dcc",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Lp.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emw--color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);overflow:hidden}.tel__wrapper--flex:focus-within{border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__wrapper .text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 5px 5px 0;background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emw--color-white, #FFFFFF)}.tel__prefix::part(toggle-button){color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emw--registration-typography, var(--emw--color-black, #000000));background-color:var(--emw--color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emw--color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const qp=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleValidationChange(t){t.detail.field===this.name&&(this.validation=t.detail.validation,this.validationPattern=this.setPattern(),this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()))}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.isValid=this.setValidity()}setValidity(){if(this.isDuplicateInput&&this.duplicateInputValue!==this.value)return!1;if(!this.inputReference)return!1;const t=this.inputReference.validity.valid,e=!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern);return t&&e}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,s;if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)||s}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===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"37c7509b46ab92149c3c11365cf5061bb1bbb01a",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"737873a059749dc050a8efa6ffb09a1b2ee9f95c",class:"text__wrapper--flex"},i("label",{key:"1d921faece6c293c7e3c95d34bedd0d399c7be9e",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"e1e59c85912cf7c3dbd1e61bba829ae2b0192a18",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"73513026eebcc809edef481d5cd7b885e5f20f03",class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"a73e2c2430e6fbc778e1fd6b5fcfb298cf01b5c5",name:this.name,id:`${this.name}__input`,value:this.defaultValue,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"11cb376081cb05651c60c3e1ac8a41f9751ca16c",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};qp.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}';const Rp=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.callBackObject={},this.subFieldsObject={},this.value="",this.handleRevealField=(t,e)=>{t.stopPropagation(),window.postMessage({type:`registration${e}Clicked`},window.location.href)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.options=void 0,this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.showFields="true"===this.defaultValue}handleStylingChange(t,e){t!==e&&this.setClientStyling()}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)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){0!==this.options.length&&this.options.forEach((t=>{this.callBackObject[t.name]=e=>{this.handleRevealField(e,t.name)},this.subFieldsObject[t.name].addEventListener("click",this.callBackObject[t.name])}))}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.valueHandler({name:this.name,value:this.checkboxReference.checked?"true":"false",type:"toggle"})}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return n("requiredError",this.language)}disconnectedCallback(){this.options.forEach((t=>{this.subFieldsObject[t.name].removeEventListener("click",this.callBackObject[t.name])}))}renderLabel(){return i("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},i("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"6315588766319c4ac7a88646b01bc577858ad718",class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"20d6999aaf0499b8b840a28dab89242953b4610d",class:"togglecheckbox__wrapper--flex"},i("input",{key:"73b699abf4904e4f2133e30d8dea250c9fe13ac3",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.checkboxReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),i("small",{key:"4d10247f1dae300d0f5133accdd544a90fa4d5a7",class:"togglecheckbox__error-message"},this.errorMessage),i("div",{key:"9c95cef35e58875b96710d3b64b9af1be27204c5",class:"togglecheckbox__wrapper--relative"},this.tooltip&&i("img",{key:"9774edae6bad4715fd20798a7be25eb71c3c4cf0",class:"togglecheckbox__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("div",{key:"70ad3ec894a32439e2dcea617e2a5b773c5456b1",class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,ref:e=>this.subFieldsObject[t.name]=e})))))}static get watchers(){return{clientStyling:["handleStylingChange"]}}};Rp.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';const $p=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.resendCode=e(this,"resendCode",7),this.validationPattern="",this.stylingContainer=null,this.tooltipReference=null,this.tooltipIconReference=null,this.inputRefs=[],this.containerRef=null,this.resendInterval=null,this.resendCodeHandler=()=>{this.triggerResendInterval(),this.resendCode.emit()},this.setInputRef=(t,e)=>{t&&(this.inputRefs[e]=t)},this.setContainerRef=t=>{t&&(this.containerRef=t)},this.triggerResendInterval=()=>{this.isResendButtonAvailable=!1,this.resendInterval&&clearInterval(this.resendInterval),this.resendInterval=setInterval((()=>{--this.resendIntervalSecondsLeft<=0&&(clearInterval(this.resendInterval),this.resendIntervalSecondsLeft=this.resendIntervalSeconds,this.isResendButtonAvailable=!0)}),1e3)},this.formatTime=()=>{const t=String(Math.floor(this.resendIntervalSecondsLeft/60));let e=String(this.resendIntervalSecondsLeft%60);return 1===e.length&&(e="0"+e),`${t}:${e}`},this.handleInput=(t,e)=>{const i=t.target,s=i.value;if(i.value=s.charAt(s.length>1?1:0),!s)return;this.code[e]=i.value;const o=this.inputRefs[e+1];o&&o.focus(),this.setValidity(),this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name="",this.displayName="",this.placeholder="",this.validation=void 0,this.tooltip="",this.language="en",this.emitValue=!0,this.destination="",this.resendIntervalSeconds=60,this.clientStyling="",this.limitStylingAppends=!1,this.isValid=!1,this.isResendButtonAvailable=!0,this.showTooltip=!1,this.errorMessage="",this.code=[],this.resendIntervalSecondsLeft=this.resendIntervalSeconds}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.code.join("")})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.code.join("")})}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)}connectedCallback(){this.validationPattern=this.setPattern(),this.code=new Array(this.validation.maxLength).fill("")}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.setValidity()}handleKeyDown(t,e){if("Backspace"===t.key){this.code[e]="",this.inputRefs[e]&&(this.inputRefs[e].value="");const t=this.inputRefs[e-1];t&&(null==t||t.focus())}this.setValidity(),this.setErrorMessage()}handlePaste(t){var e;t.preventDefault();const i=null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text").trim();if(!i)return;const s=i.slice(0,this.validation.maxLength).split("");this.code=[...s,...new Array(this.validation.maxLength-s.length).fill("")],s.forEach(((t,e)=>{this.inputRefs[e].value=t}));const o=this.inputRefs[Math.min(s.length,this.inputRefs.length-1)];o&&o.focus(),this.setValidity(),this.setErrorMessage()}setValidity(){const t=this.code.join(""),e=t.length===this.validation.maxLength,i=null!==t.match(this.validationPattern);this.isValid=e&&i}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;if(null!==this.code.join("").match(this.validationPattern))this.errorMessage="";else{const e=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey;e&&(this.errorMessage=n(e,this.language))}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"97c1955fececc6f3998375f4c8176ceaed66856a",class:"twofa"},i("div",{key:"ee2243931d8e5c6a5aadf1e78d1851449806d2b2",class:"twofa__error-message"},i("p",{key:"20a8ccad2e6501c73e3672f6ae325f8539e2d21a"},this.errorMessage)),i("div",{key:"bb33610a8be04b86378026c02099620749b81a4b",class:"twofa__description",innerHTML:n("twofaDescription",this.language,{values:{destination:this.destination}})}),i("div",{key:"af3ea38ed6468eb2de66aed810ba50a850bf21a9",class:"twofa__input-wrapper",ref:this.setContainerRef},this.code.map(((t,e)=>i("input",{key:e,ref:t=>this.setInputRef(t,e),id:`otp-input-${e}`,type:"text",maxLength:2,value:t,onInput:t=>this.handleInput(t,e),onKeyDown:t=>this.handleKeyDown(t,e),onPaste:t=>this.handlePaste(t)})))),i("div",{key:"f385bd6dc93896d918a5cc1365b59bedd47d5bb0",class:"twofa__button-wrapper"},i("p",{key:"3623f0391e0e5923cd6b3bfd74d203905486209f",class:"twofa__resend-message"},n("twofaResendMessage",this.language)),i("button",{key:"497660604f87dbf4ce1ce51ecd041e82ab5dd33a",class:"twofa__resend-button",onClick:this.resendCodeHandler,disabled:!this.isResendButtonAvailable},this.isResendButtonAvailable?n("twofaResendButton",this.language):this.formatTime())))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};$p.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.twofa{display:flex;flex-direction:column;gap:10px}.twofa__description{display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center}.twofa__error-message{text-align:center;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.twofa__input-wrapper{display:flex;justify-content:center}.twofa__input-wrapper input{width:35px;height:35px;padding:10px;text-align:center;border-radius:var(--emw--border-radius-small, 5px);margin-left:5px;margin-right:5px;border:2px solid var(--emw--otp-border-color, #55525c);font-weight:var(--emw-font-weight-bold, 800);outline:none;transition:all 0.1s}.twofa__input-wrapper input:focus{border:2px solid var(--emw--color-primary, #22B04E);box-shadow:0 0 2px 2px var(--emw--color-primary, #22B04E)}.twofa__button-wrapper{justify-content:center;text-align:center}.twofa__button-wrapper button{border:none;background:none;font-weight:var(--emw-font-weight-bold, 800);color:var(--emw--color-primary, #22B04E);cursor:pointer}";export{l as checkbox_group_input,h as checkbox_input,Ke as date_input,Qe as email_input,Fp as general_input,Np as number_input,Bp as password_input,Vp as radio_input,jp as select_input,Lp as tel_input,qp as text_input,Rp as toggle_checkbox_input,$p as twofa_input}
|