@everymatrix/player-account-controller 1.88.13 → 1.88.15
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/components/{GeneralLogout-DohdTvnB.js → GeneralLogout-CbpSYjc4.js} +1 -1
- package/components/{GeneralLogout-B22hYfkm.cjs → GeneralLogout-DLhgTJlp.cjs} +1 -1
- package/components/{GeneralLogout--AsEuYTN.js → GeneralLogout-DYk7zg5E.js} +1 -1
- package/components/{PlayerAccountBettingHistory-Dv2g1yEF.js → PlayerAccountBettingHistory-BCPCo2J1.js} +1 -1
- package/components/{PlayerAccountBettingHistory-kFtr-0qw.js → PlayerAccountBettingHistory-ClgE2kZP.js} +1 -1
- package/components/{PlayerAccountBettingHistory-ColdLmi9.cjs → PlayerAccountBettingHistory-oyMmu5B-.cjs} +1 -1
- package/components/{PlayerAccountBiometrics-DSX1OO2x.js → PlayerAccountBiometrics-3ozR2su6.js} +2 -2
- package/components/{PlayerAccountBiometrics-BqG6I_De.js → PlayerAccountBiometrics-BrFKp3nU.js} +2 -2
- package/components/{PlayerAccountBiometrics-CZRX6A31.cjs → PlayerAccountBiometrics-ON-VvjjF.cjs} +1 -1
- package/components/{PlayerAccountBiometricsAction-BC50P4qd.js → PlayerAccountBiometricsAction-4LcbhJFB.js} +1 -1
- package/components/{PlayerAccountBiometricsAction-DKiSBVrw.js → PlayerAccountBiometricsAction-BMkPzBdS.js} +1 -1
- package/components/{PlayerAccountBiometricsAction-BjphsoZB.cjs → PlayerAccountBiometricsAction-pLwdDB00.cjs} +1 -1
- package/components/{PlayerAccountClosure-BmAK29Ad.js → PlayerAccountClosure-BHUpz3WZ.js} +1 -1
- package/components/{PlayerAccountClosure-BNbNkqGO.js → PlayerAccountClosure-BXMgg1Uj.js} +1 -1
- package/components/{PlayerAccountClosure-B10I-u66.cjs → PlayerAccountClosure-CsPg8qzV.cjs} +1 -1
- package/components/{PlayerAccountController-BG1Iaz1o.js → PlayerAccountController-BFN0kyo8.js} +24 -24
- package/components/{PlayerAccountController-B8ZGkfNT.js → PlayerAccountController-BksazbG4.js} +24 -24
- package/components/{PlayerAccountController-Db8LzVzu.cjs → PlayerAccountController-CVKhXL9-.cjs} +2 -2
- package/components/{PlayerAccountGamingLimits-CQLp3OIS.js → PlayerAccountGamingLimits-B2yKlI5D.js} +2 -2
- package/components/{PlayerAccountGamingLimits-_cVdGK1I.js → PlayerAccountGamingLimits-COAixXSx.js} +2 -2
- package/components/{PlayerAccountGamingLimits-Br6E09Yw.cjs → PlayerAccountGamingLimits-DOAkdsVa.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsConfirmationModal-B1tkNNLh.cjs → PlayerAccountGamingLimitsConfirmationModal-BowXKUtp.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsConfirmationModal-DOuBtWYo.js → PlayerAccountGamingLimitsConfirmationModal-CmEIIMz6.js} +1 -1
- package/components/{PlayerAccountGamingLimitsConfirmationModal-C49nhwH2.js → PlayerAccountGamingLimitsConfirmationModal-Xzhw8yOQ.js} +1 -1
- package/components/{PlayerAccountGamingLimitsGroupEdit-BB103lWP.js → PlayerAccountGamingLimitsGroupEdit-DhDjt5zM.js} +5 -5
- package/components/{PlayerAccountGamingLimitsGroupEdit-B_NdfHks.js → PlayerAccountGamingLimitsGroupEdit-Httzqk1a.js} +5 -5
- package/components/{PlayerAccountGamingLimitsGroupEdit-DwQCentc.cjs → PlayerAccountGamingLimitsGroupEdit-fKmbPZhi.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsHistory2-BfwEjPrl.js → PlayerAccountGamingLimitsHistory2-CVzKujO5.js} +1 -1
- package/components/{PlayerAccountGamingLimitsHistory2-CVrBwrym.js → PlayerAccountGamingLimitsHistory2-CbcEg95T.js} +1 -1
- package/components/{PlayerAccountGamingLimitsHistory2-DrTolBWj.cjs → PlayerAccountGamingLimitsHistory2-DoETcErZ.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsInfoCard-BrbxlUTD.cjs → PlayerAccountGamingLimitsInfoCard-De-8L4_F.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsInfoCard-rvMDc2P0.js → PlayerAccountGamingLimitsInfoCard-DwMMe7h1.js} +4 -4
- package/components/{PlayerAccountGamingLimitsInfoCard-DaDdAppF.js → PlayerAccountGamingLimitsInfoCard-ju6bQWwS.js} +4 -4
- package/components/{PlayerAccountGamingLimitsPage2Gm16-RYPUQ8_y.js → PlayerAccountGamingLimitsPage2Gm16-DVbWI-DZ.js} +1 -1
- package/components/{PlayerAccountGamingLimitsPage2Gm16-Chz1QH1U.js → PlayerAccountGamingLimitsPage2Gm16-DZd-mzr8.js} +1 -1
- package/components/{PlayerAccountGamingLimitsPage2Gm16-Dmux5Voq.cjs → PlayerAccountGamingLimitsPage2Gm16-D_Oy_k9p.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsPopup-C6z39Gaw.js → PlayerAccountGamingLimitsPopup-CofiPTxO.js} +1 -1
- package/components/{PlayerAccountGamingLimitsPopup-BVQTEfRk.js → PlayerAccountGamingLimitsPopup-a1QRvil9.js} +1 -1
- package/components/{PlayerAccountGamingLimitsPopup-DE2CE-7n.cjs → PlayerAccountGamingLimitsPopup-faLC9TR7.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsWrapper2-pDoDhETn.js → PlayerAccountGamingLimitsWrapper2-B2ucztOT.js} +3 -3
- package/components/{PlayerAccountGamingLimitsWrapper2-CJxIxKex.cjs → PlayerAccountGamingLimitsWrapper2-BXreTyp7.cjs} +1 -1
- package/components/{PlayerAccountGamingLimitsWrapper2-CLTckJkA.js → PlayerAccountGamingLimitsWrapper2-Df6vsR-t.js} +3 -3
- package/components/{PlayerAccountGeneralConfirmationModal-CDvogjRn.cjs → PlayerAccountGeneralConfirmationModal-BSN55_yV.cjs} +1 -1
- package/components/{PlayerAccountGeneralConfirmationModal-CRMLpKr_.js → PlayerAccountGeneralConfirmationModal-Bvj9WTg8.js} +1 -1
- package/components/{PlayerAccountGeneralConfirmationModal-dlFpykpk.js → PlayerAccountGeneralConfirmationModal-CyZwdqhH.js} +1 -1
- package/components/{PlayerAccountMenu-C7WVCv57.cjs → PlayerAccountMenu-BJkiTAWE.cjs} +1 -1
- package/components/{PlayerAccountMenu-XyqNOLqq.js → PlayerAccountMenu-CjhNpxm1.js} +2 -2
- package/components/{PlayerAccountMenu-Cp9atAIS.js → PlayerAccountMenu-D94HnFsv.js} +2 -2
- package/components/{PlayerAccountModal-DWF5oIi6.js → PlayerAccountModal-BhYxs0J_.js} +1 -1
- package/components/{PlayerAccountModal-CaRN_fC1.cjs → PlayerAccountModal-D5FzkEAN.cjs} +1 -1
- package/components/{PlayerAccountModal-vsVV7nLv.js → PlayerAccountModal-WeulhqYg.js} +1 -1
- package/components/{PlayerAccountNotifications-BpL2TwI7.js → PlayerAccountNotifications-B_EgSCxT.js} +1 -1
- package/components/{PlayerAccountNotifications-CWMVve3C.cjs → PlayerAccountNotifications-Bi9zwnaY.cjs} +1 -1
- package/components/{PlayerAccountNotifications-LchexivI.js → PlayerAccountNotifications-LiX8IjFT.js} +1 -1
- package/components/{PlayerAccountProductRestriction-DlF4xrtx.cjs → PlayerAccountProductRestriction-BCMZCDZU.cjs} +1 -1
- package/components/{PlayerAccountProductRestriction-B6zc1ji3.js → PlayerAccountProductRestriction-CFUBOq9g.js} +3 -3
- package/components/{PlayerAccountProductRestriction-Ce32dP-B.js → PlayerAccountProductRestriction-H_C8A6Tm.js} +3 -3
- package/components/{PlayerAccountReviewFrequency-Cqhzsz9_.cjs → PlayerAccountReviewFrequency-C4jMJeCs.cjs} +1 -1
- package/components/{PlayerAccountReviewFrequency-SDMdG3LF.js → PlayerAccountReviewFrequency-C7sIafuV.js} +1 -1
- package/components/{PlayerAccountReviewFrequency-CUjwONdK.js → PlayerAccountReviewFrequency-_cGXXJRN.js} +1 -1
- package/components/{PlayerAccountSelfExclusion-C9YHmEeS.js → PlayerAccountSelfExclusion-C2fXa5KA.js} +2 -2
- package/components/{PlayerAccountSelfExclusion-Bio_Jj_w.js → PlayerAccountSelfExclusion-CK8-IH6m.js} +2 -2
- package/components/{PlayerAccountSelfExclusion-DADfB-fj.cjs → PlayerAccountSelfExclusion-COQXAVoD.cjs} +1 -1
- package/components/{PlayerAccountTimeout-Dzi7SXyx.cjs → PlayerAccountTimeout-6JGF2kMG.cjs} +2 -2
- package/components/{PlayerAccountTimeout-CdJcWPoY.js → PlayerAccountTimeout-BaS8VvW5.js} +3 -3
- package/components/{PlayerAccountTimeout-D0k-yAzk.js → PlayerAccountTimeout-CQevTzMy.js} +3 -3
- package/components/{PlayerAccountTransactionsHistory-BwgJsAj9.js → PlayerAccountTransactionsHistory-B_7OoCXV.js} +4 -4
- package/components/{PlayerAccountTransactionsHistory-_CTZLOnQ.js → PlayerAccountTransactionsHistory-CENqTl6O.js} +4 -4
- package/components/{PlayerAccountTransactionsHistory-BnKz1BjO.cjs → PlayerAccountTransactionsHistory-CJ93EkXk.cjs} +1 -1
- package/components/{PlayerActiveBonuses-CDv2Y2LE.js → PlayerActiveBonuses-BgK6GQpf.js} +2 -2
- package/components/{PlayerActiveBonuses-KHRTFJdZ.cjs → PlayerActiveBonuses-CSHcsHhB.cjs} +1 -1
- package/components/{PlayerActiveBonuses-DLlpYcDM.js → PlayerActiveBonuses-DVwOLZTI.js} +2 -2
- package/components/{PlayerBonusCard-Dq1Plngo.js → PlayerBonusCard-0ek7gT4e.js} +2 -2
- package/components/{PlayerBonusCard-zLbw-zMe.js → PlayerBonusCard-B7NJ3uHS.js} +2 -2
- package/components/{PlayerBonusCard-B4QYqh9i.cjs → PlayerBonusCard-CwoSa__a.cjs} +1 -1
- package/components/{PlayerBonusHistory-DF9L-vis.js → PlayerBonusHistory-B6PxcL63.js} +2 -2
- package/components/{PlayerBonusHistory-B_I-7bsl.cjs → PlayerBonusHistory-CU-ycC8z.cjs} +1 -1
- package/components/{PlayerBonusHistory-HXot3N-c.js → PlayerBonusHistory-DREgq4BV.js} +2 -2
- package/components/{PlayerChangePassword-1N4a6fl6.cjs → PlayerChangePassword-B7mQZpA8.cjs} +1 -1
- package/components/{PlayerChangePassword-COGiHToa.js → PlayerChangePassword-DgPVCgkv.js} +1 -1
- package/components/{PlayerChangePassword-DrSwPT7Q.js → PlayerChangePassword-Dqxj7126.js} +1 -1
- package/components/{PlayerDeposit-BM7_MPKA.js → PlayerDeposit-BUBUM7Vx.js} +1 -1
- package/components/{PlayerDeposit-B0hpMUQZ.cjs → PlayerDeposit-BrMHhDuQ.cjs} +1 -1
- package/components/{PlayerDeposit-DjzJUD74.js → PlayerDeposit-D1OkH9OC.js} +1 -1
- package/components/{PlayerGamingHistory-gQit4MNT.js → PlayerGamingHistory-BRhUZZ0E.js} +3 -3
- package/components/{PlayerGamingHistory-BOLTtbud.js → PlayerGamingHistory-DV6NKwNx.js} +3 -3
- package/components/{PlayerGamingHistory-DdVZ6L4J.cjs → PlayerGamingHistory-FHiEvnjD.cjs} +1 -1
- package/components/{PlayerPendingWithdrawals-LkE0SA9R.cjs → PlayerPendingWithdrawals-BpOdaer2.cjs} +1 -1
- package/components/{PlayerPendingWithdrawals-DrhU9QS9.js → PlayerPendingWithdrawals-BvvwlNFQ.js} +1 -1
- package/components/{PlayerPendingWithdrawals-C-Q14tr9.js → PlayerPendingWithdrawals-CtLpKbx-.js} +1 -1
- package/components/{PlayerProfileInfo-CYKqe3YQ.js → PlayerProfileInfo-D2HnLjM2.js} +2 -2
- package/components/{PlayerProfileInfo-yEn6gwAE.js → PlayerProfileInfo-D7wSvmQ3.js} +2 -2
- package/components/{PlayerProfileInfo-D6-lFO8R.cjs → PlayerProfileInfo-IlDil_rA.cjs} +2 -2
- package/components/{PlayerRealityCheck-DkqG3WZx.cjs → PlayerRealityCheck-D2rYBKYn.cjs} +1 -1
- package/components/{PlayerRealityCheck-IWcnNnUV.js → PlayerRealityCheck-D_HoLb3t.js} +1 -1
- package/components/{PlayerRealityCheck-DeZnELVa.js → PlayerRealityCheck-Dy8HGS9C.js} +1 -1
- package/components/{PlayerTransactionHistory-DbiCqA7B.js → PlayerTransactionHistory-BnwWFzJg.js} +1 -1
- package/components/{PlayerTransactionHistory-ChOF7V_m.cjs → PlayerTransactionHistory-CMWixeh4.cjs} +1 -1
- package/components/{PlayerTransactionHistory-Bnm2QFlP.js → PlayerTransactionHistory-Cdc8BjRK.js} +1 -1
- package/components/{PlayerWithdrawal-QfO2NMT3.js → PlayerWithdrawal-DEnEOaYn.js} +1 -1
- package/components/{PlayerWithdrawal-DROc3Y6I.js → PlayerWithdrawal-HJm-RvPt.js} +1 -1
- package/components/{PlayerWithdrawal-6Bo9llYK.cjs → PlayerWithdrawal-lnhZEyVc.cjs} +1 -1
- package/es2015/player-account-controller.cjs +1 -1
- package/es2015/player-account-controller.js +1 -1
- package/esnext/player-account-controller.js +1 -1
- package/package.json +1 -1
- package/stencil/{checkbox-group-input_16-Cr-8Deok.js → checkbox-group-input_16-BRWhf2kd.js} +444 -417
- package/stencil/{checkbox-group-input_16-B5krEBar.cjs → checkbox-group-input_16-CVisNOsA.cjs} +65 -65
- package/stencil/{checkbox-group-input_16-DYsXmYiw.js → checkbox-group-input_16-DERCYTuD.js} +444 -417
- package/stencil/{index-9c0f6c58-CGnN9UdB.js → index-9c0f6c58-D7TwZQBD.js} +1 -1
- package/stencil/{index-9c0f6c58-CWbWCRYV.js → index-9c0f6c58-DLtRG1IG.js} +1 -1
- package/stencil/{index-9c0f6c58-DmNyK26v.cjs → index-9c0f6c58-OZ3FNbU1.cjs} +1 -1
- package/stencil/{index-c666b6e6-TJNoh3po.js → index-c666b6e6-0o4yiNRv.js} +1 -1
- package/stencil/{index-c666b6e6-BcuDjnrv.cjs → index-c666b6e6-70EcL6Jm.cjs} +1 -1
- package/stencil/{index-c666b6e6-BTlMMlQk.js → index-c666b6e6-ACBx6wFh.js} +1 -1
- package/stencil/{pam-change-password-121f4e26-CYSMgND6.js → pam-change-password-121f4e26-Cb4GZR5d.js} +1 -1
- package/stencil/{pam-change-password-121f4e26-BjrDTiWY.js → pam-change-password-121f4e26-CtSw3Qan.js} +1 -1
- package/stencil/{pam-change-password-121f4e26-Dfjmvzbv.cjs → pam-change-password-121f4e26-Dot95D3Z.cjs} +1 -1
- package/stencil/{pam-change-password-Bj2I29y7.js → pam-change-password-9sqObKZ8.js} +1 -1
- package/stencil/{pam-change-password-D6zP6teo.cjs → pam-change-password-CN_oqF9U.cjs} +1 -1
- package/stencil/{pam-change-password-DceySfCL.js → pam-change-password-CwxYjnD7.js} +1 -1
- package/stencil/{player-kyc-verification-CgfRuE57.cjs → player-kyc-verification-DV7KHNHP.cjs} +2 -2
- package/stencil/{player-kyc-verification-BPMSQ7ct.js → player-kyc-verification-Dzul5VDy.js} +91 -27
- package/stencil/{player-kyc-verification-DQ9aChj3.js → player-kyc-verification-Jx0eG0Dz.js} +100 -36
package/stencil/{checkbox-group-input_16-B5krEBar.cjs → checkbox-group-input_16-CVisNOsA.cjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-c666b6e6-BcuDjnrv.cjs"),Ws=require("./pam-change-password-121f4e26-Dfjmvzbv.cjs"),Ys="en",xe={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}",fixedLengthError:"The length should be {length} characters",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",MustIncludeLowercase:"Password must include one lowercase character",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",enterIEAddressManually:"For IRE, enter the address manually",postalLookUpNoAddressFound:"No addresses found for this postal code",searchingForAddresses:"Searching for addresses...",SAIdLengthError:"SA ID must be 13 digits",SAIdInvalidError:"Invalid SA ID",PassportLengthError:"Passport number must be 8 or 9 digits.",PasswordMustContain:"Password must contain:",AlphanumericalOnly:"Only alphanumerical characters are allowed"},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",fixedLengthError:"A hossznak {length} karakternek 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",MustIncludeLowercase:"A jelszónak legalább egy kisbetűt kell tartalmaznia",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",PassportLengthError:"Az útlevélszámnak 9 számjegyűnek kell lennie",SAIdLengthError:"A dél-afrikai személyi számnak 13 számjegyűnek kell lennie",SAIdInvalidError:"Érvénytelen dél-afrikai személyi szám",PasswordMustContain:"A jelszónak tartalmaznia kell:",AlphanumericalOnly:"Csak alfanumerikus karakterek engedélyezettek"},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}",fixedLengthError:"Duljina mora biti {length} znakova",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",MustIncludeLowercase:"Lozinka mora sadržavati barem jedno malo slovo",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",PassportLengthError:"Broj putovnice mora imati 9 znamenki",SAIdLengthError:"Južnoafrički osobni broj mora imati 13 znamenki",SAIdInvalidError:"Nevažeći južnoafrički osobni broj",PasswordMustContain:"Lozinka mora sadržavati:",AlphanumericalOnly:"Dopušteni su samo alfanumerički znakovi"},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",fixedLengthError:"Uzunluk {length} karakter 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",MustIncludeLowercase:"Şifre en az bir küçük harf 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",PassportLengthError:"Pasaport numarası 9 haneli olmalıdır",SAIdLengthError:"Güney Afrika kimlik numarası 13 haneli olmalıdır",SAIdInvalidError:"Geçersiz Güney Afrika kimlik numarası",PasswordMustContain:"Şifre şunları içermelidir:",AlphanumericalOnly:"Yalnızca alfanümerik karakterlere izin verilir"},"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}",fixedLengthError:"O comprimento deve ser de {length} caracteres",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",MustIncludeLowercase:"A senha deve conter pelo menos uma letra minúscula",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",PassportLengthError:"O número do passaporte deve ter 9 dígitos",SAIdLengthError:"O número de identificação da África do Sul deve ter 13 dígitos",SAIdInvalidError:"Número de identificação da África do Sul inválido",PasswordMustContain:"A senha deve conter:",AlphanumericalOnly:"Apenas caracteres alfanuméricos são permitidos"},pt:{dateError:"A data selecionada deve estar entre {min} e {max}",dateError2:"A data selecionada não está dentro do intervalo aceite",dateFormatError:"A data selecionada tem 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 da palavra-passe inicial não cumpre todos os critérios.",invalidPassword:"A palavra-passe não cumpre todos os critérios",passwordStrength:"Força da palavra-passe",passwordStrengthWeak:"não é adequada",passwordStrengthStrong:"é adequada",SpecialCharactersNotAllowed:"Não deve conter caracteres especiais",InvalidEmailFormat:"Formato de email inválido.",EmailNotMatching:"Os emails não coincidem!",PasswordNotMatching:"As palavras-passe não coincidem",MustIncludeNumber:"A palavra-passe deve incluir um número",MustContainCapital:"A palavra-passe deve incluir uma letra maiúscula",MustIncludePunctation:"A palavra-passe deve incluir pontuação",MustIncludeLowercase:"A palavra-passe deve incluir um caractere minúsculo",OnlyNumbers:"O campo deve conter apenas dígitos.",InvalidFieldSize:"O comprimento deve ser exatamente 11 dígitos.",InvalidDocumentNumber:"Apenas caracteres numéricos são permitidos.",twofaDescription:"<p> Enviámos o código de verificação para <p> {destination}. </p> </p> <p> Por favor, introduza o PIN abaixo. </p>",twofaResendMessage:"Não recebeu o código de verificação?",twofaResendButton:"Reenviar",enterIEAddressManually:"Para IRE, introduza o endereço manualmente",postalLookUpNoAddressFound:"Não foram encontrados endereços para este código postal",searchingForAddresses:"A procurar endereços...",SAIdLengthError:"O ID da África do Sul deve ter 13 dígitos",SAIdInvalidError:"ID da África do Sul inválido",PassportLengthError:"O número de passaporte deve ter 8 ou 9 dígitos.",PasswordMustContain:"A palavra-passe deve conter:",AlphanumericalOnly:"Apenas caracteres alfanuméricos são permitidos"},"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}",fixedLengthError:"La longitud debe ser de {length} caracteres",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",MustIncludeLowercase:"La contraseña debe contener al menos una letra minúscula",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",PassportLengthError:"El número de pasaporte debe tener 9 dígitos",SAIdLengthError:"El número de identificación de Sudáfrica debe tener 13 dígitos",SAIdInvalidError:"Número de identificación de Sudáfrica inválido",PasswordMustContain:"La contraseña debe contener:",AlphanumericalOnly:"Solo se permiten caracteres alfanuméricos"},fr:{dateError:"La date sélectionnée doit être comprise entre {min} et {max}",dateError2:"La date sélectionnée n’est pas dans la plage autorisée",dateFormatError:"Le format de la date sélectionnée est incorrect.",numberLengthError:"Le nombre doit être compris entre {min} et {max}",lengthError:"La longueur doit être comprise entre {minLength} et {maxLength}",fixedLengthError:"La longueur doit être de {length} caractères",requiredError:"Ce champ est obligatoire.",invalidOriginalPasswordError:"Le mot de passe initial ne respecte pas tous les critères.",invalidPassword:"Le mot de passe ne respecte pas tous les critères",passwordStrength:"Robustesse du mot de passe",passwordStrengthWeak:"est insuffisante",passwordStrengthStrong:"est suffisante",SpecialCharactersNotAllowed:"Ne doit pas contenir de caractères spéciaux",InvalidEmailFormat:"Format d’adresse e-mail invalide.",EmailNotMatching:"Les adresses e-mail ne correspondent pas !",PasswordNotMatching:"Les mots de passe ne correspondent pas",MustIncludeNumber:"Le mot de passe doit contenir un chiffre",MustContainCapital:"Le mot de passe doit contenir une lettre majuscule",MustIncludePunctation:"Le mot de passe doit contenir un caractère de ponctuation",MustIncludeLowercase:"Le mot de passe doit contenir une lettre minuscule",OnlyNumbers:"Ce champ ne doit contenir que des chiffres.",InvalidFieldSize:"La longueur doit être exactement de 11 chiffres.",InvalidDocumentNumber:"Seuls les caractères numériques sont autorisés.",twofaDescription:"<p>Nous avons envoyé le code de vérification à <p>{destination}</p>.</p><p>Veuillez saisir le code PIN ci-dessous.</p>",twofaResendMessage:"Vous n’avez pas reçu le code de vérification ?",twofaResendButton:"Renvoyer",enterIEAddressManually:"Pour l’Irlande, saisissez l’adresse manuellement",postalLookUpNoAddressFound:"Aucune adresse trouvée pour ce code postal",searchingForAddresses:"Recherche d’adresses...",SAIdLengthError:"L’identifiant sud-africain doit comporter 13 chiffres",SAIdInvalidError:"Identifiant sud-africain invalide",PassportLengthError:"Le numéro de passeport doit comporter 8 ou 9 chiffres.",PasswordMustContain:"Le mot de passe doit contenir :",AlphanumericalOnly:"Seuls les caractères alphanumériques sont autorisés"}},X={DOCUMENT_NUMBER:"DocumentNumber",FIRSTNAME_ON_DOCUMENT:"FirstnameOnDocument",LASTNAME_ON_DOCUMENT:"LastnameOnDocument",PASSPORT:"Passport",SOUTH_AFRICAN_ID:"SouthAfricanID",BIRTHDATE:"BirthDate",PASSPORT_NUMERIC_REGEX:/^\d{8,9}$/,SA_ID_BASIC_REGEX:/^\d{13}$/,SOUTH_AFRICAN_ID_LENGTH:13,NON_LETTERS_REGEX:/[^A-Za-z]/g,DATE_FORMAT:"yyyy-MM-dd",PASSWORD_COMPLEXITY_PASSED:"passed",PASSWORD_COMPLEXITY_FAILED:"failed"},$e={PASSPORT_INVALID:"PassportLengthError",SA_ID_LENGTH:"SAIdLengthError",SA_ID_INVALID:"SAIdInvalidError",REQUIRED:"requiredError",LENGTH:"lengthError",FIXED_LENGTH:"fixedLengthError"},fa={PASSED:"✓",FAILED:"✕"},b=(i,e,t)=>{const r=e;let a=xe[r]?xe[r][i]:xe[Ys][i];if(t!==void 0)for(const[o,n]of Object.entries(t.values)){const s=new RegExp(`{${o}}`,"g");a=a.replace(s,n)}return a},Gs=i=>new Promise(e=>{fetch(i).then(t=>t.json()).then(t=>{Object.keys(t).forEach(r=>{xe[r]=xe[r]||{};for(let a in t[r])typeof t[r][a]=="string"&&(xe[r]=xe[r]||{},xe[r][a]=t[r][a])}),e(!0)})}),Ks=i=>{if(!X.SA_ID_BASIC_REGEX.test(i))return!1;const e=i.split("").map(l=>parseInt(l,10));let t=0;for(let l=0;l<12;l+=2)t+=e[l];let r="";for(let l=1;l<12;l+=2)r+=e[l];const o=(parseInt(r,10)*2).toString().split("").reduce((l,d)=>l+parseInt(d,10),0);return(10-(t+o)%10)%10===e[12]},se="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==",Xs='*,*::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}',Qs=Xs,Eo=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.value=null,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce((i,e)=>(i[e.name]=this.selectedValues.includes(e.name),i),{}),this.emitValueHandler(!0)}validityStateHandler(i){this.sendValidityState.emit(i)}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(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(i=>i.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 b("requiredError",this.language)}renderTooltip(){return this.showTooltip?h.h("div",{class:`checkboxgroup__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}handleParentCheckbox(i){const e=i.target.checked;this.showCheckboxes=e,this.selectedValues=e?this.options.map(t=>t.name):[]}renderLabel(){return h.h("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},h.h("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return h.h("div",{key:"9985f4050655bc2233090f63abb0e22f2fe0b556",class:`checkboxgroup__wrapper ${this.name}__input`,ref:i=>this.stylingContainer=i},h.h("div",{key:"9922e45ae7ee74b137ffc8552b3d714b7e3b1f59",class:"checkboxgroup__wrapper--flex"},h.h("vaadin-checkbox",{key:"f18bae7c3ee6df76edcde75924eb1ad51a227443",class:"checkbox__input",checked:this.selectedValues.length===this.options.length||this.defaultValue==="true",indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:i=>this.handleParentCheckbox(i)},this.renderLabel()),this.tooltip&&h.h("img",{key:"3dc2ce07e4d5f8de7ed4707b5e140fb4752ca86b",class:"checkboxgroup__tooltip-icon",src:se,alt:"",ref:i=>this.tooltipIconReference=i,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),h.h("small",{key:"d55f25f75aa20007ff58cf45b6632517f49b6c00",class:"checkboxgroup__error-message"},this.errorMessage),this.showCheckboxes&&h.h("vaadin-checkbox-group",{key:"210c3cc2868a07a403494e04336c4f3091eea0e4",theme:"vertical",value:this.selectedValues,"on-value-changed":i=>{this.selectedValues=i.detail.value}},this.options.map(i=>h.h("vaadin-checkbox",{class:"checkbox__input",name:i.name,value:i.name,label:i.displayName}))))}get element(){return h.getElement(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};Eo.style=Qs;const Js='*,*::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{display:none}.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}.checkbox__label-text.mandatory::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}',Zs=Js,Io=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.value="",this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(i){this.sendValidityState.emit(i)}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(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(i){this.value=i.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 b("requiredError",this.language)}renderLabel(){var i;return h.h("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},h.h("div",{class:{"checkbox__label-text":!0,mandatory:(i=this.validation)===null||i===void 0?void 0:i.mandatory},innerHTML:this.displayName}))}renderTooltip(){return this.showTooltip?h.h("div",{class:`checkbox__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){return h.h("div",{key:"80ed581cec5bb009ea5ea009f11c6453fe24ef7b",class:`checkbox__wrapper ${this.name}__input`,ref:i=>this.stylingContainer=i},h.h("vaadin-checkbox",{key:"42d793f607af77435f629218f9bdac7736522bc3",class:"checkbox__input",required:this.validation.mandatory,checked:this.defaultValue==="true",onChange:i=>this.handleCheckbox(i),"error-message":!this.isValid&&this.errorMessage,ref:i=>this.vaadinCheckbox=i},this.renderLabel()),this.tooltip&&h.h("img",{key:"ce3870810ede8f3905fd8c07c0892ab0d909bab5",class:"checkboxgroup__tooltip-icon",src:se,alt:"",ref:i=>this.tooltipIconReference=i,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Io.style=Zs;function ge(i){"@babel/helpers - typeof";return ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(i)}function R(i,e){if(e.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+e.length+" present")}function el(i){return R(1,arguments),i instanceof Date||ge(i)==="object"&&Object.prototype.toString.call(i)==="[object Date]"}function U(i){R(1,arguments);var e=Object.prototype.toString.call(i);return i instanceof Date||ge(i)==="object"&&e==="[object Date]"?new Date(i.getTime()):typeof i=="number"||e==="[object Number]"?new Date(i):((typeof i=="string"||e==="[object String]")&&typeof console!="undefined"&&(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 So(i){if(R(1,arguments),!el(i)&&typeof i!="number")return!1;var e=U(i);return!isNaN(Number(e))}function ee(i){if(i===null||i===!0||i===!1)return NaN;var e=Number(i);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function tl(i,e){R(2,arguments);var t=U(i).getTime(),r=ee(e);return new Date(t+r)}function Ao(i,e){R(2,arguments);var t=ee(e);return tl(i,-t)}var il=864e5;function rl(i){R(1,arguments);var e=U(i),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),a=t-r;return Math.floor(a/il)+1}function Ke(i){R(1,arguments);var e=1,t=U(i),r=t.getUTCDay(),a=(r<e?7:0)+r-e;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function To(i){R(1,arguments);var e=U(i),t=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var a=Ke(r),o=new Date(0);o.setUTCFullYear(t,0,4),o.setUTCHours(0,0,0,0);var n=Ke(o);return e.getTime()>=a.getTime()?t+1:e.getTime()>=n.getTime()?t:t-1}function al(i){R(1,arguments);var e=To(i),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var r=Ke(t);return r}var ol=6048e5;function Po(i){R(1,arguments);var e=U(i),t=Ke(e).getTime()-al(e).getTime();return Math.round(t/ol)+1}var nl={};function et(){return nl}function Me(i,e){var t,r,a,o,n,s,l,d;R(1,arguments);var c=et(),u=ee((t=(r=(a=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(n=e.locale)===null||n===void 0||(s=n.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=U(i),m=p.getUTCDay(),y=(m<u?7:0)+m-u;return p.setUTCDate(p.getUTCDate()-y),p.setUTCHours(0,0,0,0),p}function wr(i,e){var t,r,a,o,n,s,l,d;R(1,arguments);var c=U(i),u=c.getUTCFullYear(),p=et(),m=ee((t=(r=(a=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(n=e.locale)===null||n===void 0||(s=n.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:p.firstWeekContainsDate)!==null&&r!==void 0?r:(l=p.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(u+1,0,m),y.setUTCHours(0,0,0,0);var N=Me(y,e),D=new Date(0);D.setUTCFullYear(u,0,m),D.setUTCHours(0,0,0,0);var O=Me(D,e);return c.getTime()>=N.getTime()?u+1:c.getTime()>=O.getTime()?u:u-1}function sl(i,e){var t,r,a,o,n,s,l,d;R(1,arguments);var c=et(),u=ee((t=(r=(a=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(n=e.locale)===null||n===void 0||(s=n.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1),p=wr(i,e),m=new Date(0);m.setUTCFullYear(p,0,u),m.setUTCHours(0,0,0,0);var y=Me(m,e);return y}var ll=6048e5;function Do(i,e){R(1,arguments);var t=U(i),r=Me(t,e).getTime()-sl(t,e).getTime();return Math.round(r/ll)+1}function V(i,e){for(var t=i<0?"-":"",r=Math.abs(i).toString();r.length<e;)r="0"+r;return t+r}var dl={y:function(e,t){var r=e.getUTCFullYear(),a=r>0?r:1-r;return V(t==="yy"?a%100:a,t.length)},M:function(e,t){var r=e.getUTCMonth();return t==="M"?String(r+1):V(r+1,2)},d:function(e,t){return V(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(e,t){return V(e.getUTCHours()%12||12,t.length)},H:function(e,t){return V(e.getUTCHours(),t.length)},m:function(e,t){return V(e.getUTCMinutes(),t.length)},s:function(e,t){return V(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,a=e.getUTCMilliseconds(),o=Math.floor(a*Math.pow(10,r-3));return V(o,t.length)}};const we=dl;var He={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},hl={G:function(e,t,r){var a=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(a,{width:"abbreviated"});case"GGGGG":return r.era(a,{width:"narrow"});case"GGGG":default:return r.era(a,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){var a=e.getUTCFullYear(),o=a>0?a:1-a;return r.ordinalNumber(o,{unit:"year"})}return we.y(e,t)},Y:function(e,t,r,a){var o=wr(e,a),n=o>0?o:1-o;if(t==="YY"){var s=n%100;return V(s,2)}return t==="Yo"?r.ordinalNumber(n,{unit:"year"}):V(n,t.length)},R:function(e,t){var r=To(e);return V(r,t.length)},u:function(e,t){var r=e.getUTCFullYear();return V(r,t.length)},Q:function(e,t,r){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return V(a,2);case"Qo":return r.ordinalNumber(a,{unit:"quarter"});case"QQQ":return r.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,r){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return V(a,2);case"qo":return r.ordinalNumber(a,{unit:"quarter"});case"qqq":return r.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,r){var a=e.getUTCMonth();switch(t){case"M":case"MM":return we.M(e,t);case"Mo":return r.ordinalNumber(a+1,{unit:"month"});case"MMM":return r.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,r){var a=e.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return V(a+1,2);case"Lo":return r.ordinalNumber(a+1,{unit:"month"});case"LLL":return r.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,r,a){var o=Do(e,a);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):V(o,t.length)},I:function(e,t,r){var a=Po(e);return t==="Io"?r.ordinalNumber(a,{unit:"week"}):V(a,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):we.d(e,t)},D:function(e,t,r){var a=rl(e);return t==="Do"?r.ordinalNumber(a,{unit:"dayOfYear"}):V(a,t.length)},E:function(e,t,r){var a=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(a,{width:"short",context:"formatting"});case"EEEE":default:return r.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,r,a){var o=e.getUTCDay(),n=(o-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(n);case"ee":return V(n,2);case"eo":return r.ordinalNumber(n,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,a){var o=e.getUTCDay(),n=(o-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(n);case"cc":return V(n,t.length);case"co":return r.ordinalNumber(n,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){var a=e.getUTCDay(),o=a===0?7:a;switch(t){case"i":return String(o);case"ii":return V(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(a,{width:"short",context:"formatting"});case"iiii":default:return r.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,r){var a=e.getUTCHours(),o=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){var a=e.getUTCHours(),o;switch(a===12?o=He.noon:a===0?o=He.midnight:o=a/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){var a=e.getUTCHours(),o;switch(a>=17?o=He.evening:a>=12?o=He.afternoon:a>=4?o=He.morning:o=He.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){var a=e.getUTCHours()%12;return a===0&&(a=12),r.ordinalNumber(a,{unit:"hour"})}return we.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):we.H(e,t)},K:function(e,t,r){var a=e.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(a,{unit:"hour"}):V(a,t.length)},k:function(e,t,r){var a=e.getUTCHours();return a===0&&(a=24),t==="ko"?r.ordinalNumber(a,{unit:"hour"}):V(a,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):we.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):we.s(e,t)},S:function(e,t){return we.S(e,t)},X:function(e,t,r,a){var o=a._originalDate||e,n=o.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return _a(n);case"XXXX":case"XX":return Te(n);case"XXXXX":case"XXX":default:return Te(n,":")}},x:function(e,t,r,a){var o=a._originalDate||e,n=o.getTimezoneOffset();switch(t){case"x":return _a(n);case"xxxx":case"xx":return Te(n);case"xxxxx":case"xxx":default:return Te(n,":")}},O:function(e,t,r,a){var o=a._originalDate||e,n=o.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+va(n,":");case"OOOO":default:return"GMT"+Te(n,":")}},z:function(e,t,r,a){var o=a._originalDate||e,n=o.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+va(n,":");case"zzzz":default:return"GMT"+Te(n,":")}},t:function(e,t,r,a){var o=a._originalDate||e,n=Math.floor(o.getTime()/1e3);return V(n,t.length)},T:function(e,t,r,a){var o=a._originalDate||e,n=o.getTime();return V(n,t.length)}};function va(i,e){var t=i>0?"-":"+",r=Math.abs(i),a=Math.floor(r/60),o=r%60;if(o===0)return t+String(a);var n=e;return t+String(a)+n+V(o,2)}function _a(i,e){if(i%60===0){var t=i>0?"-":"+";return t+V(Math.abs(i)/60,2)}return Te(i,e)}function Te(i,e){var t=e||"",r=i>0?"-":"+",a=Math.abs(i),o=V(Math.floor(a/60),2),n=V(a%60,2);return r+o+t+n}const cl=hl;var ga=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Oo=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ul=function(e,t){var r=e.match(/(P+)(p+)?/)||[],a=r[1],o=r[2];if(!o)return ga(e,t);var n;switch(a){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"});break}return n.replace("{{date}}",ga(a,t)).replace("{{time}}",Oo(o,t))},pl={p:Oo,P:ul};const Gi=pl;function Vo(i){var e=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return e.setUTCFullYear(i.getFullYear()),i.getTime()-e.getTime()}var ml=["D","DD"],fl=["YY","YYYY"];function Mo(i){return ml.indexOf(i)!==-1}function No(i){return fl.indexOf(i)!==-1}function ei(i,e,t){if(i==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vl={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"}},_l=function(e,t,r){var a,o=vl[e];return typeof o=="string"?a=o:t===1?a=o.one:a=o.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+a:a+" ago":a};const gl=_l;function Oi(i){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):i.defaultWidth,r=i.formats[t]||i.formats[i.defaultWidth];return r}}var bl={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yl={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wl={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xl={date:Oi({formats:bl,defaultWidth:"full"}),time:Oi({formats:yl,defaultWidth:"full"}),dateTime:Oi({formats:wl,defaultWidth:"full"})};const Cl=xl;var kl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},El=function(e,t,r,a){return kl[e]};const Il=El;function lt(i){return function(e,t){var r=t!=null&&t.context?String(t.context):"standalone",a;if(r==="formatting"&&i.formattingValues){var o=i.defaultFormattingWidth||i.defaultWidth,n=t!=null&&t.width?String(t.width):o;a=i.formattingValues[n]||i.formattingValues[o]}else{var s=i.defaultWidth,l=t!=null&&t.width?String(t.width):i.defaultWidth;a=i.values[l]||i.values[s]}var d=i.argumentCallback?i.argumentCallback(e):e;return a[d]}}var Sl={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Al={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Tl={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"]},Pl={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"]},Dl={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"}},Ol={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"}},Vl=function(e,t){var r=Number(e),a=r%100;if(a>20||a<10)switch(a%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ml={ordinalNumber:Vl,era:lt({values:Sl,defaultWidth:"wide"}),quarter:lt({values:Al,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:lt({values:Tl,defaultWidth:"wide"}),day:lt({values:Pl,defaultWidth:"wide"}),dayPeriod:lt({values:Dl,defaultWidth:"wide",formattingValues:Ol,defaultFormattingWidth:"wide"})};const Nl=Ml;function dt(i){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,a=r&&i.matchPatterns[r]||i.matchPatterns[i.defaultMatchWidth],o=e.match(a);if(!o)return null;var n=o[0],s=r&&i.parsePatterns[r]||i.parsePatterns[i.defaultParseWidth],l=Array.isArray(s)?zl(s,function(u){return u.test(n)}):Ll(s,function(u){return u.test(n)}),d;d=i.valueCallback?i.valueCallback(l):l,d=t.valueCallback?t.valueCallback(d):d;var c=e.slice(n.length);return{value:d,rest:c}}}function Ll(i,e){for(var t in i)if(i.hasOwnProperty(t)&&e(i[t]))return t}function zl(i,e){for(var t=0;t<i.length;t++)if(e(i[t]))return t}function Rl(i){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(i.matchPattern);if(!r)return null;var a=r[0],o=e.match(i.parsePattern);if(!o)return null;var n=i.valueCallback?i.valueCallback(o[0]):o[0];n=t.valueCallback?t.valueCallback(n):n;var s=e.slice(a.length);return{value:n,rest:s}}}var Fl=/^(\d+)(th|st|nd|rd)?/i,$l=/\d+/i,Hl={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},Bl={any:[/^b/i,/^(a|c)/i]},Ul={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ql={any:[/1/i,/2/i,/3/i,/4/i]},jl={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},Wl={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]},Yl={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},Gl={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]},Kl={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},Xl={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}},Ql={ordinalNumber:Rl({matchPattern:Fl,parsePattern:$l,valueCallback:function(e){return parseInt(e,10)}}),era:dt({matchPatterns:Hl,defaultMatchWidth:"wide",parsePatterns:Bl,defaultParseWidth:"any"}),quarter:dt({matchPatterns:Ul,defaultMatchWidth:"wide",parsePatterns:ql,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:dt({matchPatterns:jl,defaultMatchWidth:"wide",parsePatterns:Wl,defaultParseWidth:"any"}),day:dt({matchPatterns:Yl,defaultMatchWidth:"wide",parsePatterns:Gl,defaultParseWidth:"any"}),dayPeriod:dt({matchPatterns:Kl,defaultMatchWidth:"any",parsePatterns:Xl,defaultParseWidth:"any"})};const Jl=Ql;var Zl={code:"en-US",formatDistance:gl,formatLong:Cl,formatRelative:Il,localize:Nl,match:Jl,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Lo=Zl;var ed=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,td=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,id=/^'([^]*?)'?$/,rd=/''/g,ad=/[a-zA-Z]/;function ba(i,e,t){var r,a,o,n,s,l,d,c,u,p,m,y,N,D;R(2,arguments);var O=String(e),A=et(),q=(r=(a=void 0)!==null&&a!==void 0?a:A.locale)!==null&&r!==void 0?r:Lo,j=ee((o=(n=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:A.firstWeekContainsDate)!==null&&n!==void 0?n:(d=A.locale)===null||d===void 0||(c=d.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var le=ee((u=(p=(m=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&m!==void 0?m:A.weekStartsOn)!==null&&p!==void 0?p:(N=A.locale)===null||N===void 0||(D=N.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&u!==void 0?u:0);if(!(le>=0&&le<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!q.localize)throw new RangeError("locale must contain localize property");if(!q.formatLong)throw new RangeError("locale must contain formatLong property");var ye=U(i);if(!So(ye))throw new RangeError("Invalid time value");var at=Vo(ye),ot=Ao(ye,at),nt={firstWeekContainsDate:j,weekStartsOn:le,locale:q,_originalDate:ye},Ti=O.match(td).map(function(G){var te=G[0];if(te==="p"||te==="P"){var Se=Gi[te];return Se(G,q.formatLong)}return G}).join("").match(ed).map(function(G){if(G==="''")return"'";var te=G[0];if(te==="'")return od(G);var Se=cl[te];if(Se)return No(G)&&ei(G,e,String(i)),Mo(G)&&ei(G,e,String(i)),Se(ot,G,q.localize,nt);if(te.match(ad))throw new RangeError("Format string contains an unescaped latin alphabet character `"+te+"`");return G}).join("");return Ti}function od(i){var e=i.match(id);return e?e[1].replace(rd,"'"):i}function ya(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=Array(e);t<e;t++)r[t]=i[t];return r}function nd(i,e){if(i){if(typeof i=="string")return ya(i,e);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ya(i,e):void 0}}function wa(i,e){var t=typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(!t){if(Array.isArray(i)||(t=nd(i))||e){t&&(i=t);var r=0,a=function(){};return{s:a,n:function(){return r>=i.length?{done:!0}:{done:!1,value:i[r++]}},e:function(d){throw d},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,n=!0,s=!1;return{s:function(){t=t.call(i)},n:function(){var d=t.next();return n=d.done,d},e:function(d){s=!0,o=d},f:function(){try{n||t.return==null||t.return()}finally{if(s)throw o}}}}function sd(i,e){if(i==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i}function _(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ki(i,e){return Ki=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},Ki(i,e)}function I(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),e&&Ki(i,e)}function ti(i){return ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ti(i)}function zo(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zo=function(){return!!i})()}function ld(i,e){if(e&&(ge(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(i)}function S(i){var e=zo();return function(){var t,r=ti(i);if(e){var a=ti(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return ld(this,t)}}function x(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function dd(i,e){if(ge(i)!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var r=t.call(i,e);if(ge(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function Ro(i){var e=dd(i,"string");return ge(e)=="symbol"?e:e+""}function hd(i,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(i,Ro(r.key),r)}}function C(i,e,t){return e&&hd(i.prototype,e),Object.defineProperty(i,"prototype",{writable:!1}),i}function v(i,e,t){return(e=Ro(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}var cd=10,Fo=function(){function i(){x(this,i),v(this,"priority",void 0),v(this,"subPriority",0)}return C(i,[{key:"validate",value:function(t,r){return!0}}]),i}(),ud=function(i){I(t,i);var e=S(t);function t(r,a,o,n,s){var l;return x(this,t),l=e.call(this),l.value=r,l.validateValue=a,l.setValue=o,l.priority=n,s&&(l.subPriority=s),l}return C(t,[{key:"validate",value:function(a,o){return this.validateValue(a,this.value,o)}},{key:"set",value:function(a,o,n){return this.setValue(a,o,this.value,n)}}]),t}(Fo),pd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",cd),v(_(r),"subPriority",-1),r}return C(t,[{key:"set",value:function(a,o){if(o.timestampIsSet)return a;var n=new Date(0);return n.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),n.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),n}}]),t}(Fo),P=function(){function i(){x(this,i),v(this,"incompatibleTokens",void 0),v(this,"priority",void 0),v(this,"subPriority",void 0)}return C(i,[{key:"run",value:function(t,r,a,o){var n=this.parse(t,r,a,o);return n?{setter:new ud(n.value,this.validate,this.set,this.priority,this.subPriority),rest:n.rest}:null}},{key:"validate",value:function(t,r,a){return!0}}]),i}(),md=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",140),v(_(r),"incompatibleTokens",["R","u","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})||n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"})}}},{key:"set",value:function(a,o,n){return o.era=n,a.setUTCFullYear(n,0,1),a.setUTCHours(0,0,0,0),a}}]),t}(P),fd=6e4,vd=36e5,_d=1e3,$={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ce={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function H(i,e){return i&&{value:e(i.value),rest:i.rest}}function z(i,e){var t=e.match(i);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function ue(i,e){var t=e.match(i);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};var r=t[1]==="+"?1:-1,a=t[2]?parseInt(t[2],10):0,o=t[3]?parseInt(t[3],10):0,n=t[5]?parseInt(t[5],10):0;return{value:r*(a*vd+o*fd+n*_d),rest:e.slice(t[0].length)}}function $o(i){return z($.anyDigitsSigned,i)}function F(i,e){switch(i){case 1:return z($.singleDigit,e);case 2:return z($.twoDigits,e);case 3:return z($.threeDigits,e);case 4:return z($.fourDigits,e);default:return z(new RegExp("^\\d{1,"+i+"}"),e)}}function ii(i,e){switch(i){case 1:return z($.singleDigitSigned,e);case 2:return z($.twoDigitsSigned,e);case 3:return z($.threeDigitsSigned,e);case 4:return z($.fourDigitsSigned,e);default:return z(new RegExp("^-?\\d{1,"+i+"}"),e)}}function xr(i){switch(i){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ho(i,e){var t=e>0,r=t?e:1-e,a;if(r<=50)a=i||100;else{var o=r+50,n=Math.floor(o/100)*100,s=i>=o%100;a=i+n-(s?100:0)}return t?a:1-a}function Bo(i){return i%400===0||i%4===0&&i%100!==0}var gd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",130),v(_(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){var s=function(d){return{year:d,isTwoDigitYear:o==="yy"}};switch(o){case"y":return H(F(4,a),s);case"yo":return H(n.ordinalNumber(a,{unit:"year"}),s);default:return H(F(o.length,a),s)}}},{key:"validate",value:function(a,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(a,o,n){var s=a.getUTCFullYear();if(n.isTwoDigitYear){var l=Ho(n.year,s);return a.setUTCFullYear(l,0,1),a.setUTCHours(0,0,0,0),a}var d=!("era"in o)||o.era===1?n.year:1-n.year;return a.setUTCFullYear(d,0,1),a.setUTCHours(0,0,0,0),a}}]),t}(P),bd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",130),v(_(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){var s=function(d){return{year:d,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return H(F(4,a),s);case"Yo":return H(n.ordinalNumber(a,{unit:"year"}),s);default:return H(F(o.length,a),s)}}},{key:"validate",value:function(a,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(a,o,n,s){var l=wr(a,s);if(n.isTwoDigitYear){var d=Ho(n.year,l);return a.setUTCFullYear(d,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),Me(a,s)}var c=!("era"in o)||o.era===1?n.year:1-n.year;return a.setUTCFullYear(c,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),Me(a,s)}}]),t}(P),yd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",130),v(_(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o){return ii(o==="R"?4:o.length,a)}},{key:"set",value:function(a,o,n){var s=new Date(0);return s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0),Ke(s)}}]),t}(P),wd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",130),v(_(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o){return ii(o==="u"?4:o.length,a)}},{key:"set",value:function(a,o,n){return a.setUTCFullYear(n,0,1),a.setUTCHours(0,0,0,0),a}}]),t}(P),xd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",120),v(_(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"Q":case"QQ":return F(o.length,a);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})||n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,o){return o>=1&&o<=4}},{key:"set",value:function(a,o,n){return a.setUTCMonth((n-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),t}(P),Cd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",120),v(_(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"q":case"qq":return F(o.length,a);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})||n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(a,o){return o>=1&&o<=4}},{key:"set",value:function(a,o,n){return a.setUTCMonth((n-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),t}(P),kd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),v(_(r),"priority",110),r}return C(t,[{key:"parse",value:function(a,o,n){var s=function(d){return d-1};switch(o){case"M":return H(z($.month,a),s);case"MM":return H(F(2,a),s);case"Mo":return H(n.ordinalNumber(a,{unit:"month"}),s);case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})||n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,o){return o>=0&&o<=11}},{key:"set",value:function(a,o,n){return a.setUTCMonth(n,1),a.setUTCHours(0,0,0,0),a}}]),t}(P),Ed=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",110),v(_(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){var s=function(d){return d-1};switch(o){case"L":return H(z($.month,a),s);case"LL":return H(F(2,a),s);case"Lo":return H(n.ordinalNumber(a,{unit:"month"}),s);case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})||n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(a,o){return o>=0&&o<=11}},{key:"set",value:function(a,o,n){return a.setUTCMonth(n,1),a.setUTCHours(0,0,0,0),a}}]),t}(P);function Id(i,e,t){R(2,arguments);var r=U(i),a=ee(e),o=Do(r,t)-a;return r.setUTCDate(r.getUTCDate()-o*7),r}var Sd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",100),v(_(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"w":return z($.week,a);case"wo":return n.ordinalNumber(a,{unit:"week"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=1&&o<=53}},{key:"set",value:function(a,o,n,s){return Me(Id(a,n,s),s)}}]),t}(P);function Ad(i,e){R(2,arguments);var t=U(i),r=ee(e),a=Po(t)-r;return t.setUTCDate(t.getUTCDate()-a*7),t}var Td=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",100),v(_(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"I":return z($.week,a);case"Io":return n.ordinalNumber(a,{unit:"week"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=1&&o<=53}},{key:"set",value:function(a,o,n){return Ke(Ad(a,n))}}]),t}(P),Pd=[31,28,31,30,31,30,31,31,30,31,30,31],Dd=[31,29,31,30,31,30,31,31,30,31,30,31],Od=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",90),v(_(r),"subPriority",1),v(_(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"d":return z($.date,a);case"do":return n.ordinalNumber(a,{unit:"date"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){var n=a.getUTCFullYear(),s=Bo(n),l=a.getUTCMonth();return s?o>=1&&o<=Dd[l]:o>=1&&o<=Pd[l]}},{key:"set",value:function(a,o,n){return a.setUTCDate(n),a.setUTCHours(0,0,0,0),a}}]),t}(P),Vd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",90),v(_(r),"subpriority",1),v(_(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"D":case"DD":return z($.dayOfYear,a);case"Do":return n.ordinalNumber(a,{unit:"date"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){var n=a.getUTCFullYear(),s=Bo(n);return s?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(a,o,n){return a.setUTCMonth(0,n),a.setUTCHours(0,0,0,0),a}}]),t}(P);function Cr(i,e,t){var r,a,o,n,s,l,d,c;R(2,arguments);var u=et(),p=ee((r=(a=(o=(n=t==null?void 0:t.weekStartsOn)!==null&&n!==void 0?n:t==null||(s=t.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:u.weekStartsOn)!==null&&a!==void 0?a:(d=u.locale)===null||d===void 0||(c=d.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=U(i),y=ee(e),N=m.getUTCDay(),D=y%7,O=(D+7)%7,A=(O<p?7:0)+y-N;return m.setUTCDate(m.getUTCDate()+A),m}var Md=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",90),v(_(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,o){return o>=0&&o<=6}},{key:"set",value:function(a,o,n,s){return a=Cr(a,n,s),a.setUTCHours(0,0,0,0),a}}]),t}(P),Nd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",90),v(_(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n,s){var l=function(c){var u=Math.floor((c-1)/7)*7;return(c+s.weekStartsOn+6)%7+u};switch(o){case"e":case"ee":return H(F(o.length,a),l);case"eo":return H(n.ordinalNumber(a,{unit:"day"}),l);case"eee":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,o){return o>=0&&o<=6}},{key:"set",value:function(a,o,n,s){return a=Cr(a,n,s),a.setUTCHours(0,0,0,0),a}}]),t}(P),Ld=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",90),v(_(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n,s){var l=function(c){var u=Math.floor((c-1)/7)*7;return(c+s.weekStartsOn+6)%7+u};switch(o){case"c":case"cc":return H(F(o.length,a),l);case"co":return H(n.ordinalNumber(a,{unit:"day"}),l);case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})||n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(a,o){return o>=0&&o<=6}},{key:"set",value:function(a,o,n,s){return a=Cr(a,n,s),a.setUTCHours(0,0,0,0),a}}]),t}(P);function zd(i,e){R(2,arguments);var t=ee(e);t%7===0&&(t=t-7);var r=1,a=U(i),o=a.getUTCDay(),n=t%7,s=(n+7)%7,l=(s<r?7:0)+t-o;return a.setUTCDate(a.getUTCDate()+l),a}var Rd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",90),v(_(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){var s=function(d){return d===0?7:d};switch(o){case"i":case"ii":return F(o.length,a);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return H(n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),s);case"iiiii":return H(n.day(a,{width:"narrow",context:"formatting"}),s);case"iiiiii":return H(n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),s);case"iiii":default:return H(n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(a,o){return o>=1&&o<=7}},{key:"set",value:function(a,o,n){return a=zd(a,n),a.setUTCHours(0,0,0,0),a}}]),t}(P),Fd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",80),v(_(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"a":case"aa":case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(a,o,n){return a.setUTCHours(xr(n),0,0,0),a}}]),t}(P),$d=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",80),v(_(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"b":case"bb":case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(a,o,n){return a.setUTCHours(xr(n),0,0,0),a}}]),t}(P),Hd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",80),v(_(r),"incompatibleTokens",["a","b","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(a,o,n){return a.setUTCHours(xr(n),0,0,0),a}}]),t}(P),Bd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",70),v(_(r),"incompatibleTokens",["H","K","k","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"h":return z($.hour12h,a);case"ho":return n.ordinalNumber(a,{unit:"hour"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=1&&o<=12}},{key:"set",value:function(a,o,n){var s=a.getUTCHours()>=12;return s&&n<12?a.setUTCHours(n+12,0,0,0):!s&&n===12?a.setUTCHours(0,0,0,0):a.setUTCHours(n,0,0,0),a}}]),t}(P),Ud=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",70),v(_(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"H":return z($.hour23h,a);case"Ho":return n.ordinalNumber(a,{unit:"hour"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=0&&o<=23}},{key:"set",value:function(a,o,n){return a.setUTCHours(n,0,0,0),a}}]),t}(P),qd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",70),v(_(r),"incompatibleTokens",["h","H","k","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"K":return z($.hour11h,a);case"Ko":return n.ordinalNumber(a,{unit:"hour"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=0&&o<=11}},{key:"set",value:function(a,o,n){var s=a.getUTCHours()>=12;return s&&n<12?a.setUTCHours(n+12,0,0,0):a.setUTCHours(n,0,0,0),a}}]),t}(P),jd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",70),v(_(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"k":return z($.hour24h,a);case"ko":return n.ordinalNumber(a,{unit:"hour"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=1&&o<=24}},{key:"set",value:function(a,o,n){var s=n<=24?n%24:n;return a.setUTCHours(s,0,0,0),a}}]),t}(P),Wd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",60),v(_(r),"incompatibleTokens",["t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"m":return z($.minute,a);case"mo":return n.ordinalNumber(a,{unit:"minute"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=0&&o<=59}},{key:"set",value:function(a,o,n){return a.setUTCMinutes(n,0,0),a}}]),t}(P),Yd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",50),v(_(r),"incompatibleTokens",["t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"s":return z($.second,a);case"so":return n.ordinalNumber(a,{unit:"second"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=0&&o<=59}},{key:"set",value:function(a,o,n){return a.setUTCSeconds(n,0),a}}]),t}(P),Gd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",30),v(_(r),"incompatibleTokens",["t","T"]),r}return C(t,[{key:"parse",value:function(a,o){var n=function(l){return Math.floor(l*Math.pow(10,-o.length+3))};return H(F(o.length,a),n)}},{key:"set",value:function(a,o,n){return a.setUTCMilliseconds(n),a}}]),t}(P),Kd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",10),v(_(r),"incompatibleTokens",["t","T","x"]),r}return C(t,[{key:"parse",value:function(a,o){switch(o){case"X":return ue(ce.basicOptionalMinutes,a);case"XX":return ue(ce.basic,a);case"XXXX":return ue(ce.basicOptionalSeconds,a);case"XXXXX":return ue(ce.extendedOptionalSeconds,a);case"XXX":default:return ue(ce.extended,a)}}},{key:"set",value:function(a,o,n){return o.timestampIsSet?a:new Date(a.getTime()-n)}}]),t}(P),Xd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",10),v(_(r),"incompatibleTokens",["t","T","X"]),r}return C(t,[{key:"parse",value:function(a,o){switch(o){case"x":return ue(ce.basicOptionalMinutes,a);case"xx":return ue(ce.basic,a);case"xxxx":return ue(ce.basicOptionalSeconds,a);case"xxxxx":return ue(ce.extendedOptionalSeconds,a);case"xxx":default:return ue(ce.extended,a)}}},{key:"set",value:function(a,o,n){return o.timestampIsSet?a:new Date(a.getTime()-n)}}]),t}(P),Qd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",40),v(_(r),"incompatibleTokens","*"),r}return C(t,[{key:"parse",value:function(a){return $o(a)}},{key:"set",value:function(a,o,n){return[new Date(n*1e3),{timestampIsSet:!0}]}}]),t}(P),Jd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",20),v(_(r),"incompatibleTokens","*"),r}return C(t,[{key:"parse",value:function(a){return $o(a)}},{key:"set",value:function(a,o,n){return[new Date(n),{timestampIsSet:!0}]}}]),t}(P),Zd={G:new md,y:new gd,Y:new bd,R:new yd,u:new wd,Q:new xd,q:new Cd,M:new kd,L:new Ed,w:new Sd,I:new Td,d:new Od,D:new Vd,E:new Md,e:new Nd,c:new Ld,i:new Rd,a:new Fd,b:new $d,B:new Hd,h:new Bd,H:new Ud,K:new qd,k:new jd,m:new Wd,s:new Yd,S:new Gd,X:new Kd,x:new Xd,t:new Qd,T:new Jd},eh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,th=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ih=/^'([^]*?)'?$/,rh=/''/g,ah=/\S/,oh=/[a-zA-Z]/;function Pe(i,e,t,r){var a,o,n,s,l,d,c,u,p,m,y,N,D,O;R(3,arguments);var A=String(i),q=String(e),j=et(),le=(a=(o=void 0)!==null&&o!==void 0?o:j.locale)!==null&&a!==void 0?a:Lo;if(!le.match)throw new RangeError("locale must contain match property");var ye=ee((n=(s=(l=(d=void 0)!==null&&d!==void 0?d:void 0)!==null&&l!==void 0?l:j.firstWeekContainsDate)!==null&&s!==void 0?s:(c=j.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(ye>=1&&ye<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var at=ee((p=(m=(y=(N=void 0)!==null&&N!==void 0?N:void 0)!==null&&y!==void 0?y:j.weekStartsOn)!==null&&m!==void 0?m:(D=j.locale)===null||D===void 0||(O=D.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&p!==void 0?p:0);if(!(at>=0&&at<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(q==="")return A===""?U(t):new Date(NaN);var ot={firstWeekContainsDate:ye,weekStartsOn:at,locale:le},nt=[new pd],Ti=q.match(th).map(function(W){var L=W[0];if(L in Gi){var ne=Gi[L];return ne(W,le.formatLong)}return W}).join("").match(eh),G=[],te=wa(Ti),Se;try{var qs=function(){var L=Se.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&No(L)&&ei(L,q,i),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Mo(L)&&ei(L,q,i);var ne=L[0],Bt=Zd[ne];if(Bt){var ua=Bt.incompatibleTokens;if(Array.isArray(ua)){var pa=G.find(function(ma){return ua.includes(ma.token)||ma.token===ne});if(pa)throw new RangeError("The format string mustn't contain `".concat(pa.fullToken,"` and `").concat(L,"` at the same time"))}else if(Bt.incompatibleTokens==="*"&&G.length>0)throw new RangeError("The format string mustn't contain `".concat(L,"` and any other token at the same time"));G.push({token:ne,fullToken:L});var Di=Bt.run(A,L,le.match,ot);if(!Di)return{v:new Date(NaN)};nt.push(Di.setter),A=Di.rest}else{if(ne.match(oh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ne+"`");if(L==="''"?L="'":ne==="'"&&(L=nh(L)),A.indexOf(L)===0)A=A.slice(L.length);else return{v:new Date(NaN)}}};for(te.s();!(Se=te.n()).done;){var la=qs();if(ge(la)==="object")return la.v}}catch(W){te.e(W)}finally{te.f()}if(A.length>0&&ah.test(A))return new Date(NaN);var js=nt.map(function(W){return W.priority}).sort(function(W,L){return L-W}).filter(function(W,L,ne){return ne.indexOf(W)===L}).map(function(W){return nt.filter(function(L){return L.priority===W}).sort(function(L,ne){return ne.subPriority-L.subPriority})}).map(function(W){return W[0]}),Pi=U(t);if(isNaN(Pi.getTime()))return new Date(NaN);var st=Ao(Pi,Vo(Pi)),da={},$t=wa(js),ha;try{for($t.s();!(ha=$t.n()).done;){var ca=ha.value;if(!ca.validate(st,ot))return new Date(NaN);var Ht=ca.set(st,da,ot);Array.isArray(Ht)?(st=Ht[0],sd(da,Ht[1])):st=Ht}}catch(W){$t.e(W)}finally{$t.f()}return st}function nh(i){return i.match(ih)[1].replace(rh,"'")}function xa(i,e){R(2,arguments);var t=U(i),r=U(e);return t.getTime()>r.getTime()}function Ca(i,e){R(2,arguments);var t=U(i),r=U(e);return t.getTime()<r.getTime()}function ka(i,e,t){return R(2,arguments),So(Pe(i,e,new Date,t))}const sh='*,*::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__manual-mode::part(toggle-button){display:none}.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}',lh=sh,Uo=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.touched=!1,this.formatDate=e=>{const{year:t,month:r,day:a}=e,o=new Date(t,r,a);return ba(o,this.dateFormat)},this.parseDate=e=>{const t=Pe(e,this.dateFormat,new Date);return{year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.handleDocumentIdUpdate=e=>{if(this.name!==X.BIRTHDATE)return;const t=e.detail;this.value=t,this.valueAsDate=Pe(this.value||"",X.DATE_FORMAT,new Date),this.touched=!0,this.datePicker&&(this.datePicker.value=this.value),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.valueHandler({name:this.name,value:this.value})},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="yyyy-MM-dd",this.emitOnClick=!1,this.enableSouthAfricanMode=void 0,this.enableManualDateInput=!1,this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}get formattedValue(){if(!this.value)return"";const i=Pe(this.value,"yyyy-MM-dd",new Date);return ba(i,this.dateFormat)}handleStylingChange(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(i){this.sendValidityState.emit(i)}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}handleCustomRegistrationChange(i){i?window.addEventListener("documentIdUpdated",this.handleDocumentIdUpdate):window.removeEventListener("documentIdUpdated",this.handleDocumentIdUpdate)}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}connectedCallback(){var i,e;this.minDate=Pe(((i=this.validation.min)===null||i===void 0?void 0:i.toString())||"","yyyy-MM-dd",new Date),this.maxDate=Pe(((e=this.validation.max)===null||e===void 0?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 i=this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');i&&i.addEventListener("click",()=>this.handleCalendarIconClick()),this.datePicker.addEventListener("opened-changed",e=>{e.detail.value===!0?this.errorMessage="":(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0)})}this.enableSouthAfricanMode&&window.addEventListener("documentIdUpdated",this.handleDocumentIdUpdate),this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value})),this.isValid=this.setValidity()}disconnectedCallback(){this.enableSouthAfricanMode&&window.removeEventListener("documentIdUpdated",this.handleDocumentIdUpdate)}handleCalendarIconClick(){this.datePicker.opened&&this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}handleInput(i){this.value=i.target.value,this.touched=!0,this.valueAsDate=Pe(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0),this.enableSouthAfricanMode&&window.dispatchEvent(new CustomEvent("birthDateUpdated",{detail:{birthDate:this.value}}))}handleValidated(){this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()}setValidity(){return Ca(this.valueAsDate,this.minDate)||xa(this.valueAsDate,this.maxDate)||!ka(this.formattedValue,this.dateFormat)?!1:this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return b("requiredError",this.language);if(this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow)return b("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}});if(Ca(this.valueAsDate,this.minDate)||xa(this.valueAsDate,this.maxDate))return b("dateError2",this.language);if(!ka(this.formattedValue,this.dateFormat))return b("dateFormatError",this.language)}renderTooltip(){return this.showTooltip?h.h("div",{class:`date__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){let i="";return this.touched&&(i=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"b8f91a203d028d6effe0cb976465756841453300",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:e=>this.stylingContainer=e},h.h("label",{key:"e5d9bda31742bec5c4e24e390941688fd4eeb239",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName,h.h("span",{key:"8055cfcb8ed54eea9f7b4f7c3719267aa258fc78",class:this.validation.mandatory?"date__label--required":""})),h.h("vaadin-date-picker",{key:"a2bd1e51e96308d02ee0462ff681a818d008399f",id:`${this.name}__input`,type:"date",class:`date__input ${i} ${this.enableManualDateInput&&"date__manual-mode"}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:e=>this.handleInput(e),onValidated:()=>this.handleValidated(),autoOpenDisabled:this.enableManualDateInput}),h.h("small",{key:"6f7e5bead37a71932d678be3dc9ff36170871289",class:"date__error-message"},this.errorMessage),this.tooltip&&h.h("img",{key:"c67702d9aa5ee40666c772bc9612007fdd69af80",class:"date__tooltip-icon",src:se,alt:"",ref:e=>this.tooltipIconReference=e,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return h.getElement(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],enableSouthAfricanMode:["handleCustomRegistrationChange"]}}};Uo.style=lh;const dh='*,*::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}',hh=dh,qo=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.validationPattern="",this.touched=!1,this.handleInput=e=>{this.value=e.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 e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(i){this.sendValidityState.emit(i)}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}valueChangedHandler(i){this.isDuplicateInput&&this.name===i.detail.name+"Duplicate"&&(this.duplicateInputValue=i.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 i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i,e,t,r;if(this.inputReference.validity.valueMissing)return b("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return b("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.patternMismatch){const a=(i=this.validation.custom.find(n=>n.rule==="regex"))===null||i===void 0?void 0:i.errorKey,o=(e=this.validation.custom.find(n=>n.rule==="regex"))===null||e===void 0?void 0:e.errorMessage;return b(`${a}`,this.language)?b(`${a}`,this.language):o}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const a=(t=this.validation.custom.find(n=>n.rule==="duplicate-input"))===null||t===void 0?void 0:t.errorKey,o=(r=this.validation.custom.find(n=>n.rule==="duplicate-input"))===null||r===void 0?void 0:r.errorMessage;return b(`${a}`,this.language)?b(`${a}`,this.language):o}}renderTooltip(){return this.showTooltip?h.h("div",{class:`email__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){let i="";return this.touched&&(i=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"723df8f3a6e8c57fe19082400971daf50f5c981d",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:e=>this.stylingContainer=e},h.h("div",{key:"581d6e02b63d1c659ae44424518f64db450d5365",class:"email__wrapper--flex"},h.h("label",{key:"11e6a848f6f04903989b3ab2075865f6e279c087",class:`email__label ${this.validation.mandatory?"email__label--required":""}`,htmlFor:`${this.name}__input`},this.displayName),h.h("div",{key:"73e11520cffbddda1a2aeb4b560e7f4cf456e2fb",class:"email__wrapper--relative"},this.tooltip&&h.h("img",{key:"e8571ce14b9b98311daf1712ebde7d6da9b5a6a6",class:"email__tooltip-icon",src:se,alt:"",ref:e=>this.tooltipIconReference=e,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),h.h("input",{key:"dd05ef0b4d906598c6d5775a78ccbdc9ea81cb8c",id:`${this.name}__input`,type:"email",class:`email__input ${i}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:e=>this.inputReference=e,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),h.h("small",{key:"0d2d41207f8274d8c6f69143131265ef5b458689",class:"email__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};qo.style=hh;var ch=Object.defineProperty,uh=Object.defineProperties,ph=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertySymbols,mh=Object.prototype.hasOwnProperty,fh=Object.prototype.propertyIsEnumerable,Xi=(i,e,t)=>e in i?ch(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ri=(i,e)=>{for(var t in e||(e={}))mh.call(e,t)&&Xi(i,t,e[t]);if(Ea)for(var t of Ea(e))fh.call(e,t)&&Xi(i,t,e[t]);return i},jo=(i,e)=>uh(i,ph(e)),Q=(i,e,t)=>(Xi(i,typeof e!="symbol"?e+"":e,t),t),ai=(i,e,t)=>new Promise((r,a)=>{var o=l=>{try{s(t.next(l))}catch(d){a(d)}},n=l=>{try{s(t.throw(l))}catch(d){a(d)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,n);s((t=t.apply(i,e)).next())});/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-c666b6e6-70EcL6Jm.cjs"),Ws=require("./pam-change-password-121f4e26-Dot95D3Z.cjs"),Ys="en",Ce={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}",fixedLengthError:"The length should be {length} characters",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",MustIncludeLowercase:"Password must include one lowercase character",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",enterIEAddressManually:"For IRE, enter the address manually",postalLookUpNoAddressFound:"No addresses found for this postal code",searchingForAddresses:"Searching for addresses...",SAIdLengthError:"SA ID must be 13 digits",SAIdInvalidError:"Invalid SA ID",PassportLengthError:"Passport number must be 8 or 9 digits.",PasswordMustContain:"Password must contain:",AlphanumericalOnly:"Only alphanumerical characters are allowed",InvalidFirstName:"Only alphabetic characters are allowed.",InvalidLastName:"Only alphabetic characters are allowed."},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",fixedLengthError:"A hossznak {length} karakternek 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",MustIncludeLowercase:"A jelszónak legalább egy kisbetűt kell tartalmaznia",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",PassportLengthError:"Az útlevélszámnak 9 számjegyűnek kell lennie",SAIdLengthError:"A dél-afrikai személyi számnak 13 számjegyűnek kell lennie",SAIdInvalidError:"Érvénytelen dél-afrikai személyi szám",PasswordMustContain:"A jelszónak tartalmaznia kell:",AlphanumericalOnly:"Csak alfanumerikus karakterek engedélyezettek",InvalidFirstName:"Csak betűk engedélyezettek.",InvalidLastName:"Csak betűk engedélyezettek."},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}",fixedLengthError:"Duljina mora biti {length} znakova",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",MustIncludeLowercase:"Lozinka mora sadržavati barem jedno malo slovo",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",PassportLengthError:"Broj putovnice mora imati 9 znamenki",SAIdLengthError:"Južnoafrički osobni broj mora imati 13 znamenki",SAIdInvalidError:"Nevažeći južnoafrički osobni broj",PasswordMustContain:"Lozinka mora sadržavati:",AlphanumericalOnly:"Dopušteni su samo alfanumerički znakovi",InvalidFirstName:"Dozvoljena su samo slova.",InvalidLastName:"Dozvoljena su samo slova."},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",fixedLengthError:"Uzunluk {length} karakter 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",MustIncludeLowercase:"Şifre en az bir küçük harf 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",PassportLengthError:"Pasaport numarası 9 haneli olmalıdır",SAIdLengthError:"Güney Afrika kimlik numarası 13 haneli olmalıdır",SAIdInvalidError:"Geçersiz Güney Afrika kimlik numarası",PasswordMustContain:"Şifre şunları içermelidir:",AlphanumericalOnly:"Yalnızca alfanümerik karakterlere izin verilir",InvalidFirstName:"Yalnızca alfabetik karakterlere izin verilir.",InvalidLastName:"Yalnızca alfabetik karakterlere izin verilir."},"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}",fixedLengthError:"O comprimento deve ser de {length} caracteres",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",MustIncludeLowercase:"A senha deve conter pelo menos uma letra minúscula",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",PassportLengthError:"O número do passaporte deve ter 9 dígitos",SAIdLengthError:"O número de identificação da África do Sul deve ter 13 dígitos",SAIdInvalidError:"Número de identificação da África do Sul inválido",PasswordMustContain:"A senha deve conter:",AlphanumericalOnly:"Apenas caracteres alfanuméricos são permitidos",InvalidFirstName:"Apenas caracteres alfabéticos são permitidos.",InvalidLastName:"Apenas caracteres alfabéticos são permitidos."},pt:{dateError:"A data selecionada deve estar entre {min} e {max}",dateError2:"A data selecionada não está dentro do intervalo aceite",dateFormatError:"A data selecionada tem 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 da palavra-passe inicial não cumpre todos os critérios.",invalidPassword:"A palavra-passe não cumpre todos os critérios",passwordStrength:"Força da palavra-passe",passwordStrengthWeak:"não é adequada",passwordStrengthStrong:"é adequada",SpecialCharactersNotAllowed:"Não deve conter caracteres especiais",InvalidEmailFormat:"Formato de email inválido.",EmailNotMatching:"Os emails não coincidem!",PasswordNotMatching:"As palavras-passe não coincidem",MustIncludeNumber:"A palavra-passe deve incluir um número",MustContainCapital:"A palavra-passe deve incluir uma letra maiúscula",MustIncludePunctation:"A palavra-passe deve incluir pontuação",MustIncludeLowercase:"A palavra-passe deve incluir um caractere minúsculo",OnlyNumbers:"O campo deve conter apenas dígitos.",InvalidFieldSize:"O comprimento deve ser exatamente 11 dígitos.",InvalidDocumentNumber:"Apenas caracteres numéricos são permitidos.",twofaDescription:"<p> Enviámos o código de verificação para <p> {destination}. </p> </p> <p> Por favor, introduza o PIN abaixo. </p>",twofaResendMessage:"Não recebeu o código de verificação?",twofaResendButton:"Reenviar",enterIEAddressManually:"Para IRE, introduza o endereço manualmente",postalLookUpNoAddressFound:"Não foram encontrados endereços para este código postal",searchingForAddresses:"A procurar endereços...",SAIdLengthError:"O ID da África do Sul deve ter 13 dígitos",SAIdInvalidError:"ID da África do Sul inválido",PassportLengthError:"O número de passaporte deve ter 8 ou 9 dígitos.",PasswordMustContain:"A palavra-passe deve conter:",AlphanumericalOnly:"Apenas caracteres alfanuméricos são permitidos",InvalidFirstName:"Apenas caracteres alfabéticos são permitidos.",InvalidLastName:"Apenas caracteres alfabéticos são permitidos."},"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}",fixedLengthError:"La longitud debe ser de {length} caracteres",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",MustIncludeLowercase:"La contraseña debe contener al menos una letra minúscula",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",PassportLengthError:"El número de pasaporte debe tener 9 dígitos",SAIdLengthError:"El número de identificación de Sudáfrica debe tener 13 dígitos",SAIdInvalidError:"Número de identificación de Sudáfrica inválido",PasswordMustContain:"La contraseña debe contener:",AlphanumericalOnly:"Solo se permiten caracteres alfanuméricos",InvalidFirstName:"Solo se permiten caracteres alfabéticos.",InvalidLastName:"Solo se permiten caracteres alfabéticos."},fr:{dateError:"La date sélectionnée doit être comprise entre {min} et {max}",dateError2:"La date sélectionnée n’est pas dans la plage autorisée",dateFormatError:"Le format de la date sélectionnée est incorrect.",numberLengthError:"Le nombre doit être compris entre {min} et {max}",lengthError:"La longueur doit être comprise entre {minLength} et {maxLength}",fixedLengthError:"La longueur doit être de {length} caractères",requiredError:"Ce champ est obligatoire.",invalidOriginalPasswordError:"Le mot de passe initial ne respecte pas tous les critères.",invalidPassword:"Le mot de passe ne respecte pas tous les critères",passwordStrength:"Robustesse du mot de passe",passwordStrengthWeak:"est insuffisante",passwordStrengthStrong:"est suffisante",SpecialCharactersNotAllowed:"Ne doit pas contenir de caractères spéciaux",InvalidEmailFormat:"Format d’adresse e-mail invalide.",EmailNotMatching:"Les adresses e-mail ne correspondent pas !",PasswordNotMatching:"Les mots de passe ne correspondent pas",MustIncludeNumber:"Le mot de passe doit contenir un chiffre",MustContainCapital:"Le mot de passe doit contenir une lettre majuscule",MustIncludePunctation:"Le mot de passe doit contenir un caractère de ponctuation",MustIncludeLowercase:"Le mot de passe doit contenir une lettre minuscule",OnlyNumbers:"Ce champ ne doit contenir que des chiffres.",InvalidFieldSize:"La longueur doit être exactement de 11 chiffres.",InvalidDocumentNumber:"Seuls les caractères numériques sont autorisés.",twofaDescription:"<p>Nous avons envoyé le code de vérification à <p>{destination}</p>.</p><p>Veuillez saisir le code PIN ci-dessous.</p>",twofaResendMessage:"Vous n’avez pas reçu le code de vérification ?",twofaResendButton:"Renvoyer",enterIEAddressManually:"Pour l’Irlande, saisissez l’adresse manuellement",postalLookUpNoAddressFound:"Aucune adresse trouvée pour ce code postal",searchingForAddresses:"Recherche d’adresses...",SAIdLengthError:"L’identifiant sud-africain doit comporter 13 chiffres",SAIdInvalidError:"Identifiant sud-africain invalide",PassportLengthError:"Le numéro de passeport doit comporter 8 ou 9 chiffres.",PasswordMustContain:"Le mot de passe doit contenir :",AlphanumericalOnly:"Seuls les caractères alphanumériques sont autorisés",InvalidFirstName:"Seuls les caractères alphabétiques sont autorisés.",InvalidLastName:"Seuls les caractères alphabétiques sont autorisés."}},X={DOCUMENT_NUMBER:"DocumentNumber",FIRSTNAME_ON_DOCUMENT:"FirstnameOnDocument",LASTNAME_ON_DOCUMENT:"LastnameOnDocument",PASSPORT:"Passport",SOUTH_AFRICAN_ID:"SouthAfricanID",BIRTHDATE:"BirthDate",PASSPORT_NUMERIC_REGEX:/^\d{8,9}$/,SA_ID_BASIC_REGEX:/^\d{13}$/,SOUTH_AFRICAN_ID_LENGTH:13,NON_LETTERS_REGEX:/[^A-Za-z]/g,DATE_FORMAT:"yyyy-MM-dd",PASSWORD_COMPLEXITY_PASSED:"passed",PASSWORD_COMPLEXITY_FAILED:"failed"},se={PASSPORT_INVALID:"PassportLengthError",SA_ID_LENGTH:"SAIdLengthError",SA_ID_INVALID:"SAIdInvalidError",REQUIRED:"requiredError",LENGTH:"lengthError",FIXED_LENGTH:"fixedLengthError"},fa={PASSED:"✓",FAILED:"✕"},b=(i,e,t)=>{const r=e;let a=Ce[r]?Ce[r][i]:Ce[Ys][i];if(t!==void 0)for(const[o,n]of Object.entries(t.values)){const s=new RegExp(`{${o}}`,"g");a=a.replace(s,n)}return a},Gs=i=>new Promise(e=>{fetch(i).then(t=>t.json()).then(t=>{Object.keys(t).forEach(r=>{Ce[r]=Ce[r]||{};for(let a in t[r])typeof t[r][a]=="string"&&(Ce[r]=Ce[r]||{},Ce[r][a]=t[r][a])}),e(!0)})}),Ks=i=>{if(!X.SA_ID_BASIC_REGEX.test(i))return!1;const e=i.split("").map(l=>parseInt(l,10));let t=0;for(let l=0;l<12;l+=2)t+=e[l];let r="";for(let l=1;l<12;l+=2)r+=e[l];const o=(parseInt(r,10)*2).toString().split("").reduce((l,d)=>l+parseInt(d,10),0);return(10-(t+o)%10)%10===e[12]},le="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==",Xs='*,*::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}',Qs=Xs,Eo=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.value=null,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce((i,e)=>(i[e.name]=this.selectedValues.includes(e.name),i),{}),this.emitValueHandler(!0)}validityStateHandler(i){this.sendValidityState.emit(i)}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(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(i=>i.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 b("requiredError",this.language)}renderTooltip(){return this.showTooltip?h.h("div",{class:`checkboxgroup__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}handleParentCheckbox(i){const e=i.target.checked;this.showCheckboxes=e,this.selectedValues=e?this.options.map(t=>t.name):[]}renderLabel(){return h.h("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},h.h("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return h.h("div",{key:"9985f4050655bc2233090f63abb0e22f2fe0b556",class:`checkboxgroup__wrapper ${this.name}__input`,ref:i=>this.stylingContainer=i},h.h("div",{key:"9922e45ae7ee74b137ffc8552b3d714b7e3b1f59",class:"checkboxgroup__wrapper--flex"},h.h("vaadin-checkbox",{key:"f18bae7c3ee6df76edcde75924eb1ad51a227443",class:"checkbox__input",checked:this.selectedValues.length===this.options.length||this.defaultValue==="true",indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:i=>this.handleParentCheckbox(i)},this.renderLabel()),this.tooltip&&h.h("img",{key:"3dc2ce07e4d5f8de7ed4707b5e140fb4752ca86b",class:"checkboxgroup__tooltip-icon",src:le,alt:"",ref:i=>this.tooltipIconReference=i,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),h.h("small",{key:"d55f25f75aa20007ff58cf45b6632517f49b6c00",class:"checkboxgroup__error-message"},this.errorMessage),this.showCheckboxes&&h.h("vaadin-checkbox-group",{key:"210c3cc2868a07a403494e04336c4f3091eea0e4",theme:"vertical",value:this.selectedValues,"on-value-changed":i=>{this.selectedValues=i.detail.value}},this.options.map(i=>h.h("vaadin-checkbox",{class:"checkbox__input",name:i.name,value:i.name,label:i.displayName}))))}get element(){return h.getElement(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};Eo.style=Qs;const Js='*,*::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{display:none}.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}.checkbox__label-text.mandatory::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}',Zs=Js,Io=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.value="",this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(i){this.sendValidityState.emit(i)}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(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(i){this.value=i.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 b("requiredError",this.language)}renderLabel(){var i;return h.h("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},h.h("div",{class:{"checkbox__label-text":!0,mandatory:(i=this.validation)===null||i===void 0?void 0:i.mandatory},innerHTML:this.displayName}))}renderTooltip(){return this.showTooltip?h.h("div",{class:`checkbox__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){return h.h("div",{key:"80ed581cec5bb009ea5ea009f11c6453fe24ef7b",class:`checkbox__wrapper ${this.name}__input`,ref:i=>this.stylingContainer=i},h.h("vaadin-checkbox",{key:"42d793f607af77435f629218f9bdac7736522bc3",class:"checkbox__input",required:this.validation.mandatory,checked:this.defaultValue==="true",onChange:i=>this.handleCheckbox(i),"error-message":!this.isValid&&this.errorMessage,ref:i=>this.vaadinCheckbox=i},this.renderLabel()),this.tooltip&&h.h("img",{key:"ce3870810ede8f3905fd8c07c0892ab0d909bab5",class:"checkboxgroup__tooltip-icon",src:le,alt:"",ref:i=>this.tooltipIconReference=i,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Io.style=Zs;function be(i){"@babel/helpers - typeof";return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(i)}function R(i,e){if(e.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+e.length+" present")}function el(i){return R(1,arguments),i instanceof Date||be(i)==="object"&&Object.prototype.toString.call(i)==="[object Date]"}function U(i){R(1,arguments);var e=Object.prototype.toString.call(i);return i instanceof Date||be(i)==="object"&&e==="[object Date]"?new Date(i.getTime()):typeof i=="number"||e==="[object Number]"?new Date(i):((typeof i=="string"||e==="[object String]")&&typeof console!="undefined"&&(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 So(i){if(R(1,arguments),!el(i)&&typeof i!="number")return!1;var e=U(i);return!isNaN(Number(e))}function ee(i){if(i===null||i===!0||i===!1)return NaN;var e=Number(i);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function tl(i,e){R(2,arguments);var t=U(i).getTime(),r=ee(e);return new Date(t+r)}function Ao(i,e){R(2,arguments);var t=ee(e);return tl(i,-t)}var il=864e5;function rl(i){R(1,arguments);var e=U(i),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),a=t-r;return Math.floor(a/il)+1}function Ke(i){R(1,arguments);var e=1,t=U(i),r=t.getUTCDay(),a=(r<e?7:0)+r-e;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function To(i){R(1,arguments);var e=U(i),t=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var a=Ke(r),o=new Date(0);o.setUTCFullYear(t,0,4),o.setUTCHours(0,0,0,0);var n=Ke(o);return e.getTime()>=a.getTime()?t+1:e.getTime()>=n.getTime()?t:t-1}function al(i){R(1,arguments);var e=To(i),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var r=Ke(t);return r}var ol=6048e5;function Po(i){R(1,arguments);var e=U(i),t=Ke(e).getTime()-al(e).getTime();return Math.round(t/ol)+1}var nl={};function et(){return nl}function Ne(i,e){var t,r,a,o,n,s,l,d;R(1,arguments);var c=et(),u=ee((t=(r=(a=(o=e==null?void 0:e.weekStartsOn)!==null&&o!==void 0?o:e==null||(n=e.locale)===null||n===void 0||(s=n.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=U(i),m=p.getUTCDay(),y=(m<u?7:0)+m-u;return p.setUTCDate(p.getUTCDate()-y),p.setUTCHours(0,0,0,0),p}function wr(i,e){var t,r,a,o,n,s,l,d;R(1,arguments);var c=U(i),u=c.getUTCFullYear(),p=et(),m=ee((t=(r=(a=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(n=e.locale)===null||n===void 0||(s=n.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:p.firstWeekContainsDate)!==null&&r!==void 0?r:(l=p.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(u+1,0,m),y.setUTCHours(0,0,0,0);var N=Ne(y,e),D=new Date(0);D.setUTCFullYear(u,0,m),D.setUTCHours(0,0,0,0);var O=Ne(D,e);return c.getTime()>=N.getTime()?u+1:c.getTime()>=O.getTime()?u:u-1}function sl(i,e){var t,r,a,o,n,s,l,d;R(1,arguments);var c=et(),u=ee((t=(r=(a=(o=e==null?void 0:e.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(n=e.locale)===null||n===void 0||(s=n.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1),p=wr(i,e),m=new Date(0);m.setUTCFullYear(p,0,u),m.setUTCHours(0,0,0,0);var y=Ne(m,e);return y}var ll=6048e5;function Do(i,e){R(1,arguments);var t=U(i),r=Ne(t,e).getTime()-sl(t,e).getTime();return Math.round(r/ll)+1}function V(i,e){for(var t=i<0?"-":"",r=Math.abs(i).toString();r.length<e;)r="0"+r;return t+r}var dl={y:function(e,t){var r=e.getUTCFullYear(),a=r>0?r:1-r;return V(t==="yy"?a%100:a,t.length)},M:function(e,t){var r=e.getUTCMonth();return t==="M"?String(r+1):V(r+1,2)},d:function(e,t){return V(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(e,t){return V(e.getUTCHours()%12||12,t.length)},H:function(e,t){return V(e.getUTCHours(),t.length)},m:function(e,t){return V(e.getUTCMinutes(),t.length)},s:function(e,t){return V(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,a=e.getUTCMilliseconds(),o=Math.floor(a*Math.pow(10,r-3));return V(o,t.length)}};const xe=dl;var He={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},hl={G:function(e,t,r){var a=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(a,{width:"abbreviated"});case"GGGGG":return r.era(a,{width:"narrow"});case"GGGG":default:return r.era(a,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){var a=e.getUTCFullYear(),o=a>0?a:1-a;return r.ordinalNumber(o,{unit:"year"})}return xe.y(e,t)},Y:function(e,t,r,a){var o=wr(e,a),n=o>0?o:1-o;if(t==="YY"){var s=n%100;return V(s,2)}return t==="Yo"?r.ordinalNumber(n,{unit:"year"}):V(n,t.length)},R:function(e,t){var r=To(e);return V(r,t.length)},u:function(e,t){var r=e.getUTCFullYear();return V(r,t.length)},Q:function(e,t,r){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return V(a,2);case"Qo":return r.ordinalNumber(a,{unit:"quarter"});case"QQQ":return r.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,r){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return V(a,2);case"qo":return r.ordinalNumber(a,{unit:"quarter"});case"qqq":return r.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,r){var a=e.getUTCMonth();switch(t){case"M":case"MM":return xe.M(e,t);case"Mo":return r.ordinalNumber(a+1,{unit:"month"});case"MMM":return r.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,r){var a=e.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return V(a+1,2);case"Lo":return r.ordinalNumber(a+1,{unit:"month"});case"LLL":return r.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,r,a){var o=Do(e,a);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):V(o,t.length)},I:function(e,t,r){var a=Po(e);return t==="Io"?r.ordinalNumber(a,{unit:"week"}):V(a,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):xe.d(e,t)},D:function(e,t,r){var a=rl(e);return t==="Do"?r.ordinalNumber(a,{unit:"dayOfYear"}):V(a,t.length)},E:function(e,t,r){var a=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(a,{width:"short",context:"formatting"});case"EEEE":default:return r.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,r,a){var o=e.getUTCDay(),n=(o-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(n);case"ee":return V(n,2);case"eo":return r.ordinalNumber(n,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,a){var o=e.getUTCDay(),n=(o-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(n);case"cc":return V(n,t.length);case"co":return r.ordinalNumber(n,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){var a=e.getUTCDay(),o=a===0?7:a;switch(t){case"i":return String(o);case"ii":return V(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(a,{width:"short",context:"formatting"});case"iiii":default:return r.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,r){var a=e.getUTCHours(),o=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){var a=e.getUTCHours(),o;switch(a===12?o=He.noon:a===0?o=He.midnight:o=a/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){var a=e.getUTCHours(),o;switch(a>=17?o=He.evening:a>=12?o=He.afternoon:a>=4?o=He.morning:o=He.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){var a=e.getUTCHours()%12;return a===0&&(a=12),r.ordinalNumber(a,{unit:"hour"})}return xe.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):xe.H(e,t)},K:function(e,t,r){var a=e.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(a,{unit:"hour"}):V(a,t.length)},k:function(e,t,r){var a=e.getUTCHours();return a===0&&(a=24),t==="ko"?r.ordinalNumber(a,{unit:"hour"}):V(a,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):xe.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):xe.s(e,t)},S:function(e,t){return xe.S(e,t)},X:function(e,t,r,a){var o=a._originalDate||e,n=o.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return _a(n);case"XXXX":case"XX":return Pe(n);case"XXXXX":case"XXX":default:return Pe(n,":")}},x:function(e,t,r,a){var o=a._originalDate||e,n=o.getTimezoneOffset();switch(t){case"x":return _a(n);case"xxxx":case"xx":return Pe(n);case"xxxxx":case"xxx":default:return Pe(n,":")}},O:function(e,t,r,a){var o=a._originalDate||e,n=o.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+va(n,":");case"OOOO":default:return"GMT"+Pe(n,":")}},z:function(e,t,r,a){var o=a._originalDate||e,n=o.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+va(n,":");case"zzzz":default:return"GMT"+Pe(n,":")}},t:function(e,t,r,a){var o=a._originalDate||e,n=Math.floor(o.getTime()/1e3);return V(n,t.length)},T:function(e,t,r,a){var o=a._originalDate||e,n=o.getTime();return V(n,t.length)}};function va(i,e){var t=i>0?"-":"+",r=Math.abs(i),a=Math.floor(r/60),o=r%60;if(o===0)return t+String(a);var n=e;return t+String(a)+n+V(o,2)}function _a(i,e){if(i%60===0){var t=i>0?"-":"+";return t+V(Math.abs(i)/60,2)}return Pe(i,e)}function Pe(i,e){var t=e||"",r=i>0?"-":"+",a=Math.abs(i),o=V(Math.floor(a/60),2),n=V(a%60,2);return r+o+t+n}const cl=hl;var ga=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Oo=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ul=function(e,t){var r=e.match(/(P+)(p+)?/)||[],a=r[1],o=r[2];if(!o)return ga(e,t);var n;switch(a){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"});break}return n.replace("{{date}}",ga(a,t)).replace("{{time}}",Oo(o,t))},pl={p:Oo,P:ul};const Gi=pl;function Vo(i){var e=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return e.setUTCFullYear(i.getFullYear()),i.getTime()-e.getTime()}var ml=["D","DD"],fl=["YY","YYYY"];function Mo(i){return ml.indexOf(i)!==-1}function No(i){return fl.indexOf(i)!==-1}function ei(i,e,t){if(i==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vl={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"}},_l=function(e,t,r){var a,o=vl[e];return typeof o=="string"?a=o:t===1?a=o.one:a=o.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+a:a+" ago":a};const gl=_l;function Oi(i){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):i.defaultWidth,r=i.formats[t]||i.formats[i.defaultWidth];return r}}var bl={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yl={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wl={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xl={date:Oi({formats:bl,defaultWidth:"full"}),time:Oi({formats:yl,defaultWidth:"full"}),dateTime:Oi({formats:wl,defaultWidth:"full"})};const Cl=xl;var kl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},El=function(e,t,r,a){return kl[e]};const Il=El;function lt(i){return function(e,t){var r=t!=null&&t.context?String(t.context):"standalone",a;if(r==="formatting"&&i.formattingValues){var o=i.defaultFormattingWidth||i.defaultWidth,n=t!=null&&t.width?String(t.width):o;a=i.formattingValues[n]||i.formattingValues[o]}else{var s=i.defaultWidth,l=t!=null&&t.width?String(t.width):i.defaultWidth;a=i.values[l]||i.values[s]}var d=i.argumentCallback?i.argumentCallback(e):e;return a[d]}}var Sl={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Al={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Tl={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"]},Pl={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"]},Dl={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"}},Ol={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"}},Vl=function(e,t){var r=Number(e),a=r%100;if(a>20||a<10)switch(a%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ml={ordinalNumber:Vl,era:lt({values:Sl,defaultWidth:"wide"}),quarter:lt({values:Al,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:lt({values:Tl,defaultWidth:"wide"}),day:lt({values:Pl,defaultWidth:"wide"}),dayPeriod:lt({values:Dl,defaultWidth:"wide",formattingValues:Ol,defaultFormattingWidth:"wide"})};const Nl=Ml;function dt(i){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,a=r&&i.matchPatterns[r]||i.matchPatterns[i.defaultMatchWidth],o=e.match(a);if(!o)return null;var n=o[0],s=r&&i.parsePatterns[r]||i.parsePatterns[i.defaultParseWidth],l=Array.isArray(s)?zl(s,function(u){return u.test(n)}):Ll(s,function(u){return u.test(n)}),d;d=i.valueCallback?i.valueCallback(l):l,d=t.valueCallback?t.valueCallback(d):d;var c=e.slice(n.length);return{value:d,rest:c}}}function Ll(i,e){for(var t in i)if(i.hasOwnProperty(t)&&e(i[t]))return t}function zl(i,e){for(var t=0;t<i.length;t++)if(e(i[t]))return t}function Rl(i){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(i.matchPattern);if(!r)return null;var a=r[0],o=e.match(i.parsePattern);if(!o)return null;var n=i.valueCallback?i.valueCallback(o[0]):o[0];n=t.valueCallback?t.valueCallback(n):n;var s=e.slice(a.length);return{value:n,rest:s}}}var Fl=/^(\d+)(th|st|nd|rd)?/i,$l=/\d+/i,Hl={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},Bl={any:[/^b/i,/^(a|c)/i]},Ul={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ql={any:[/1/i,/2/i,/3/i,/4/i]},jl={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},Wl={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]},Yl={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},Gl={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]},Kl={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},Xl={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}},Ql={ordinalNumber:Rl({matchPattern:Fl,parsePattern:$l,valueCallback:function(e){return parseInt(e,10)}}),era:dt({matchPatterns:Hl,defaultMatchWidth:"wide",parsePatterns:Bl,defaultParseWidth:"any"}),quarter:dt({matchPatterns:Ul,defaultMatchWidth:"wide",parsePatterns:ql,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:dt({matchPatterns:jl,defaultMatchWidth:"wide",parsePatterns:Wl,defaultParseWidth:"any"}),day:dt({matchPatterns:Yl,defaultMatchWidth:"wide",parsePatterns:Gl,defaultParseWidth:"any"}),dayPeriod:dt({matchPatterns:Kl,defaultMatchWidth:"any",parsePatterns:Xl,defaultParseWidth:"any"})};const Jl=Ql;var Zl={code:"en-US",formatDistance:gl,formatLong:Cl,formatRelative:Il,localize:Nl,match:Jl,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Lo=Zl;var ed=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,td=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,id=/^'([^]*?)'?$/,rd=/''/g,ad=/[a-zA-Z]/;function ba(i,e,t){var r,a,o,n,s,l,d,c,u,p,m,y,N,D;R(2,arguments);var O=String(e),A=et(),q=(r=(a=void 0)!==null&&a!==void 0?a:A.locale)!==null&&r!==void 0?r:Lo,j=ee((o=(n=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:A.firstWeekContainsDate)!==null&&n!==void 0?n:(d=A.locale)===null||d===void 0||(c=d.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var de=ee((u=(p=(m=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&m!==void 0?m:A.weekStartsOn)!==null&&p!==void 0?p:(N=A.locale)===null||N===void 0||(D=N.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&u!==void 0?u:0);if(!(de>=0&&de<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!q.localize)throw new RangeError("locale must contain localize property");if(!q.formatLong)throw new RangeError("locale must contain formatLong property");var we=U(i);if(!So(we))throw new RangeError("Invalid time value");var at=Vo(we),ot=Ao(we,at),nt={firstWeekContainsDate:j,weekStartsOn:de,locale:q,_originalDate:we},Ti=O.match(td).map(function(G){var te=G[0];if(te==="p"||te==="P"){var Ae=Gi[te];return Ae(G,q.formatLong)}return G}).join("").match(ed).map(function(G){if(G==="''")return"'";var te=G[0];if(te==="'")return od(G);var Ae=cl[te];if(Ae)return No(G)&&ei(G,e,String(i)),Mo(G)&&ei(G,e,String(i)),Ae(ot,G,q.localize,nt);if(te.match(ad))throw new RangeError("Format string contains an unescaped latin alphabet character `"+te+"`");return G}).join("");return Ti}function od(i){var e=i.match(id);return e?e[1].replace(rd,"'"):i}function ya(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,r=Array(e);t<e;t++)r[t]=i[t];return r}function nd(i,e){if(i){if(typeof i=="string")return ya(i,e);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ya(i,e):void 0}}function wa(i,e){var t=typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(!t){if(Array.isArray(i)||(t=nd(i))||e){t&&(i=t);var r=0,a=function(){};return{s:a,n:function(){return r>=i.length?{done:!0}:{done:!1,value:i[r++]}},e:function(d){throw d},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,n=!0,s=!1;return{s:function(){t=t.call(i)},n:function(){var d=t.next();return n=d.done,d},e:function(d){s=!0,o=d},f:function(){try{n||t.return==null||t.return()}finally{if(s)throw o}}}}function sd(i,e){if(i==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i}function _(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ki(i,e){return Ki=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},Ki(i,e)}function I(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),e&&Ki(i,e)}function ti(i){return ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ti(i)}function zo(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zo=function(){return!!i})()}function ld(i,e){if(e&&(be(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _(i)}function S(i){var e=zo();return function(){var t,r=ti(i);if(e){var a=ti(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return ld(this,t)}}function x(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function dd(i,e){if(be(i)!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var r=t.call(i,e);if(be(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function Ro(i){var e=dd(i,"string");return be(e)=="symbol"?e:e+""}function hd(i,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(i,Ro(r.key),r)}}function C(i,e,t){return e&&hd(i.prototype,e),Object.defineProperty(i,"prototype",{writable:!1}),i}function v(i,e,t){return(e=Ro(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}var cd=10,Fo=function(){function i(){x(this,i),v(this,"priority",void 0),v(this,"subPriority",0)}return C(i,[{key:"validate",value:function(t,r){return!0}}]),i}(),ud=function(i){I(t,i);var e=S(t);function t(r,a,o,n,s){var l;return x(this,t),l=e.call(this),l.value=r,l.validateValue=a,l.setValue=o,l.priority=n,s&&(l.subPriority=s),l}return C(t,[{key:"validate",value:function(a,o){return this.validateValue(a,this.value,o)}},{key:"set",value:function(a,o,n){return this.setValue(a,o,this.value,n)}}]),t}(Fo),pd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",cd),v(_(r),"subPriority",-1),r}return C(t,[{key:"set",value:function(a,o){if(o.timestampIsSet)return a;var n=new Date(0);return n.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),n.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),n}}]),t}(Fo),P=function(){function i(){x(this,i),v(this,"incompatibleTokens",void 0),v(this,"priority",void 0),v(this,"subPriority",void 0)}return C(i,[{key:"run",value:function(t,r,a,o){var n=this.parse(t,r,a,o);return n?{setter:new ud(n.value,this.validate,this.set,this.priority,this.subPriority),rest:n.rest}:null}},{key:"validate",value:function(t,r,a){return!0}}]),i}(),md=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",140),v(_(r),"incompatibleTokens",["R","u","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})||n.era(a,{width:"abbreviated"})||n.era(a,{width:"narrow"})}}},{key:"set",value:function(a,o,n){return o.era=n,a.setUTCFullYear(n,0,1),a.setUTCHours(0,0,0,0),a}}]),t}(P),fd=6e4,vd=36e5,_d=1e3,$={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ue={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function H(i,e){return i&&{value:e(i.value),rest:i.rest}}function z(i,e){var t=e.match(i);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function pe(i,e){var t=e.match(i);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};var r=t[1]==="+"?1:-1,a=t[2]?parseInt(t[2],10):0,o=t[3]?parseInt(t[3],10):0,n=t[5]?parseInt(t[5],10):0;return{value:r*(a*vd+o*fd+n*_d),rest:e.slice(t[0].length)}}function $o(i){return z($.anyDigitsSigned,i)}function F(i,e){switch(i){case 1:return z($.singleDigit,e);case 2:return z($.twoDigits,e);case 3:return z($.threeDigits,e);case 4:return z($.fourDigits,e);default:return z(new RegExp("^\\d{1,"+i+"}"),e)}}function ii(i,e){switch(i){case 1:return z($.singleDigitSigned,e);case 2:return z($.twoDigitsSigned,e);case 3:return z($.threeDigitsSigned,e);case 4:return z($.fourDigitsSigned,e);default:return z(new RegExp("^-?\\d{1,"+i+"}"),e)}}function xr(i){switch(i){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ho(i,e){var t=e>0,r=t?e:1-e,a;if(r<=50)a=i||100;else{var o=r+50,n=Math.floor(o/100)*100,s=i>=o%100;a=i+n-(s?100:0)}return t?a:1-a}function Bo(i){return i%400===0||i%4===0&&i%100!==0}var gd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",130),v(_(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){var s=function(d){return{year:d,isTwoDigitYear:o==="yy"}};switch(o){case"y":return H(F(4,a),s);case"yo":return H(n.ordinalNumber(a,{unit:"year"}),s);default:return H(F(o.length,a),s)}}},{key:"validate",value:function(a,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(a,o,n){var s=a.getUTCFullYear();if(n.isTwoDigitYear){var l=Ho(n.year,s);return a.setUTCFullYear(l,0,1),a.setUTCHours(0,0,0,0),a}var d=!("era"in o)||o.era===1?n.year:1-n.year;return a.setUTCFullYear(d,0,1),a.setUTCHours(0,0,0,0),a}}]),t}(P),bd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",130),v(_(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){var s=function(d){return{year:d,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return H(F(4,a),s);case"Yo":return H(n.ordinalNumber(a,{unit:"year"}),s);default:return H(F(o.length,a),s)}}},{key:"validate",value:function(a,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(a,o,n,s){var l=wr(a,s);if(n.isTwoDigitYear){var d=Ho(n.year,l);return a.setUTCFullYear(d,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),Ne(a,s)}var c=!("era"in o)||o.era===1?n.year:1-n.year;return a.setUTCFullYear(c,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),Ne(a,s)}}]),t}(P),yd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",130),v(_(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o){return ii(o==="R"?4:o.length,a)}},{key:"set",value:function(a,o,n){var s=new Date(0);return s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0),Ke(s)}}]),t}(P),wd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",130),v(_(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o){return ii(o==="u"?4:o.length,a)}},{key:"set",value:function(a,o,n){return a.setUTCFullYear(n,0,1),a.setUTCHours(0,0,0,0),a}}]),t}(P),xd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",120),v(_(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"Q":case"QQ":return F(o.length,a);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})||n.quarter(a,{width:"abbreviated",context:"formatting"})||n.quarter(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,o){return o>=1&&o<=4}},{key:"set",value:function(a,o,n){return a.setUTCMonth((n-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),t}(P),Cd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",120),v(_(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"q":case"qq":return F(o.length,a);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})||n.quarter(a,{width:"abbreviated",context:"standalone"})||n.quarter(a,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(a,o){return o>=1&&o<=4}},{key:"set",value:function(a,o,n){return a.setUTCMonth((n-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),t}(P),kd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),v(_(r),"priority",110),r}return C(t,[{key:"parse",value:function(a,o,n){var s=function(d){return d-1};switch(o){case"M":return H(z($.month,a),s);case"MM":return H(F(2,a),s);case"Mo":return H(n.ordinalNumber(a,{unit:"month"}),s);case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})||n.month(a,{width:"abbreviated",context:"formatting"})||n.month(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,o){return o>=0&&o<=11}},{key:"set",value:function(a,o,n){return a.setUTCMonth(n,1),a.setUTCHours(0,0,0,0),a}}]),t}(P),Ed=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",110),v(_(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){var s=function(d){return d-1};switch(o){case"L":return H(z($.month,a),s);case"LL":return H(F(2,a),s);case"Lo":return H(n.ordinalNumber(a,{unit:"month"}),s);case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})||n.month(a,{width:"abbreviated",context:"standalone"})||n.month(a,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(a,o){return o>=0&&o<=11}},{key:"set",value:function(a,o,n){return a.setUTCMonth(n,1),a.setUTCHours(0,0,0,0),a}}]),t}(P);function Id(i,e,t){R(2,arguments);var r=U(i),a=ee(e),o=Do(r,t)-a;return r.setUTCDate(r.getUTCDate()-o*7),r}var Sd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",100),v(_(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"w":return z($.week,a);case"wo":return n.ordinalNumber(a,{unit:"week"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=1&&o<=53}},{key:"set",value:function(a,o,n,s){return Ne(Id(a,n,s),s)}}]),t}(P);function Ad(i,e){R(2,arguments);var t=U(i),r=ee(e),a=Po(t)-r;return t.setUTCDate(t.getUTCDate()-a*7),t}var Td=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",100),v(_(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"I":return z($.week,a);case"Io":return n.ordinalNumber(a,{unit:"week"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=1&&o<=53}},{key:"set",value:function(a,o,n){return Ke(Ad(a,n))}}]),t}(P),Pd=[31,28,31,30,31,30,31,31,30,31,30,31],Dd=[31,29,31,30,31,30,31,31,30,31,30,31],Od=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",90),v(_(r),"subPriority",1),v(_(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"d":return z($.date,a);case"do":return n.ordinalNumber(a,{unit:"date"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){var n=a.getUTCFullYear(),s=Bo(n),l=a.getUTCMonth();return s?o>=1&&o<=Dd[l]:o>=1&&o<=Pd[l]}},{key:"set",value:function(a,o,n){return a.setUTCDate(n),a.setUTCHours(0,0,0,0),a}}]),t}(P),Vd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",90),v(_(r),"subpriority",1),v(_(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"D":case"DD":return z($.dayOfYear,a);case"Do":return n.ordinalNumber(a,{unit:"date"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){var n=a.getUTCFullYear(),s=Bo(n);return s?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(a,o,n){return a.setUTCMonth(0,n),a.setUTCHours(0,0,0,0),a}}]),t}(P);function Cr(i,e,t){var r,a,o,n,s,l,d,c;R(2,arguments);var u=et(),p=ee((r=(a=(o=(n=t==null?void 0:t.weekStartsOn)!==null&&n!==void 0?n:t==null||(s=t.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:u.weekStartsOn)!==null&&a!==void 0?a:(d=u.locale)===null||d===void 0||(c=d.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=U(i),y=ee(e),N=m.getUTCDay(),D=y%7,O=(D+7)%7,A=(O<p?7:0)+y-N;return m.setUTCDate(m.getUTCDate()+A),m}var Md=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",90),v(_(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,o){return o>=0&&o<=6}},{key:"set",value:function(a,o,n,s){return a=Cr(a,n,s),a.setUTCHours(0,0,0,0),a}}]),t}(P),Nd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",90),v(_(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n,s){var l=function(c){var u=Math.floor((c-1)/7)*7;return(c+s.weekStartsOn+6)%7+u};switch(o){case"e":case"ee":return H(F(o.length,a),l);case"eo":return H(n.ordinalNumber(a,{unit:"day"}),l);case"eee":return n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(a,o){return o>=0&&o<=6}},{key:"set",value:function(a,o,n,s){return a=Cr(a,n,s),a.setUTCHours(0,0,0,0),a}}]),t}(P),Ld=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",90),v(_(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n,s){var l=function(c){var u=Math.floor((c-1)/7)*7;return(c+s.weekStartsOn+6)%7+u};switch(o){case"c":case"cc":return H(F(o.length,a),l);case"co":return H(n.ordinalNumber(a,{unit:"day"}),l);case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})||n.day(a,{width:"abbreviated",context:"standalone"})||n.day(a,{width:"short",context:"standalone"})||n.day(a,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(a,o){return o>=0&&o<=6}},{key:"set",value:function(a,o,n,s){return a=Cr(a,n,s),a.setUTCHours(0,0,0,0),a}}]),t}(P);function zd(i,e){R(2,arguments);var t=ee(e);t%7===0&&(t=t-7);var r=1,a=U(i),o=a.getUTCDay(),n=t%7,s=(n+7)%7,l=(s<r?7:0)+t-o;return a.setUTCDate(a.getUTCDate()+l),a}var Rd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",90),v(_(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){var s=function(d){return d===0?7:d};switch(o){case"i":case"ii":return F(o.length,a);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return H(n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),s);case"iiiii":return H(n.day(a,{width:"narrow",context:"formatting"}),s);case"iiiiii":return H(n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),s);case"iiii":default:return H(n.day(a,{width:"wide",context:"formatting"})||n.day(a,{width:"abbreviated",context:"formatting"})||n.day(a,{width:"short",context:"formatting"})||n.day(a,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(a,o){return o>=1&&o<=7}},{key:"set",value:function(a,o,n){return a=zd(a,n),a.setUTCHours(0,0,0,0),a}}]),t}(P),Fd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",80),v(_(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"a":case"aa":case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(a,o,n){return a.setUTCHours(xr(n),0,0,0),a}}]),t}(P),$d=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",80),v(_(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"b":case"bb":case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(a,o,n){return a.setUTCHours(xr(n),0,0,0),a}}]),t}(P),Hd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",80),v(_(r),"incompatibleTokens",["a","b","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})||n.dayPeriod(a,{width:"abbreviated",context:"formatting"})||n.dayPeriod(a,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(a,o,n){return a.setUTCHours(xr(n),0,0,0),a}}]),t}(P),Bd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",70),v(_(r),"incompatibleTokens",["H","K","k","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"h":return z($.hour12h,a);case"ho":return n.ordinalNumber(a,{unit:"hour"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=1&&o<=12}},{key:"set",value:function(a,o,n){var s=a.getUTCHours()>=12;return s&&n<12?a.setUTCHours(n+12,0,0,0):!s&&n===12?a.setUTCHours(0,0,0,0):a.setUTCHours(n,0,0,0),a}}]),t}(P),Ud=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",70),v(_(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"H":return z($.hour23h,a);case"Ho":return n.ordinalNumber(a,{unit:"hour"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=0&&o<=23}},{key:"set",value:function(a,o,n){return a.setUTCHours(n,0,0,0),a}}]),t}(P),qd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",70),v(_(r),"incompatibleTokens",["h","H","k","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"K":return z($.hour11h,a);case"Ko":return n.ordinalNumber(a,{unit:"hour"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=0&&o<=11}},{key:"set",value:function(a,o,n){var s=a.getUTCHours()>=12;return s&&n<12?a.setUTCHours(n+12,0,0,0):a.setUTCHours(n,0,0,0),a}}]),t}(P),jd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",70),v(_(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"k":return z($.hour24h,a);case"ko":return n.ordinalNumber(a,{unit:"hour"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=1&&o<=24}},{key:"set",value:function(a,o,n){var s=n<=24?n%24:n;return a.setUTCHours(s,0,0,0),a}}]),t}(P),Wd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",60),v(_(r),"incompatibleTokens",["t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"m":return z($.minute,a);case"mo":return n.ordinalNumber(a,{unit:"minute"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=0&&o<=59}},{key:"set",value:function(a,o,n){return a.setUTCMinutes(n,0,0),a}}]),t}(P),Yd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",50),v(_(r),"incompatibleTokens",["t","T"]),r}return C(t,[{key:"parse",value:function(a,o,n){switch(o){case"s":return z($.second,a);case"so":return n.ordinalNumber(a,{unit:"second"});default:return F(o.length,a)}}},{key:"validate",value:function(a,o){return o>=0&&o<=59}},{key:"set",value:function(a,o,n){return a.setUTCSeconds(n,0),a}}]),t}(P),Gd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",30),v(_(r),"incompatibleTokens",["t","T"]),r}return C(t,[{key:"parse",value:function(a,o){var n=function(l){return Math.floor(l*Math.pow(10,-o.length+3))};return H(F(o.length,a),n)}},{key:"set",value:function(a,o,n){return a.setUTCMilliseconds(n),a}}]),t}(P),Kd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",10),v(_(r),"incompatibleTokens",["t","T","x"]),r}return C(t,[{key:"parse",value:function(a,o){switch(o){case"X":return pe(ue.basicOptionalMinutes,a);case"XX":return pe(ue.basic,a);case"XXXX":return pe(ue.basicOptionalSeconds,a);case"XXXXX":return pe(ue.extendedOptionalSeconds,a);case"XXX":default:return pe(ue.extended,a)}}},{key:"set",value:function(a,o,n){return o.timestampIsSet?a:new Date(a.getTime()-n)}}]),t}(P),Xd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",10),v(_(r),"incompatibleTokens",["t","T","X"]),r}return C(t,[{key:"parse",value:function(a,o){switch(o){case"x":return pe(ue.basicOptionalMinutes,a);case"xx":return pe(ue.basic,a);case"xxxx":return pe(ue.basicOptionalSeconds,a);case"xxxxx":return pe(ue.extendedOptionalSeconds,a);case"xxx":default:return pe(ue.extended,a)}}},{key:"set",value:function(a,o,n){return o.timestampIsSet?a:new Date(a.getTime()-n)}}]),t}(P),Qd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",40),v(_(r),"incompatibleTokens","*"),r}return C(t,[{key:"parse",value:function(a){return $o(a)}},{key:"set",value:function(a,o,n){return[new Date(n*1e3),{timestampIsSet:!0}]}}]),t}(P),Jd=function(i){I(t,i);var e=S(t);function t(){var r;x(this,t);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];return r=e.call.apply(e,[this].concat(o)),v(_(r),"priority",20),v(_(r),"incompatibleTokens","*"),r}return C(t,[{key:"parse",value:function(a){return $o(a)}},{key:"set",value:function(a,o,n){return[new Date(n),{timestampIsSet:!0}]}}]),t}(P),Zd={G:new md,y:new gd,Y:new bd,R:new yd,u:new wd,Q:new xd,q:new Cd,M:new kd,L:new Ed,w:new Sd,I:new Td,d:new Od,D:new Vd,E:new Md,e:new Nd,c:new Ld,i:new Rd,a:new Fd,b:new $d,B:new Hd,h:new Bd,H:new Ud,K:new qd,k:new jd,m:new Wd,s:new Yd,S:new Gd,X:new Kd,x:new Xd,t:new Qd,T:new Jd},eh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,th=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ih=/^'([^]*?)'?$/,rh=/''/g,ah=/\S/,oh=/[a-zA-Z]/;function De(i,e,t,r){var a,o,n,s,l,d,c,u,p,m,y,N,D,O;R(3,arguments);var A=String(i),q=String(e),j=et(),de=(a=(o=void 0)!==null&&o!==void 0?o:j.locale)!==null&&a!==void 0?a:Lo;if(!de.match)throw new RangeError("locale must contain match property");var we=ee((n=(s=(l=(d=void 0)!==null&&d!==void 0?d:void 0)!==null&&l!==void 0?l:j.firstWeekContainsDate)!==null&&s!==void 0?s:(c=j.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(we>=1&&we<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var at=ee((p=(m=(y=(N=void 0)!==null&&N!==void 0?N:void 0)!==null&&y!==void 0?y:j.weekStartsOn)!==null&&m!==void 0?m:(D=j.locale)===null||D===void 0||(O=D.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&p!==void 0?p:0);if(!(at>=0&&at<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(q==="")return A===""?U(t):new Date(NaN);var ot={firstWeekContainsDate:we,weekStartsOn:at,locale:de},nt=[new pd],Ti=q.match(th).map(function(W){var L=W[0];if(L in Gi){var ne=Gi[L];return ne(W,de.formatLong)}return W}).join("").match(eh),G=[],te=wa(Ti),Ae;try{var qs=function(){var L=Ae.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&No(L)&&ei(L,q,i),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Mo(L)&&ei(L,q,i);var ne=L[0],Bt=Zd[ne];if(Bt){var ua=Bt.incompatibleTokens;if(Array.isArray(ua)){var pa=G.find(function(ma){return ua.includes(ma.token)||ma.token===ne});if(pa)throw new RangeError("The format string mustn't contain `".concat(pa.fullToken,"` and `").concat(L,"` at the same time"))}else if(Bt.incompatibleTokens==="*"&&G.length>0)throw new RangeError("The format string mustn't contain `".concat(L,"` and any other token at the same time"));G.push({token:ne,fullToken:L});var Di=Bt.run(A,L,de.match,ot);if(!Di)return{v:new Date(NaN)};nt.push(Di.setter),A=Di.rest}else{if(ne.match(oh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ne+"`");if(L==="''"?L="'":ne==="'"&&(L=nh(L)),A.indexOf(L)===0)A=A.slice(L.length);else return{v:new Date(NaN)}}};for(te.s();!(Ae=te.n()).done;){var la=qs();if(be(la)==="object")return la.v}}catch(W){te.e(W)}finally{te.f()}if(A.length>0&&ah.test(A))return new Date(NaN);var js=nt.map(function(W){return W.priority}).sort(function(W,L){return L-W}).filter(function(W,L,ne){return ne.indexOf(W)===L}).map(function(W){return nt.filter(function(L){return L.priority===W}).sort(function(L,ne){return ne.subPriority-L.subPriority})}).map(function(W){return W[0]}),Pi=U(t);if(isNaN(Pi.getTime()))return new Date(NaN);var st=Ao(Pi,Vo(Pi)),da={},$t=wa(js),ha;try{for($t.s();!(ha=$t.n()).done;){var ca=ha.value;if(!ca.validate(st,ot))return new Date(NaN);var Ht=ca.set(st,da,ot);Array.isArray(Ht)?(st=Ht[0],sd(da,Ht[1])):st=Ht}}catch(W){$t.e(W)}finally{$t.f()}return st}function nh(i){return i.match(ih)[1].replace(rh,"'")}function xa(i,e){R(2,arguments);var t=U(i),r=U(e);return t.getTime()>r.getTime()}function Ca(i,e){R(2,arguments);var t=U(i),r=U(e);return t.getTime()<r.getTime()}function ka(i,e,t){return R(2,arguments),So(De(i,e,new Date,t))}const sh='*,*::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__manual-mode::part(toggle-button){display:none}.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}',lh=sh,Uo=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.touched=!1,this.formatDate=e=>{const{year:t,month:r,day:a}=e,o=new Date(t,r,a);return ba(o,this.dateFormat)},this.parseDate=e=>{const t=De(e,this.dateFormat,new Date);return{year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.handleDocumentIdUpdate=e=>{if(this.name!==X.BIRTHDATE)return;const t=e.detail;this.value=t,this.valueAsDate=De(this.value||"",X.DATE_FORMAT,new Date),this.touched=!0,this.datePicker&&(this.datePicker.value=this.value),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.valueHandler({name:this.name,value:this.value})},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="yyyy-MM-dd",this.emitOnClick=!1,this.enableSouthAfricanMode=void 0,this.enableManualDateInput=!1,this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}get formattedValue(){if(!this.value)return"";const i=De(this.value,"yyyy-MM-dd",new Date);return ba(i,this.dateFormat)}handleStylingChange(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(i){this.sendValidityState.emit(i)}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}handleCustomRegistrationChange(i){i?window.addEventListener("documentIdUpdated",this.handleDocumentIdUpdate):window.removeEventListener("documentIdUpdated",this.handleDocumentIdUpdate)}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}connectedCallback(){var i,e;this.minDate=De(((i=this.validation.min)===null||i===void 0?void 0:i.toString())||"","yyyy-MM-dd",new Date),this.maxDate=De(((e=this.validation.max)===null||e===void 0?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 i=this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');i&&i.addEventListener("click",()=>this.handleCalendarIconClick()),this.datePicker.addEventListener("opened-changed",e=>{e.detail.value===!0?this.errorMessage="":(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0)})}this.enableSouthAfricanMode&&window.addEventListener("documentIdUpdated",this.handleDocumentIdUpdate),this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value})),this.isValid=this.setValidity()}disconnectedCallback(){this.enableSouthAfricanMode&&window.removeEventListener("documentIdUpdated",this.handleDocumentIdUpdate)}handleCalendarIconClick(){this.datePicker.opened&&this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}handleInput(i){this.value=i.target.value,this.touched=!0,this.valueAsDate=De(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0),this.enableSouthAfricanMode&&window.dispatchEvent(new CustomEvent("birthDateUpdated",{detail:{birthDate:this.value}}))}handleValidated(){this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()}setValidity(){return Ca(this.valueAsDate,this.minDate)||xa(this.valueAsDate,this.maxDate)||!ka(this.formattedValue,this.dateFormat)?!1:this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return b("requiredError",this.language);if(this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow)return b("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}});if(Ca(this.valueAsDate,this.minDate)||xa(this.valueAsDate,this.maxDate))return b("dateError2",this.language);if(!ka(this.formattedValue,this.dateFormat))return b("dateFormatError",this.language)}renderTooltip(){return this.showTooltip?h.h("div",{class:`date__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){let i="";return this.touched&&(i=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"b8f91a203d028d6effe0cb976465756841453300",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:e=>this.stylingContainer=e},h.h("label",{key:"e5d9bda31742bec5c4e24e390941688fd4eeb239",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName,h.h("span",{key:"8055cfcb8ed54eea9f7b4f7c3719267aa258fc78",class:this.validation.mandatory?"date__label--required":""})),h.h("vaadin-date-picker",{key:"a2bd1e51e96308d02ee0462ff681a818d008399f",id:`${this.name}__input`,type:"date",class:`date__input ${i} ${this.enableManualDateInput&&"date__manual-mode"}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:e=>this.handleInput(e),onValidated:()=>this.handleValidated(),autoOpenDisabled:this.enableManualDateInput}),h.h("small",{key:"6f7e5bead37a71932d678be3dc9ff36170871289",class:"date__error-message"},this.errorMessage),this.tooltip&&h.h("img",{key:"c67702d9aa5ee40666c772bc9612007fdd69af80",class:"date__tooltip-icon",src:le,alt:"",ref:e=>this.tooltipIconReference=e,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return h.getElement(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],enableSouthAfricanMode:["handleCustomRegistrationChange"]}}};Uo.style=lh;const dh='*,*::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}',hh=dh,qo=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.validationPattern="",this.touched=!1,this.handleInput=e=>{this.value=e.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 e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(i){this.sendValidityState.emit(i)}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}valueChangedHandler(i){this.isDuplicateInput&&this.name===i.detail.name+"Duplicate"&&(this.duplicateInputValue=i.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 i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i,e,t,r;if(this.inputReference.validity.valueMissing)return b("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return b("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.patternMismatch){const a=(i=this.validation.custom.find(n=>n.rule==="regex"))===null||i===void 0?void 0:i.errorKey,o=(e=this.validation.custom.find(n=>n.rule==="regex"))===null||e===void 0?void 0:e.errorMessage;return b(`${a}`,this.language)?b(`${a}`,this.language):o}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const a=(t=this.validation.custom.find(n=>n.rule==="duplicate-input"))===null||t===void 0?void 0:t.errorKey,o=(r=this.validation.custom.find(n=>n.rule==="duplicate-input"))===null||r===void 0?void 0:r.errorMessage;return b(`${a}`,this.language)?b(`${a}`,this.language):o}}renderTooltip(){return this.showTooltip?h.h("div",{class:`email__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){let i="";return this.touched&&(i=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"723df8f3a6e8c57fe19082400971daf50f5c981d",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:e=>this.stylingContainer=e},h.h("div",{key:"581d6e02b63d1c659ae44424518f64db450d5365",class:"email__wrapper--flex"},h.h("label",{key:"11e6a848f6f04903989b3ab2075865f6e279c087",class:`email__label ${this.validation.mandatory?"email__label--required":""}`,htmlFor:`${this.name}__input`},this.displayName),h.h("div",{key:"73e11520cffbddda1a2aeb4b560e7f4cf456e2fb",class:"email__wrapper--relative"},this.tooltip&&h.h("img",{key:"e8571ce14b9b98311daf1712ebde7d6da9b5a6a6",class:"email__tooltip-icon",src:le,alt:"",ref:e=>this.tooltipIconReference=e,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),h.h("input",{key:"dd05ef0b4d906598c6d5775a78ccbdc9ea81cb8c",id:`${this.name}__input`,type:"email",class:`email__input ${i}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:e=>this.inputReference=e,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),h.h("small",{key:"0d2d41207f8274d8c6f69143131265ef5b458689",class:"email__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};qo.style=hh;var ch=Object.defineProperty,uh=Object.defineProperties,ph=Object.getOwnPropertyDescriptors,Ea=Object.getOwnPropertySymbols,mh=Object.prototype.hasOwnProperty,fh=Object.prototype.propertyIsEnumerable,Xi=(i,e,t)=>e in i?ch(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ri=(i,e)=>{for(var t in e||(e={}))mh.call(e,t)&&Xi(i,t,e[t]);if(Ea)for(var t of Ea(e))fh.call(e,t)&&Xi(i,t,e[t]);return i},jo=(i,e)=>uh(i,ph(e)),Q=(i,e,t)=>(Xi(i,typeof e!="symbol"?e+"":e,t),t),ai=(i,e,t)=>new Promise((r,a)=>{var o=l=>{try{s(t.next(l))}catch(d){a(d)}},n=l=>{try{s(t.throw(l))}catch(d){a(d)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,n);s((t=t.apply(i,e)).next())});/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
5
5
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -19,9 +19,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/const oi=globalThis,Oa=i=>i,ni=oi.trustedTypes,Va=ni?ni.createPolicy("lit-html",{createHTML:i=>i}):void 0,Go="$lit$",
|
|
23
|
-
\f\r]`,ht=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ma=/-->/g,Na=/>/g,
|
|
24
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),La=/'/g,za=/"/g,Xo=/^(?:script|style|textarea|title)$/i,Qe=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),Ra=new WeakMap,
|
|
22
|
+
*/const oi=globalThis,Oa=i=>i,ni=oi.trustedTypes,Va=ni?ni.createPolicy("lit-html",{createHTML:i=>i}):void 0,Go="$lit$",ke=`lit$${Math.random().toFixed(9).slice(2)}$`,Ko="?"+ke,Eh=`<${Ko}>`,Le=document,yt=()=>Le.createComment(""),wt=i=>i===null||typeof i!="object"&&typeof i!="function",Sr=Array.isArray,Ih=i=>Sr(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",Vi=`[
|
|
23
|
+
\f\r]`,ht=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ma=/-->/g,Na=/>/g,Te=RegExp(`>|${Vi}(?:([^\\s"'>=/]+)(${Vi}*=${Vi}*(?:[^
|
|
24
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),La=/'/g,za=/"/g,Xo=/^(?:script|style|textarea|title)$/i,Qe=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),Ra=new WeakMap,Oe=Le.createTreeWalker(Le,129);function Qo(i,e){if(!Sr(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Va!==void 0?Va.createHTML(e):e}const Sh=(i,e)=>{const t=i.length-1,r=[];let a,o=e===2?"<svg>":e===3?"<math>":"",n=ht;for(let s=0;s<t;s++){const l=i[s];let d,c,u=-1,p=0;for(;p<l.length&&(n.lastIndex=p,c=n.exec(l),c!==null);)p=n.lastIndex,n===ht?c[1]==="!--"?n=Ma:c[1]!==void 0?n=Na:c[2]!==void 0?(Xo.test(c[2])&&(a=RegExp("</"+c[2],"g")),n=Te):c[3]!==void 0&&(n=Te):n===Te?c[0]===">"?(n=a!=null?a:ht,u=-1):c[1]===void 0?u=-2:(u=n.lastIndex-c[2].length,d=c[1],n=c[3]===void 0?Te:c[3]==='"'?za:La):n===za||n===La?n=Te:n===Ma||n===Na?n=ht:(n=Te,a=void 0);const m=n===Te&&i[s+1].startsWith("/>")?" ":"";o+=n===ht?l+Eh:u>=0?(r.push(d),l.slice(0,u)+Go+l.slice(u)+ke+m):l+ke+(u===-2?s:m)}return[Qo(i,o+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class xt{constructor({strings:e,_$litType$:t},r){let a;this.parts=[];let o=0,n=0;const s=e.length-1,l=this.parts,[d,c]=Sh(e,t);if(this.el=xt.createElement(d,r),Oe.currentNode=this.el.content,t===2||t===3){const u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(a=Oe.nextNode())!==null&&l.length<s;){if(a.nodeType===1){if(a.hasAttributes())for(const u of a.getAttributeNames())if(u.endsWith(Go)){const p=c[n++],m=a.getAttribute(u).split(ke),y=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:y[2],strings:m,ctor:y[1]==="."?Th:y[1]==="?"?Ph:y[1]==="@"?Dh:vi}),a.removeAttribute(u)}else u.startsWith(ke)&&(l.push({type:6,index:o}),a.removeAttribute(u));if(Xo.test(a.tagName)){const u=a.textContent.split(ke),p=u.length-1;if(p>0){a.textContent=ni?ni.emptyScript:"";for(let m=0;m<p;m++)a.append(u[m],yt()),Oe.nextNode(),l.push({type:2,index:++o});a.append(u[p],yt())}}}else if(a.nodeType===8)if(a.data===Ko)l.push({type:2,index:o});else{let u=-1;for(;(u=a.data.indexOf(ke,u+1))!==-1;)l.push({type:7,index:o}),u+=ke.length-1}o++}}static createElement(e,t){const r=Le.createElement("template");return r.innerHTML=e,r}}function Je(i,e,t=i,r){var a,o,n;if(e===Qe)return e;let s=r!==void 0?(a=t._$Co)==null?void 0:a[r]:t._$Cl;const l=wt(e)?void 0:e._$litDirective$;return(s==null?void 0:s.constructor)!==l&&((o=s==null?void 0:s._$AO)==null||o.call(s,!1),l===void 0?s=void 0:(s=new l(i),s._$AT(i,t,r)),r!==void 0?((n=t._$Co)!=null?n:t._$Co=[])[r]=s:t._$Cl=s),s!==void 0&&(e=Je(i,s._$AS(i,e.values),s,r)),e}class Ah{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:r},parts:a}=this._$AD,o=((t=e==null?void 0:e.creationScope)!=null?t:Le).importNode(r,!0);Oe.currentNode=o;let n=Oe.nextNode(),s=0,l=0,d=a[0];for(;d!==void 0;){if(s===d.index){let c;d.type===2?c=new Ot(n,n.nextSibling,this,e):d.type===1?c=new d.ctor(n,d.name,d.strings,this,e):d.type===6&&(c=new Oh(n,this,e)),this._$AV.push(c),d=a[++l]}s!==(d==null?void 0:d.index)&&(n=Oe.nextNode(),s++)}return Oe.currentNode=Le,o}p(e){let t=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class Ot{get _$AU(){var e,t;return(t=(e=this._$AM)==null?void 0:e._$AU)!=null?t:this._$Cv}constructor(e,t,r,a){var o;this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=a,this._$Cv=(o=a==null?void 0:a.isConnected)!=null?o:!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Je(this,e,t),wt(e)?e===Y||e==null||e===""?(this._$AH!==Y&&this._$AR(),this._$AH=Y):e!==this._$AH&&e!==Qe&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ih(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Y&&wt(this._$AH)?this._$AA.nextSibling.data=e:this.T(Le.createTextNode(e)),this._$AH=e}$(e){var t;const{values:r,_$litType$:a}=e,o=typeof a=="number"?this._$AC(e):(a.el===void 0&&(a.el=xt.createElement(Qo(a.h,a.h[0]),this.options)),a);if(((t=this._$AH)==null?void 0:t._$AD)===o)this._$AH.p(r);else{const n=new Ah(o,this),s=n.u(this.options);n.p(r),this.T(s),this._$AH=n}}_$AC(e){let t=Ra.get(e.strings);return t===void 0&&Ra.set(e.strings,t=new xt(e)),t}k(e){Sr(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,a=0;for(const o of e)a===t.length?t.push(r=new Ot(this.O(yt()),this.O(yt()),this,this.options)):r=t[a],r._$AI(o),a++;a<t.length&&(this._$AR(r&&r._$AB.nextSibling,a),t.length=a)}_$AR(e=this._$AA.nextSibling,t){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,t);e!==this._$AB;){const a=Oa(e).nextSibling;Oa(e).remove(),e=a}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}}class vi{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,a,o){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Y}_$AI(e,t=this,r,a){const o=this.strings;let n=!1;if(o===void 0)e=Je(this,e,t,0),n=!wt(e)||e!==this._$AH&&e!==Qe,n&&(this._$AH=e);else{const s=e;let l,d;for(e=o[0],l=0;l<o.length-1;l++)d=Je(this,s[r+l],t,l),d===Qe&&(d=this._$AH[l]),n||(n=!wt(d)||d!==this._$AH[l]),d===Y?e=Y:e!==Y&&(e+=(d!=null?d:"")+o[l+1]),this._$AH[l]=d}n&&!a&&this.j(e)}j(e){e===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class Th extends vi{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Y?void 0:e}}class Ph extends vi{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Y)}}class Dh extends vi{constructor(e,t,r,a,o){super(e,t,r,a,o),this.type=5}_$AI(e,t=this){var r;if((e=(r=Je(this,e,t,0))!=null?r:Y)===Qe)return;const a=this._$AH,o=e===Y&&a!==Y||e.capture!==a.capture||e.once!==a.once||e.passive!==a.passive,n=e!==Y&&(a===Y||o);o&&this.element.removeEventListener(this.name,this,a),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,r;typeof this._$AH=="function"?this._$AH.call((r=(t=this.options)==null?void 0:t.host)!=null?r:this.element,e):this._$AH.handleEvent(e)}}class Oh{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Je(this,e)}}const Fa=oi.litHtmlPolyfillSupport;var $a;Fa==null||Fa(xt,Ot),(($a=oi.litHtmlVersions)!=null?$a:oi.litHtmlVersions=[]).push("3.3.2");const Jo=(i,e,t)=>{var r,a;const o=(r=t==null?void 0:t.renderBefore)!=null?r:e;let n=o._$litPart$;if(n===void 0){const s=(a=t==null?void 0:t.renderBefore)!=null?a:null;o._$litPart$=n=new Ot(e.insertBefore(yt(),s),s,void 0,t!=null?t:{})}return n._$AI(i),n};/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -937,7 +937,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
937
937
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
938
938
|
Code distributed by Google as part of the polymer project is also
|
|
939
939
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
940
|
-
*/function tr(i){return i.indexOf(".")>=0}function
|
|
940
|
+
*/function tr(i){return i.indexOf(".")>=0}function ze(i){let e=i.indexOf(".");return e===-1?i:i.slice(0,e)}function pn(i,e){return i.indexOf(e+".")===0}function Et(i,e){return e.indexOf(i+".")===0}function It(i,e,t){return e+t.slice(i.length)}function uc(i,e){return i===e||pn(i,e)||Et(i,e)}function ft(i){if(Array.isArray(i)){let e=[];for(let t=0;t<i.length;t++){let r=i[t].toString().split(".");for(let a=0;a<r.length;a++)e.push(r[a])}return e.join(".")}else return i}function mn(i){return Array.isArray(i)?ft(i).split("."):i.toString().split(".")}function Z(i,e,t){let r=i,a=mn(e);for(let o=0;o<a.length;o++){if(!r)return;let n=a[o];r=r[n]}return t&&(t.path=a.join(".")),r}function Xa(i,e,t){let r=i,a=mn(e),o=a[a.length-1];if(a.length>1){for(let n=0;n<a.length-1;n++){let s=a[n];if(r=r[s],!r)return}r[o]=t}else r[e]=t;return a.join(".")}/**
|
|
941
941
|
@license
|
|
942
942
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
943
943
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -987,7 +987,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
987
987
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
988
988
|
* Google as part of the polymer project is also subject to an additional IP
|
|
989
989
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
990
|
-
*/let St=0;const At=[],T={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},xn="__computeInfo",Vc=/[A-Z]/;function Mi(i,e,t){let r=i[e];if(!r)r=i[e]={};else if(!i.hasOwnProperty(e)&&(r=i[e]=Object.create(i[e]),t))for(let a in r){let o=r[a],n=r[a]=Array(o.length);for(let s=0;s<o.length;s++)n[s]=o[s]}return r}function vt(i,e,t,r,a,o){if(e){let n=!1;const s=St++;for(let l in t){let d=a?Le(l):l,c=e[d];if(c)for(let u=0,p=c.length,m;u<p&&(m=c[u]);u++)(!m.info||m.info.lastRun!==s)&&(!a||Or(l,m.trigger))&&(m.info&&(m.info.lastRun=s),m.fn(i,l,t,r,m.info,a,o),n=!0)}return n}return!1}function Mc(i,e,t,r,a,o,n,s){let l=!1,d=n?Le(r):r,c=e[d];if(c)for(let u=0,p=c.length,m;u<p&&(m=c[u]);u++)(!m.info||m.info.lastRun!==t)&&(!n||Or(r,m.trigger))&&(m.info&&(m.info.lastRun=t),m.fn(i,r,a,o,m.info,n,s),l=!0);return l}function Or(i,e){if(e){let t=e.name;return t==i||!!(e.structured&&pn(t,i))||!!(e.wildcard&&Et(t,i))}else return!0}function Za(i,e,t,r,a){let o=typeof a.method=="string"?i[a.method]:a.method,n=a.property;o?o.call(i,i.__data[n],r[n]):a.dynamicFn||console.warn("observer method `"+a.method+"` not defined")}function Nc(i,e,t,r,a){let o=i[T.NOTIFY],n,s=St++;for(let d in e)e[d]&&(o&&Mc(i,o,s,d,t,r,a)||a&&Lc(i,d,t))&&(n=!0);let l;n&&(l=i.__dataHost)&&l._invalidateProperties&&l._invalidateProperties()}function Lc(i,e,t){let r=Le(e);if(r!==e){let a=gi(r)+"-changed";return Cn(i,a,t[e],e),!0}return!1}function Cn(i,e,t,r){let a={value:t,queueProperty:!0};r&&(a.path=r),K(i).dispatchEvent(new CustomEvent(e,{detail:a}))}function zc(i,e,t,r,a,o){let n=(o?Le(e):e)!=e?e:null,s=n?Z(i,n):i.__data[e];n&&s===void 0&&(s=t[e]),Cn(i,a.eventName,s,n)}function Rc(i,e,t,r,a){let o,n=i.detail,s=n&&n.path;s?(r=It(t,r,s),o=n&&n.value):o=i.currentTarget[t],o=a?!o:o,(!e[T.READ_ONLY]||!e[T.READ_ONLY][r])&&e._setPendingPropertyOrPath(r,o,!0,!!s)&&(!n||!n.queueProperty)&&e._invalidateProperties()}function Fc(i,e,t,r,a){let o=i.__data[e];li&&(o=li(o,a.attrName,"attribute",i)),i._propertyToAttribute(e,a.attrName,o)}function $c(i,e,t,r){let a=i[T.COMPUTE];if(a)if(ic){St++;const o=Bc(i),n=[];for(let l in e)eo(l,a,n,o,r);let s;for(;s=n.shift();)kn(i,"",e,t,s)&&eo(s.methodInfo,a,n,o,r);Object.assign(t,i.__dataOld),Object.assign(e,i.__dataPending),i.__dataPending=null}else{let o=e;for(;vt(i,a,o,t,r);)Object.assign(t,i.__dataOld),Object.assign(e,i.__dataPending),o=i.__dataPending,i.__dataPending=null}}const Hc=(i,e,t)=>{let r=0,a=e.length-1,o=-1;for(;r<=a;){const n=r+a>>1,s=t.get(e[n].methodInfo)-t.get(i.methodInfo);if(s<0)r=n+1;else if(s>0)a=n-1;else{o=n;break}}o<0&&(o=a+1),e.splice(o,0,i)},eo=(i,e,t,r,a)=>{const o=a?Le(i):i,n=e[o];if(n)for(let s=0;s<n.length;s++){const l=n[s];l.info.lastRun!==St&&(!a||Or(i,l.trigger))&&(l.info.lastRun=St,Hc(l.info,t,r))}};function Bc(i){let e=i.constructor.__orderedComputedDeps;if(!e){e=new Map;const t=i[T.COMPUTE];let{counts:r,ready:a,total:o}=Uc(i),n;for(;n=a.shift();){e.set(n,e.size);const s=t[n];s&&s.forEach(l=>{const d=l.info.methodInfo;--o,--r[d]===0&&a.push(d)})}o!==0&&console.warn(`Computed graph for ${i.localName} incomplete; circular?`),i.constructor.__orderedComputedDeps=e}return e}function Uc(i){const e=i[xn],t={},r=i[T.COMPUTE],a=[];let o=0;for(let n in e){const s=e[n];o+=t[n]=s.args.filter(l=>!l.literal).length+(s.dynamicFn?1:0)}for(let n in r)e[n]||a.push(n);return{counts:t,ready:a,total:o}}function kn(i,e,t,r,a){let o=rr(i,e,t,r,a);if(o===At)return!1;let n=a.methodInfo;return i.__dataHasAccessor&&i.__dataHasAccessor[n]?i._setPendingProperty(n,o,!0):(i[n]=o,!1)}function qc(i,e,t){let r=i.__dataLinkedPaths;if(r){let a;for(let o in r){let n=r[o];Et(o,e)?(a=It(o,n,e),i._setPendingPropertyOrPath(a,t,!0,!0)):Et(n,e)&&(a=It(n,o,e),i._setPendingPropertyOrPath(a,t,!0,!0))}}}function Ni(i,e,t,r,a,o,n){t.bindings=t.bindings||[];let s={kind:r,target:a,parts:o,literal:n,isCompound:o.length!==1};if(t.bindings.push(s),Kc(s)){let{event:d,negate:c}=s.parts[0];s.listenerEvent=d||gi(a)+"-changed",s.listenerNegate=c}let l=e.nodeInfoList.length;for(let d=0;d<s.parts.length;d++){let c=s.parts[d];c.compoundIndex=d,jc(i,e,s,c,l)}}function jc(i,e,t,r,a){if(!r.literal)if(t.kind==="attribute"&&t.target[0]==="-")console.warn("Cannot set attribute "+t.target+' because "-" is not a valid attribute starting character');else{let o=r.dependencies,n={index:a,binding:t,part:r,evaluator:i};for(let s=0;s<o.length;s++){let l=o[s];typeof l=="string"&&(l=In(l),l.wildcard=!0),i._addTemplatePropertyEffect(e,l.rootProperty,{fn:Wc,info:n,trigger:l})}}}function Wc(i,e,t,r,a,o,n){let s=n[a.index],l=a.binding,d=a.part;if(o&&d.source&&e.length>d.source.length&&l.kind=="property"&&!l.isCompound&&s.__isPropertyEffectsClient&&s.__dataHasAccessor&&s.__dataHasAccessor[l.target]){let c=t[e];e=It(d.source,l.target,e),s._setPendingPropertyOrPath(e,c,!1,!0)&&i._enqueueClient(s)}else{let c=a.evaluator._evaluateBinding(i,d,e,t,r,o);c!==At&&Yc(i,s,l,d,c)}}function Yc(i,e,t,r,a){if(a=Gc(e,a,t,r),li&&(a=li(a,t.target,t.kind,e)),t.kind=="attribute")i._valueToNodeAttribute(e,a,t.target);else{let o=t.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[o]?(!e[T.READ_ONLY]||!e[T.READ_ONLY][o])&&e._setPendingProperty(o,a)&&i._enqueueClient(e):i._setUnmanagedPropertyToNode(e,o,a)}}function Gc(i,e,t,r){if(t.isCompound){let a=i.__dataCompoundStorage[t.target];a[r.compoundIndex]=e,e=a.join("")}return t.kind!=="attribute"&&(t.target==="textContent"||t.target==="value"&&(i.localName==="input"||i.localName==="textarea"))&&(e=e==null?"":e),e}function Kc(i){return!!i.target&&i.kind!="attribute"&&i.kind!="text"&&!i.isCompound&&i.parts[0].mode==="{"}function Xc(i,e){let{nodeList:t,nodeInfoList:r}=e;if(r.length)for(let a=0;a<r.length;a++){let o=r[a],n=t[a],s=o.bindings;if(s)for(let l=0;l<s.length;l++){let d=s[l];Qc(n,d),Jc(n,i,d)}n.__dataHost=i}}function Qc(i,e){if(e.isCompound){let t=i.__dataCompoundStorage||(i.__dataCompoundStorage={}),r=e.parts,a=new Array(r.length);for(let n=0;n<r.length;n++)a[n]=r[n].literal;let o=e.target;t[o]=a,e.literal&&e.kind=="property"&&(o==="className"&&(i=K(i)),i[o]=e.literal)}}function Jc(i,e,t){if(t.listenerEvent){let r=t.parts[0];i.addEventListener(t.listenerEvent,function(a){Rc(a,e,t.target,r.source,r.negate)})}}function to(i,e,t,r,a,o){o=e.static||o&&(typeof o!="object"||o[e.methodName]);let n={methodName:e.methodName,args:e.args,methodInfo:a,dynamicFn:o};for(let s=0,l;s<e.args.length&&(l=e.args[s]);s++)l.literal||i._addPropertyEffect(l.rootProperty,t,{fn:r,info:n,trigger:l});return o&&i._addPropertyEffect(e.methodName,t,{fn:r,info:n}),n}function rr(i,e,t,r,a){let o=i._methodHost||i,n=o[a.methodName];if(n){let s=i._marshalArgs(a.args,e,t);return s===At?At:n.apply(o,s)}else a.dynamicFn||console.warn("method `"+a.methodName+"` not defined")}const Zc=[],En="(?:[a-zA-Z_$][\\w.:$\\-*]*)",eu="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",tu="(?:'(?:[^'\\\\]|\\\\.)*')",iu='(?:"(?:[^"\\\\]|\\\\.)*")',ru="(?:"+tu+"|"+iu+")",io="(?:("+En+"|"+eu+"|"+ru+")\\s*)",au="(?:"+io+"(?:,\\s*"+io+")*)",ou="(?:\\(\\s*(?:"+au+"?)\\)\\s*)",nu="("+En+"\\s*"+ou+"?)",su="(\\[\\[|{{)\\s*",lu="(?:]]|}})",du="(?:(!)\\s*)?",hu=su+du+nu+lu,ro=new RegExp(hu,"g");function ao(i){let e="";for(let t=0;t<i.length;t++){let r=i[t].literal;e+=r||""}return e}function Li(i){let e=i.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Zc};if(e[2].trim()){let r=e[2].replace(/\\,/g,",").split(",");return cu(r,t)}else return t}return null}function cu(i,e){return e.args=i.map(function(t){let r=In(t);return r.literal||(e.static=!1),r},this),e}function In(i){let e=i.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),t={name:e,value:"",literal:!1},r=e[0];switch(r==="-"&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':t.value=e.slice(1,-1),t.literal=!0;break;case"#":t.value=Number(e),t.literal=!0;break}return t.literal||(t.rootProperty=Le(e),t.structured=tr(e),t.structured&&(t.wildcard=e.slice(-2)==".*",t.wildcard&&(t.name=e.slice(0,-2)))),t}function oo(i,e,t){let r=Z(i,t);return r===void 0&&(r=e[t]),r}function Sn(i,e,t,r){const a={indexSplices:r};er&&!i._overrideLegacyUndefined&&(e.splices=a),i.notifyPath(t+".splices",a),i.notifyPath(t+".length",e.length),er&&!i._overrideLegacyUndefined&&(a.indexSplices=[])}function ct(i,e,t,r,a,o){Sn(i,e,t,[{index:r,addedCount:a,removed:o,object:e,type:"splice"}])}function uu(i){return i[0].toUpperCase()+i.substring(1)}const Vr=B(i=>{const e=Oc(xc(i));class t extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return T}_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(ut.length){let a=ut[ut.length-1];a._enqueueClient(this),this.__dataHost=a}}_initializeProtoProperties(a){this.__data=Object.create(a),this.__dataPending=Object.create(a),this.__dataOld={}}_initializeInstanceProperties(a){let o=this[T.READ_ONLY];for(let n in a)(!o||!o[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=a[n])}_addPropertyEffect(a,o,n){this._createPropertyAccessor(a,o==T.READ_ONLY);let s=Mi(this,o,!0)[a];s||(s=this[o][a]=[]),s.push(n)}_removePropertyEffect(a,o,n){let s=Mi(this,o,!0)[a],l=s.indexOf(n);l>=0&&s.splice(l,1)}_hasPropertyEffect(a,o){let n=this[o];return!!(n&&n[a])}_hasReadOnlyEffect(a){return this._hasPropertyEffect(a,T.READ_ONLY)}_hasNotifyEffect(a){return this._hasPropertyEffect(a,T.NOTIFY)}_hasReflectEffect(a){return this._hasPropertyEffect(a,T.REFLECT)}_hasComputedEffect(a){return this._hasPropertyEffect(a,T.COMPUTE)}_setPendingPropertyOrPath(a,o,n,s){if(s||Le(Array.isArray(a)?a[0]:a)!==a){if(!s){let l=Z(this,a);if(a=Xa(this,a,o),!a||!super._shouldPropertyChange(a,o,l))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(a,o,n))return qc(this,a,o),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[a])return this._setPendingProperty(a,o,n);this[a]=o}return!1}_setUnmanagedPropertyToNode(a,o,n){(n!==a[o]||typeof n=="object")&&(o==="className"&&(a=K(a)),a[o]=n)}_setPendingProperty(a,o,n){let s=this.__dataHasPaths&&tr(a),l=s?this.__dataTemp:this.__data;return this._shouldPropertyChange(a,o,l[a])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),a in this.__dataOld||(this.__dataOld[a]=this.__data[a]),s?this.__dataTemp[a]=o:this.__data[a]=o,this.__dataPending[a]=o,(s||this[T.NOTIFY]&&this[T.NOTIFY][a])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[a]=n),!0):!1}_setProperty(a,o){this._setPendingProperty(a,o,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(a){this.__dataPendingClients=this.__dataPendingClients||[],a!==this&&this.__dataPendingClients.push(a)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let a=this.__dataPendingClients;if(a){this.__dataPendingClients=null;for(let o=0;o<a.length;o++){let n=a[o];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(a,o){for(let n in a)(o||!this[T.READ_ONLY]||!this[T.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,a[n],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(a,o,n){let s=this.__dataHasPaths;this.__dataHasPaths=!1;let l;$c(this,o,n,s),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(o,n,s),this._flushClients(),vt(this,this[T.REFLECT],o,n,s),vt(this,this[T.OBSERVE],o,n,s),l&&Nc(this,l,o,n,s),this.__dataCounter==1&&(this.__dataTemp={})}_propagatePropertyChanges(a,o,n){this[T.PROPAGATE]&&vt(this,this[T.PROPAGATE],a,o,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,a,o,n)}_runEffectsForTemplate(a,o,n,s){const l=(d,c)=>{vt(this,a.propertyEffects,d,n,c,a.nodeList);for(let u=a.firstChild;u;u=u.nextSibling)this._runEffectsForTemplate(u,d,n,c)};a.runEffects?a.runEffects(l,o,s):l(o,s)}linkPaths(a,o){a=ft(a),o=ft(o),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[a]=o}unlinkPaths(a){a=ft(a),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[a]}notifySplices(a,o){let n={path:""},s=Z(this,a,n);Sn(this,s,n.path,o)}get(a,o){return Z(o||this,a)}set(a,o,n){n?Xa(n,a,o):(!this[T.READ_ONLY]||!this[T.READ_ONLY][a])&&this._setPendingPropertyOrPath(a,o,!0)&&this._invalidateProperties()}push(a,...o){let n={path:""},s=Z(this,a,n),l=s.length,d=s.push(...o);return o.length&&ct(this,s,n.path,l,o.length,[]),d}pop(a){let o={path:""},n=Z(this,a,o),s=!!n.length,l=n.pop();return s&&ct(this,n,o.path,n.length,0,[l]),l}splice(a,o,n,...s){let l={path:""},d=Z(this,a,l);o<0?o=d.length-Math.floor(-o):o&&(o=Math.floor(o));let c;return arguments.length===2?c=d.splice(o):c=d.splice(o,n,...s),(s.length||c.length)&&ct(this,d,l.path,o,s.length,c),c}shift(a){let o={path:""},n=Z(this,a,o),s=!!n.length,l=n.shift();return s&&ct(this,n,o.path,0,0,[l]),l}unshift(a,...o){let n={path:""},s=Z(this,a,n),l=s.unshift(...o);return o.length&&ct(this,s,n.path,0,o.length,[]),l}notifyPath(a,o){let n;if(arguments.length==1){let s={path:""};o=Z(this,a,s),n=s.path}else Array.isArray(a)?n=ft(a):n=a;this._setPendingPropertyOrPath(n,o,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(a,o){this._addPropertyEffect(a,T.READ_ONLY),o&&(this["_set"+uu(a)]=function(n){this._setProperty(a,n)})}_createPropertyObserver(a,o,n){let s={property:a,method:o,dynamicFn:!!n};this._addPropertyEffect(a,T.OBSERVE,{fn:Za,info:s,trigger:{name:a}}),n&&this._addPropertyEffect(o,T.OBSERVE,{fn:Za,info:s,trigger:{name:o}})}_createMethodObserver(a,o){let n=Li(a);if(!n)throw new Error("Malformed observer expression '"+a+"'");to(this,n,T.OBSERVE,rr,null,o)}_createNotifyingProperty(a){this._addPropertyEffect(a,T.NOTIFY,{fn:zc,info:{eventName:gi(a)+"-changed",property:a}})}_createReflectedProperty(a){let o=this.constructor.attributeNameForProperty(a);o[0]==="-"?console.warn("Property "+a+" cannot be reflected to attribute "+o+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(a,T.REFLECT,{fn:Fc,info:{attrName:o}})}_createComputedProperty(a,o,n){let s=Li(o);if(!s)throw new Error("Malformed computed expression '"+o+"'");const l=to(this,s,T.COMPUTE,kn,a,n);Mi(this,xn)[a]=l}_marshalArgs(a,o,n){const s=this.__data,l=[];for(let d=0,c=a.length;d<c;d++){let{name:u,structured:p,wildcard:m,value:y,literal:N}=a[d];if(!N)if(m){const D=Et(u,o),O=oo(s,n,D?o:u);y={path:D?o:u,value:O,base:D?Z(s,u):O}}else y=p?oo(s,n,u):s[u];if(er&&!this._overrideLegacyUndefined&&y===void 0&&a.length>1)return At;l[d]=y}return l}static addPropertyEffect(a,o,n){this.prototype._addPropertyEffect(a,o,n)}static createPropertyObserver(a,o,n){this.prototype._createPropertyObserver(a,o,n)}static createMethodObserver(a,o){this.prototype._createMethodObserver(a,o)}static createNotifyingProperty(a){this.prototype._createNotifyingProperty(a)}static createReadOnlyProperty(a,o){this.prototype._createReadOnlyProperty(a,o)}static createReflectedProperty(a){this.prototype._createReflectedProperty(a)}static createComputedProperty(a,o,n){this.prototype._createComputedProperty(a,o,n)}static bindTemplate(a){return this.prototype._bindTemplate(a)}_bindTemplate(a,o){let n=this.constructor._parseTemplate(a),s=this.__preBoundTemplateInfo==n;if(!s)for(let l in n.propertyEffects)this._createPropertyAccessor(l);if(o)if(n=Object.create(n),n.wasPreBound=s,!this.__templateInfo)this.__templateInfo=n;else{const l=a._parentTemplateInfo||this.__templateInfo,d=l.lastChild;n.parent=l,l.lastChild=n,n.previousSibling=d,d?d.nextSibling=n:l.firstChild=n}else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(a,o,n){let s=a.hostProps=a.hostProps||{};s[o]=!0;let l=a.propertyEffects=a.propertyEffects||{};(l[o]=l[o]||[]).push(n)}_stampTemplate(a,o){o=o||this._bindTemplate(a,!0),ut.push(this);let n=super._stampTemplate(a,o);if(ut.pop(),o.nodeList=n.nodeList,!o.wasPreBound){let s=o.childNodes=[];for(let l=n.firstChild;l;l=l.nextSibling)s.push(l)}return n.templateInfo=o,Xc(this,o),this.__dataClientsReady&&(this._runEffectsForTemplate(o,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(a){const o=a.templateInfo,{previousSibling:n,nextSibling:s,parent:l}=o;n?n.nextSibling=s:l&&(l.firstChild=s),s?s.previousSibling=n:l&&(l.lastChild=n),o.nextSibling=o.previousSibling=null;let d=o.childNodes;for(let c=0;c<d.length;c++){let u=d[c];K(K(u).parentNode).removeChild(u)}}static _parseTemplateNode(a,o,n){let s=e._parseTemplateNode.call(this,a,o,n);if(a.nodeType===Node.TEXT_NODE){let l=this._parseBindings(a.textContent,o);l&&(a.textContent=ao(l)||" ",Ni(this,o,n,"text","textContent",l),s=!0)}return s}static _parseTemplateNodeAttribute(a,o,n,s,l){let d=this._parseBindings(l,o);if(d){let c=s,u="property";Vc.test(s)?u="attribute":s[s.length-1]=="$"&&(s=s.slice(0,-1),u="attribute");let p=ao(d);return p&&u=="attribute"&&(s=="class"&&a.hasAttribute("class")&&(p+=" "+a.getAttribute(s)),a.setAttribute(s,p)),u=="attribute"&&c=="disable-upgrade$"&&a.setAttribute(s,""),a.localName==="input"&&c==="value"&&a.setAttribute(c,""),a.removeAttribute(c),u==="property"&&(s=fn(s)),Ni(this,o,n,u,s,d,p),!0}else return e._parseTemplateNodeAttribute.call(this,a,o,n,s,l)}static _parseTemplateNestedTemplate(a,o,n){let s=e._parseTemplateNestedTemplate.call(this,a,o,n);const l=a.parentNode,d=n.templateInfo,c=l.localName==="dom-if",u=l.localName==="dom-repeat";qa&&(c||u)&&(l.removeChild(a),n=n.parentInfo,n.templateInfo=d,n.noted=!0,s=!1);let p=d.hostProps;if(rc&&c)p&&(o.hostProps=Object.assign(o.hostProps||{},p),qa||(n.parentInfo.noted=!0));else{let m="{";for(let y in p){let N=[{mode:m,source:y,dependencies:[y],hostProp:!0}];Ni(this,o,n,"property","_host_"+y,N)}}return s}static _parseBindings(a,o){let n=[],s=0,l;for(;(l=ro.exec(a))!==null;){l.index>s&&n.push({literal:a.slice(s,l.index)});let d=l[1][0],c=!!l[2],u=l[3].trim(),p=!1,m="",y=-1;d=="{"&&(y=u.indexOf("::"))>0&&(m=u.substring(y+2),u=u.substring(0,y),p=!0);let N=Li(u),D=[];if(N){let{args:O,methodName:A}=N;for(let j=0;j<O.length;j++){let le=O[j];le.literal||D.push(le)}let q=o.dynamicFns;(q&&q[A]||N.static)&&(D.push(A),N.dynamicFn=!0)}else D.push(u);n.push({source:u,mode:d,negate:c,customEvent:p,signature:N,dependencies:D,event:m}),s=ro.lastIndex}if(s&&s<a.length){let d=a.substring(s);d&&n.push({literal:d})}return n.length?n:null}static _evaluateBinding(a,o,n,s,l,d){let c;return o.signature?c=rr(a,n,s,l,o.signature):n!=o.source?c=Z(a,o.source):d&&tr(n)?c=Z(a,n):c=a.__data[n],o.negate&&(c=!c),c}}return t}),ut=[];/**
|
|
990
|
+
*/let St=0;const At=[],T={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},xn="__computeInfo",Vc=/[A-Z]/;function Mi(i,e,t){let r=i[e];if(!r)r=i[e]={};else if(!i.hasOwnProperty(e)&&(r=i[e]=Object.create(i[e]),t))for(let a in r){let o=r[a],n=r[a]=Array(o.length);for(let s=0;s<o.length;s++)n[s]=o[s]}return r}function vt(i,e,t,r,a,o){if(e){let n=!1;const s=St++;for(let l in t){let d=a?ze(l):l,c=e[d];if(c)for(let u=0,p=c.length,m;u<p&&(m=c[u]);u++)(!m.info||m.info.lastRun!==s)&&(!a||Or(l,m.trigger))&&(m.info&&(m.info.lastRun=s),m.fn(i,l,t,r,m.info,a,o),n=!0)}return n}return!1}function Mc(i,e,t,r,a,o,n,s){let l=!1,d=n?ze(r):r,c=e[d];if(c)for(let u=0,p=c.length,m;u<p&&(m=c[u]);u++)(!m.info||m.info.lastRun!==t)&&(!n||Or(r,m.trigger))&&(m.info&&(m.info.lastRun=t),m.fn(i,r,a,o,m.info,n,s),l=!0);return l}function Or(i,e){if(e){let t=e.name;return t==i||!!(e.structured&&pn(t,i))||!!(e.wildcard&&Et(t,i))}else return!0}function Za(i,e,t,r,a){let o=typeof a.method=="string"?i[a.method]:a.method,n=a.property;o?o.call(i,i.__data[n],r[n]):a.dynamicFn||console.warn("observer method `"+a.method+"` not defined")}function Nc(i,e,t,r,a){let o=i[T.NOTIFY],n,s=St++;for(let d in e)e[d]&&(o&&Mc(i,o,s,d,t,r,a)||a&&Lc(i,d,t))&&(n=!0);let l;n&&(l=i.__dataHost)&&l._invalidateProperties&&l._invalidateProperties()}function Lc(i,e,t){let r=ze(e);if(r!==e){let a=gi(r)+"-changed";return Cn(i,a,t[e],e),!0}return!1}function Cn(i,e,t,r){let a={value:t,queueProperty:!0};r&&(a.path=r),K(i).dispatchEvent(new CustomEvent(e,{detail:a}))}function zc(i,e,t,r,a,o){let n=(o?ze(e):e)!=e?e:null,s=n?Z(i,n):i.__data[e];n&&s===void 0&&(s=t[e]),Cn(i,a.eventName,s,n)}function Rc(i,e,t,r,a){let o,n=i.detail,s=n&&n.path;s?(r=It(t,r,s),o=n&&n.value):o=i.currentTarget[t],o=a?!o:o,(!e[T.READ_ONLY]||!e[T.READ_ONLY][r])&&e._setPendingPropertyOrPath(r,o,!0,!!s)&&(!n||!n.queueProperty)&&e._invalidateProperties()}function Fc(i,e,t,r,a){let o=i.__data[e];li&&(o=li(o,a.attrName,"attribute",i)),i._propertyToAttribute(e,a.attrName,o)}function $c(i,e,t,r){let a=i[T.COMPUTE];if(a)if(ic){St++;const o=Bc(i),n=[];for(let l in e)eo(l,a,n,o,r);let s;for(;s=n.shift();)kn(i,"",e,t,s)&&eo(s.methodInfo,a,n,o,r);Object.assign(t,i.__dataOld),Object.assign(e,i.__dataPending),i.__dataPending=null}else{let o=e;for(;vt(i,a,o,t,r);)Object.assign(t,i.__dataOld),Object.assign(e,i.__dataPending),o=i.__dataPending,i.__dataPending=null}}const Hc=(i,e,t)=>{let r=0,a=e.length-1,o=-1;for(;r<=a;){const n=r+a>>1,s=t.get(e[n].methodInfo)-t.get(i.methodInfo);if(s<0)r=n+1;else if(s>0)a=n-1;else{o=n;break}}o<0&&(o=a+1),e.splice(o,0,i)},eo=(i,e,t,r,a)=>{const o=a?ze(i):i,n=e[o];if(n)for(let s=0;s<n.length;s++){const l=n[s];l.info.lastRun!==St&&(!a||Or(i,l.trigger))&&(l.info.lastRun=St,Hc(l.info,t,r))}};function Bc(i){let e=i.constructor.__orderedComputedDeps;if(!e){e=new Map;const t=i[T.COMPUTE];let{counts:r,ready:a,total:o}=Uc(i),n;for(;n=a.shift();){e.set(n,e.size);const s=t[n];s&&s.forEach(l=>{const d=l.info.methodInfo;--o,--r[d]===0&&a.push(d)})}o!==0&&console.warn(`Computed graph for ${i.localName} incomplete; circular?`),i.constructor.__orderedComputedDeps=e}return e}function Uc(i){const e=i[xn],t={},r=i[T.COMPUTE],a=[];let o=0;for(let n in e){const s=e[n];o+=t[n]=s.args.filter(l=>!l.literal).length+(s.dynamicFn?1:0)}for(let n in r)e[n]||a.push(n);return{counts:t,ready:a,total:o}}function kn(i,e,t,r,a){let o=rr(i,e,t,r,a);if(o===At)return!1;let n=a.methodInfo;return i.__dataHasAccessor&&i.__dataHasAccessor[n]?i._setPendingProperty(n,o,!0):(i[n]=o,!1)}function qc(i,e,t){let r=i.__dataLinkedPaths;if(r){let a;for(let o in r){let n=r[o];Et(o,e)?(a=It(o,n,e),i._setPendingPropertyOrPath(a,t,!0,!0)):Et(n,e)&&(a=It(n,o,e),i._setPendingPropertyOrPath(a,t,!0,!0))}}}function Ni(i,e,t,r,a,o,n){t.bindings=t.bindings||[];let s={kind:r,target:a,parts:o,literal:n,isCompound:o.length!==1};if(t.bindings.push(s),Kc(s)){let{event:d,negate:c}=s.parts[0];s.listenerEvent=d||gi(a)+"-changed",s.listenerNegate=c}let l=e.nodeInfoList.length;for(let d=0;d<s.parts.length;d++){let c=s.parts[d];c.compoundIndex=d,jc(i,e,s,c,l)}}function jc(i,e,t,r,a){if(!r.literal)if(t.kind==="attribute"&&t.target[0]==="-")console.warn("Cannot set attribute "+t.target+' because "-" is not a valid attribute starting character');else{let o=r.dependencies,n={index:a,binding:t,part:r,evaluator:i};for(let s=0;s<o.length;s++){let l=o[s];typeof l=="string"&&(l=In(l),l.wildcard=!0),i._addTemplatePropertyEffect(e,l.rootProperty,{fn:Wc,info:n,trigger:l})}}}function Wc(i,e,t,r,a,o,n){let s=n[a.index],l=a.binding,d=a.part;if(o&&d.source&&e.length>d.source.length&&l.kind=="property"&&!l.isCompound&&s.__isPropertyEffectsClient&&s.__dataHasAccessor&&s.__dataHasAccessor[l.target]){let c=t[e];e=It(d.source,l.target,e),s._setPendingPropertyOrPath(e,c,!1,!0)&&i._enqueueClient(s)}else{let c=a.evaluator._evaluateBinding(i,d,e,t,r,o);c!==At&&Yc(i,s,l,d,c)}}function Yc(i,e,t,r,a){if(a=Gc(e,a,t,r),li&&(a=li(a,t.target,t.kind,e)),t.kind=="attribute")i._valueToNodeAttribute(e,a,t.target);else{let o=t.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[o]?(!e[T.READ_ONLY]||!e[T.READ_ONLY][o])&&e._setPendingProperty(o,a)&&i._enqueueClient(e):i._setUnmanagedPropertyToNode(e,o,a)}}function Gc(i,e,t,r){if(t.isCompound){let a=i.__dataCompoundStorage[t.target];a[r.compoundIndex]=e,e=a.join("")}return t.kind!=="attribute"&&(t.target==="textContent"||t.target==="value"&&(i.localName==="input"||i.localName==="textarea"))&&(e=e==null?"":e),e}function Kc(i){return!!i.target&&i.kind!="attribute"&&i.kind!="text"&&!i.isCompound&&i.parts[0].mode==="{"}function Xc(i,e){let{nodeList:t,nodeInfoList:r}=e;if(r.length)for(let a=0;a<r.length;a++){let o=r[a],n=t[a],s=o.bindings;if(s)for(let l=0;l<s.length;l++){let d=s[l];Qc(n,d),Jc(n,i,d)}n.__dataHost=i}}function Qc(i,e){if(e.isCompound){let t=i.__dataCompoundStorage||(i.__dataCompoundStorage={}),r=e.parts,a=new Array(r.length);for(let n=0;n<r.length;n++)a[n]=r[n].literal;let o=e.target;t[o]=a,e.literal&&e.kind=="property"&&(o==="className"&&(i=K(i)),i[o]=e.literal)}}function Jc(i,e,t){if(t.listenerEvent){let r=t.parts[0];i.addEventListener(t.listenerEvent,function(a){Rc(a,e,t.target,r.source,r.negate)})}}function to(i,e,t,r,a,o){o=e.static||o&&(typeof o!="object"||o[e.methodName]);let n={methodName:e.methodName,args:e.args,methodInfo:a,dynamicFn:o};for(let s=0,l;s<e.args.length&&(l=e.args[s]);s++)l.literal||i._addPropertyEffect(l.rootProperty,t,{fn:r,info:n,trigger:l});return o&&i._addPropertyEffect(e.methodName,t,{fn:r,info:n}),n}function rr(i,e,t,r,a){let o=i._methodHost||i,n=o[a.methodName];if(n){let s=i._marshalArgs(a.args,e,t);return s===At?At:n.apply(o,s)}else a.dynamicFn||console.warn("method `"+a.methodName+"` not defined")}const Zc=[],En="(?:[a-zA-Z_$][\\w.:$\\-*]*)",eu="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",tu="(?:'(?:[^'\\\\]|\\\\.)*')",iu='(?:"(?:[^"\\\\]|\\\\.)*")',ru="(?:"+tu+"|"+iu+")",io="(?:("+En+"|"+eu+"|"+ru+")\\s*)",au="(?:"+io+"(?:,\\s*"+io+")*)",ou="(?:\\(\\s*(?:"+au+"?)\\)\\s*)",nu="("+En+"\\s*"+ou+"?)",su="(\\[\\[|{{)\\s*",lu="(?:]]|}})",du="(?:(!)\\s*)?",hu=su+du+nu+lu,ro=new RegExp(hu,"g");function ao(i){let e="";for(let t=0;t<i.length;t++){let r=i[t].literal;e+=r||""}return e}function Li(i){let e=i.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Zc};if(e[2].trim()){let r=e[2].replace(/\\,/g,",").split(",");return cu(r,t)}else return t}return null}function cu(i,e){return e.args=i.map(function(t){let r=In(t);return r.literal||(e.static=!1),r},this),e}function In(i){let e=i.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),t={name:e,value:"",literal:!1},r=e[0];switch(r==="-"&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':t.value=e.slice(1,-1),t.literal=!0;break;case"#":t.value=Number(e),t.literal=!0;break}return t.literal||(t.rootProperty=ze(e),t.structured=tr(e),t.structured&&(t.wildcard=e.slice(-2)==".*",t.wildcard&&(t.name=e.slice(0,-2)))),t}function oo(i,e,t){let r=Z(i,t);return r===void 0&&(r=e[t]),r}function Sn(i,e,t,r){const a={indexSplices:r};er&&!i._overrideLegacyUndefined&&(e.splices=a),i.notifyPath(t+".splices",a),i.notifyPath(t+".length",e.length),er&&!i._overrideLegacyUndefined&&(a.indexSplices=[])}function ct(i,e,t,r,a,o){Sn(i,e,t,[{index:r,addedCount:a,removed:o,object:e,type:"splice"}])}function uu(i){return i[0].toUpperCase()+i.substring(1)}const Vr=B(i=>{const e=Oc(xc(i));class t extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return T}_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(ut.length){let a=ut[ut.length-1];a._enqueueClient(this),this.__dataHost=a}}_initializeProtoProperties(a){this.__data=Object.create(a),this.__dataPending=Object.create(a),this.__dataOld={}}_initializeInstanceProperties(a){let o=this[T.READ_ONLY];for(let n in a)(!o||!o[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=a[n])}_addPropertyEffect(a,o,n){this._createPropertyAccessor(a,o==T.READ_ONLY);let s=Mi(this,o,!0)[a];s||(s=this[o][a]=[]),s.push(n)}_removePropertyEffect(a,o,n){let s=Mi(this,o,!0)[a],l=s.indexOf(n);l>=0&&s.splice(l,1)}_hasPropertyEffect(a,o){let n=this[o];return!!(n&&n[a])}_hasReadOnlyEffect(a){return this._hasPropertyEffect(a,T.READ_ONLY)}_hasNotifyEffect(a){return this._hasPropertyEffect(a,T.NOTIFY)}_hasReflectEffect(a){return this._hasPropertyEffect(a,T.REFLECT)}_hasComputedEffect(a){return this._hasPropertyEffect(a,T.COMPUTE)}_setPendingPropertyOrPath(a,o,n,s){if(s||ze(Array.isArray(a)?a[0]:a)!==a){if(!s){let l=Z(this,a);if(a=Xa(this,a,o),!a||!super._shouldPropertyChange(a,o,l))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(a,o,n))return qc(this,a,o),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[a])return this._setPendingProperty(a,o,n);this[a]=o}return!1}_setUnmanagedPropertyToNode(a,o,n){(n!==a[o]||typeof n=="object")&&(o==="className"&&(a=K(a)),a[o]=n)}_setPendingProperty(a,o,n){let s=this.__dataHasPaths&&tr(a),l=s?this.__dataTemp:this.__data;return this._shouldPropertyChange(a,o,l[a])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),a in this.__dataOld||(this.__dataOld[a]=this.__data[a]),s?this.__dataTemp[a]=o:this.__data[a]=o,this.__dataPending[a]=o,(s||this[T.NOTIFY]&&this[T.NOTIFY][a])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[a]=n),!0):!1}_setProperty(a,o){this._setPendingProperty(a,o,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(a){this.__dataPendingClients=this.__dataPendingClients||[],a!==this&&this.__dataPendingClients.push(a)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let a=this.__dataPendingClients;if(a){this.__dataPendingClients=null;for(let o=0;o<a.length;o++){let n=a[o];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(a,o){for(let n in a)(o||!this[T.READ_ONLY]||!this[T.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,a[n],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(a,o,n){let s=this.__dataHasPaths;this.__dataHasPaths=!1;let l;$c(this,o,n,s),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(o,n,s),this._flushClients(),vt(this,this[T.REFLECT],o,n,s),vt(this,this[T.OBSERVE],o,n,s),l&&Nc(this,l,o,n,s),this.__dataCounter==1&&(this.__dataTemp={})}_propagatePropertyChanges(a,o,n){this[T.PROPAGATE]&&vt(this,this[T.PROPAGATE],a,o,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,a,o,n)}_runEffectsForTemplate(a,o,n,s){const l=(d,c)=>{vt(this,a.propertyEffects,d,n,c,a.nodeList);for(let u=a.firstChild;u;u=u.nextSibling)this._runEffectsForTemplate(u,d,n,c)};a.runEffects?a.runEffects(l,o,s):l(o,s)}linkPaths(a,o){a=ft(a),o=ft(o),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[a]=o}unlinkPaths(a){a=ft(a),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[a]}notifySplices(a,o){let n={path:""},s=Z(this,a,n);Sn(this,s,n.path,o)}get(a,o){return Z(o||this,a)}set(a,o,n){n?Xa(n,a,o):(!this[T.READ_ONLY]||!this[T.READ_ONLY][a])&&this._setPendingPropertyOrPath(a,o,!0)&&this._invalidateProperties()}push(a,...o){let n={path:""},s=Z(this,a,n),l=s.length,d=s.push(...o);return o.length&&ct(this,s,n.path,l,o.length,[]),d}pop(a){let o={path:""},n=Z(this,a,o),s=!!n.length,l=n.pop();return s&&ct(this,n,o.path,n.length,0,[l]),l}splice(a,o,n,...s){let l={path:""},d=Z(this,a,l);o<0?o=d.length-Math.floor(-o):o&&(o=Math.floor(o));let c;return arguments.length===2?c=d.splice(o):c=d.splice(o,n,...s),(s.length||c.length)&&ct(this,d,l.path,o,s.length,c),c}shift(a){let o={path:""},n=Z(this,a,o),s=!!n.length,l=n.shift();return s&&ct(this,n,o.path,0,0,[l]),l}unshift(a,...o){let n={path:""},s=Z(this,a,n),l=s.unshift(...o);return o.length&&ct(this,s,n.path,0,o.length,[]),l}notifyPath(a,o){let n;if(arguments.length==1){let s={path:""};o=Z(this,a,s),n=s.path}else Array.isArray(a)?n=ft(a):n=a;this._setPendingPropertyOrPath(n,o,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(a,o){this._addPropertyEffect(a,T.READ_ONLY),o&&(this["_set"+uu(a)]=function(n){this._setProperty(a,n)})}_createPropertyObserver(a,o,n){let s={property:a,method:o,dynamicFn:!!n};this._addPropertyEffect(a,T.OBSERVE,{fn:Za,info:s,trigger:{name:a}}),n&&this._addPropertyEffect(o,T.OBSERVE,{fn:Za,info:s,trigger:{name:o}})}_createMethodObserver(a,o){let n=Li(a);if(!n)throw new Error("Malformed observer expression '"+a+"'");to(this,n,T.OBSERVE,rr,null,o)}_createNotifyingProperty(a){this._addPropertyEffect(a,T.NOTIFY,{fn:zc,info:{eventName:gi(a)+"-changed",property:a}})}_createReflectedProperty(a){let o=this.constructor.attributeNameForProperty(a);o[0]==="-"?console.warn("Property "+a+" cannot be reflected to attribute "+o+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(a,T.REFLECT,{fn:Fc,info:{attrName:o}})}_createComputedProperty(a,o,n){let s=Li(o);if(!s)throw new Error("Malformed computed expression '"+o+"'");const l=to(this,s,T.COMPUTE,kn,a,n);Mi(this,xn)[a]=l}_marshalArgs(a,o,n){const s=this.__data,l=[];for(let d=0,c=a.length;d<c;d++){let{name:u,structured:p,wildcard:m,value:y,literal:N}=a[d];if(!N)if(m){const D=Et(u,o),O=oo(s,n,D?o:u);y={path:D?o:u,value:O,base:D?Z(s,u):O}}else y=p?oo(s,n,u):s[u];if(er&&!this._overrideLegacyUndefined&&y===void 0&&a.length>1)return At;l[d]=y}return l}static addPropertyEffect(a,o,n){this.prototype._addPropertyEffect(a,o,n)}static createPropertyObserver(a,o,n){this.prototype._createPropertyObserver(a,o,n)}static createMethodObserver(a,o){this.prototype._createMethodObserver(a,o)}static createNotifyingProperty(a){this.prototype._createNotifyingProperty(a)}static createReadOnlyProperty(a,o){this.prototype._createReadOnlyProperty(a,o)}static createReflectedProperty(a){this.prototype._createReflectedProperty(a)}static createComputedProperty(a,o,n){this.prototype._createComputedProperty(a,o,n)}static bindTemplate(a){return this.prototype._bindTemplate(a)}_bindTemplate(a,o){let n=this.constructor._parseTemplate(a),s=this.__preBoundTemplateInfo==n;if(!s)for(let l in n.propertyEffects)this._createPropertyAccessor(l);if(o)if(n=Object.create(n),n.wasPreBound=s,!this.__templateInfo)this.__templateInfo=n;else{const l=a._parentTemplateInfo||this.__templateInfo,d=l.lastChild;n.parent=l,l.lastChild=n,n.previousSibling=d,d?d.nextSibling=n:l.firstChild=n}else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(a,o,n){let s=a.hostProps=a.hostProps||{};s[o]=!0;let l=a.propertyEffects=a.propertyEffects||{};(l[o]=l[o]||[]).push(n)}_stampTemplate(a,o){o=o||this._bindTemplate(a,!0),ut.push(this);let n=super._stampTemplate(a,o);if(ut.pop(),o.nodeList=n.nodeList,!o.wasPreBound){let s=o.childNodes=[];for(let l=n.firstChild;l;l=l.nextSibling)s.push(l)}return n.templateInfo=o,Xc(this,o),this.__dataClientsReady&&(this._runEffectsForTemplate(o,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(a){const o=a.templateInfo,{previousSibling:n,nextSibling:s,parent:l}=o;n?n.nextSibling=s:l&&(l.firstChild=s),s?s.previousSibling=n:l&&(l.lastChild=n),o.nextSibling=o.previousSibling=null;let d=o.childNodes;for(let c=0;c<d.length;c++){let u=d[c];K(K(u).parentNode).removeChild(u)}}static _parseTemplateNode(a,o,n){let s=e._parseTemplateNode.call(this,a,o,n);if(a.nodeType===Node.TEXT_NODE){let l=this._parseBindings(a.textContent,o);l&&(a.textContent=ao(l)||" ",Ni(this,o,n,"text","textContent",l),s=!0)}return s}static _parseTemplateNodeAttribute(a,o,n,s,l){let d=this._parseBindings(l,o);if(d){let c=s,u="property";Vc.test(s)?u="attribute":s[s.length-1]=="$"&&(s=s.slice(0,-1),u="attribute");let p=ao(d);return p&&u=="attribute"&&(s=="class"&&a.hasAttribute("class")&&(p+=" "+a.getAttribute(s)),a.setAttribute(s,p)),u=="attribute"&&c=="disable-upgrade$"&&a.setAttribute(s,""),a.localName==="input"&&c==="value"&&a.setAttribute(c,""),a.removeAttribute(c),u==="property"&&(s=fn(s)),Ni(this,o,n,u,s,d,p),!0}else return e._parseTemplateNodeAttribute.call(this,a,o,n,s,l)}static _parseTemplateNestedTemplate(a,o,n){let s=e._parseTemplateNestedTemplate.call(this,a,o,n);const l=a.parentNode,d=n.templateInfo,c=l.localName==="dom-if",u=l.localName==="dom-repeat";qa&&(c||u)&&(l.removeChild(a),n=n.parentInfo,n.templateInfo=d,n.noted=!0,s=!1);let p=d.hostProps;if(rc&&c)p&&(o.hostProps=Object.assign(o.hostProps||{},p),qa||(n.parentInfo.noted=!0));else{let m="{";for(let y in p){let N=[{mode:m,source:y,dependencies:[y],hostProp:!0}];Ni(this,o,n,"property","_host_"+y,N)}}return s}static _parseBindings(a,o){let n=[],s=0,l;for(;(l=ro.exec(a))!==null;){l.index>s&&n.push({literal:a.slice(s,l.index)});let d=l[1][0],c=!!l[2],u=l[3].trim(),p=!1,m="",y=-1;d=="{"&&(y=u.indexOf("::"))>0&&(m=u.substring(y+2),u=u.substring(0,y),p=!0);let N=Li(u),D=[];if(N){let{args:O,methodName:A}=N;for(let j=0;j<O.length;j++){let de=O[j];de.literal||D.push(de)}let q=o.dynamicFns;(q&&q[A]||N.static)&&(D.push(A),N.dynamicFn=!0)}else D.push(u);n.push({source:u,mode:d,negate:c,customEvent:p,signature:N,dependencies:D,event:m}),s=ro.lastIndex}if(s&&s<a.length){let d=a.substring(s);d&&n.push({literal:d})}return n.length?n:null}static _evaluateBinding(a,o,n,s,l,d){let c;return o.signature?c=rr(a,n,s,l,o.signature):n!=o.source?c=Z(a,o.source):d&&tr(n)?c=Z(a,n):c=a.__data[n],o.negate&&(c=!c),c}}return t}),ut=[];/**
|
|
991
991
|
@license
|
|
992
992
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
993
993
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1515,7 +1515,7 @@ try {
|
|
|
1515
1515
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1516
1516
|
* Code distributed by Google as part of the polymer project is also
|
|
1517
1517
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1518
|
-
*/let ho=0,On=0;const We=[];let ar=!1;function Iu(){ar=!1;const i=We.length;for(let e=0;e<i;e++){const t=We[e];if(t)try{t()}catch(r){setTimeout(()=>{throw r})}}We.splice(0,i),On+=i}const
|
|
1518
|
+
*/let ho=0,On=0;const We=[];let ar=!1;function Iu(){ar=!1;const i=We.length;for(let e=0;e<i;e++){const t=We[e];if(t)try{t()}catch(r){setTimeout(()=>{throw r})}}We.splice(0,i),On+=i}const Ee={after(i){return{run(e){return window.setTimeout(e,i)},cancel(e){window.clearTimeout(e)}}},run(i,e){return window.setTimeout(i,e)},cancel(i){window.clearTimeout(i)}},Tt={run(i){return window.requestAnimationFrame(i)},cancel(i){window.cancelAnimationFrame(i)}},Vn={run(i){return window.requestIdleCallback?window.requestIdleCallback(i):window.setTimeout(i,16)},cancel(i){window.cancelIdleCallback?window.cancelIdleCallback(i):window.clearTimeout(i)}},ci={run(i){ar||(ar=!0,queueMicrotask(()=>Iu())),We.push(i);const e=ho;return ho+=1,e},cancel(i){const e=i-On;if(e>=0){if(!We[e])throw new Error(`invalid async handle: ${i}`);We[e]=null}}};/**
|
|
1519
1519
|
@license
|
|
1520
1520
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1521
1521
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1527,7 +1527,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1527
1527
|
* @license
|
|
1528
1528
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1529
1529
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1530
|
-
*/const
|
|
1530
|
+
*/const fe=[];function nr(i,e,t=i.getAttribute("dir")){e?i.setAttribute("dir",e):t!=null&&i.removeAttribute("dir")}function sr(){return document.documentElement.getAttribute("dir")}function Au(){const i=sr();fe.forEach(e=>{nr(e,i)})}const Tu=new MutationObserver(Au);Tu.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const ae=i=>class extends i{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>e===""?null:e}}}}get __isRTL(){return this.getAttribute("dir")==="rtl"}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),nr(this,sr(),null))}attributeChangedCallback(e,t,r){if(super.attributeChangedCallback(e,t,r),e!=="dir")return;const a=sr(),o=r===a&&fe.indexOf(this)===-1,n=!r&&t&&fe.indexOf(this)===-1;o||n?(this.__subscribe(),nr(this,a,r)):r!==a&&t===a&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=fe.includes(this),this.__unsubscribe()}_valueToNodeAttribute(e,t,r){r==="dir"&&t===""&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,t,r)}_attributeToProperty(e,t,r){e==="dir"&&!t?this.dir="":super._attributeToProperty(e,t,r)}__subscribe(){fe.includes(this)||fe.push(this)}__unsubscribe(){fe.includes(this)&&fe.splice(fe.indexOf(this),1)}};/**
|
|
1531
1531
|
* @license
|
|
1532
1532
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1533
1533
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1551,7 +1551,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1551
1551
|
* @license
|
|
1552
1552
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1553
1553
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1554
|
-
*/class
|
|
1554
|
+
*/class ye extends J{constructor(e){super(e,"tooltip"),this.setTarget(e)}initCustomNode(e){e.target=this.target,this.ariaTarget!==void 0&&(e.ariaTarget=this.ariaTarget),this.context!==void 0&&(e.context=this.context),this.manual!==void 0&&(e.manual=this.manual),this.opened!==void 0&&(e.opened=this.opened),this.position!==void 0&&(e._position=this.position),this.shouldShow!==void 0&&(e.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(e){this.ariaTarget=e;const t=this.node;t&&(t.ariaTarget=e)}setContext(e){this.context=e;const t=this.node;t&&(t.context=e)}setManual(e){this.manual=e;const t=this.node;t&&(t.manual=e)}setOpened(e){this.opened=e;const t=this.node;t&&(t.opened=e)}setPosition(e){this.position=e;const t=this.node;t&&(t._position=e)}setShouldShow(e){this.shouldShow=e;const t=this.node;t&&(t.shouldShow=e)}setTarget(e){this.target=e;const t=this.node;t&&(t.target=e)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}/**
|
|
1555
1555
|
@license
|
|
1556
1556
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1557
1557
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -1559,7 +1559,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1559
1559
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1560
1560
|
Code distributed by Google as part of the polymer project is also
|
|
1561
1561
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1562
|
-
*/const Mu=i=>i,zn=typeof document.head.style.touchAction=="string",lr="__polymerGestures",Ri="__polymerGesturesHandled",dr="__polymerGesturesTouchAction",uo=25,po=5,Nu=2,Lu=["mousedown","mousemove","mouseup","click"],zu=[0,1,4,2],Ru=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(i){return!1}}();function Rn(i){return Lu.indexOf(i)>-1}(function(){try{const i=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch(i){}})();const Fu=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),$u={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function
|
|
1562
|
+
*/const Mu=i=>i,zn=typeof document.head.style.touchAction=="string",lr="__polymerGestures",Ri="__polymerGesturesHandled",dr="__polymerGesturesTouchAction",uo=25,po=5,Nu=2,Lu=["mousedown","mousemove","mouseup","click"],zu=[0,1,4,2],Ru=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(i){return!1}}();function Rn(i){return Lu.indexOf(i)>-1}(function(){try{const i=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch(i){}})();const Fu=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),$u={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Me(i){const e=i.type;if(!Rn(e))return!1;if(e==="mousemove"){let t=i.buttons===void 0?1:i.buttons;return i instanceof window.MouseEvent&&!Ru&&(t=zu[i.which]||0),!!(t&1)}return(i.button===void 0?0:i.button)===0}function Hu(i){if(i.type==="click"){if(i.detail===0)return!0;const e=Ie(i);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const t=e.getBoundingClientRect(),r=i.pageX,a=i.pageY;return!(r>=t.left&&r<=t.right&&a>=t.top&&a<=t.bottom)}return!1}const ve={touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Bu(i){let e="auto";const t=$n(i);for(let r=0,a;r<t.length;r++)if(a=t[r],a[dr]){e=a[dr];break}return e}function Fn(i,e,t){i.movefn=e,i.upfn=t,document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)}function Ye(i){document.removeEventListener("mousemove",i.movefn),document.removeEventListener("mouseup",i.upfn),i.movefn=null,i.upfn=null}const $n=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:i=>i.composedPath&&i.composedPath()||[],Lr={},Ve=[];function Uu(i,e){let t=document.elementFromPoint(i,e),r=t;for(;r&&r.shadowRoot&&!window.ShadyDOM;){const a=r;if(r=r.shadowRoot.elementFromPoint(i,e),a===r)break;r&&(t=r)}return t}function Ie(i){const e=$n(i);return e.length>0?e[0]:i.target}function qu(i){const e=i.type,t=i.currentTarget[lr];if(!t)return;const r=t[e];if(!r)return;if(!i[Ri]&&(i[Ri]={},e.startsWith("touch"))){const o=i.changedTouches[0];if(e==="touchstart"&&i.touches.length===1&&(ve.touch.id=o.identifier),ve.touch.id!==o.identifier)return;zn||(e==="touchstart"||e==="touchmove")&&ju(i)}const a=i[Ri];if(!a.skip){for(let o=0,n;o<Ve.length;o++)n=Ve[o],r[n.name]&&!a[n.name]&&n.flow&&n.flow.start.indexOf(i.type)>-1&&n.reset&&n.reset();for(let o=0,n;o<Ve.length;o++)n=Ve[o],r[n.name]&&!a[n.name]&&(a[n.name]=!0,n[e](i))}}function ju(i){const e=i.changedTouches[0],t=i.type;if(t==="touchstart")ve.touch.x=e.clientX,ve.touch.y=e.clientY,ve.touch.scrollDecided=!1;else if(t==="touchmove"){if(ve.touch.scrollDecided)return;ve.touch.scrollDecided=!0;const r=Bu(i);let a=!1;const o=Math.abs(ve.touch.x-e.clientX),n=Math.abs(ve.touch.y-e.clientY);i.cancelable&&(r==="none"?a=!0:r==="pan-x"?a=n>o:r==="pan-y"&&(a=o>n)),a?i.preventDefault():ui("track")}}function ce(i,e,t){return Lr[e]?(Wu(i,e,t),!0):!1}function Wu(i,e,t){const r=Lr[e],a=r.deps,o=r.name;let n=i[lr];n||(i[lr]=n={});for(let s=0,l,d;s<a.length;s++)l=a[s],!(Fu&&Rn(l)&&l!=="click")&&(d=n[l],d||(n[l]=d={_count:0}),d._count===0&&i.addEventListener(l,qu,void 0),d[o]=(d[o]||0)+1,d._count=(d._count||0)+1);i.addEventListener(e,t),r.touchAction&&Hn(i,r.touchAction)}function zr(i){Ve.push(i),i.emits.forEach(e=>{Lr[e]=i})}function Yu(i){for(let e=0,t;e<Ve.length;e++){t=Ve[e];for(let r=0,a;r<t.emits.length;r++)if(a=t.emits[r],a===i)return t}return null}function Hn(i,e){zn&&i instanceof HTMLElement&&ci.run(()=>{i.style.touchAction=e}),i[dr]=e}function Rr(i,e,t){const r=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(r.detail=t,Mu(i).dispatchEvent(r),r.defaultPrevented){const a=t.preventer||t.sourceEvent;a&&a.preventDefault&&a.preventDefault()}}function ui(i){const e=Yu(i);e.info&&(e.info.prevent=!0)}zr({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Ye(this.info)},mousedown(i){if(!Me(i))return;const e=Ie(i),t=this,r=o=>{Me(o)||(pt("up",e,o),Ye(t.info))},a=o=>{Me(o)&&pt("up",e,o),Ye(t.info)};Fn(this.info,r,a),pt("down",e,i)},touchstart(i){pt("down",Ie(i),i.changedTouches[0],i)},touchend(i){pt("up",Ie(i),i.changedTouches[0],i)}});function pt(i,e,t,r){e&&Rr(e,i,{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:r,prevent(a){return ui(a)}})}zr({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(i){this.moves.length>Nu&&this.moves.shift(),this.moves.push(i)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Ye(this.info)},mousedown(i){if(!Me(i))return;const e=Ie(i),t=this,r=o=>{const n=o.clientX,s=o.clientY;mo(t.info,n,s)&&(t.info.state=t.info.started?o.type==="mouseup"?"end":"track":"start",t.info.state==="start"&&ui("tap"),t.info.addMove({x:n,y:s}),Me(o)||(t.info.state="end",Ye(t.info)),e&&Fi(t.info,e,o),t.info.started=!0)},a=o=>{t.info.started&&r(o),Ye(t.info)};Fn(this.info,r,a),this.info.x=i.clientX,this.info.y=i.clientY},touchstart(i){const e=i.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(i){const e=Ie(i),t=i.changedTouches[0],r=t.clientX,a=t.clientY;mo(this.info,r,a)&&(this.info.state==="start"&&ui("tap"),this.info.addMove({x:r,y:a}),Fi(this.info,e,t),this.info.state="track",this.info.started=!0)},touchend(i){const e=Ie(i),t=i.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:t.clientX,y:t.clientY}),Fi(this.info,e,t))}});function mo(i,e,t){if(i.prevent)return!1;if(i.started)return!0;const r=Math.abs(i.x-e),a=Math.abs(i.y-t);return r>=po||a>=po}function Fi(i,e,t){if(!e)return;const r=i.moves[i.moves.length-2],a=i.moves[i.moves.length-1],o=a.x-i.x,n=a.y-i.y;let s,l=0;r&&(s=a.x-r.x,l=a.y-r.y),Rr(e,"track",{state:i.state,x:t.clientX,y:t.clientY,dx:o,dy:n,ddx:s,ddy:l,sourceEvent:t,hover(){return Uu(t.clientX,t.clientY)}})}zr({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(i){Me(i)&&(this.info.x=i.clientX,this.info.y=i.clientY)},click(i){Me(i)&&fo(this.info,i)},touchstart(i){const e=i.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(i){fo(this.info,i.changedTouches[0],i)}});function fo(i,e,t){const r=Math.abs(e.clientX-i.x),a=Math.abs(e.clientY-i.y),o=Ie(t||e);!o||$u[o.localName]&&o.hasAttribute("disabled")||(isNaN(r)||isNaN(a)||r<=uo&&a<=uo||Hu(e))&&(i.prevent||Rr(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:t}))}/**
|
|
1563
1563
|
* @license
|
|
1564
1564
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1565
1565
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1567,11 +1567,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1567
1567
|
* @license
|
|
1568
1568
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1569
1569
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1570
|
-
*/const
|
|
1570
|
+
*/const Re=B(i=>class extends i{ready(){super.ready(),this.addEventListener("keydown",e=>{this._onKeyDown(e)}),this.addEventListener("keyup",e=>{this._onKeyUp(e)})}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e);break}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}});/**
|
|
1571
1571
|
* @license
|
|
1572
1572
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1573
1573
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1574
|
-
*/const Fr=i=>class extends it(
|
|
1574
|
+
*/const Fr=i=>class extends it(Re(i)){get _activeKeys(){return[" "]}ready(){super.ready(),ce(this,"down",e=>{this._shouldSetActive(e)&&this._setActive(!0)}),ce(this,"up",()=>{this._setActive(!1)})}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(e){return!this.disabled}_onKeyDown(e){super._onKeyDown(e),this._shouldSetActive(e)&&this._activeKeys.includes(e.key)&&(this._setActive(!0),document.addEventListener("keyup",t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)},{once:!0}))}_setActive(e){this.toggleAttribute("active",e)}};/**
|
|
1575
1575
|
* @license
|
|
1576
1576
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1577
1577
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1579,7 +1579,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1579
1579
|
* @license
|
|
1580
1580
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1581
1581
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1582
|
-
*/const
|
|
1582
|
+
*/const Fe=B(i=>class extends i{get _keyboardActive(){return yi()}ready(){this.addEventListener("focusin",e=>{this._shouldSetFocus(e)&&this._setFocused(!0)}),this.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1)}),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&this._keyboardActive)}_shouldSetFocus(e){return!0}_shouldRemoveFocus(e){return!0}});/**
|
|
1583
1583
|
* @license
|
|
1584
1584
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1585
1585
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1587,7 +1587,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1587
1587
|
* @license
|
|
1588
1588
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1589
1589
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1590
|
-
*/const wi=B(i=>class extends
|
|
1590
|
+
*/const wi=B(i=>class extends Fe(qn(i)){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame(()=>{this.focus(),this.setAttribute("focus-ring","")})}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(e,t){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):t&&this._removeFocusListeners(t)}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus)}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,t){super._disabledChanged(e,t),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur()}_tabindexChanged(e){this.__forwardTabIndex(e)}__forwardTabIndex(e){e!==void 0&&this.focusElement&&(this.focusElement.tabIndex=e,e!==-1&&(this.tabindex=void 0)),this.disabled&&e&&(e!==-1&&(this._lastTabIndex=e),this.tabindex=void 0)}});/**
|
|
1591
1591
|
* @license
|
|
1592
1592
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1593
1593
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1611,11 +1611,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
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
|
-
*/const
|
|
1614
|
+
*/const me=B(i=>typeof i.prototype.addController=="function"?i:class extends i{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach(e=>{e.hostConnected&&e.hostConnected()})}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach(e=>{e.hostDisconnected&&e.hostDisconnected()})}addController(e){this.__controllers.add(e),this.$!==void 0&&this.isConnected&&e.hostConnected&&e.hostConnected()}removeController(e){this.__controllers.delete(e)}});/**
|
|
1615
1615
|
* @license
|
|
1616
1616
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1617
1617
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1618
|
-
*/const
|
|
1618
|
+
*/const he=document.createElement("div");he.style.position="fixed";he.style.clip="rect(0px, 0px, 0px, 0px)";he.setAttribute("aria-live","polite");document.body.appendChild(he);let jt;function Zt(i,e={}){const t=e.mode||"polite",r=e.timeout===void 0?150:e.timeout;t==="alert"?(he.removeAttribute("aria-live"),he.removeAttribute("role"),jt=re.debounce(jt,Tt,()=>{he.setAttribute("role","alert")})):(jt&&jt.cancel(),he.removeAttribute("role"),he.setAttribute("aria-live",t)),he.textContent="",setTimeout(()=>{he.textContent=i},r)}/**
|
|
1619
1619
|
* @license
|
|
1620
1620
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
1621
1621
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1635,7 +1635,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1635
1635
|
* @license
|
|
1636
1636
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1637
1637
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1638
|
-
*/const ap=B(i=>class extends
|
|
1638
|
+
*/const ap=B(i=>class extends me(i){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Yn(this),this._labelController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-label",e.detail.hasContent)})}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(e){this._labelController.setLabel(e)}});/**
|
|
1639
1639
|
* @license
|
|
1640
1640
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1641
1641
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1643,7 +1643,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1643
1643
|
* @license
|
|
1644
1644
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1645
1645
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1646
|
-
*/const xi=i=>class extends Wr(ap(
|
|
1646
|
+
*/const xi=i=>class extends Wr(ap(me(i))){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 tp(this),this._helperController=new rp(this),this._errorController=new ip(this),this._errorController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-error-message",e.detail.hasContent)}),this._labelController.addEventListener("slot-content-changed",e=>{const{hasContent:t,node:r}=e.detail;this.__labelChanged(t,r)}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:t,node:r}=e.detail;this.toggleAttribute("has-helper",t),this.__helperChanged(t,r)})}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(e,t){e?this._fieldAriaController.setHelperId(t.id):this._fieldAriaController.setHelperId(null)}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e)}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0)}__labelChanged(e,t){e?this._fieldAriaController.setLabelId(t.id):this._fieldAriaController.setLabelId(null)}_errorMessageChanged(e){this._errorController.setErrorMessage(e)}_helperTextChanged(e){this._helperController.setHelperText(e)}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e)}_requiredChanged(e){this._fieldAriaController.setRequired(e)}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout(()=>{if(e){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)})}};/**
|
|
1647
1647
|
* @license
|
|
1648
1648
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1649
1649
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1767,7 +1767,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1767
1767
|
</div>
|
|
1768
1768
|
</div>
|
|
1769
1769
|
<slot name="tooltip"></slot>
|
|
1770
|
-
`}ready(){super.ready(),this._tooltipController=new
|
|
1770
|
+
`}ready(){super.ready(),this._tooltipController=new ye(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}w(sp);/**
|
|
1771
1771
|
* @license
|
|
1772
1772
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1773
1773
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -1990,7 +1990,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1990
1990
|
* @license
|
|
1991
1991
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
1992
1992
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1993
|
-
*/const dp=i=>class extends xi(
|
|
1993
|
+
*/const dp=i=>class extends xi(Fe(it(i))){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 ye(this),this._tooltipController.addEventListener("tooltip-changed",e=>{const t=e.detail.node;if(t&&t.isConnected){const r=this.__checkboxes.map(a=>a.inputElement);this._tooltipController.setAriaTarget(r)}else this._tooltipController.setAriaTarget([])})}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Nr(e,({addedNodes:t,removedNodes:r})=>{const a=this.__filterCheckboxes(t),o=this.__filterCheckboxes(r);a.forEach(this.__registerCheckbox),o.forEach(this.__unregisterCheckbox);const n=this.__checkboxes.map(s=>s.inputElement);this._tooltipController.setAriaTarget(n),this.__warnOfCheckboxesWithoutValue(a)}),this.addController(this._tooltipController)}checkValidity(){return!this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(e){return e.filter(t=>t.nodeType===Node.ELEMENT_NODE&&t.localName==="vaadin-checkbox")}__warnOfCheckboxesWithoutValue(e){e.some(t=>{const{value:r}=t;return!t.hasAttribute("value")&&(!r||r==="on")})&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(e){e.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(e.disabled=!0),this.readonly&&(e.readonly=!0),e.checked?this.__addCheckboxToValue(e.value):this.value&&this.value.includes(e.value)&&(e.checked=!0)}__unregisterCheckbox(e){e.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),e.checked&&this.__removeCheckboxFromValue(e.value)}_disabledChanged(e,t){super._disabledChanged(e,t),!(!e&&t===void 0)&&t!==e&&this.__checkboxes.forEach(r=>{r.disabled=e})}__addCheckboxToValue(e){this.value?this.value.includes(e)||(this.value=[...this.value,e]):this.value=[e]}__removeCheckboxFromValue(e){this.value&&this.value.includes(e)&&(this.value=this.value.filter(t=>t!==e))}__onCheckboxCheckedChanged(e){const t=e.target;t.checked?this.__addCheckboxToValue(t.value):this.__removeCheckboxFromValue(t.value)}__valueChanged(e,t){e&&e.length===0&&t===void 0||(this.toggleAttribute("has-value",e&&e.length>0),this.__checkboxes.forEach(r=>{r.checked=e&&e.includes(r.value)}),t!==void 0&&this.validate())}__readonlyChanged(e,t){(e||t)&&this.__checkboxes.forEach(r=>{r.readonly=e})}_shouldRemoveFocus(e){return!this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate()}};/**
|
|
1994
1994
|
* @license
|
|
1995
1995
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
1996
1996
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -3199,7 +3199,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3199
3199
|
[part='clear-button']::before {
|
|
3200
3200
|
content: var(--lumo-icons-cross);
|
|
3201
3201
|
}
|
|
3202
|
-
|
|
3202
|
+
`,$e=[Yr,Kr,Gn,mp];g("",$e,{moduleId:"lumo-input-field-shared-styles"});const fp=f`
|
|
3203
3203
|
[part='toggle-button']::before {
|
|
3204
3204
|
content: var(--lumo-icons-calendar);
|
|
3205
3205
|
}
|
|
@@ -3221,7 +3221,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3221
3221
|
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
|
3222
3222
|
--_lumo-text-field-overflow-mask-image: none;
|
|
3223
3223
|
}
|
|
3224
|
-
`;g("vaadin-date-picker",[
|
|
3224
|
+
`;g("vaadin-date-picker",[$e,fp],{moduleId:"lumo-date-picker"});/**
|
|
3225
3225
|
* @license
|
|
3226
3226
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3227
3227
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -3397,7 +3397,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3397
3397
|
* @license
|
|
3398
3398
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3399
3399
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3400
|
-
*/const Dp=i=>class extends
|
|
3400
|
+
*/const Dp=i=>class extends me(i){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Ap(this),this.__focusTrapController=new Pp(this),this.__focusRestorationController=new Tp}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const e=!yi();this.__focusRestorationController.restoreFocus({preventScroll:e})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const e=hr();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return!0;let t=e;const r=e.ownerDocument;for(;t&&t!==r&&t!==this;)t=t.parentNode||t.host;return t===this}};/**
|
|
3401
3401
|
* @license
|
|
3402
3402
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3403
3403
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -3528,15 +3528,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3528
3528
|
* @license
|
|
3529
3529
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3530
3530
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3531
|
-
*/const Zr=i=>class extends Fr(qn(
|
|
3531
|
+
*/const Zr=i=>class extends Fr(qn(Fe(i))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(e){super._onKeyDown(e),!(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)&&this._activeKeys.includes(e.key)&&(e.preventDefault(),this.click())}};/**
|
|
3532
3532
|
* @license
|
|
3533
3533
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
3534
3534
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3535
|
-
*/g("vaadin-button",is,{moduleId:"vaadin-button-styles"});class Rp extends Zr(oe(M(
|
|
3535
|
+
*/g("vaadin-button",is,{moduleId:"vaadin-button-styles"});class Rp extends Zr(oe(M(me(E)))){static get is(){return"vaadin-button"}static get template(){return zp(k)}ready(){super.ready(),this._tooltipController=new ye(this),this.addController(this._tooltipController)}}w(Rp);/**
|
|
3536
3536
|
* @license
|
|
3537
3537
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3538
3538
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3539
|
-
*/function Fp(i){let e=i.getDay();e===0&&(e=7);const t=4-e,r=new Date(i.getTime()+t*24*3600*1e3),a=new Date(0,0);a.setFullYear(r.getFullYear());const o=r.getTime()-a.getTime(),n=Math.round(o/(24*3600*1e3));return Math.floor(n/7+1)}function _r(i){const e=new Date(i);return e.setHours(0,0,0,0),e}function
|
|
3539
|
+
*/function Fp(i){let e=i.getDay();e===0&&(e=7);const t=4-e,r=new Date(i.getTime()+t*24*3600*1e3),a=new Date(0,0);a.setFullYear(r.getFullYear());const o=r.getTime()-a.getTime(),n=Math.round(o/(24*3600*1e3));return Math.floor(n/7+1)}function _r(i){const e=new Date(i);return e.setHours(0,0,0,0),e}function ge(i,e,t=_r){return i instanceof Date&&e instanceof Date&&t(i).getTime()===t(e).getTime()}function ea(i){return{day:i.getDate(),month:i.getMonth(),year:i.getFullYear()}}function Ze(i,e,t,r){let a=!1;if(typeof r=="function"&&i){const o=ea(i);a=r(o)}return(!e||i>=e)&&(!t||i<=t)&&!a}function rs(i,e){return e.filter(t=>t!==void 0).reduce((t,r)=>{if(!r)return t;if(!t)return r;const a=Math.abs(i.getTime()-r.getTime()),o=Math.abs(t.getTime()-i.getTime());return a<o?r:t})}function as(i){const e=new Date,t=new Date(e);return t.setDate(1),t.setMonth(parseInt(i)+e.getMonth()),t}function $p(i,e,t=0,r=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 a=e+Math.floor(i.getFullYear()/100)*100;return i<new Date(a-50,t,r)?a-=100:i>new Date(a+50,t,r)&&(a+=100),a}function mt(i){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(i);if(!e)return;const t=new Date(0,0);return t.setFullYear(parseInt(e[1],10)),t.setMonth(parseInt(e[2],10)-1),t.setDate(parseInt(e[3],10)),t}function Hp(i){const e=(l,d="00")=>(d+l).substr((d+l).length-d.length);let t="",r="0000",a=i.year;a<0?(a=-a,t="-",r="000000"):i.year>=1e4&&(t="+",r="000000");const o=t+e(a,r),n=e(i.month+1),s=e(i.day);return[o,n,s].join("-")}function Bp(i){return i instanceof Date?Hp({year:i.getFullYear(),month:i.getMonth(),day:i.getDate()}):""}/**
|
|
3540
3540
|
@license
|
|
3541
3541
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
3542
3542
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -3606,7 +3606,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3606
3606
|
<div class="buffer"></div>
|
|
3607
3607
|
<div id="fullHeight"></div>
|
|
3608
3608
|
</div>
|
|
3609
|
-
`;class ns extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(os.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(e){e&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const e=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),t="background-position";this.$.fullHeight.style.setProperty(t,e);const r=getComputedStyle(this.$.fullHeight).getPropertyValue(t);this.$.fullHeight.style.removeProperty(t),this._itemHeightVal=parseFloat(r)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(e){this._preventScrollEvent=!0,e>this._firstIndex&&e<this._firstIndex+this.bufferSize*2?this.$.scroller.scrollTop=this.itemHeight*(e-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~e,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=e%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout(()=>{this.$.scroller.classList.remove("notouchscroll")},10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach(e=>{this.$[e.id]=e}),this.$.scroller.addEventListener("scroll",()=>this._scroll()),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=`${this._initialScroll*2}px`)}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),ta()}_createElement(){}_updateElement(e,t){}_finishInit(){this._initDone||(this._buffers.forEach(e=>{[...e.children].forEach(t=>{this._ensureStampedInstance(t._itemWrapper)})}),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(e){const t=e?1:0;this._buffers[t].translateY=this._buffers[t?0:1].translateY+this._bufferHeight*(t?-1:1),this._buffers[t].style.transform=`translate3d(0, ${this._buffers[t].translateY}px, 0)`,this._buffers[t].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const e=this.$.scroller.scrollTop;(e<this._bufferHeight||e>this._initialScroll*2-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const t=this.itemHeight+this.bufferOffset,r=e>this._buffers[1].translateY+t,a=e<this._buffers[0].translateY+t;(r||a)&&(this._translateBuffer(a),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=re.debounce(this._debouncerScrollFinish,
|
|
3609
|
+
`;class ns extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(os.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(e){e&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const e=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),t="background-position";this.$.fullHeight.style.setProperty(t,e);const r=getComputedStyle(this.$.fullHeight).getPropertyValue(t);this.$.fullHeight.style.removeProperty(t),this._itemHeightVal=parseFloat(r)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(e){this._preventScrollEvent=!0,e>this._firstIndex&&e<this._firstIndex+this.bufferSize*2?this.$.scroller.scrollTop=this.itemHeight*(e-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~e,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=e%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout(()=>{this.$.scroller.classList.remove("notouchscroll")},10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach(e=>{this.$[e.id]=e}),this.$.scroller.addEventListener("scroll",()=>this._scroll()),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=`${this._initialScroll*2}px`)}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),ta()}_createElement(){}_updateElement(e,t){}_finishInit(){this._initDone||(this._buffers.forEach(e=>{[...e.children].forEach(t=>{this._ensureStampedInstance(t._itemWrapper)})}),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(e){const t=e?1:0;this._buffers[t].translateY=this._buffers[t?0:1].translateY+this._bufferHeight*(t?-1:1),this._buffers[t].style.transform=`translate3d(0, ${this._buffers[t].translateY}px, 0)`,this._buffers[t].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const e=this.$.scroller.scrollTop;(e<this._bufferHeight||e>this._initialScroll*2-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const t=this.itemHeight+this.bufferOffset,r=e>this._buffers[1].translateY+t,a=e<this._buffers[0].translateY+t;(r||a)&&(this._translateBuffer(a),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=re.debounce(this._debouncerScrollFinish,Ee.after(200),()=>{const o=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],o)&&!this._isVisible(this._buffers[1],o)&&(this.position=this.position)})}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach(e=>{e.style.transform=`translate3d(0, ${e.translateY}px, 0)`}),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=re.debounce(this._debouncerUpdateClones,Ee.after(200),()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()}),this._scrollDisabled=!1}_createPool(){const e=this.getBoundingClientRect();this._buffers.forEach(t=>{for(let r=0;r<this.bufferSize;r++){const a=document.createElement("div");a.style.height=`${this.itemHeight}px`,a.instance={};const o=`vaadin-infinite-scroller-item-content-${Vt()}`,n=document.createElement("slot");n.setAttribute("name",o),n._itemWrapper=a,t.appendChild(n),a.setAttribute("slot",o),this.appendChild(a),this._isVisible(a,e)&&this._ensureStampedInstance(a)}}),requestAnimationFrame(()=>{this._finishInit()})}_ensureStampedInstance(e){if(e.firstElementChild)return;const t=e.instance;e.instance=this._createElement(),e.appendChild(e.instance),Object.keys(t).forEach(r=>{e.instance[r]=t[r]})}_updateClones(e){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const t=e?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach((r,a)=>{if(!r.updated){const o=this._firstIndex+this.bufferSize*a;[...r.children].forEach((n,s)=>{const l=n._itemWrapper;(!e||this._isVisible(l,t))&&this._updateElement(l.instance,o+s)}),r.updated=!0}})}_isVisible(e,t){const r=e.getBoundingClientRect();return r.bottom>t.top&&r.top<t.bottom}}/**
|
|
3610
3610
|
* @license
|
|
3611
3611
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3612
3612
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -3713,7 +3713,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3713
3713
|
* @license
|
|
3714
3714
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3715
3715
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3716
|
-
*/const cm=i=>class extends
|
|
3716
|
+
*/const cm=i=>class extends Fe(i){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(e=>ge(e.date,this.focusedDate))}ready(){super.ready(),ce(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(e,t,r){const a=new Date(0,0);a.setFullYear(e.getFullYear()),a.setMonth(e.getMonth()),a.setDate(1);const o=new Date(0,0);return o.setFullYear(e.getFullYear()),o.setMonth(e.getMonth()+1),o.setDate(0),t&&r&&t.getMonth()===r.getMonth()&&t.getMonth()===e.getMonth()&&r.getDate()-t.getDate()>=0?!1:!Ze(a,t,r)&&!Ze(o,t,r)}_getTitle(e,t){if(!(e===void 0||t===void 0))return t.formatTitle(t.monthNames[e.getMonth()],e.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0},300)}_dateAdd(e,t){e.setDate(e.getDate()+t)}_applyFirstDayOfWeek(e,t){if(!(e===void 0||t===void 0))return e.slice(t).concat(e.slice(0,t))}_getWeekDayNames(e,t){if(e===void 0||t===void 0)return[];const{weekdays:r,weekdaysShort:a,firstDayOfWeek:o}=e,n=this._applyFirstDayOfWeek(a,o);return this._applyFirstDayOfWeek(r,o).map((s,l)=>({weekDay:s,weekDayShort:n[l]})).slice(0,7)}__focusedDateChanged(e,t){Array.isArray(t)&&t.some(r=>ge(r,e))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(e){return e?e.getDate():""}_showWeekSeparator(e,t){return e&&t&&t.firstDayOfWeek===1}_isToday(e){return ge(new Date,e)}_getDays(e,t){if(e===void 0||t===void 0)return[];const r=new Date(0,0);for(r.setFullYear(e.getFullYear()),r.setMonth(e.getMonth()),r.setDate(1);r.getDay()!==t.firstDayOfWeek;)this._dateAdd(r,-1);const a=[],o=r.getMonth(),n=e.getMonth();for(;r.getMonth()===n||r.getMonth()===o;)a.push(r.getMonth()===n?new Date(r.getTime()):null),this._dateAdd(r,1);return a}_getWeeks(e){return e.reduce((t,r,a)=>(a%7===0&&t.push([]),t[t.length-1].push(r),t),[])}_handleTap(e){!this.ignoreTaps&&!this._notTapping&&e.target.date&&!e.target.hasAttribute("disabled")&&(this.selectedDate=e.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:e.target.date},bubbles:!0,composed:!0})))}_preventDefault(e){e.preventDefault()}__getWeekNumber(e){const t=e.reduce((r,a)=>!r&&a?a:r);return Fp(t)}__getDayAriaLabel(e){if(!e)return"";let t=`${this._getDate(e)} ${this.i18n.monthNames[e.getMonth()]} ${e.getFullYear()}, ${this.i18n.weekdays[e.getDay()]}`;return this._isToday(e)&&(t+=`, ${this.i18n.today}`),t}};/**
|
|
3717
3717
|
* @license
|
|
3718
3718
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3719
3719
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -3819,7 +3819,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3819
3819
|
</template>
|
|
3820
3820
|
</tbody>
|
|
3821
3821
|
</table>
|
|
3822
|
-
`}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(e,t){e&&t&&t.firstDayOfWeek===1?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(e,t,r,a,o,n){const s=["date"],l=e>_r(new Date),d=e<_r(new Date);return this.__isDayDisabled(e,a,o,n)&&s.push("disabled"),this.__isDayFocused(e,t)&&s.push("focused"),this.__isDaySelected(e,r)&&s.push("selected"),this._isToday(e)&&s.push("today"),d&&s.push("past"),l&&s.push("future"),s.join(" ")}__isDayFocused(e,t){return
|
|
3822
|
+
`}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(e,t){e&&t&&t.firstDayOfWeek===1?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(e,t,r,a,o,n){const s=["date"],l=e>_r(new Date),d=e<_r(new Date);return this.__isDayDisabled(e,a,o,n)&&s.push("disabled"),this.__isDayFocused(e,t)&&s.push("focused"),this.__isDaySelected(e,r)&&s.push("selected"),this._isToday(e)&&s.push("today"),d&&s.push("past"),l&&s.push("future"),s.join(" ")}__isDayFocused(e,t){return ge(e,t)}__isDaySelected(e,t){return ge(e,t)}__getDayAriaSelected(e,t){if(this.__isDaySelected(e,t))return"true"}__isDayDisabled(e,t,r,a){return!Ze(e,t,r,a)}__getDayAriaDisabled(e,t,r,a){if(!(e===void 0||t===void 0&&r===void 0&&a===void 0)&&this.__isDayDisabled(e,t,r,a))return"true"}__getDayTabindex(e,t){return this.__isDayFocused(e,t)?"0":"-1"}}w(pm);/**
|
|
3823
3823
|
* @license
|
|
3824
3824
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3825
3825
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -3827,7 +3827,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3827
3827
|
* @license
|
|
3828
3828
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3829
3829
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3830
|
-
*/const mm=i=>class extends i{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(e=>e.focusableDateElement).find(Boolean)}_addListeners(){Hn(this.$.scrollers,"pan-y"),he(this.$.scrollers,"track",this._track.bind(this)),he(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),he(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),he(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new oa(this._desktopMediaQuery,e=>{this._desktopMode=e})),this.addController(new J(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",t=>this.__onTodayButtonKeyDown(t)),he(e,"tap",this._onTodayTap.bind(this)),this._todayButton=e}})),this.addController(new J(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",t=>this.__onCancelButtonKeyDown(t)),he(e,"tap",this._cancel.bind(this)),this._cancelButton=e}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(e,t){const r=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+r,t),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new J(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:e=>{e.addEventListener("custom-scroll",()=>{this._onMonthScroll()}),e.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart()}),e.addEventListener("keydown",t=>{this.__onMonthCalendarKeyDown(t)}),e.addEventListener("init-done",()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach(r=>{r.addEventListener("selected-date-changed",a=>{this.selectedDate=a.detail.value})}),this.calendars=t}),this._monthScroller=e}}))}__initYearScroller(){this.addController(new J(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),he(e,"tap",t=>{this._onYearTap(t)}),e.addEventListener("custom-scroll",()=>{this._onYearScroll()}),e.addEventListener("touchstart",()=>{this._onYearScrollTouchStart()}),e.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]}),this._yearScroller=e}}))}__updateCancelButton(e,t){e&&(e.textContent=t&&t.cancel)}__updateTodayButton(e,t,r,a,o){e&&(e.textContent=t&&t.today,e.disabled=!this._isTodayAllowed(r,a,o))}__updateCalendars(e,t,r,a,o,n,s,l,d,c){e&&e.length&&e.forEach(u=>{u.i18n=t,u.minDate=r,u.maxDate=a,u.isDateDisabled=c,u.focusedDate=n,u.selectedDate=o,u.showWeekNumbers=s,u.ignoreTaps=l,d?u.setAttribute("theme",d):u.removeAttribute("theme")})}__updateYears(e,t,r){e&&e.length&&e.forEach(a=>{a.selectedDate=t,r?a.setAttribute("theme",r):a.removeAttribute("theme")})}_selectDate(e){return this._dateAllowed(e)?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0})),!0):!1}_desktopModeChanged(e){this.toggleAttribute("desktop",e)}_focusedDateChanged(e){this.revealDate(e)}revealDate(e,t=!0){if(!e)return;const r=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(e);this._scrollToPosition(r+s,t);return}const a=this._monthScroller.position>r,o=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,n=this._monthScroller.position+o-1<r;a?this._scrollToPosition(r,t):n&&this._scrollToPosition(r-o+1,t)}_calculateWeekScrollOffset(e){const t=new Date(0,0);t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(1);let r=0;for(;t.getDate()<e.getDate();)t.setDate(t.getDate()+1),t.getDay()===this.i18n.firstDayOfWeek&&(r+=1);return r/6}_initialPositionChanged(e){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(e)}_repositionYearScroller(){const e=this._monthScroller.position;this._visibleMonthIndex=Math.floor(e),this._yearScroller.position=(e+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=this._yearScroller.position*12-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=re.debounce(this._debouncer,ke.after(300),()=>{this._ignoreTaps=!1})}_formatDisplayed(e,t,r){return e&&t&&typeof t.formatDate=="function"?t.formatDate(ea(e)):r}_onTodayTap(){const e=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this._selectDate(e),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){const t=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+t*12,!0)}}_scrollToPosition(e,t){if(this._targetPosition!==void 0){this._targetPosition=e;return}if(!t){this._monthScroller.position=e,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=e;let r;this._revealPromise=new Promise(l=>{r=l});const a=(l,d,c,u)=>(l/=u/2,l<1?c/2*l*l+d:(l-=1,-c/2*(l*(l-2)-1)+d));let o=0;const n=this._monthScroller.position,s=l=>{o||(o=l);const d=l-o;if(d<this.scrollDuration){const c=a(d,n,this._targetPosition-n,this.scrollDuration);this._monthScroller.position=c,window.requestAnimationFrame(s)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:n}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,r(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(s)}_limit(e,t){return Math.min(t.max,Math.max(t.min,e))}_handleTrack(e){if(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)return;Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);const t=this._translateX+e.detail.ddx;this._translateX=this._limit(t,{min:0,max:this._yearScrollerWidth})}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller();break}}_toggleAnimateClass(e){e?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(e){this._desktopMode||(this._monthScroller.style.transform=`translateX(${e-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${e}px)`)}_yearAfterXMonths(e){return as(e).getFullYear()}_differenceInMonths(e,t){return(e.getFullYear()-t.getFullYear())*12-t.getMonth()+e.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(e){e.preventDefault()}__toggleDate(e){_e(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e)}__onMonthCalendarKeyDown(e){let t=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),t=!0;break;case"ArrowUp":this._moveFocusByDays(-7),t=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),t=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),t=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),t=!0);break;case" ":this.__toggleDate(this.focusedDate),t=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),t=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),t=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),t=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),t=!0;break;case"Tab":this._onTabKeyDown(e,"calendar");break}t&&(e.preventDefault(),e.stopPropagation())}_onTabKeyDown(e,t){switch(e.stopPropagation(),t){case"calendar":e.shiftKey&&(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":e.shiftKey&&(e.preventDefault(),this.focusDateElement());break;case"cancel":e.shiftKey||(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput());break}}__onTodayButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"today")}__onCancelButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const e=this.focusableDateElement;e&&_e(e.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,e.focus())}}focusDate(e,t){return ai(this,null,function*(){const r=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=r,t||(this._focusedMonthDate=r.getDate()),yield this.focusDateElement(!1)})}focusDateElement(e=!0){return ai(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(t=>{Xr(this,()=>{ta(),t()})})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()})}_focusClosestDate(e){this.focusDate(rs(e,[this.minDate,this.maxDate]))}_focusAllowedDate(e,t,r){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,r):this._dateAllowed(this.focusedDate)?t>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(e,t){const r=new Date(0,0);return r.setFullYear(this.focusedDate.getFullYear()),r.setMonth(this.focusedDate.getMonth()+e),t&&r.setDate(this.focusedDate.getDate()+t),r}_moveFocusByDays(e){const t=this._getDateDiff(0,e);this._focusAllowedDate(t,e,!1)}_moveFocusByMonths(e){const t=this._getDateDiff(e),r=t.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),t.setDate(this._focusedMonthDate),t.getMonth()!==r&&t.setDate(0),this._focusAllowedDate(t,e,!0)}_moveFocusInsideMonth(e,t){const r=new Date(0,0);r.setFullYear(e.getFullYear()),t==="minDate"?(r.setMonth(e.getMonth()),r.setDate(1)):(r.setMonth(e.getMonth()+1),r.setDate(0)),this._dateAllowed(r)?this.focusDate(r):this._dateAllowed(e)?this.focusDate(this[t]):this._focusClosestDate(e)}_dateAllowed(e,t=this.minDate,r=this.maxDate,a=this.isDateDisabled){return Ze(e,t,r,a)}_isTodayAllowed(e,t,r){return this._dateAllowed(this._getTodayMidnight(),e,t,r)}_getTodayMidnight(){const e=new Date,t=new Date(0,0);return t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(e.getDate()),t}};/**
|
|
3830
|
+
*/const mm=i=>class extends i{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(e=>e.focusableDateElement).find(Boolean)}_addListeners(){Hn(this.$.scrollers,"pan-y"),ce(this.$.scrollers,"track",this._track.bind(this)),ce(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),ce(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),ce(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new oa(this._desktopMediaQuery,e=>{this._desktopMode=e})),this.addController(new J(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",t=>this.__onTodayButtonKeyDown(t)),ce(e,"tap",this._onTodayTap.bind(this)),this._todayButton=e}})),this.addController(new J(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",t=>this.__onCancelButtonKeyDown(t)),ce(e,"tap",this._cancel.bind(this)),this._cancelButton=e}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(e,t){const r=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+r,t),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new J(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:e=>{e.addEventListener("custom-scroll",()=>{this._onMonthScroll()}),e.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart()}),e.addEventListener("keydown",t=>{this.__onMonthCalendarKeyDown(t)}),e.addEventListener("init-done",()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach(r=>{r.addEventListener("selected-date-changed",a=>{this.selectedDate=a.detail.value})}),this.calendars=t}),this._monthScroller=e}}))}__initYearScroller(){this.addController(new J(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),ce(e,"tap",t=>{this._onYearTap(t)}),e.addEventListener("custom-scroll",()=>{this._onYearScroll()}),e.addEventListener("touchstart",()=>{this._onYearScrollTouchStart()}),e.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]}),this._yearScroller=e}}))}__updateCancelButton(e,t){e&&(e.textContent=t&&t.cancel)}__updateTodayButton(e,t,r,a,o){e&&(e.textContent=t&&t.today,e.disabled=!this._isTodayAllowed(r,a,o))}__updateCalendars(e,t,r,a,o,n,s,l,d,c){e&&e.length&&e.forEach(u=>{u.i18n=t,u.minDate=r,u.maxDate=a,u.isDateDisabled=c,u.focusedDate=n,u.selectedDate=o,u.showWeekNumbers=s,u.ignoreTaps=l,d?u.setAttribute("theme",d):u.removeAttribute("theme")})}__updateYears(e,t,r){e&&e.length&&e.forEach(a=>{a.selectedDate=t,r?a.setAttribute("theme",r):a.removeAttribute("theme")})}_selectDate(e){return this._dateAllowed(e)?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0})),!0):!1}_desktopModeChanged(e){this.toggleAttribute("desktop",e)}_focusedDateChanged(e){this.revealDate(e)}revealDate(e,t=!0){if(!e)return;const r=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(e);this._scrollToPosition(r+s,t);return}const a=this._monthScroller.position>r,o=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,n=this._monthScroller.position+o-1<r;a?this._scrollToPosition(r,t):n&&this._scrollToPosition(r-o+1,t)}_calculateWeekScrollOffset(e){const t=new Date(0,0);t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(1);let r=0;for(;t.getDate()<e.getDate();)t.setDate(t.getDate()+1),t.getDay()===this.i18n.firstDayOfWeek&&(r+=1);return r/6}_initialPositionChanged(e){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(e)}_repositionYearScroller(){const e=this._monthScroller.position;this._visibleMonthIndex=Math.floor(e),this._yearScroller.position=(e+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=this._yearScroller.position*12-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=re.debounce(this._debouncer,Ee.after(300),()=>{this._ignoreTaps=!1})}_formatDisplayed(e,t,r){return e&&t&&typeof t.formatDate=="function"?t.formatDate(ea(e)):r}_onTodayTap(){const e=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this._selectDate(e),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){const t=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+t*12,!0)}}_scrollToPosition(e,t){if(this._targetPosition!==void 0){this._targetPosition=e;return}if(!t){this._monthScroller.position=e,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=e;let r;this._revealPromise=new Promise(l=>{r=l});const a=(l,d,c,u)=>(l/=u/2,l<1?c/2*l*l+d:(l-=1,-c/2*(l*(l-2)-1)+d));let o=0;const n=this._monthScroller.position,s=l=>{o||(o=l);const d=l-o;if(d<this.scrollDuration){const c=a(d,n,this._targetPosition-n,this.scrollDuration);this._monthScroller.position=c,window.requestAnimationFrame(s)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:n}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,r(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(s)}_limit(e,t){return Math.min(t.max,Math.max(t.min,e))}_handleTrack(e){if(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)return;Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);const t=this._translateX+e.detail.ddx;this._translateX=this._limit(t,{min:0,max:this._yearScrollerWidth})}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller();break}}_toggleAnimateClass(e){e?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(e){this._desktopMode||(this._monthScroller.style.transform=`translateX(${e-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${e}px)`)}_yearAfterXMonths(e){return as(e).getFullYear()}_differenceInMonths(e,t){return(e.getFullYear()-t.getFullYear())*12-t.getMonth()+e.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(e){e.preventDefault()}__toggleDate(e){ge(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e)}__onMonthCalendarKeyDown(e){let t=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),t=!0;break;case"ArrowUp":this._moveFocusByDays(-7),t=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),t=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),t=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),t=!0);break;case" ":this.__toggleDate(this.focusedDate),t=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),t=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),t=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),t=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),t=!0;break;case"Tab":this._onTabKeyDown(e,"calendar");break}t&&(e.preventDefault(),e.stopPropagation())}_onTabKeyDown(e,t){switch(e.stopPropagation(),t){case"calendar":e.shiftKey&&(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":e.shiftKey&&(e.preventDefault(),this.focusDateElement());break;case"cancel":e.shiftKey||(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput());break}}__onTodayButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"today")}__onCancelButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const e=this.focusableDateElement;e&&ge(e.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,e.focus())}}focusDate(e,t){return ai(this,null,function*(){const r=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=r,t||(this._focusedMonthDate=r.getDate()),yield this.focusDateElement(!1)})}focusDateElement(e=!0){return ai(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(t=>{Xr(this,()=>{ta(),t()})})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()})}_focusClosestDate(e){this.focusDate(rs(e,[this.minDate,this.maxDate]))}_focusAllowedDate(e,t,r){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,r):this._dateAllowed(this.focusedDate)?t>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(e,t){const r=new Date(0,0);return r.setFullYear(this.focusedDate.getFullYear()),r.setMonth(this.focusedDate.getMonth()+e),t&&r.setDate(this.focusedDate.getDate()+t),r}_moveFocusByDays(e){const t=this._getDateDiff(0,e);this._focusAllowedDate(t,e,!1)}_moveFocusByMonths(e){const t=this._getDateDiff(e),r=t.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),t.setDate(this._focusedMonthDate),t.getMonth()!==r&&t.setDate(0),this._focusAllowedDate(t,e,!0)}_moveFocusInsideMonth(e,t){const r=new Date(0,0);r.setFullYear(e.getFullYear()),t==="minDate"?(r.setMonth(e.getMonth()),r.setDate(1)):(r.setMonth(e.getMonth()+1),r.setDate(0)),this._dateAllowed(r)?this.focusDate(r):this._dateAllowed(e)?this.focusDate(this[t]):this._focusClosestDate(e)}_dateAllowed(e,t=this.minDate,r=this.maxDate,a=this.isDateDisabled){return Ze(e,t,r,a)}_isTodayAllowed(e,t,r){return this._dateAllowed(this._getTodayMidnight(),e,t,r)}_getTodayMidnight(){const e=new Date,t=new Date(0,0);return t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(e.getDate()),t}};/**
|
|
3831
3831
|
* @license
|
|
3832
3832
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3833
3833
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -3895,7 +3895,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3895
3895
|
* @license
|
|
3896
3896
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
3897
3897
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3898
|
-
*/g("vaadin-date-picker-overlay-content",fm,{moduleId:"vaadin-date-picker-overlay-content-styles"});class vm extends mm(
|
|
3898
|
+
*/g("vaadin-date-picker-overlay-content",fm,{moduleId:"vaadin-date-picker-overlay-content-styles"});class vm extends mm(me(M(ae(E)))){static get template(){return k`
|
|
3899
3899
|
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
|
3900
3900
|
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
|
3901
3901
|
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
@@ -3923,7 +3923,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3923
3923
|
* @license
|
|
3924
3924
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3925
3925
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3926
|
-
*/const bm=i=>class extends Mt(
|
|
3926
|
+
*/const bm=i=>class extends Mt(Re(i)){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",e=>this._onClearButtonMouseDown(e)),this.clearElement.addEventListener("click",e=>this._onClearButtonClick(e)))}_onClearButtonClick(e){e.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(e){e.preventDefault(),fr||this.inputElement.focus()}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}};/**
|
|
3927
3927
|
* @license
|
|
3928
3928
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3929
3929
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -3931,12 +3931,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
3931
3931
|
* @license
|
|
3932
3932
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
3933
3933
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3934
|
-
*/const Ei=i=>class extends hs(wi(na(xi(bm(
|
|
3934
|
+
*/const Ei=i=>class extends hs(wi(na(xi(bm(Re(i)))))){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[`
|
|
3935
3935
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
3936
3936
|
font: inherit;
|
|
3937
3937
|
color: inherit;
|
|
3938
3938
|
}
|
|
3939
|
-
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}))}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=re.debounce(this._preventInputDebouncer,
|
|
3939
|
+
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}))}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=re.debounce(this._preventInputDebouncer,Ee.after(200),()=>{this.removeAttribute("input-prevented")})}__shouldAcceptKey(e){return e.metaKey||e.ctrlKey||!e.key||e.key.length!==1||this.__allowedCharRegExp.test(e.key)}_onPaste(e){if(this.allowedCharPattern){const t=e.clipboardData.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onDrop(e){if(this.allowedCharPattern){const t=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(t)||(e.preventDefault(),this._markInputPrevented())}}_onBeforeInput(e){this.allowedCharPattern&&e.data&&!this.__allowedTextRegExp.test(e.data)&&(e.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(e){if(e)try{this.__allowedCharRegExp=new RegExp(`^${e}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${e}*$`,"u")}catch(t){console.error(t)}}};/**
|
|
3940
3940
|
* @license
|
|
3941
3941
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
3942
3942
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4019,7 +4019,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4019
4019
|
* @license
|
|
4020
4020
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4021
4021
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4022
|
-
*/const wm=i=>class extends Ft(pe(wi(na(ze(i))))){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(e){const t=String(e.year).replace(/\d+/u,r=>"0000".substr(r.length)+r);return[e.month+1,e.day,t].join("/")},parseDate(e){const t=e.split("/"),r=new Date;let a,o=r.getMonth(),n=r.getFullYear();if(t.length===3){if(o=parseInt(t[0])-1,a=parseInt(t[1]),n=parseInt(t[2]),t[2].length<3&&n>=0){const s=this.referenceDate?mt(this.referenceDate):new Date;n=$p(s,n,o,a)}}else t.length===2?(o=parseInt(t[0])-1,a=parseInt(t[1])):t.length===1&&(a=parseInt(t[0]));if(a!==void 0)return{day:a,month:o,year:n}},formatTitle:(e,t)=>`${e} ${t}`})},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:Qr},_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(e){super._inputElementValue=e,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(e){super._onFocus(e),this._noInput&&!yi()&&e.target.blur()}_onBlur(e){super._onBlur(e),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new oa(this._fullscreenMediaQuery,t=>{this._fullscreen=t})),this.addController(new ps(this));const e=this.$.overlay;this._overlayElement=e,e.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(e){if(e.firstChild)return;const t=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(t),this._overlayContent=t,t.addEventListener("close",()=>{this._close()}),t.addEventListener("focus-input",this._focusAndSelect.bind(this)),t.addEventListener("date-tap",r=>{this.__commitDate(r.detail.date),this._close()}),t.addEventListener("date-selected",r=>{this.__commitDate(r.detail.date)}),t.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0)}),t.addEventListener("focusout",r=>{this._shouldRemoveFocus(r)&&this._setFocused(!1)}),t.addEventListener("focused-date-changed",r=>{this._focusedDate=r.detail.value}),t.addEventListener("click",r=>r.stopPropagation())}__parseDate(e){if(!this.i18n.parseDate)return;let t=this.i18n.parseDate(e);if(t&&(t=mt(`${t.year}-${t.month+1}-${t.day}`)),t&&!isNaN(t.getTime()))return t}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(ea(e))}checkValidity(){const e=this._inputElementValue,t=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),r=!this._selectedDate||Ze(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let a=!0;return this.inputElement&&(this.inputElement.checkValidity?a=this.inputElement.checkValidity():this.inputElement.validate&&(a=this.inputElement.validate())),t&&r&&a}_shouldSetFocus(e){return!this._shouldKeepFocusRing}_shouldRemoveFocus(e){const{relatedTarget:t}=e;return this.opened&&t!==null&&t!==document.body&&!this.contains(t)&&!this._overlayContent.contains(t)?!0:!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive}__commitValueChange(){const e=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e}__commitDate(e){this.__keepCommittedValue=!0,this._selectedDate=e,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame(()=>{this.$.overlay.bringToFront()})}_isNoInput(e,t,r,a,o,n){return!e||t&&(!n||o)||r&&o||!a.parseDate}_formatISO(e){return Bp(e)}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(e){this.inputElement&&this.inputElement.setAttribute("aria-expanded",e)}_selectedDateChanged(e,t){e===void 0||t===void 0||(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(e,t){e===void 0||t===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(e)}_valueChanged(e,t){const r=mt(e);if(e&&!r){this.value=t;return}e?_e(this._selectedDate,r)||(this._selectedDate=r,t!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)}__updateOverlayContent(e,t,r,a,o,n,s,l,d){e&&(e.i18n=t,e.label=r,e.minDate=a,e.maxDate=o,e.focusedDate=n,e.selectedDate=s,e.showWeekNumbers=l,e.isDateDisabled=d)}__updateOverlayContentTheme(e,t){e&&(t?e.setAttribute("theme",t):e.removeAttribute("theme"))}__updateOverlayContentFullScreen(e,t){e&&e.toggleAttribute("fullscreen",t)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const e=this._overlayContent;e.reset();const t=this._getInitialPosition();e.initialPosition=t;const r=e.focusedDate||t;e.scrollToDate(r),this._ignoreFocusedDateChange=!0,e.focusedDate=r,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const a=this._nativeInput;this._noInput&&a&&(a.blur(),this._overlayContent.focusDateElement());const o=this._noInput?e:[a,e];this.__showOthers=Zn(o)}_getInitialPosition(){const e=mt(this.initialPosition),t=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||Ze(t,this._minDate,this._maxDate,this.isDateDisabled)?t:this._minDate||this._maxDate?rs(t,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",t=this.__parseDate(e);t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._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(e){(e.target===window||!this._overlayContent.contains(e.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):""}_setSelectionRange(e,t){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,t)}_onChange(e){e.stopPropagation()}_onClick(e){this._isClearButton(e)||this._onHostClick(e)}_onHostClick(e){(!this.autoOpenDisabled||this._noInput)&&(e.preventDefault(),this.open())}_onClearButtonClick(e){e.preventDefault(),this.__commitDate(null)}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&[9].indexOf(e.keyCode)===-1&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement());break}}_onEnter(e){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(e){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly){e.stopPropagation(),this._onClearButtonClick(e);return}this.inputElement.value===""?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const e=this.__parseDate(this._inputElementValue);e&&(this._ignoreFocusedDateChange=!0,_e(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(e){return mt(e)}};/**
|
|
4022
|
+
*/const wm=i=>class extends Ft(me(wi(na(Re(i))))){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(e){const t=String(e.year).replace(/\d+/u,r=>"0000".substr(r.length)+r);return[e.month+1,e.day,t].join("/")},parseDate(e){const t=e.split("/"),r=new Date;let a,o=r.getMonth(),n=r.getFullYear();if(t.length===3){if(o=parseInt(t[0])-1,a=parseInt(t[1]),n=parseInt(t[2]),t[2].length<3&&n>=0){const s=this.referenceDate?mt(this.referenceDate):new Date;n=$p(s,n,o,a)}}else t.length===2?(o=parseInt(t[0])-1,a=parseInt(t[1])):t.length===1&&(a=parseInt(t[0]));if(a!==void 0)return{day:a,month:o,year:n}},formatTitle:(e,t)=>`${e} ${t}`})},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:Qr},_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(e){super._inputElementValue=e,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(e){super._onFocus(e),this._noInput&&!yi()&&e.target.blur()}_onBlur(e){super._onBlur(e),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new oa(this._fullscreenMediaQuery,t=>{this._fullscreen=t})),this.addController(new ps(this));const e=this.$.overlay;this._overlayElement=e,e.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(e){if(e.firstChild)return;const t=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(t),this._overlayContent=t,t.addEventListener("close",()=>{this._close()}),t.addEventListener("focus-input",this._focusAndSelect.bind(this)),t.addEventListener("date-tap",r=>{this.__commitDate(r.detail.date),this._close()}),t.addEventListener("date-selected",r=>{this.__commitDate(r.detail.date)}),t.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0)}),t.addEventListener("focusout",r=>{this._shouldRemoveFocus(r)&&this._setFocused(!1)}),t.addEventListener("focused-date-changed",r=>{this._focusedDate=r.detail.value}),t.addEventListener("click",r=>r.stopPropagation())}__parseDate(e){if(!this.i18n.parseDate)return;let t=this.i18n.parseDate(e);if(t&&(t=mt(`${t.year}-${t.month+1}-${t.day}`)),t&&!isNaN(t.getTime()))return t}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(ea(e))}checkValidity(){const e=this._inputElementValue,t=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),r=!this._selectedDate||Ze(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let a=!0;return this.inputElement&&(this.inputElement.checkValidity?a=this.inputElement.checkValidity():this.inputElement.validate&&(a=this.inputElement.validate())),t&&r&&a}_shouldSetFocus(e){return!this._shouldKeepFocusRing}_shouldRemoveFocus(e){const{relatedTarget:t}=e;return this.opened&&t!==null&&t!==document.body&&!this.contains(t)&&!this._overlayContent.contains(t)?!0:!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive}__commitValueChange(){const e=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e}__commitDate(e){this.__keepCommittedValue=!0,this._selectedDate=e,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame(()=>{this.$.overlay.bringToFront()})}_isNoInput(e,t,r,a,o,n){return!e||t&&(!n||o)||r&&o||!a.parseDate}_formatISO(e){return Bp(e)}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(e){this.inputElement&&this.inputElement.setAttribute("aria-expanded",e)}_selectedDateChanged(e,t){e===void 0||t===void 0||(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(e,t){e===void 0||t===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(e)}_valueChanged(e,t){const r=mt(e);if(e&&!r){this.value=t;return}e?ge(this._selectedDate,r)||(this._selectedDate=r,t!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)}__updateOverlayContent(e,t,r,a,o,n,s,l,d){e&&(e.i18n=t,e.label=r,e.minDate=a,e.maxDate=o,e.focusedDate=n,e.selectedDate=s,e.showWeekNumbers=l,e.isDateDisabled=d)}__updateOverlayContentTheme(e,t){e&&(t?e.setAttribute("theme",t):e.removeAttribute("theme"))}__updateOverlayContentFullScreen(e,t){e&&e.toggleAttribute("fullscreen",t)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const e=this._overlayContent;e.reset();const t=this._getInitialPosition();e.initialPosition=t;const r=e.focusedDate||t;e.scrollToDate(r),this._ignoreFocusedDateChange=!0,e.focusedDate=r,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const a=this._nativeInput;this._noInput&&a&&(a.blur(),this._overlayContent.focusDateElement());const o=this._noInput?e:[a,e];this.__showOthers=Zn(o)}_getInitialPosition(){const e=mt(this.initialPosition),t=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||Ze(t,this._minDate,this._maxDate,this.isDateDisabled)?t:this._minDate||this._maxDate?rs(t,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",t=this.__parseDate(e);t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._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(e){(e.target===window||!this._overlayContent.contains(e.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):""}_setSelectionRange(e,t){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,t)}_onChange(e){e.stopPropagation()}_onClick(e){this._isClearButton(e)||this._onHostClick(e)}_onHostClick(e){(!this.autoOpenDisabled||this._noInput)&&(e.preventDefault(),this.open())}_onClearButtonClick(e){e.preventDefault(),this.__commitDate(null)}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&[9].indexOf(e.keyCode)===-1&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement());break}}_onEnter(e){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(e){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly){e.stopPropagation(),this._onClearButtonClick(e);return}this.inputElement.value===""?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const e=this.__parseDate(this._inputElementValue);e&&(this._ignoreFocusedDateChange=!0,ge(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(e){return mt(e)}};/**
|
|
4023
4023
|
* @license
|
|
4024
4024
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
4025
4025
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4082,11 +4082,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4082
4082
|
></vaadin-date-picker-overlay>
|
|
4083
4083
|
|
|
4084
4084
|
<slot name="tooltip"></slot>
|
|
4085
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Nt(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e},{uniqueIdPrefix:"search-input"})),this.addController(new Lt(this.inputElement,this._labelController)),this._tooltipController=new
|
|
4085
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Nt(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e},{uniqueIdPrefix:"search-input"})),this.addController(new Lt(this.inputElement,this._labelController)),this._tooltipController=new ye(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",e=>e.preventDefault()),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(e){e.detail.sourceEvent&&e.detail.sourceEvent.composedPath().includes(this)&&e.preventDefault()}_toggle(e){e.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(e){super._openedChanged(e),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}w(Cm);/**
|
|
4086
4086
|
* @license
|
|
4087
4087
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
4088
4088
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4089
|
-
*/g("vaadin-text-field",
|
|
4089
|
+
*/g("vaadin-text-field",$e,{moduleId:"lumo-text-field-styles"});/**
|
|
4090
4090
|
* @license
|
|
4091
4091
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4092
4092
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4127,7 +4127,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4127
4127
|
</div>
|
|
4128
4128
|
</div>
|
|
4129
4129
|
<slot name="tooltip"></slot>
|
|
4130
|
-
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new
|
|
4130
|
+
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new ye(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}w(ms);/**
|
|
4131
4131
|
* @license
|
|
4132
4132
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4133
4133
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4166,7 +4166,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4166
4166
|
[part='reveal-button'][hidden] {
|
|
4167
4167
|
display: none !important;
|
|
4168
4168
|
}
|
|
4169
|
-
`;g("vaadin-password-field",[
|
|
4169
|
+
`;g("vaadin-password-field",[$e,Sm],{moduleId:"lumo-password-field"});/**
|
|
4170
4170
|
* @license
|
|
4171
4171
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4172
4172
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4174,7 +4174,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4174
4174
|
* @license
|
|
4175
4175
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4176
4176
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4177
|
-
*/const Tm=i=>class extends hs(it(
|
|
4177
|
+
*/const Tm=i=>class extends hs(it(Fe(Mt(i)))){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(){const e=this.localName;return[...super.slotStyles,`
|
|
4178
4178
|
${e} [slot="input"]::-ms-reveal {
|
|
4179
4179
|
display: none;
|
|
4180
4180
|
}
|
|
@@ -4366,7 +4366,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4366
4366
|
[part='toggle-button']::before {
|
|
4367
4367
|
content: var(--lumo-icons-dropdown);
|
|
4368
4368
|
}
|
|
4369
|
-
`;g("vaadin-combo-box",[
|
|
4369
|
+
`;g("vaadin-combo-box",[$e,Om],{moduleId:"lumo-combo-box"});/**
|
|
4370
4370
|
* @license
|
|
4371
4371
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4372
4372
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4428,15 +4428,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4428
4428
|
* @license
|
|
4429
4429
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4430
4430
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4431
|
-
*/const Rm=1e5,Yi=1e3;class ws{constructor({createElements:e,updateElement:t,scrollTarget:r,scrollContainer:a,elementsContainer:o,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=e,this.updateElement=t,this.scrollTarget=r,this.scrollContainer=a,this.elementsContainer=o||a,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:s}])=>{const l=s.width===0&&s.height===0;!l&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=l}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",s=>this.__onWheel(s)),this.scrollTarget.addEventListener("virtualizer-element-focused",s=>this.__onElementFocused(s)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()}))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(e=>e.__virtualizerPlaceholder)}scrollToIndex(e){if(typeof e!="number"||isNaN(e)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),e=this._clamp(e,0,this.size-1);const t=this.__getVisibleElements().length;let r=Math.floor(e/this.size*this._virtualCount);this._virtualCount-r<t?(r=this._virtualCount-(this.size-e),this._vidxOffset=this._maxVirtualIndexOffset):r<t?e<Yi?(r=e,this._vidxOffset=0):(r=Yi,this._vidxOffset=e-r):this._vidxOffset=e-r,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(r),this.adjustedFirstVisibleIndex!==e&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(e)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=e)}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),_t(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(e=0,t=this.size-1){const r=[];this.__getVisibleElements().forEach(a=>{a.__virtualIndex>=e&&a.__virtualIndex<=t&&(this.__updateElement(a,a.__virtualIndex,!0),r.push(a))}),this.__afterElementsUpdated(r)}_updateMetrics(e){_t();let t=0,r=0;const a=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((n,s)=>{r+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),t+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0},e),this._physicalSize=this._physicalSize+t-r,this._physicalAverageCount!==a&&(this._physicalAverage=Math.round((o*a+t)/this._physicalAverageCount))}__getBorderBoxHeight(e){const t=getComputedStyle(e),r=parseFloat(t.height)||0;if(t.boxSizing==="border-box")return r;const a=parseFloat(t.paddingBottom)||0,o=parseFloat(t.paddingTop)||0,n=parseFloat(t.borderBottomWidth)||0,s=parseFloat(t.borderTopWidth)||0;return r+a+o+n+s}__updateElement(e,t,r){e.__virtualizerPlaceholder&&(e.style.paddingTop="",e.style.opacity="",e.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(e.__lastUpdatedIndex!==t||r)&&(this.updateElement(e,t),e.__lastUpdatedIndex=t)}__afterElementsUpdated(e){e.forEach(t=>{const r=t.offsetHeight;if(r===0)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=re.debounce(this.__placeholderClearDebouncer,Tt,()=>this._resizeHandler());else{this.__elementHeightQueue.push(r),this.__elementHeightQueue.shift();const a=this.__elementHeightQueue.filter(o=>o!==void 0);this.__placeholderHeight=Math.round(a.reduce((o,n)=>o+n,0)/a.length)}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(e){const t=this.__getVisibleElements().find(r=>r.__virtualIndex===e);return t?this.scrollTarget.getBoundingClientRect().top-t.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(e){if(e===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let t,r;if(e>0&&(t=this.adjustedFirstVisibleIndex,r=this.__getIndexScrollOffset(t)),this.__size=e,this._itemsChanged({path:"items"}),_t(),e>0){t=Math.min(t,e-1),this.scrollToIndex(t);const a=this.__getIndexScrollOffset(t);r!==void 0&&a!==void 0&&(this._scrollTop+=r-a)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),_t(),this._debounce("_update",this._update,ci)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(e){this.scrollTarget.scrollTop=e}get items(){return{length:Math.min(this.size,Rm)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const e=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=e.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(e){const t=this.createElements(e),r=document.createDocumentFragment();return t.forEach(a=>{a.style.position="absolute",r.appendChild(a),this.__resizeObserver.observe(a)}),this.elementsContainer.appendChild(r),t}_assignModels(e){const t=[];this._iterateItems((r,a)=>{const o=this._physicalItems[r];o.hidden=a>=this.size,o.hidden?delete o.__lastUpdatedIndex:(o.__virtualIndex=a+(this._vidxOffset||0),this.__updateElement(o,o.__virtualIndex),t.push(o))},e),this.__afterElementsUpdated(t)}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0}),this.__clientFull||super._isClientFull()}translate3d(e,t,r,a){a.style.transform=`translateY(${t})`}toggleScrollListener(){}__getFocusedElement(e=this.__getVisibleElements()){return e.find(t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(e,t){return t.indexOf(e)===t.length-1&&this.size>e.__virtualIndex+1}__previousFocusableSiblingMissing(e,t){return t.indexOf(e)===0&&e.__virtualIndex>0}__onElementFocused(e){if(!this.reorderElements)return;const t=e.detail.element;if(!t)return;const r=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(t,r)||this.__nextFocusableSiblingMissing(t,r))&&this.flush();const a=this.__getVisibleElements();this.__nextFocusableSiblingMissing(t,a)?(this._scrollTop+=Math.ceil(t.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(t,a)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(t.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const e=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const t=e>=0,r=this._getReusables(!t);r.indexes.length&&(this._physicalTop=r.physicalTop,t?(this._virtualStart-=r.indexes.length,this._physicalStart-=r.indexes.length):(this._virtualStart+=r.indexes.length,this._physicalStart+=r.indexes.length),this._resizeHandler())}e&&(this.__fixInvalidItemPositioningDebouncer=re.debounce(this.__fixInvalidItemPositioningDebouncer,ke.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=re.debounce(this.__scrollReorderDebouncer,ke.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(e)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const e=this._physicalTop>this._scrollTop,t=this._physicalBottom<this._scrollBottom,r=this.adjustedFirstVisibleIndex===0,a=this.adjustedLastVisibleIndex===this.size-1;if(e&&!r||t&&!a){const o=t,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(o?-1:1),this._scrollHandler(),this._ratio=n}}__onWheel(e){if(e.ctrlKey||this._hasScrolledAncestor(e.target,e.deltaX,e.deltaY))return;let t=e.deltaY;if(e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._scrollLineHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=t,e.preventDefault();return}t+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=re.debounce(this.__debouncerWheelAnimationFrame,Tt,()=>{this._wheelAnimationFrame=!1});const r=Math.abs(e.deltaX)+Math.abs(t);this._canScroll(this.scrollTarget,e.deltaX,t)?(e.preventDefault(),this.scrollTarget.scrollTop+=t,this.scrollTarget.scrollLeft+=e.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=re.debounce(this._debouncerIgnoreNewWheel,ke.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1})):this._hasResidualMomentum&&r<=this._previousMomentum||this._ignoreNewWheel?e.preventDefault():r>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=r}_hasScrolledAncestor(e,t,r){if(e===this.scrollTarget||e===this.scrollTarget.getRootNode().host)return!1;if(this._canScroll(e,t,r)&&["auto","scroll"].indexOf(getComputedStyle(e).overflow)!==-1)return!0;if(e!==this&&e.parentElement)return this._hasScrolledAncestor(e.parentElement,t,r)}_canScroll(e,t,r){return r>0&&e.scrollTop<e.scrollHeight-e.offsetHeight||r<0&&e.scrollTop>0||t>0&&e.scrollLeft<e.scrollWidth-e.offsetWidth||t<0&&e.scrollLeft>0}_increasePoolIfNeeded(e){if(this._physicalCount>2&&e){const t=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(e,Math.min(100,t)))}else super._increasePoolIfNeeded(e)}get _optPhysicalSize(){const e=super._optPhysicalSize;return e<=0||this.__hasPlaceholders()?e:e+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const e=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),t=Math.max(...this._physicalSizes);return t>Math.min(...this._physicalSizes)?Math.max(0,t-e):0}_getScrollLineHeight(){const e=document.createElement("div");e.style.fontSize="initial",e.style.display="none",document.body.appendChild(e);const t=window.getComputedStyle(e).fontSize;return document.body.removeChild(e),t?window.parseInt(t):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(e=>!e.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const e=this._virtualStart+(this._vidxOffset||0),t=this.__getVisibleElements(),r=this.__getFocusedElement(t)||t[0];if(!r)return;const a=r.__virtualIndex-e,o=t.indexOf(r)-a;if(o>0)for(let n=0;n<o;n++)this.elementsContainer.appendChild(t[n]);else if(o<0)for(let n=t.length+o;n<t.length;n++)this.elementsContainer.insertBefore(t[n],t[0]);if(Ep){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n})}}_adjustVirtualIndexOffset(e){const t=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(e)>1e4){const r=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(r*t)}else{const r=this._vidxOffset,a=Yi,o=100;this._scrollTop===0?(this._vidxOffset=0,r!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<a&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,o),super.scrollToIndex(this.firstVisibleIndex+(r-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=t,r!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-a&&this._vidxOffset<t&&(this._vidxOffset+=Math.min(t-this._vidxOffset,o),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-r)))}}}Object.setPrototypeOf(ws.prototype,zm);class Fm{constructor(e){this.__adapter=new ws(e)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(e){this.__adapter.size=e}scrollToIndex(e){this.__adapter.scrollToIndex(e)}update(e=0,t=this.size-1){this.__adapter.update(e,t)}flush(){this.__adapter.flush()}}/**
|
|
4431
|
+
*/const Rm=1e5,Yi=1e3;class ws{constructor({createElements:e,updateElement:t,scrollTarget:r,scrollContainer:a,elementsContainer:o,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=e,this.updateElement=t,this.scrollTarget=r,this.scrollContainer=a,this.elementsContainer=o||a,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:s}])=>{const l=s.width===0&&s.height===0;!l&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=l}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",s=>this.__onWheel(s)),this.scrollTarget.addEventListener("virtualizer-element-focused",s=>this.__onElementFocused(s)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()}))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(e=>e.__virtualizerPlaceholder)}scrollToIndex(e){if(typeof e!="number"||isNaN(e)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),e=this._clamp(e,0,this.size-1);const t=this.__getVisibleElements().length;let r=Math.floor(e/this.size*this._virtualCount);this._virtualCount-r<t?(r=this._virtualCount-(this.size-e),this._vidxOffset=this._maxVirtualIndexOffset):r<t?e<Yi?(r=e,this._vidxOffset=0):(r=Yi,this._vidxOffset=e-r):this._vidxOffset=e-r,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(r),this.adjustedFirstVisibleIndex!==e&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(e)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=e)}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),_t(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(e=0,t=this.size-1){const r=[];this.__getVisibleElements().forEach(a=>{a.__virtualIndex>=e&&a.__virtualIndex<=t&&(this.__updateElement(a,a.__virtualIndex,!0),r.push(a))}),this.__afterElementsUpdated(r)}_updateMetrics(e){_t();let t=0,r=0;const a=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((n,s)=>{r+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),t+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0},e),this._physicalSize=this._physicalSize+t-r,this._physicalAverageCount!==a&&(this._physicalAverage=Math.round((o*a+t)/this._physicalAverageCount))}__getBorderBoxHeight(e){const t=getComputedStyle(e),r=parseFloat(t.height)||0;if(t.boxSizing==="border-box")return r;const a=parseFloat(t.paddingBottom)||0,o=parseFloat(t.paddingTop)||0,n=parseFloat(t.borderBottomWidth)||0,s=parseFloat(t.borderTopWidth)||0;return r+a+o+n+s}__updateElement(e,t,r){e.__virtualizerPlaceholder&&(e.style.paddingTop="",e.style.opacity="",e.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(e.__lastUpdatedIndex!==t||r)&&(this.updateElement(e,t),e.__lastUpdatedIndex=t)}__afterElementsUpdated(e){e.forEach(t=>{const r=t.offsetHeight;if(r===0)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=re.debounce(this.__placeholderClearDebouncer,Tt,()=>this._resizeHandler());else{this.__elementHeightQueue.push(r),this.__elementHeightQueue.shift();const a=this.__elementHeightQueue.filter(o=>o!==void 0);this.__placeholderHeight=Math.round(a.reduce((o,n)=>o+n,0)/a.length)}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(e){const t=this.__getVisibleElements().find(r=>r.__virtualIndex===e);return t?this.scrollTarget.getBoundingClientRect().top-t.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(e){if(e===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let t,r;if(e>0&&(t=this.adjustedFirstVisibleIndex,r=this.__getIndexScrollOffset(t)),this.__size=e,this._itemsChanged({path:"items"}),_t(),e>0){t=Math.min(t,e-1),this.scrollToIndex(t);const a=this.__getIndexScrollOffset(t);r!==void 0&&a!==void 0&&(this._scrollTop+=r-a)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),_t(),this._debounce("_update",this._update,ci)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(e){this.scrollTarget.scrollTop=e}get items(){return{length:Math.min(this.size,Rm)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const e=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=e.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(e){const t=this.createElements(e),r=document.createDocumentFragment();return t.forEach(a=>{a.style.position="absolute",r.appendChild(a),this.__resizeObserver.observe(a)}),this.elementsContainer.appendChild(r),t}_assignModels(e){const t=[];this._iterateItems((r,a)=>{const o=this._physicalItems[r];o.hidden=a>=this.size,o.hidden?delete o.__lastUpdatedIndex:(o.__virtualIndex=a+(this._vidxOffset||0),this.__updateElement(o,o.__virtualIndex),t.push(o))},e),this.__afterElementsUpdated(t)}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0}),this.__clientFull||super._isClientFull()}translate3d(e,t,r,a){a.style.transform=`translateY(${t})`}toggleScrollListener(){}__getFocusedElement(e=this.__getVisibleElements()){return e.find(t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(e,t){return t.indexOf(e)===t.length-1&&this.size>e.__virtualIndex+1}__previousFocusableSiblingMissing(e,t){return t.indexOf(e)===0&&e.__virtualIndex>0}__onElementFocused(e){if(!this.reorderElements)return;const t=e.detail.element;if(!t)return;const r=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(t,r)||this.__nextFocusableSiblingMissing(t,r))&&this.flush();const a=this.__getVisibleElements();this.__nextFocusableSiblingMissing(t,a)?(this._scrollTop+=Math.ceil(t.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(t,a)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(t.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const e=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const t=e>=0,r=this._getReusables(!t);r.indexes.length&&(this._physicalTop=r.physicalTop,t?(this._virtualStart-=r.indexes.length,this._physicalStart-=r.indexes.length):(this._virtualStart+=r.indexes.length,this._physicalStart+=r.indexes.length),this._resizeHandler())}e&&(this.__fixInvalidItemPositioningDebouncer=re.debounce(this.__fixInvalidItemPositioningDebouncer,Ee.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=re.debounce(this.__scrollReorderDebouncer,Ee.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(e)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const e=this._physicalTop>this._scrollTop,t=this._physicalBottom<this._scrollBottom,r=this.adjustedFirstVisibleIndex===0,a=this.adjustedLastVisibleIndex===this.size-1;if(e&&!r||t&&!a){const o=t,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(o?-1:1),this._scrollHandler(),this._ratio=n}}__onWheel(e){if(e.ctrlKey||this._hasScrolledAncestor(e.target,e.deltaX,e.deltaY))return;let t=e.deltaY;if(e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._scrollLineHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=t,e.preventDefault();return}t+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=re.debounce(this.__debouncerWheelAnimationFrame,Tt,()=>{this._wheelAnimationFrame=!1});const r=Math.abs(e.deltaX)+Math.abs(t);this._canScroll(this.scrollTarget,e.deltaX,t)?(e.preventDefault(),this.scrollTarget.scrollTop+=t,this.scrollTarget.scrollLeft+=e.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=re.debounce(this._debouncerIgnoreNewWheel,Ee.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1})):this._hasResidualMomentum&&r<=this._previousMomentum||this._ignoreNewWheel?e.preventDefault():r>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=r}_hasScrolledAncestor(e,t,r){if(e===this.scrollTarget||e===this.scrollTarget.getRootNode().host)return!1;if(this._canScroll(e,t,r)&&["auto","scroll"].indexOf(getComputedStyle(e).overflow)!==-1)return!0;if(e!==this&&e.parentElement)return this._hasScrolledAncestor(e.parentElement,t,r)}_canScroll(e,t,r){return r>0&&e.scrollTop<e.scrollHeight-e.offsetHeight||r<0&&e.scrollTop>0||t>0&&e.scrollLeft<e.scrollWidth-e.offsetWidth||t<0&&e.scrollLeft>0}_increasePoolIfNeeded(e){if(this._physicalCount>2&&e){const t=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(e,Math.min(100,t)))}else super._increasePoolIfNeeded(e)}get _optPhysicalSize(){const e=super._optPhysicalSize;return e<=0||this.__hasPlaceholders()?e:e+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const e=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),t=Math.max(...this._physicalSizes);return t>Math.min(...this._physicalSizes)?Math.max(0,t-e):0}_getScrollLineHeight(){const e=document.createElement("div");e.style.fontSize="initial",e.style.display="none",document.body.appendChild(e);const t=window.getComputedStyle(e).fontSize;return document.body.removeChild(e),t?window.parseInt(t):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(e=>!e.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const e=this._virtualStart+(this._vidxOffset||0),t=this.__getVisibleElements(),r=this.__getFocusedElement(t)||t[0];if(!r)return;const a=r.__virtualIndex-e,o=t.indexOf(r)-a;if(o>0)for(let n=0;n<o;n++)this.elementsContainer.appendChild(t[n]);else if(o<0)for(let n=t.length+o;n<t.length;n++)this.elementsContainer.insertBefore(t[n],t[0]);if(Ep){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n})}}_adjustVirtualIndexOffset(e){const t=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(e)>1e4){const r=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(r*t)}else{const r=this._vidxOffset,a=Yi,o=100;this._scrollTop===0?(this._vidxOffset=0,r!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<a&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,o),super.scrollToIndex(this.firstVisibleIndex+(r-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=t,r!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-a&&this._vidxOffset<t&&(this._vidxOffset+=Math.min(t-this._vidxOffset,o),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-r)))}}}Object.setPrototypeOf(ws.prototype,zm);class Fm{constructor(e){this.__adapter=new ws(e)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(e){this.__adapter.size=e}scrollToIndex(e){this.__adapter.scrollToIndex(e)}update(e=0,t=this.size-1){this.__adapter.update(e,t)}flush(){this.__adapter.flush()}}/**
|
|
4432
4432
|
* @license
|
|
4433
4433
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4434
4434
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4435
|
-
*/const
|
|
4435
|
+
*/const Se=class{toString(){return""}};/**
|
|
4436
4436
|
* @license
|
|
4437
4437
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4438
4438
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4439
|
-
*/const xs=i=>class extends i{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(this._cachedViewportTotalPaddingBottom===void 0){const e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map(t=>parseInt(t,10)).reduce((t,r)=>t+r)}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Vt()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",e=>e.stopPropagation()),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(e){if(!this.__virtualizer||!(this.opened&&e>=0))return;const t=this._visibleItemsCount();let r=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),r=e-t+1):e>this.__virtualizer.firstVisibleIndex&&(r=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,r));const a=[...this.children].find(l=>!l.hidden&&l.index===this.__virtualizer.lastVisibleIndex);if(!a||e!==a.index)return;const o=a.getBoundingClientRect(),n=this.getBoundingClientRect(),s=o.bottom-n.bottom+this._viewportTotalPaddingBottom;s>0&&(this.scrollTop+=s)}_isItemSelected(e,t,r){return e instanceof
|
|
4439
|
+
*/const xs=i=>class extends i{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(this._cachedViewportTotalPaddingBottom===void 0){const e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map(t=>parseInt(t,10)).reduce((t,r)=>t+r)}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Vt()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",e=>e.stopPropagation()),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(e){if(!this.__virtualizer||!(this.opened&&e>=0))return;const t=this._visibleItemsCount();let r=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),r=e-t+1):e>this.__virtualizer.firstVisibleIndex&&(r=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,r));const a=[...this.children].find(l=>!l.hidden&&l.index===this.__virtualizer.lastVisibleIndex);if(!a||e!==a.index)return;const o=a.getBoundingClientRect(),n=this.getBoundingClientRect(),s=o.bottom-n.bottom+this._viewportTotalPaddingBottom;s>0&&(this.scrollTop+=s)}_isItemSelected(e,t,r){return e instanceof Se?!1:r&&e!==void 0&&t!==void 0?mi(r,e)===mi(r,t):e===t}__initVirtualizer(){this.__virtualizer=new Fm({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(e){e&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(e){e&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(e,t){(e||t)&&this.requestContentUpdate()}__focusedIndexChanged(e,t){e!==t&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e)}__rendererChanged(e,t){(e||t)&&this.requestContentUpdate()}__createElements(e){return[...Array(e)].map(()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t})}_updateElement(e,t){const r=this.items[t],a=this.focusedIndex,o=this._isItemSelected(r,this.selectedItem,this.itemIdPath);e.setProperties({item:r,index:t,label:this.getItemLabel(r),selected:o,renderer:this.renderer,focused:!this.loading&&a===t}),typeof this.itemClassNameGenerator=="function"?e.className=this.itemClassNameGenerator(r):e.className!==""&&(e.className=""),e.performUpdate&&!e.hasUpdated&&e.performUpdate(),e.id=`${this.__hostTagName}-item-${t}`,e.setAttribute("role",t!==void 0?"option":!1),e.setAttribute("aria-selected",o.toString()),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),r instanceof Se&&this.__requestItemByIndex(t)}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{const t=this.scrollTop===0,r=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(t&&e.deltaY<0||r&&e.deltaY>0)&&e.preventDefault()})}__requestItemByIndex(e){requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e}}))})}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}};/**
|
|
4440
4440
|
* @license
|
|
4441
4441
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4442
4442
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4487,7 +4487,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4487
4487
|
* @license
|
|
4488
4488
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4489
4489
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4490
|
-
*/const Es=i=>class extends i{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new Bm(this,{placeholder:new
|
|
4490
|
+
*/const Es=i=>class extends i{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new Bm(this,{placeholder:new Se,isPlaceholder:e=>e instanceof Se,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",e=>{if(!this._shouldFetchData())return;const t=e.detail.index;t!==void 0&&this.__dataProviderController.ensureFlatIndexLoaded(t)}),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(e){if(this.__previousDataProviderFilter===void 0&&e===""){this.__previousDataProviderFilter=e;return}this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1)}_shouldFetchData(){return this.dataProvider?this.opened||this.filter&&this.filter.length:!1}_ensureFirstPage(e){!this._shouldFetchData()||!e||(this._forceNextRequest||this.size===void 0?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){const{rootCache:e}=this.__dataProviderController;e.items=[...e.items],this.__synchronizeControllerState(),!this.opened&&!this._isInputFocused()&&this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(e){const{rootCache:t}=this.__dataProviderController;t.size!==e&&(t.size=e,t.items=[...t.items],this.__synchronizeControllerState())}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){const{rootCache:t}=this.__dataProviderController;t.items!==e&&(t.items=e,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:e}=this.__dataProviderController;this.size=e.size,this.filteredItems=e.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(e,t){if(Math.floor(e)!==e||e<1)throw this.pageSize=t,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache()}_dataProviderChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.dataProvider=t}),this.__dataProviderController.setDataProvider(e),this.clearCache()}_ensureItemsOrDataProvider(e){if(this.items!==void 0&&this.dataProvider!==void 0)throw e(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(e,t){if(e&&t!==""&&(this.selectedItem===void 0||this.selectedItem===null)){const r=this.__getItemIndexByValue(this.filteredItems,t);(r<0||!this._getItemLabel(this.filteredItems[r]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}};/**
|
|
4491
4491
|
* @license
|
|
4492
4492
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4493
4493
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4495,7 +4495,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4495
4495
|
* @license
|
|
4496
4496
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4497
4497
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4498
|
-
*/function Co(i){return i!=null}function ko(i,e){return i.findIndex(t=>t instanceof Ie?!1:e(t))}const Is=i=>class extends Ft(pe(Wr(Re(ze(Mt(it(i))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const t=this._nativeInput;t&&(t.autocomplete="off",t.autocapitalize="off",t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-expanded",!!this.opened),t.setAttribute("spellcheck","false"),t.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront()})};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),Ai(this),this.addController(new ps(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate()}))}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(e,t,r){super._propertiesChanged(e,t,r),t.filter!==void 0&&this._filterChanged(t.filter)}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",t=>t.preventDefault()),e.addEventListener("opened-changed",t=>{this._overlayOpened=t.detail.value}),this._overlayElement=e}_initScroller(e){const t=document.createElement(`${this._tagNamePrefix}-scroller`);t.owner=e||this,t.getItemLabel=this._getItemLabel.bind(this),t.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const r=this._overlayElement;r.renderer=a=>{a.innerHTML||a.appendChild(t)},r.requestContentUpdate(),this._scroller=t}_updateScroller(e,t,r,a,o,n,s,l,d,c){if(e&&(r&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:r?t:[],opened:r,loading:a,selectedItem:o,itemIdPath:n,focusedIndex:s,renderer:l,theme:d,itemClassNameGenerator:c}),e.performUpdate&&!e.hasUpdated))try{e.performUpdate()}catch(u){}}_openedOrItemsChanged(e,t,r,a){this._overlayOpened=e&&(a||r||!!(t&&t.length))}_overlayOpenedChanged(e,t){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):t&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(e,t){t!==void 0&&this._updateActiveDescendant(e)}_isInputFocused(){return this.inputElement&&Br(this.inputElement)}_updateActiveDescendant(e){const t=this._nativeInput;if(!t)return;const r=this._getItemElements().find(a=>a.index===e);r?t.setAttribute("aria-activedescendant",r.id):t.removeAttribute("aria-activedescendant")}_openedChanged(e,t){if(t===void 0)return;e?!this._isInputFocused()&&!fr&&this.inputElement&&this.inputElement.focus():this._onClosed();const r=this._nativeInput;r&&(r.setAttribute("aria-expanded",!!e),e?r.setAttribute("aria-controls",this._scroller.id):r.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus()}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open()}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open())}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e)}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault())}_getItemLabel(e){let t=e&&this.itemLabelPath?mi(this.itemLabelPath,e):void 0;return t==null&&(t=e?e.toString():""),t}_getItemValue(e){let t=e&&this.itemValuePath?mi(this.itemValuePath,e):void 0;return t===void 0&&(t=e?e.toString():""),t}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange()}}_setSelectionRange(e,t){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,t)}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e)}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close()}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",t=>t.preventDefault()),e.addEventListener("click",()=>{fr&&!this._isInputFocused()&&document.activeElement.blur()}))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const e=[this.selectedItem,...this._dropdownItems||[]],t=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!t){const r=this._inputElementValue;this._lastCustomValue=r;const a=new CustomEvent("custom-value-set",{detail:r,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(a),a.defaultPrevented||(this.value=r)}else!this.allowCustomValue&&!this.opened&&t?this.value=this._getItemValue(t):this._revertInputValueToValue()}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(e){const t=this._inputElementValue,r={};this.filter===t?this._filterChanged(this.filter):r.filter=t,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(r.opened=!0),this.setProperties(r)}_onChange(e){e.stopPropagation()}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem)}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const t=this._getItemValue(e);if(this.value!==t&&(this.value=t,this.value!==t))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e)}}_valueChanged(e,t){e===""&&t===void 0||(Co(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.items=t}),e?this.filteredItems=e.slice(0):t&&(this.filteredItems=null)}_filteredItemsChanged(e){this._setDropdownItems(e)}_filterItems(e,t){return e&&e.filter(r=>(t=t?t.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(t)>-1))}_selectItemForValue(e){const t=this.__getItemIndexByValue(this.filteredItems,e),r=this.selectedItem;t>=0?this.selectedItem=this.filteredItems[t]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&r===null&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(e){const t=this._dropdownItems;this._dropdownItems=e;const r=t?t[this._focusedIndex]:null,a=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&a>=0&&(this.selectedItem=e[a]);const o=this.__getItemIndexByValue(e,this._getItemValue(r));o>-1?this._focusedIndex=o:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e)}__getItemIndexByValue(e,t){return!e||!Co(t)?-1:ko(e,r=>this._getItemValue(r)===t)}__getItemIndexByLabel(e,t){return!e||!t?-1:ko(e,r=>this._getItemLabel(r).toString().toLowerCase()===t.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof Ie)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close())}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(yi()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction())}};/**
|
|
4498
|
+
*/function Co(i){return i!=null}function ko(i,e){return i.findIndex(t=>t instanceof Se?!1:e(t))}const Is=i=>class extends Ft(me(Wr(Fe(Re(Mt(it(i))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const t=this._nativeInput;t&&(t.autocomplete="off",t.autocapitalize="off",t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-expanded",!!this.opened),t.setAttribute("spellcheck","false"),t.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront()})};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),Ai(this),this.addController(new ps(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate()}))}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(e,t,r){super._propertiesChanged(e,t,r),t.filter!==void 0&&this._filterChanged(t.filter)}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",t=>t.preventDefault()),e.addEventListener("opened-changed",t=>{this._overlayOpened=t.detail.value}),this._overlayElement=e}_initScroller(e){const t=document.createElement(`${this._tagNamePrefix}-scroller`);t.owner=e||this,t.getItemLabel=this._getItemLabel.bind(this),t.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const r=this._overlayElement;r.renderer=a=>{a.innerHTML||a.appendChild(t)},r.requestContentUpdate(),this._scroller=t}_updateScroller(e,t,r,a,o,n,s,l,d,c){if(e&&(r&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:r?t:[],opened:r,loading:a,selectedItem:o,itemIdPath:n,focusedIndex:s,renderer:l,theme:d,itemClassNameGenerator:c}),e.performUpdate&&!e.hasUpdated))try{e.performUpdate()}catch(u){}}_openedOrItemsChanged(e,t,r,a){this._overlayOpened=e&&(a||r||!!(t&&t.length))}_overlayOpenedChanged(e,t){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):t&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(e,t){t!==void 0&&this._updateActiveDescendant(e)}_isInputFocused(){return this.inputElement&&Br(this.inputElement)}_updateActiveDescendant(e){const t=this._nativeInput;if(!t)return;const r=this._getItemElements().find(a=>a.index===e);r?t.setAttribute("aria-activedescendant",r.id):t.removeAttribute("aria-activedescendant")}_openedChanged(e,t){if(t===void 0)return;e?!this._isInputFocused()&&!fr&&this.inputElement&&this.inputElement.focus():this._onClosed();const r=this._nativeInput;r&&(r.setAttribute("aria-expanded",!!e),e?r.setAttribute("aria-controls",this._scroller.id):r.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus()}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open()}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open())}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e)}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault())}_getItemLabel(e){let t=e&&this.itemLabelPath?mi(this.itemLabelPath,e):void 0;return t==null&&(t=e?e.toString():""),t}_getItemValue(e){let t=e&&this.itemValuePath?mi(this.itemValuePath,e):void 0;return t===void 0&&(t=e?e.toString():""),t}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange()}}_setSelectionRange(e,t){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,t)}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e)}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close()}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction())}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",t=>t.preventDefault()),e.addEventListener("click",()=>{fr&&!this._isInputFocused()&&document.activeElement.blur()}))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const e=[this.selectedItem,...this._dropdownItems||[]],t=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!t){const r=this._inputElementValue;this._lastCustomValue=r;const a=new CustomEvent("custom-value-set",{detail:r,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(a),a.defaultPrevented||(this.value=r)}else!this.allowCustomValue&&!this.opened&&t?this.value=this._getItemValue(t):this._revertInputValueToValue()}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(e){const t=this._inputElementValue,r={};this.filter===t?this._filterChanged(this.filter):r.filter=t,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(r.opened=!0),this.setProperties(r)}_onChange(e){e.stopPropagation()}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem)}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const t=this._getItemValue(e);if(this.value!==t&&(this.value=t,this.value!==t))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e)}}_valueChanged(e,t){e===""&&t===void 0||(Co(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(e,t){this._ensureItemsOrDataProvider(()=>{this.items=t}),e?this.filteredItems=e.slice(0):t&&(this.filteredItems=null)}_filteredItemsChanged(e){this._setDropdownItems(e)}_filterItems(e,t){return e&&e.filter(r=>(t=t?t.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(t)>-1))}_selectItemForValue(e){const t=this.__getItemIndexByValue(this.filteredItems,e),r=this.selectedItem;t>=0?this.selectedItem=this.filteredItems[t]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&r===null&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(e){const t=this._dropdownItems;this._dropdownItems=e;const r=t?t[this._focusedIndex]:null,a=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&a>=0&&(this.selectedItem=e[a]);const o=this.__getItemIndexByValue(e,this._getItemValue(r));o>-1?this._focusedIndex=o:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e)}__getItemIndexByValue(e,t){return!e||!Co(t)?-1:ko(e,r=>this._getItemValue(r)===t)}__getItemIndexByLabel(e,t){return!e||!t?-1:ko(e,r=>this._getItemLabel(r).toString().toLowerCase()===t.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof Se)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close())}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(yi()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction())}};/**
|
|
4499
4499
|
* @license
|
|
4500
4500
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
4501
4501
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4544,7 +4544,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4544
4544
|
></vaadin-combo-box-overlay>
|
|
4545
4545
|
|
|
4546
4546
|
<slot name="tooltip"></slot>
|
|
4547
|
-
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Nt(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new Lt(this.inputElement,this._labelController)),this._tooltipController=new
|
|
4547
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Nt(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new Lt(this.inputElement,this._labelController)),this._tooltipController=new ye(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(e){e.stopPropagation(),super._onClearButtonClick(e)}_onHostClick(e){const t=e.composedPath();(t.includes(this._labelNode)||t.includes(this._positionTarget))&&super._onHostClick(e)}}w(Um);/**
|
|
4548
4548
|
* @license
|
|
4549
4549
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4550
4550
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4710,7 +4710,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4710
4710
|
color: var(--lumo-contrast-60pct);
|
|
4711
4711
|
cursor: var(--lumo-clickable-cursor);
|
|
4712
4712
|
}
|
|
4713
|
-
`;g("vaadin-multi-select-combo-box",[
|
|
4713
|
+
`;g("vaadin-multi-select-combo-box",[$e,Wm],{moduleId:"lumo-multi-select-combo-box"});/**
|
|
4714
4714
|
* @license
|
|
4715
4715
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4716
4716
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4829,7 +4829,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4829
4829
|
<div id="selector">
|
|
4830
4830
|
<slot></slot>
|
|
4831
4831
|
</div>
|
|
4832
|
-
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(e,t,r){return e instanceof
|
|
4832
|
+
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(e,t,r){return e instanceof Se||this.owner.readonly?!1:this.owner._findIndex(e,this.owner.selectedItems,r)>-1}_updateElement(e,t){super._updateElement(e,t),e.toggleAttribute("readonly",this.owner.readonly)}}w(Jm);/**
|
|
4833
4833
|
* @license
|
|
4834
4834
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4835
4835
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4851,7 +4851,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4851
4851
|
no-vertical-overlap
|
|
4852
4852
|
restore-focus-node="[[inputElement]]"
|
|
4853
4853
|
></vaadin-multi-select-combo-box-overlay>
|
|
4854
|
-
`}static get properties(){return{filteredItems:{type:Array,notify:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_target:{type:Object}}}static get observers(){return["_readonlyChanged(readonly)"]}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}constructor(){super(),this.addEventListener("custom-value-set",this.__onCustomValueSet.bind(this))}open(){!this.disabled&&!(this.readonly&&this.selectedItems.length===0)&&(this.opened=!0)}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button")}_readonlyChanged(){this._setDropdownItems(this.filteredItems)}_setDropdownItems(e){if(this.readonly){super._setDropdownItems(this.selectedItems);return}if(this.filter||!this.selectedItemsOnTop){super._setDropdownItems(e);return}if(e&&e.length&&this.topGroup&&this.topGroup.length){const t=e.filter(r=>this._comboBox._findIndex(r,this.topGroup,this.itemIdPath)===-1);super._setDropdownItems(this.topGroup.concat(t));return}super._setDropdownItems(e)}_topGroupChanged(e){e&&this._setDropdownItems(this.filteredItems)}_initScroller(){const e=this.getRootNode().host;this._comboBox=e,super._initScroller(e)}_onEnter(e){if(this.opened){if(e.preventDefault(),e.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const t=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(t)}return}super._onEnter(e)}_onEscape(e){if(this.readonly){e.stopPropagation(),this.opened&&this.close();return}super._onEscape(e)}_clearFilter(){(!this.keepFilter||!this.opened)&&super._clearFilter()}_revertInputValueToValue(){super._revertInputValueToValue(),this.filter=""}_commitValue(){this.lastFilter=this.filter,super._commitValue()}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_setFocused(e){e||(this._ignoreCommitValue=!0),super._setFocused(e),!e&&this.readonly&&!this._closeOnBlurIsPrevented&&this.close()}_onClosed(){this._ignoreCommitValue=!0,super._onClosed()}_detectAndDispatchChange(){if(this._ignoreCommitValue){this._ignoreCommitValue=!1,this.clear(),this._inputElementValue="";return}super._detectAndDispatchChange()}_overlaySelectedItemChanged(e){e.stopPropagation(),!this.readonly&&(e.detail.item instanceof
|
|
4854
|
+
`}static get properties(){return{filteredItems:{type:Array,notify:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_target:{type:Object}}}static get observers(){return["_readonlyChanged(readonly)"]}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}constructor(){super(),this.addEventListener("custom-value-set",this.__onCustomValueSet.bind(this))}open(){!this.disabled&&!(this.readonly&&this.selectedItems.length===0)&&(this.opened=!0)}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button")}_readonlyChanged(){this._setDropdownItems(this.filteredItems)}_setDropdownItems(e){if(this.readonly){super._setDropdownItems(this.selectedItems);return}if(this.filter||!this.selectedItemsOnTop){super._setDropdownItems(e);return}if(e&&e.length&&this.topGroup&&this.topGroup.length){const t=e.filter(r=>this._comboBox._findIndex(r,this.topGroup,this.itemIdPath)===-1);super._setDropdownItems(this.topGroup.concat(t));return}super._setDropdownItems(e)}_topGroupChanged(e){e&&this._setDropdownItems(this.filteredItems)}_initScroller(){const e=this.getRootNode().host;this._comboBox=e,super._initScroller(e)}_onEnter(e){if(this.opened){if(e.preventDefault(),e.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const t=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(t)}return}super._onEnter(e)}_onEscape(e){if(this.readonly){e.stopPropagation(),this.opened&&this.close();return}super._onEscape(e)}_clearFilter(){(!this.keepFilter||!this.opened)&&super._clearFilter()}_revertInputValueToValue(){super._revertInputValueToValue(),this.filter=""}_commitValue(){this.lastFilter=this.filter,super._commitValue()}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_setFocused(e){e||(this._ignoreCommitValue=!0),super._setFocused(e),!e&&this.readonly&&!this._closeOnBlurIsPrevented&&this.close()}_onClosed(){this._ignoreCommitValue=!0,super._onClosed()}_detectAndDispatchChange(){if(this._ignoreCommitValue){this._ignoreCommitValue=!1,this.clear(),this._inputElementValue="";return}super._detectAndDispatchChange()}_overlaySelectedItemChanged(e){e.stopPropagation(),!this.readonly&&(e.detail.item instanceof Se||this.opened&&(this.lastFilter=this.filter,this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:e.detail.item}}))))}_shouldFetchData(){return this.readonly?!1:super._shouldFetchData()}clearCache(){this.readonly||super.clearCache()}__onCustomValueSet(e){this._ignoreCommitValue&&e.stopImmediatePropagation()}}w(Zm);/**
|
|
4855
4855
|
* @license
|
|
4856
4856
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4857
4857
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -4973,7 +4973,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
4973
4973
|
color: transparent !important;
|
|
4974
4974
|
forced-color-adjust: none;
|
|
4975
4975
|
}
|
|
4976
|
-
`]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new Nt(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new Lt(this.inputElement,this._labelController)),this._tooltipController=new
|
|
4976
|
+
`]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new Nt(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new Lt(this.inputElement,this._labelController)),this._tooltipController=new ye(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new J(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:e=>{e.addEventListener("mousedown",t=>this._preventBlur(t)),this._overflow=e}}),this.addController(this._overflowController),this.__updateChips(),Ai(this)}checkValidity(){return this.required&&!this.readonly?this._hasValue:!0}clear(){this.__updateSelection([]),Zt(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(e,t){super._disabledChanged(e,t),(e||t)&&this.__updateChips()}_inputElementChanged(e){super._inputElementChanged(e),e&&this.$.comboBox._setInputElement(e)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate())}_onResize(){this.__updateChips()}_delegateAttribute(e,t){if(this.stateTarget){if(e==="required"){this._delegateAttribute("aria-required",t?"true":!1);return}super._delegateAttribute(e,t)}}_autoExpandHorizontallyChanged(e,t){(e||t)&&this.__updateChips()}_autoExpandVerticallyChanged(e,t){(e||t)&&this.__updateChips()}_clearButtonVisibleChanged(e,t){(e||t)&&this.__updateChips()}_onFilteredItemsChanged(e){const{value:t}=e.detail;(Array.isArray(t)||t==null)&&(this.filteredItems=t)}_readonlyChanged(e,t){(e||t)&&this.__updateChips(),this.dataProvider&&this.clearCache()}__itemClassNameGeneratorChanged(e,t){(e||t)&&this.__updateChips()}_pageSizeChanged(e,t){(Math.floor(e)!==e||e<=0)&&(this.pageSize=t,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(e){const t=this.__tmpA11yPlaceholder;t!==e&&(this.__savedPlaceholder=e,t&&(this.placeholder=t))}_selectedItemsChanged(e){if(this._toggleHasValue(this._hasValue),this._hasValue){const t=this._mergeItemLabels(e);this.__tmpA11yPlaceholder===void 0&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=t,this.placeholder=t}else this.__tmpA11yPlaceholder!==void 0&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth()}_getItemLabel(e){return this.$.comboBox._getItemLabel(e)}_mergeItemLabels(e){return e.map(t=>this._getItemLabel(t)).join(", ")}_findIndex(e,t,r){if(r&&e){for(let a=0;a<t.length;a++)if(t[a]&&t[a][r]===e[r])return a;return-1}return t.indexOf(e)}__clearInternalValue(e=!1){!this.keepFilter||e?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter)}__announceItem(e,t,r){const a=t?"selected":"deselected",o=this.i18n.total.replace("{count}",r||0);Zt(`${e} ${this.i18n[a]} ${o}`)}__removeItem(e){const t=[...this.selectedItems];t.splice(t.indexOf(e),1),this.__updateSelection(t);const r=this._getItemLabel(e);this.__announceItem(r,!1,t.length)}__selectItem(e){const t=[...this.selectedItems],r=this._findIndex(e,t,this.itemIdPath),a=this._getItemLabel(e);let o=!1;if(r!==-1){const n=this._lastFilter;if(n&&n.toLowerCase()===a.toLowerCase()){this.__clearInternalValue();return}t.splice(r,1)}else t.push(e),o=!0;this.__updateSelection(t),this.__clearInternalValue(),this.__announceItem(a,o,t.length)}__updateSelection(e){this.selectedItems=e,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(e,t,r){e?r||(this._topGroup=[...t]):this._topGroup=[]}__createChip(e){const t=document.createElement("vaadin-multi-select-combo-box-chip");t.setAttribute("slot","chip"),t.item=e,t.disabled=this.disabled,t.readonly=this.readonly;const r=this._getItemLabel(e);return t.label=r,t.setAttribute("title",r),typeof this.itemClassNameGenerator=="function"&&(t.className=this.itemClassNameGenerator(e)),t.addEventListener("item-removed",a=>this._onItemRemoved(a)),t.addEventListener("mousedown",a=>this._preventBlur(a)),t}__getOverflowWidth(){const e=this._overflow;e.style.visibility="hidden",e.removeAttribute("hidden");const t=e.getAttribute("count");e.setAttribute("count","99");const r=getComputedStyle(e),a=e.clientWidth+parseInt(r.marginInlineStart);return e.setAttribute("count",t),e.setAttribute("hidden",""),e.style.visibility="",a}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach(n=>{n.remove()});const e=[...this.selectedItems],t=this._inputField.$.wrapper.clientWidth,r=parseInt(getComputedStyle(this.inputElement).flexBasis);let a=t-r;e.length>1&&(a-=this.__getOverflowWidth());const o=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const n=[];for(let d=e.length-1,c=null;d>=0;d--){const u=this.__createChip(e[d]);this.insertBefore(u,c),c=u,n.unshift(u)}const s=[],l=this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth;if(!this.autoExpandVertically&&l<r){for(;n.length>1;){n.pop().remove(),s.unshift(e.pop());const d=s.length>0?r+this.__getOverflowWidth():r;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=d)break}n.length===1&&(n[0].style.maxWidth=`${Math.max(o,a)}px`)}this._overflowItems=s;return}for(let n=e.length-1,s=null;n>=0;n--){const l=this.__createChip(e[n]);if(this.insertBefore(l,s),!this.autoExpandVertically&&this.$.chips.clientWidth>a)if(s===null)l.style.maxWidth=`${Math.max(o,a)}px`;else{l.remove();break}e.pop(),s=l}this._overflowItems=e}__updateOverflowChip(e,t,r,a){if(e){const o=t.length;e.label=`${o}`,e.setAttribute("count",`${o}`),e.setAttribute("title",this._mergeItemLabels(t)),e.toggleAttribute("hidden",o===0),e.disabled=r,e.readonly=a}}_onClearButtonTouchend(e){e.preventDefault(),e.stopPropagation(),this.clear()}_onClearButtonClick(e){e.stopPropagation(),this.clear()}_onChange(e){e.stopPropagation()}_onEscape(e){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(e.stopPropagation(),this.selectedItems=[])}_onKeyDown(e){super._onKeyDown(e);const t=this._chips;if(!this.readonly&&t.length>0)switch(e.key){case"Backspace":this._onBackSpace(t);break;case"ArrowLeft":this._onArrowLeft(t,e);break;case"ArrowRight":this._onArrowRight(t,e);break;default:this._focusedChipIndex=-1;break}}_onArrowLeft(e,t){if(this.inputElement.selectionStart!==0)return;const r=this._focusedChipIndex;r!==-1&&t.preventDefault();let a;this.__isRTL?r===e.length-1?a=-1:r>-1&&(a=r+1):r===-1?a=e.length-1:r>0&&(a=r-1),a!==void 0&&(this._focusedChipIndex=a)}_onArrowRight(e,t){if(this.inputElement.selectionStart!==0)return;const r=this._focusedChipIndex;r!==-1&&t.preventDefault();let a;this.__isRTL?r===-1?a=e.length-1:r>0&&(a=r-1):r===e.length-1?a=-1:r>-1&&(a=r+1),a!==void 0&&(this._focusedChipIndex=a)}_onBackSpace(e){if(this.inputElement.selectionStart!==0)return;const t=this._focusedChipIndex;t===-1?this._focusedChipIndex=e.length-1:(this.__removeItem(e[t].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(e,t){if(e>-1||t>-1){const r=this._chips;if(r.forEach((a,o)=>{a.toggleAttribute("focused",o===e)}),e>-1){const a=r[e].item,o=this._getItemLabel(a);Zt(`${o} ${this.i18n.focused}`)}}}_onComboBoxChange(){const e=this.$.comboBox.selectedItem;e&&this.__selectItem(e)}_onComboBoxItemSelected(e){this.__selectItem(e.detail.item)}_onCustomValueSet(e){e.preventDefault(),e.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:e.detail,composed:!0,bubbles:!0}))}_onItemRemoved(e){this.__removeItem(e.detail.item)}_preventBlur(e){e.preventDefault()}}w(tf);g("vaadin-notification-card",f`
|
|
4977
4977
|
:host {
|
|
4978
4978
|
position: relative;
|
|
4979
4979
|
margin: var(--lumo-space-s);
|
|
@@ -5284,14 +5284,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5284
5284
|
<slot></slot>
|
|
5285
5285
|
</div>
|
|
5286
5286
|
</div>
|
|
5287
|
-
`}static get is(){return"vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite")}}class
|
|
5287
|
+
`}static get is(){return"vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite")}}class _e extends Ft(_i(oe(E))){static get template(){return k`
|
|
5288
5288
|
<style>
|
|
5289
5289
|
:host {
|
|
5290
5290
|
display: none !important;
|
|
5291
5291
|
}
|
|
5292
5292
|
</style>
|
|
5293
5293
|
<vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
|
|
5294
|
-
`}static get is(){return"vaadin-notification"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(e,t){return rf(e)?
|
|
5294
|
+
`}static get is(){return"vaadin-notification"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(e,t){return rf(e)?_e._createAndShowNotification(r=>{Jo(e,r)},t):_e._createAndShowNotification(r=>{r.innerText=e},t)}static _createAndShowNotification(e,t){const r=document.createElement(_e.is);return t&&Number.isFinite(t.duration)&&(r.duration=t.duration),t&&t.position&&(r.position=t.position),t&&t.theme&&r.setAttribute("theme",t.theme),r.renderer=e,document.body.appendChild(r),r.opened=!0,r.addEventListener("opened-changed",a=>{a.detail.value||r.remove()}),r}get _container(){return _e._container||(_e._container=document.createElement("vaadin-notification-container"),document.body.appendChild(_e._container)),_e._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),Ai(this)}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected||(this.opened=!1)})}requestContentUpdate(){this.renderer&&this.renderer(this._card,this)}_rendererChanged(e,t,r){if(!r)return;const a=this._oldRenderer!==e;this._oldRenderer=e,a&&(r.innerHTML="",delete r._$litPart$),t&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate())}open(){this.opened=!0}close(){this.opened=!1}_openedChanged(e){e?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard()}__cleanUpOpeningClosingState(){this._card.removeAttribute("opening"),this._card.removeAttribute("closing"),this._card.removeEventListener("animationend",this.__animationEndListener)}_animatedAppendNotificationCard(){this._card?(this.__cleanUpOpeningClosingState(),this._card.setAttribute("opening",""),this._appendNotificationCard(),this.__animationEndListener=()=>this.__cleanUpOpeningClosingState(),this._card.addEventListener("animationend",this.__animationEndListener),this._didAnimateNotificationAppend=!0):this._didAnimateNotificationAppend=!1}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)){console.warn(`Invalid alignment parameter provided: position=${this.position}`);return}this._container.bringToFront(),this._card.slot=this.position,this._container.firstElementChild&&/top/u.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card)}}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=!!this._container.firstElementChild,this.dispatchEvent(new CustomEvent("closed"))}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard()}_animatedRemoveNotificationCard(){this.__cleanUpOpeningClosingState(),this._card.setAttribute("closing","");const e=getComputedStyle(this._card).getPropertyValue("animation-name");e&&e!=="none"?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState()},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard()}_positionChanged(){this.opened&&this._animatedAppendNotificationCard()}_durationChanged(e,t){t&&(clearTimeout(this._durationTimeoutId),e>0&&(this._durationTimeoutId=setTimeout(()=>this.close(),e)))}}w(af);w(of);w(_e);const As=f`
|
|
5295
5295
|
:host {
|
|
5296
5296
|
-webkit-tap-highlight-color: transparent;
|
|
5297
5297
|
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
@@ -5352,7 +5352,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5352
5352
|
--_lumo-selected-item-height: var(--lumo-size-s);
|
|
5353
5353
|
--_lumo-selected-item-padding: 0;
|
|
5354
5354
|
}
|
|
5355
|
-
`;g("vaadin-select",[
|
|
5355
|
+
`;g("vaadin-select",[$e,nf],{moduleId:"lumo-select"});g("vaadin-select-value-button",f`
|
|
5356
5356
|
:host {
|
|
5357
5357
|
font-family: var(--lumo-font-family);
|
|
5358
5358
|
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
@@ -5411,7 +5411,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5411
5411
|
* @license
|
|
5412
5412
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5413
5413
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5414
|
-
*/const Ts=i=>class extends Fr(
|
|
5414
|
+
*/const Ts=i=>class extends Fr(Fe(i)){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return this._value!==void 0?this._value:this.textContent.trim()}set value(e){this._value=e}ready(){super.ready();const e=this.getAttribute("value");e!==null&&(this.value=e)}focus(){this.disabled||(super.focus(),this._setFocused(!0))}_shouldSetActive(e){return!this.disabled&&!(e.type==="keydown"&&e.defaultPrevented)}_selectedChanged(e){this.setAttribute("aria-selected",e)}_disabledChanged(e){super._disabledChanged(e),e&&(this.selected=!1,this.blur())}_onKeyDown(e){super._onKeyDown(e),this._activeKeys.includes(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this.click())}};/**
|
|
5415
5415
|
* @license
|
|
5416
5416
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5417
5417
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -5437,15 +5437,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5437
5437
|
* @license
|
|
5438
5438
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
5439
5439
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5440
|
-
*/const hf=i=>class extends
|
|
5440
|
+
*/const hf=i=>class extends Re(i){get focused(){return(this._getItems()||[]).find(Br)}get _vertical(){return!0}focus(){const e=this._getItems();if(Array.isArray(e)){const t=this._getAvailableIndex(e,0,null,r=>!ur(r));t>=0&&this._focus(t)}}_getItems(){return Array.from(this.children)}_onKeyDown(e){if(super._onKeyDown(e),e.metaKey||e.ctrlKey)return;const{key:t}=e,r=this._getItems()||[],a=r.indexOf(this.focused);let o,n;const s=!this._vertical&&this.getAttribute("dir")==="rtl"?-1:1;this.__isPrevKey(t)?(n=-s,o=a-s):this.__isNextKey(t)?(n=s,o=a+s):t==="Home"?(n=1,o=0):t==="End"&&(n=-1,o=r.length-1),o=this._getAvailableIndex(r,o,n,l=>!ur(l)),o>=0&&(e.preventDefault(),this._focus(o,!0))}__isPrevKey(e){return this._vertical?e==="ArrowUp":e==="ArrowLeft"}__isNextKey(e){return this._vertical?e==="ArrowDown":e==="ArrowRight"}_focus(e,t=!1){const r=this._getItems();this._focusItem(r[e],t)}_focusItem(e){e&&(e.focus(),e.setAttribute("focus-ring",""))}_getAvailableIndex(e,t,r,a){const o=e.length;let n=t;for(let s=0;typeof n=="number"&&s<o;s+=1,n+=r||1){n<0?n=o-1:n>=o&&(n=0);const l=e[n];if(!l.hasAttribute("disabled")&&this.__isMatchingItem(l,a))return n}return-1}__isMatchingItem(e,t){return typeof t=="function"?t(e):!0}};/**
|
|
5441
5441
|
* @license
|
|
5442
5442
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5443
5443
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5444
|
-
*/const Ds=i=>class extends hf(i){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&this.getAttribute("dir")==="rtl"}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return this.orientation!=="horizontal"}focus(){this._observer&&this._observer.flush();const e=Array.isArray(this.items)?this.items:[],t=this._getAvailableIndex(e,0,null,r=>r.tabIndex===0&&!ur(r));t>=0?this._focus(t):super.focus()}ready(){super.ready(),this.addEventListener("click",t=>this._onClick(t));const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Nr(e,()=>{this._setItems(this._filterItems(Nn(this)))})}_getItems(){return this.items}_enhanceItems(e,t,r,a){if(!a&&e){this.setAttribute("aria-orientation",t||"vertical"),e.forEach(n=>{t?n.setAttribute("orientation",t):n.removeAttribute("orientation")}),this._setFocusable(r<0||!r?0:r);const o=e[r];e.forEach(n=>{n.selected=n===o}),o&&!o.disabled&&this._scrollToItem(r)}}_filterItems(e){return e.filter(t=>t._hasVaadinItemMixin)}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const t=this._filterItems(e.composedPath())[0];let r;t&&!t.disabled&&(r=this.items.indexOf(t))>=0&&(this.selected=r)}_searchKey(e,t){this._searchReset=re.debounce(this._searchReset,
|
|
5444
|
+
*/const Ds=i=>class extends hf(i){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&this.getAttribute("dir")==="rtl"}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return this.orientation!=="horizontal"}focus(){this._observer&&this._observer.flush();const e=Array.isArray(this.items)?this.items:[],t=this._getAvailableIndex(e,0,null,r=>r.tabIndex===0&&!ur(r));t>=0?this._focus(t):super.focus()}ready(){super.ready(),this.addEventListener("click",t=>this._onClick(t));const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Nr(e,()=>{this._setItems(this._filterItems(Nn(this)))})}_getItems(){return this.items}_enhanceItems(e,t,r,a){if(!a&&e){this.setAttribute("aria-orientation",t||"vertical"),e.forEach(n=>{t?n.setAttribute("orientation",t):n.removeAttribute("orientation")}),this._setFocusable(r<0||!r?0:r);const o=e[r];e.forEach(n=>{n.selected=n===o}),o&&!o.disabled&&this._scrollToItem(r)}}_filterItems(e){return e.filter(t=>t._hasVaadinItemMixin)}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const t=this._filterItems(e.composedPath())[0];let r;t&&!t.disabled&&(r=this.items.indexOf(t))>=0&&(this.selected=r)}_searchKey(e,t){this._searchReset=re.debounce(this._searchReset,Ee.after(500),()=>{this._searchBuf=""}),this._searchBuf+=t.toLowerCase(),this.items.some(a=>this.__isMatchingKey(a))||(this._searchBuf=t.toLowerCase());const r=this._searchBuf.length===1?e+1:e;return this._getAvailableIndex(this.items,r,1,a=>this.__isMatchingKey(a)&&getComputedStyle(a).display!=="none")}__isMatchingKey(e){return e.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(e){if(e.metaKey||e.ctrlKey)return;const t=e.key,r=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(t)&&t.length===1){const a=this._searchKey(r,t);a>=0&&this._focus(a);return}super._onKeyDown(e)}_isItemHidden(e){return getComputedStyle(e).display==="none"}_setFocusable(e){e=this._getAvailableIndex(this.items,e,1);const t=this.items[e];this.items.forEach(r=>{r.tabIndex=r===t?0:-1})}_focus(e){this.items.forEach((t,r)=>{t.focused=r===e}),this._setFocusable(e),this._scrollToItem(e),super._focus(e)}_scrollToItem(e){const t=this.items[e];if(!t)return;const r=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],a=this._scrollerElement.getBoundingClientRect(),o=(this.items[e+1]||t).getBoundingClientRect(),n=(this.items[e-1]||t).getBoundingClientRect();let s=0;!this._isRTL&&o[r[1]]>=a[r[1]]||this._isRTL&&o[r[1]]<=a[r[1]]?s=o[r[1]]-a[r[1]]:(!this._isRTL&&n[r[0]]<=a[r[0]]||this._isRTL&&n[r[0]]>=a[r[0]])&&(s=n[r[0]]-a[r[0]]),this._scroll(s)}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else{const t=this.getAttribute("dir")||"ltr",r=Ps(this._scrollerElement,t)+e;df(this._scrollerElement,t,r)}}};/**
|
|
5445
5445
|
* @license
|
|
5446
5446
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5447
5447
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5448
|
-
*/class cf extends Ds(M(ae(
|
|
5448
|
+
*/class cf extends Ds(M(ae(me(E)))){static get is(){return"vaadin-select-list-box"}static get template(){return k`
|
|
5449
5449
|
<style>
|
|
5450
5450
|
:host {
|
|
5451
5451
|
display: flex;
|
|
@@ -5577,7 +5577,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
5577
5577
|
* @license
|
|
5578
5578
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5579
5579
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5580
|
-
*/const bf=i=>class extends Ft(wi(Ur(
|
|
5580
|
+
*/const bf=i=>class extends Ft(wi(Ur(Re(xi(i))))){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}-${Vt()}`,this._srLabelController=new Yn(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 gf(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new oa(this._phoneMediaQuery,e=>{this._phone=e})),this._tooltipController=new ye(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(e){super._requiredChanged(e),e===!1&&this.validate()}__itemsChanged(e,t){(e||t)&&this.requestContentUpdate()}_assignMenuElement(e){e&&e!==this.__lastMenuElement&&(this._menuElement=e,this.__initMenuItems(e),e.addEventListener("items-changed",()=>{this.__initMenuItems(e)}),e.addEventListener("selected-changed",()=>this.__updateValueButton()),e.addEventListener("keydown",t=>this._onKeyDownInside(t),!0),e.addEventListener("click",t=>{const r=t.composedPath().find(a=>a._hasVaadinItemMixin);this.__dispatchChangePending=!!(r&&r.value!==void 0&&r.value!==this.value),this.opened=!1},!0),this.__lastMenuElement=e)}__initMenuItems(e){e.items&&(this._items=e.items)}_valueChanged(e,t){this.toggleAttribute("has-value",!!e),t!==void 0&&!this.__dispatchChangePending&&this.validate()}_onClick(e){this.disabled||(e.preventDefault(),this.opened=!this.readonly)}_onToggleMouseDown(e){e.preventDefault()}_onKeyDown(e){if(e.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened){if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(e.key))e.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(e.key)&&e.key.length===1){const t=this._menuElement.selected,r=t!==void 0?t:-1,a=this._menuElement._searchKey(r,e.key);a>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=a)}}}_onKeyDownInside(e){/^(Tab)$/u.test(e.key)&&(this.opened=!1)}_openedChanged(e,t,r){if(!(!t||!r)){if(e){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1),t.style.setProperty("--vaadin-select-text-field-width",`${r.offsetWidth}px`);const a=this.hasAttribute("focus-ring");this._openedWithFocusRing=a,a&&this.removeAttribute("focus-ring")}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=e}}_updateAriaExpanded(e,t){t&&t.setAttribute("aria-expanded",e?"true":"false")}_updateAriaLive(e){this.focusElement&&(e?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(e){let t;const r=e.getAttribute("label");r?t=this.__createItemElement({label:r}):t=e.cloneNode(!0),t._sourceItem=e,this.__appendValueItemElement(t,this.focusElement),t.selected=!0}__createItemElement(e){const t=document.createElement(e.component||"vaadin-select-item");return e.label&&(t.textContent=e.label),e.value&&(t.value=e.value),e.disabled&&(t.disabled=e.disabled),e.className&&(t.className=e.className),t}__appendValueItemElement(e,t){t.appendChild(e),e.removeAttribute("tabindex"),e.removeAttribute("aria-selected"),e.removeAttribute("role"),e.removeAttribute("focused"),e.removeAttribute("focus-ring"),e.removeAttribute("active"),e.setAttribute("id",this._itemId)}_accessibleNameChanged(e){this._srLabelController.setLabel(e),this._setCustomAriaLabelledBy(e?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(e){this._setCustomAriaLabelledBy(e)}_setCustomAriaLabelledBy(e){const t=this._getLabelIdWithItemId(e);this._fieldAriaController.setLabelId(t,!0)}_getLabelIdWithItemId(e){const t=this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:"";return e?`${e} ${t}`.trim():null}__updateValueButton(){const e=this.focusElement;if(!e)return;e.innerHTML="";const t=this._items[this._menuElement.selected];if(e.removeAttribute("placeholder"),this._hasContent(t))this.__attachSelectedItem(t);else if(this.placeholder){const a=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(a,e),e.setAttribute("placeholder","")}!this._valueChanging&&t&&(this._selectedChanging=!0,this.value=t.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging);const r=t||this.placeholder?{newId:this._itemId}:{oldId:this._itemId};Ge(e,"aria-labelledby",r),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(e){if(!e)return!1;const t=!!(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()),r=e.childElementCount>0;return t||r}_updateSelectedItem(e,t){if(t){const r=e==null?e:e.toString();this._menuElement.selected=t.reduce((a,o,n)=>a===void 0&&o.value===r?n:a,void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}}_shouldRemoveFocus(){return!this.opened}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(e,t){if(!this.items||this.items.length===0){e.textContent="";return}let r=e.firstElementChild;r||(r=document.createElement("vaadin-select-list-box"),e.appendChild(r)),r.textContent="",this.items.forEach(a=>{r.appendChild(this.__createItemElement(a))})}__dispatchChange(){return ai(this,null,function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1})}};/**
|
|
5581
5581
|
* @license
|
|
5582
5582
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
5583
5583
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -6029,7 +6029,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6029
6029
|
* @license
|
|
6030
6030
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
6031
6031
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6032
|
-
*/class Af extends Sf(oe(_i(
|
|
6032
|
+
*/class Af extends Sf(oe(_i(me(E)))){static get template(){return k`
|
|
6033
6033
|
<style>
|
|
6034
6034
|
:host,
|
|
6035
6035
|
[hidden] {
|
|
@@ -6320,10 +6320,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6320
6320
|
* @license
|
|
6321
6321
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6322
6322
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6323
|
-
*/g("vaadin-tab",Pf,{moduleId:"vaadin-tab-styles"});class Df extends oe(M(Tf(
|
|
6323
|
+
*/g("vaadin-tab",Pf,{moduleId:"vaadin-tab-styles"});class Df extends oe(M(Tf(me(E)))){static get template(){return k`
|
|
6324
6324
|
<slot></slot>
|
|
6325
6325
|
<slot name="tooltip"></slot>
|
|
6326
|
-
`}static get is(){return"vaadin-tab"}ready(){super.ready(),this._tooltipController=new
|
|
6326
|
+
`}static get is(){return"vaadin-tab"}ready(){super.ready(),this._tooltipController=new ye(this),this.addController(this._tooltipController)}}w(Df);g("vaadin-tabs",f`
|
|
6327
6327
|
:host {
|
|
6328
6328
|
-webkit-tap-highlight-color: transparent;
|
|
6329
6329
|
}
|
|
@@ -6657,7 +6657,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6657
6657
|
</div>
|
|
6658
6658
|
|
|
6659
6659
|
<div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
|
|
6660
|
-
`}static get is(){return"vaadin-tabs"}}w(Mf);const Nf=":host{display:block;height:100%}",Lf=Nf,Vs=class{constructor(i){h.registerInstance(this,i),this.registrationWidgetLoaded=h.createEvent(this,"registrationWidgetLoaded"),this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(e)},this.setStreamStyling=e=>{if(window.emMessageBus){const t=document.createElement("style");this.stylingSubscription=window.emMessageBus.subscribe(e,r=>{t.innerHTML=r,this.clientStyling=r,this.host.shadowRoot.prepend(t)})}},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then(r=>r.text()).then(r=>{t.innerHTML=r,this.clientStyling=r,setTimeout(()=>{this.host.shadowRoot.prepend(t)},1)})},this.handleClick=e=>{this.emitOnClick&&(e.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.noValidation=!1,this.clientStyling="",this.clientStylingUrl="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1,this.twofaDestination=void 0,this.twofaResendIntervalSeconds=60,this.haspostalcodelookup=void 0,this.postalcodelength=void 0,this.addresses=[],this.ignoreCountry=!1,this.enableSouthAfricanMode=void 0,this.enableManualDateInput=!1,this.pinAttemptsExceeded=void 0,this.mbSource=void 0,this.limitStylingAppends=!1}handleStylingChange(i,e){i!==e&&this.setClientStyling()}handleStylingUrlChange(i,e){i!==e&&this.setClientStylingURL()}connectedCallback(){this.translationUrl&&Gs(this.translationUrl)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),!this.limitStylingAppends&&this.host&&(window.emMessageBus!=null?this.setStreamStyling(`${this.mbSource}.Style`):(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0))}renderInput(){var i;switch((i=this.type)===null||i===void 0?void 0:i.toLowerCase()){case"text":return this.haspostalcodelookup&&this.name==="PostalCode"?h.h("postalcode-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,postalcodelength:this.postalcodelength,addresses:this.addresses,ignoreCountry:this.ignoreCountry}):h.h("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,haspostalcodelookup:this.haspostalcodelookup,"enable-south-african-mode":this.enableSouthAfricanMode});case"email":return h.h("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 h.h("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 h.h("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 h.h("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 h.h("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 h.h("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,"enable-south-african-mode":this.enableSouthAfricanMode,"enable-manual-date-input":this.enableManualDateInput});case"password":return h.h("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,"no-validation":this.noValidation,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,"enable-south-african-mode":this.enableSouthAfricanMode});case"radio":return h.h("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 h.h("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 h.h("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 h.h("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,"enable-south-african-mode":this.enableSouthAfricanMode,"pin-attempts-exceeded":this.pinAttemptsExceeded,"mb-source":this.mbSource});case"label":if(this.displayName&&this.displayName.trim()!=="")return h.h("div",{class:"general-non-input",innerHTML:this.displayName});h.h("p",null,"No content in label type");default:return h.h("p",null,"The ",this.type," input type is not valid")}}render(){return h.h(h.Host,{key:"7a7805c641082de9c5da4859187765002ab6f32d",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}get host(){return h.getElement(this)}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};Vs.style=Lf;const zf='*,*::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}',Rf=zf,Ms=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.validationPattern="",this.touched=!1,this.handleInput=e=>{this.value=e.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 e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(i){this.sendValidityState.emit(i)}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(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 i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i,e;if(this.inputReference.validity.valueMissing)return b("requiredError",this.language);if(this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow)return b("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}});if(this.inputReference.validity.patternMismatch){const t=(i=this.validation.custom.find(a=>a.rule==="regex"))===null||i===void 0?void 0:i.errorKey,r=(e=this.validation.custom.find(a=>a.rule==="regex"))===null||e===void 0?void 0:e.errorMessage;return b(`${t}`,this.language)?b(`${t}`,this.language):r}}renderTooltip(){return this.showTooltip?h.h("div",{class:`number__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){let i="";return this.touched&&(i=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"aea370172d0e55d32dc665a1c340c734334e1caf",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:e=>this.stylingContainer=e},h.h("div",{key:"10e16d10b956c5a647bc68ecffbc2eb0b06fa92a",class:"number__wrapper--flex"},h.h("label",{key:"0827d47c7278c6fdf8ebdd1dff03b91c39be6812",class:`number__label ${this.validation.mandatory?"number__label--required":""}`,htmlFor:`${this.name}__input`},this.displayName),h.h("div",{key:"cb868d01e8555f5e3333240f54d86f0a56641d0f",class:"number__wrapper--relative"},this.tooltip&&h.h("img",{key:"1aa2b16b59f4bfd4b1dadf2641ec6cb4cfc251bf",class:"number__tooltip-icon",src:se,alt:"",ref:e=>this.tooltipIconReference=e,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),h.h("input",{key:"365b70a2eb333878d367d1d414ee0e296c91b3ec",ref:e=>this.inputReference=e,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${i}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),h.h("small",{key:"a8639df7ef1e98807a7daffc9da4afd347b1c292",class:"number__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Ms.style=Rf;const Ff=`*,
|
|
6660
|
+
`}static get is(){return"vaadin-tabs"}}w(Mf);const Nf=":host{display:block;height:100%}",Lf=Nf,Vs=class{constructor(i){h.registerInstance(this,i),this.registrationWidgetLoaded=h.createEvent(this,"registrationWidgetLoaded"),this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(e)},this.setStreamStyling=e=>{if(window.emMessageBus){const t=document.createElement("style");this.stylingSubscription=window.emMessageBus.subscribe(e,r=>{t.innerHTML=r,this.clientStyling=r,this.host.shadowRoot.prepend(t)})}},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then(r=>r.text()).then(r=>{t.innerHTML=r,this.clientStyling=r,setTimeout(()=>{this.host.shadowRoot.prepend(t)},1)})},this.handleClick=e=>{this.emitOnClick&&(e.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.noValidation=!1,this.clientStyling="",this.clientStylingUrl="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1,this.twofaDestination=void 0,this.twofaResendIntervalSeconds=60,this.haspostalcodelookup=void 0,this.postalcodelength=void 0,this.addresses=[],this.ignoreCountry=!1,this.enableSouthAfricanMode=void 0,this.enableManualDateInput=!1,this.pinAttemptsExceeded=void 0,this.mbSource=void 0,this.limitStylingAppends=!1}handleStylingChange(i,e){i!==e&&this.setClientStyling()}handleStylingUrlChange(i,e){i!==e&&this.setClientStylingURL()}connectedCallback(){this.translationUrl&&Gs(this.translationUrl)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),!this.limitStylingAppends&&this.host&&(window.emMessageBus!=null?this.setStreamStyling(`${this.mbSource}.Style`):(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0))}renderInput(){var i;switch((i=this.type)===null||i===void 0?void 0:i.toLowerCase()){case"text":return this.haspostalcodelookup&&this.name==="PostalCode"?h.h("postalcode-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,postalcodelength:this.postalcodelength,addresses:this.addresses,ignoreCountry:this.ignoreCountry}):h.h("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,haspostalcodelookup:this.haspostalcodelookup,"enable-south-african-mode":this.enableSouthAfricanMode});case"email":return h.h("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 h.h("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 h.h("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 h.h("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 h.h("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 h.h("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,"enable-south-african-mode":this.enableSouthAfricanMode,"enable-manual-date-input":this.enableManualDateInput});case"password":return h.h("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,"no-validation":this.noValidation,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,"enable-south-african-mode":this.enableSouthAfricanMode});case"radio":return h.h("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 h.h("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 h.h("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 h.h("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,"enable-south-african-mode":this.enableSouthAfricanMode,"pin-attempts-exceeded":this.pinAttemptsExceeded,"mb-source":this.mbSource});case"label":if(this.displayName&&this.displayName.trim()!=="")return h.h("div",{class:"general-non-input",innerHTML:this.displayName});h.h("p",null,"No content in label type");default:return h.h("p",null,"The ",this.type," input type is not valid")}}render(){return h.h(h.Host,{key:"7a7805c641082de9c5da4859187765002ab6f32d",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}get host(){return h.getElement(this)}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};Vs.style=Lf;const zf='*,*::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}',Rf=zf,Ms=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.validationPattern="",this.touched=!1,this.handleInput=e=>{this.value=e.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 e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(i){this.sendValidityState.emit(i)}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(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 i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i,e;if(this.inputReference.validity.valueMissing)return b("requiredError",this.language);if(this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow)return b("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}});if(this.inputReference.validity.patternMismatch){const t=(i=this.validation.custom.find(a=>a.rule==="regex"))===null||i===void 0?void 0:i.errorKey,r=(e=this.validation.custom.find(a=>a.rule==="regex"))===null||e===void 0?void 0:e.errorMessage;return b(`${t}`,this.language)?b(`${t}`,this.language):r}}renderTooltip(){return this.showTooltip?h.h("div",{class:`number__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){let i="";return this.touched&&(i=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"aea370172d0e55d32dc665a1c340c734334e1caf",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:e=>this.stylingContainer=e},h.h("div",{key:"10e16d10b956c5a647bc68ecffbc2eb0b06fa92a",class:"number__wrapper--flex"},h.h("label",{key:"0827d47c7278c6fdf8ebdd1dff03b91c39be6812",class:`number__label ${this.validation.mandatory?"number__label--required":""}`,htmlFor:`${this.name}__input`},this.displayName),h.h("div",{key:"cb868d01e8555f5e3333240f54d86f0a56641d0f",class:"number__wrapper--relative"},this.tooltip&&h.h("img",{key:"1aa2b16b59f4bfd4b1dadf2641ec6cb4cfc251bf",class:"number__tooltip-icon",src:le,alt:"",ref:e=>this.tooltipIconReference=e,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),h.h("input",{key:"365b70a2eb333878d367d1d414ee0e296c91b3ec",ref:e=>this.inputReference=e,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${i}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),h.h("small",{key:"a8639df7ef1e98807a7daffc9da4afd347b1c292",class:"number__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Ms.style=Rf;const Ff=`*,
|
|
6661
6661
|
*::before,
|
|
6662
6662
|
*::after {
|
|
6663
6663
|
padding: 0;
|
|
@@ -6901,7 +6901,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6901
6901
|
|
|
6902
6902
|
.customreg-password__complexity::after {
|
|
6903
6903
|
display: none;
|
|
6904
|
-
}`,$f=Ff,Ns=class{constructor(i){h.registerInstance(this,i),this.sendOriginalValidityState=h.createEvent(this,"sendOriginalValidityState"),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=e=>{this.value=e.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=e=>{e.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=e=>{this.value=e.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 e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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.noValidation=!1,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.clientStyling="",this.enableSouthAfricanMode=void 0,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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&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(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(i){this.sendValidityState.emit(i)}valueHandler(i){this.sendInputValue.emit(i)}originalValidityChangedHandler(i){this.isDuplicateInput&&(i.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,this.value!==""&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(i){this.isDuplicateInput&&this.name===i.detail.name+"Duplicate"&&(this.duplicateInputValue=i.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===i.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===i.detail.name&&this.touched===!0&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(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",i=>{this.handleRevealField(i)}),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(i){if(this.noValidation){this.passwordComplexity=[];return}this.passwordComplexity=this.validation.custom.filter(e=>e.rule==="regex").map(e=>{const t=new RegExp(e.pattern);let r=!1;return i&&(r=t.test(i)),{rule:e.displayName,ruleKey:e.errorKey,passed:r}})}setValidity(){var i,e;return this.noValidation?!0:this.isDuplicateInput&&this.duplicateInputValue!==this.value?!1:!((i=this.passwordComplexity)===null||i===void 0)&&i.every(t=>t.passed)?(e=this.inputReference)===null||e===void 0?void 0:e.validity.valid:!1}setPattern(){var i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i,e,t,r,a;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return b("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return b("requiredError",this.language);if(this.isDuplicateInput&&!this.originalValid)return b("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const o=(i=this.validation.custom.find(s=>s.rule==="regex"))===null||i===void 0?void 0:i.errorKey,n=(e=this.validation.custom.find(s=>s.rule==="regex"))===null||e===void 0?void 0:e.errorMessage;return b(`${o}`,this.language)?b(`${o}`,this.language):n}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const o=(t=this.validation.custom.find(s=>s.rule==="duplicate-input"))===null||t===void 0?void 0:t.errorKey,n=(r=this.validation.custom.find(s=>s.rule==="duplicate-input"))===null||r===void 0?void 0:r.errorMessage;return b(`${o}`,this.language)?b(`${o}`,this.language):n}if(!(!((a=this.passwordComplexity)===null||a===void 0)&&a.every(o=>o.passed))&&!this.showPopup)return b("invalidPassword",this.language)}renderTooltip(){return this.showTooltip?h.h("div",{class:`password__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}renderComplexityPopup(){const i=this.passwordComplexity.length,t=this.passwordComplexity.filter(a=>a.passed).length/i,r=this.passwordComplexity.every(a=>a.passed);return h.h("div",{class:`password__complexity ${this.showPopup?"":"password__complexity--hidden"}`},h.h("div",{class:"password__complexity--strength"},h.h("p",{class:"password__complexity--text"},b("passwordStrength",this.language)," ",h.h("span",{class:"password__complexity--text-bold"},b(`${r?"passwordStrengthStrong":"passwordStrengthWeak"}`,this.language))),h.h("meter",{value:t,min:"0",max:"1"})),h.h("div",null,this.passwordComplexity.map((a,o)=>h.h("div",{key:o},h.h("input",{class:"password__complexity--checkbox",type:"checkbox",checked:a.passed,disabled:!0}),h.h("span",null,b(`${a.ruleKey}`,this.language)?b(`${a.ruleKey}`,this.language):a.rule)))))}renderCustomComplexityPopup(){return h.h("div",{class:`customreg-password__complexity ${this.showPopup?"":"customreg-password__complexity--hidden"}`},h.h("p",{class:"customreg-password__complexity--title"},b("PasswordMustContain",this.language)),h.h("div",{class:"customreg-password__complexity--rules"},this.passwordComplexity.map((i,e)=>h.h("div",{class:"customreg-password__complexity--rule",key:e},h.h("span",{class:`customreg-password__complexity--icon ${i.passed?X.PASSWORD_COMPLEXITY_PASSED:X.PASSWORD_COMPLEXITY_FAILED}`},i.passed?fa.PASSED:fa.FAILED),h.h("span",null,b(i.ruleKey,this.language)||i.rule)))))}render(){let i="";return this.touched&&(i=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"fe895585dd908f75eee4ba797dc9c02b237bed7f",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:e=>this.stylingContainer=e},h.h("div",{key:"844bdb3dab98e62cc5d92a761b85adcdc44831d0",class:"password__wrapper--flex"},h.h("label",{key:"28041267a6df666e7df3660a907f995eff092ae1",class:`password__label ${this.validation.mandatory?"password__label--required":""}`,htmlFor:`${this.name}__input`},this.displayName),h.h("div",{key:"79c300643134802f04d8f909fe7bb3895911c88a",class:"password__wrapper--relative"},this.tooltip&&h.h("img",{key:"43ae58549e42ba59054162c25887ec36eb826aaa",class:"password__tooltip-icon",src:se,alt:"",ref:e=>this.tooltipIconReference=e,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),h.h("vaadin-password-field",{key:"0edcfed0ea65666537240f531e5239bd5b11181e",type:"password",id:`${this.name}__input`,class:`password__input ${i}`,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}),!this.noValidation&&h.h("small",{key:"c8aeba074e66b771d745194fec535aa0b82de6d8",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.hidePasswordComplexity&&!this.isDuplicateInput&&(this.enableSouthAfricanMode?this.renderCustomComplexityPopup():this.renderComplexityPopup()))}get element(){return h.getElement(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};Ns.style=$f;const Hf='*,*::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}.input__text-wrapper{position:relative}.input__addresses-container{position:relative;left:0;width:100%;background:var(--emw--color-white);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1);max-height:200px;overflow-y:auto;z-index:999;margin-top:4px}.input__addresses-container .options{padding:4px 0}.input__addresses-container .option{padding:8px 12px;cursor:pointer;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6);font-size:14px;line-height:1.4;transition:background-color 0.2s ease;color:var(--emw--registration-gray-800, #333)}.input__addresses-container .option:last-child{border-bottom:none}.input__addresses-container .option:hover{background-color:var(--emw--registration-lightgray-100, #f8f9fa)}.input__addresses-container .option:active{background-color:var(--emw--registration-lightgray-200, #e9ecef)}.input__addresses-container::-webkit-scrollbar{width:6px}.input__addresses-container::-webkit-scrollbar-track{background:var(--emw--registration-lightgray-150, #f1f1f1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb{background:var(--emw--registration-lightgray-300, #c1c1c1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb:hover{background:var(--emw--registration-lightgray-400, #a8a8a8)}.postalcode__no-results-message{color:var(--emw--color-error, var(--emw--color-red, #ed0909));margin-top:10px}.address__manual-input-msg{text-decoration:underline;margin-top:10px;cursor:pointer;transition:opacity 0.3s ease}.address__manual-input-msg:active{opacity:0.7}.postalcode__loading-spinner{display:flex;align-items:center;gap:8px;padding:12px;color:var(--emw--registration-gray-600, #666);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-top:none;background-color:var(--emw--registration-lightgray-50, #f9f9f9)}.loading-spinner{width:14px;height:14px;border:2px solid var(--emw--color-gray-100, #E6E6E6);border-top:2px solid var(--emw--registration-gray-600, #666);border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}',Bf=Hf,Ls=class{constructor(i){h.registerInstance(this,i),this.sendAddressValue=h.createEvent(this,"sendAddressValue"),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.value="",this.validationPattern="",this.hasManualAddressBeenTriggered=!1,this.touched=!1,this.maxPostalCodeLength="10",this.handleInput=e=>{const r=e.target.value.toUpperCase();this.value=r,this.touched=!0,this.currentPostalCode=r,this.showNoResultsMessage=!1,this.inputReference&&(this.inputReference.value=r),this.value.length<this.postalcodelength&&(this.openAddressDropdown=!1,this.isFetchingAddresses=!1),(this.value===""||this.value.length<1)&&(this.openAddressDropdown=!1,this.isFetchingAddresses=!1),this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout(()=>{this.value.length>=this.postalcodelength&&(sessionStorage.setItem("currentPostalCode",this.value),this.showNoResultsMessage=!1,this.addresses&&this.addresses.length>0&&(this.openAddressDropdown=!0));const a=this.isValid;this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),a!==this.isValid&&this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)},300)},this.handleBlur=e=>{this.value=e.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.showNoResultsMessage=!1,this.openAddressDropdown||(this.showNoResultsMessage=!1)},this.handleFocus=()=>{this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&(this.openAddressDropdown=!0)},this.handlePostalCode=(e,t)=>{e.stopPropagation();const r=`${t.number}`.trim(),a=`${t.street}`.trim(),o=`${t.city}`.trim();this.sendAddressValue.emit({city:o,address1:r,address2:a}),this.value=this.currentPostalCode.toLocaleUpperCase(),this.touched=!0,this.isValid=!0,this.openAddressDropdown=!1,this.showNoResultsMessage=!1,this.isFetchingAddresses=!1,this.valueHandler({name:this.name,value:this.value}),this.validityStateHandler({valid:!0,name:this.name}),this.valueHandler({name:"address1",value:r}),this.valueHandler({name:"City",value:o}),a&&this.valueHandler({name:"address2",value:a}),this.refreshTrigger++},this.enterAddressManually=()=>{const e=window.targetInputRefs;if(!e)return;const t=[{name:"PostalCode",ref:e.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:e.address1},{name:"address2",ref:e.address2},{name:"City",ref:e.City}],a=[{name:"PostalCode",ref:e.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:e.address1},{name:"City",ref:e.City}].find(n=>{var s;const l=((s=n.ref)===null||s===void 0?void 0:s.value)||"";return n.minLength?l.length===0||l.length<n.minLength:l.length===0}),o=(a==null?void 0:a.ref)||e.address1||e.PostalCode;o.scrollIntoView({behavior:"smooth",block:"center"}),this.hasManualAddressBeenTriggered||(this.hasManualAddressBeenTriggered=!0,t.forEach(n=>{var s;if(n.ref){const l=((s=n.ref.shadowRoot)===null||s===void 0?void 0:s.querySelector("input"))||n.ref;if(l){l.classList.add("pulse-border");const d=()=>{l.classList.remove("pulse-border"),l.removeEventListener("animationend",d)};l.addEventListener("animationend",d)}}})),o.focus()},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.handleOutsideClick=e=>{if(!this.openAddressDropdown)return;const t=e.composedPath?e.composedPath():[],r=t.includes(this.inputReference),a=t.includes(this.addressesDropdownRef),o=t.some(n=>{var s;return n instanceof Element&&((s=n.classList)===null||s===void 0?void 0:s.contains("option"))});!r&&!a&&!o&&(this.openAddressDropdown=!1,this.showNoResultsMessage=!1)},this.name="PostalCode",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.emitValue=void 0,this.clientStyling="",this.postalcodelength=void 0,this.addresses=void 0,this.ignoreCountry=!1,this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedCountryCode="",this.currentPostalCode="",this.openAddressDropdown=!1,this.showNoResultsMessage=!1,this.refreshTrigger=0,this.isFetchingAddresses=!1}handleStylingChange(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value}),i===!0&&!this.value.length&&this.valueHandler({name:this.name,value:this.value})}handleAddresses(i){i&&i.length>0?(this.openAddressDropdown=!0,this.showNoResultsMessage=!1):(this.openAddressDropdown=!1,this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength&&setTimeout(()=>{this.currentPostalCode.length>=this.postalcodelength&&!this.isFetchingAddresses&&(this.showNoResultsMessage=!0)},200)),this.isFetchingAddresses=!1}validityStateHandler(i){this.sendValidityState.emit(i)}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}handleCountryCodeUpdate(i){const{name:e,value:t}=i.detail;this.selectedCountryCode=t,e==="CountryCode"&&(this.resetPostalCodeField(),this.refreshTrigger++)}handleFetchStarted(){this.showNoResultsMessage=!1,this.isFetchingAddresses=!0,this.openAddressDropdown=!1}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentWillLoad(){this.defaultValue&&(this.value=this.defaultValue)}componentDidLoad(){this.defaultValue&&this.valueHandler({name:this.name,value:this.value}),this.inputReference&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.setValidity(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}setValidity(){if(!this.inputReference)return!1;const i=this.inputReference.validity.valid,e=!this.inputReference.value||this.inputReference.value.match(this.validationPattern)!==null;return i&&e}setPattern(){var i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i,e;if(!this.touched)return"";if(this.inputReference.validity.valueMissing)return b("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return b("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.value.match(this.validationPattern)==null){const t=(i=this.validation.custom.find(a=>a.rule==="regex"))===null||i===void 0?void 0:i.errorKey,r=(e=this.validation.custom.find(a=>a.rule==="regex"))===null||e===void 0?void 0:e.errorMessage;return b(`${t}`,this.language)||r}return""}resetPostalCodeField(){this.value="",this.currentPostalCode="",this.showNoResultsMessage=!1,this.openAddressDropdown=!1,this.isFetchingAddresses=!1,sessionStorage.removeItem("currentPostalCode"),this.inputReference&&(this.inputReference.value=""),this.valueHandler({name:this.name,value:""}),this.validityStateHandler({valid:!1,name:this.name})}renderTooltip(){return this.showTooltip?h.h("div",{class:`text__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}determineInputValue(){return this.inputReference&&this.name&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.value}render(){var i,e;let t="";this.touched&&(t=this.isValid==!0||this.isValid==null?"":"text__input--invalid");let r=this.selectedCountryCode==="UK"||this.selectedCountryCode==="GB"||this.ignoreCountry,a=((i=this.addresses)===null||i===void 0?void 0:i.length)>0&&this.openAddressDropdown&&r,o=this.showNoResultsMessage&&this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&((e=this.addresses)===null||e===void 0?void 0:e.length)===0&&r,n=this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength;return h.h("div",{key:"f274a95e0a64ec67f01be8a5cf053d475c16e9ca",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:s=>this.stylingContainer=s},h.h("div",{key:"23aa865fd99048cb5c638f0b66b4ff3e8e451d97",class:"text__wrapper--flex"},h.h("label",{key:"c5d12c1548ec8bfde130a95cc20783f20295a253",class:`text__label ${this.validation.mandatory?"text__label--required":""}`,htmlFor:`${this.name}__input`},this.displayName),h.h("div",{key:"db2f499ff6ca8f4e3b1a8ac83e7f8856fc1ca888",class:"text__wrapper--relative"},this.tooltip&&h.h("img",{key:"a1d7ef42855a21f336dbbb337cc8cb644de0c655",class:"text__tooltip-icon",src:se,alt:"",ref:s=>this.tooltipIconReference=s,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),h.h("div",{key:"18a6812958691749d0c7c3396ce69a3f46f7f1e4",class:"input__text-wrapper"},h.h("input",{key:"41aa9e6b8817eee602347d7a3a909f0d81985d3d",name:this.name,id:`${this.name}__input`,value:this.determineInputValue(),type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:s=>this.inputReference=s,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.maxPostalCodeLength,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!r&&h.h("p",{key:"7083c22e5ebb306ad9ca3c4dc29dcd66bc8b17d5",class:"address__manual-input-msg",onClick:()=>this.enterAddressManually()},b("enterIEAddressManually",this.language)),a&&h.h("div",{key:"95ad996e43da19386f4576eb35850c7ba09e1620",class:"input__addresses-container",ref:s=>this.addressesDropdownRef=s},h.h("div",{key:"3997d92f28ec2ecee49b2480a5edb0a8431aa1c8",class:"options"},this.addresses.map((s,l)=>h.h("div",{key:l,class:"option",onClick:d=>this.handlePostalCode(d,s)},s.number," ",s.street," ",s.city)))),n&&h.h("div",{key:"cf5f9c9f5f96aa2ef316eb44e97768e3552c4a2e",class:"postalcode__loading-spinner"},h.h("div",{key:"d9b0dda1be9fa871dee4b7d415f84a28b81c3362",class:"loading-spinner"}),h.h("span",{key:"b5a6c58d910f5be519617288310a8a456e7e8c1c"},b("searchingForAddresses",this.language))),o&&h.h("div",{key:"2b5503571824ec9f04f58959b8b38ff279fa6d1d",class:"postalcode__no-results-message"},b("postalLookUpNoAddressFound",this.language))),h.h("small",{key:"00e0cbe15e10c40c8f43939123c10819592fdce2",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],addresses:["handleAddresses"]}}};Ls.style=Bf;const Uf="*,*::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}",qf=Uf,zs=class{constructor(i){h.registerInstance(this,i),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(i){this.sendInputValue.emit(i)}validityStateHandler(i){this.sendValidityState.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(i){this.value=i.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 b("requiredError",this.language)}renderTooltip(){return this.showTooltip?h.h("div",{class:`radio__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){return h.h("fieldset",{key:"33493de460303a32a37d253a0fd5f9da59676542",class:`radio__fieldset ${this.name}__input`,ref:i=>this.stylingContainer=i},h.h("legend",{key:"8aef7aa84a119742e05d72d976c936a560154b3f",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map(i=>h.h("div",{class:"radio__wrapper"},h.h("input",{type:"radio",class:"radio__input",id:`${i.label}__input`,ref:e=>this.inputReference=e,value:i.value,name:this.name,required:this.validation.mandatory,onClick:e=>this.handleClick(e)}),h.h("label",{htmlFor:`${i.label}__input`},i.label))),h.h("small",{key:"bec44ed4007e408ddeb0b0293b82e034c8e165f2",class:"radio__error-message"},this.errorMessage),this.tooltip&&h.h("img",{key:"a3b0a041beabe3f14661c0af8cd970040d060435",class:"radio__tooltip-icon",src:se,alt:"",ref:i=>this.tooltipIconReference=i,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};zs.style=qf;const jf='*,*::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}',Wf=jf,Rs=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.touched=!1,this.handleComboChange=e=>{this.touched=!0;const t=e.target.value,r=this.options.find(a=>a.value.toLowerCase()===t.toLowerCase());r?this.value=r.value:this.value=t,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=e=>{const t=e.currentTarget;t.opened||(this.touched=!0,this.value=t.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}))},this.handleSelectChange=e=>{this.touched=!0,this.value=e.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(i){this.sendValidityState.emit(i)}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}connectedCallback(){var i;this.displayedOptions=this.options.map(e=>({label:e.label,value:e.value})),this.isComboBox=((i=this.displayedOptions)===null||i===void 0?void 0:i.length)>6}componentWillLoad(){if(this.action&&!this.options.length&&this.action.split(" ")[0]=="GET"){const i=this.action.split(" ")[1];return this.getOptions(i).then(e=>{var t;const r=Object.keys(e)[0];this.displayedOptions=e[r].map(a=>({label:a.Name,value:a.Alpha2Code})),this.isComboBox=((t=this.displayedOptions)===null||t===void 0?void 0:t.length)>6})}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.vaadinCombo.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.inputReference&&(this.inputReference.value=this.value)),this.isValid=this.setValidity(),!this.isComboBox&&this.vaadinCombo&&this.vaadinCombo.addEventListener("opened-changed",i=>{if(i.detail.value===!0)this.errorMessage="";else{const e=i.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(i){const e=new URL(i);return new Promise((t,r)=>{fetch(e.href).then(a=>a.json()).then(a=>{t(a)}).catch(a=>{console.error(a),r(a)})})}setValidity(){var i;return!((i=this.validation)===null||i===void 0)&&i.mandatory?!!this.value:!0}setErrorMessage(){var i,e,t;if(!((e=(i=this.inputReference)===null||i===void 0?void 0:i.validity)===null||e===void 0)&&e.valueMissing||!((t=this.vaadinCombo)===null||t===void 0)&&t.invalid)return b("requiredError",this.language)}renderTooltip(){return this.showTooltip?h.h("div",{class:`select__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){var i,e;let t="";return this.touched&&(t=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"b0ed504667761e5fd77e0ac13382b467448a1944",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:r=>this.stylingContainer=r},h.h("div",{key:"b48d38dc4c2cb3442ff6773a1b1d13191ec4d0e6",class:"select__wrapper--flex"},h.h("label",{key:"ad592c8c98ecbec1961d22cdfeb8cec910291ea8",class:"select__label",htmlFor:`${this.name}__input`},this.displayName,h.h("span",{key:"b3c0f2fe9a2d26ade1626878ed9bc1f0b86a23ad",class:this.validation.mandatory?"select__label--required":""})),h.h("div",{key:"29d0f504d0f51175818dffffb882ac4e6e9c3bde",class:"select__wrapper--relative"},this.tooltip&&h.h("img",{key:"66e524ffebc43f9418e90b3bd2d7ae62eba47da3",class:"select__tooltip-icon",src:se,alt:"",ref:r=>this.tooltipIconReference=r,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),this.isComboBox?h.h("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:r=>this.vaadinCombo=r,readOnly:this.autofilled,required:(i=this.validation)===null||i===void 0?void 0:i.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleComboChange,onBlur:this.handleBlur}):h.h("vaadin-select",{name:this.name,popover:!1,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:r=>this.vaadinCombo=r,readOnly:this.autofilled,required:(e=this.validation)===null||e===void 0?void 0:e.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleSelectChange,"no-vertical-overlap":!0,noVerticalOverlap:!0}),h.h("small",{key:"0143b538740c3a8e9bfcab6bbb44660355c40cf7",class:"select__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Rs.style=Wf;const Yf='*,*::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;padding-left:4px}.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){height:100%;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__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}',Gf=Yf,Fs=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.validationPattern="",this.touched=!1,this.handleInput=e=>{this.setPhoneValue(e.target.value),this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout(()=>{this.isValid=this.isValidValue(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},500)},this.handleBlur=()=>{this.touched=!0,this.isValid=this.isValidValue(),this.errorMessage=this.setErrorMessage()},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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,this.disablePhonePrefix=!1,this.phoneValue="",this.phoneCodesOptions=void 0}setPhoneValue(i){const e=i.replace(/[^0-9]/g,"");this.phoneValue=e,this.inputReference&&(this.inputReference.value=this.phoneValue)}handleStylingChange(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(i){this.sendValidityState.emit(i)}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}connectedCallback(){var i;this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.setPhoneValue((i=this.defaultValue.phone)!==null&&i!==void 0?i:""),this.phoneCodesOptions=[{label:this.prefixValue,value:this.prefixValue}])}componentWillLoad(){if(this.action&&this.action.split(" ")[0]=="GET"){const i=this.action.split(" ")[1];this.getPhoneCodes(i).then(e=>{this.phoneCodesOptions=e.phoneCodes.map(t=>typeof t=="object"&&t.Prefix?{label:t.Prefix,value:t.Prefix}:{label:t,value:t}),this.disablePhonePrefix=this.phoneCodesOptions.length<=1})}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.isValidValue(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(i){const e=new URL(i);return new Promise((t,r)=>{fetch(e.href).then(a=>a.json()).then(a=>{t(a)}).catch(a=>{console.error(a),r(a)})})}handlePrefixInput(i){this.prefixValue=i.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}isValidValue(){return!this.inputReference||this.validation.mandatory&&(!this.phoneValue||this.phoneValue.trim()==="")?!1:!this.phoneValue||this.phoneValue.trim()===""?!this.validation.mandatory:!(this.validation.minLength&&this.phoneValue.length<this.validation.minLength||this.validation.maxLength&&this.phoneValue.length>this.validation.maxLength||this.validationPattern&&!new RegExp(this.validationPattern).test(this.phoneValue))}setPattern(){var i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i,e;if(this.inputReference.validity.patternMismatch){const t=(i=this.validation.custom.find(a=>a.rule==="regex"))===null||i===void 0?void 0:i.errorKey,r=(e=this.validation.custom.find(a=>a.rule==="regex"))===null||e===void 0?void 0:e.errorMessage;return b(`${t}`,this.language)?b(`${t}`,this.language):r}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong||this.validation.minLength&&this.phoneValue&&this.phoneValue.length<this.validation.minLength||this.validation.maxLength&&this.phoneValue&&this.phoneValue.length>this.validation.maxLength)return b("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return b("requiredError",this.language)}renderTooltip(){return this.showTooltip?h.h("div",{class:`tel__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){var i;let e="";return this.touched&&(e=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"f534de21d5597a3e90912eb87fff893511d09920",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},h.h("div",{key:"431fb8cbaea0d2244847823ea4d04d8c73a5341c",class:"tel__wrapper--flex-label"},h.h("label",{key:"2eb210b2f0c2e0e632997f59fe7aa667578f72fd",class:`tel__label ${this.validation.mandatory?"tel__label--required":""}`,htmlFor:`${this.name}__input`},this.displayName),h.h("div",{key:"2d912b828f7d9475a1bbb5bac13495779f31198e",class:"tel__wrapper--relative"},this.tooltip&&h.h("img",{key:"ce4433263d27dc9d3fb2caf45069d7a92e9ae3a7",class:"tel__tooltip-icon",src:se,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),h.h("div",{key:"480cd17eafb4f2ff1e396531429177cb3130eb95",class:`tel__wrapper--flex ${e}`},h.h("vaadin-combo-box",{key:"5f2292c8509e5f68786d0f462c689102b1c75dc3",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.disablePhonePrefix,onChange:t=>this.handlePrefixInput(t)}),h.h("input",{key:"77232e119eed4960f5e1d809507b8585dd112256",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:(i=this.phoneValue)!==null&&i!==void 0?i:"",placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),h.h("small",{key:"0d925cee41881c8c822073790e26ca7dc4a81049",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Fs.style=Gf;const Kf='*,*::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}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}',Xf=Kf,$s=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.postalcodelength=5,this.touched=!1,this.handleInput=e=>{const t=e.target,r=this.enableSouthAfricanMode&&(this.name===X.FIRSTNAME_ON_DOCUMENT||this.name===X.LASTNAME_ON_DOCUMENT)?t.value.replace(X.NON_LETTERS_REGEX,""):t.value;r!==t.value&&(t.value=r),this.value=r,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout(()=>{this.updateValidationState(),this.emitValueHandler(!0)},500)},this.handleBlur=e=>{this.value=e.target.value,this.touched=!0,this.updateValidationState()},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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.haspostalcodelookup=void 0,this.enableSouthAfricanMode=void 0,this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedCountryCode=""}handleStylingChange(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(i){this.sendValidityState.emit(i)}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}valueChangedHandler(i){this.isDuplicateInput&&this.name===i.detail.name+"Duplicate"&&(this.duplicateInputValue=i.detail.value,this.touched&&this.updateValidationState()),this.name===i.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===i.detail.name&&this.touched&&this.updateValidationState()}handleValidationChange(i){i.detail.field===this.name&&(this.validation=i.detail.validation,this.validationPattern=this.setPattern(),this.touched&&(this.isValid=this.isValidValue(),this.errorMessage=this.setErrorMessage()))}handleCountryCodeUpdate(i){const{name:e,value:t}=i.detail;this.selectedCountryCode=t,e==="CountryCode"&&["address1","address2","City"].includes(this.name)&&(this.value="",this.touched=!1,this.errorMessage="",this.isValid=!1,this.inputReference&&(this.inputReference.value=""),this.valueHandler({name:this.name,value:""}),this.validityStateHandler({valid:!1,name:this.name}))}handleAddressSelection(i){const{city:e,address1:t,address2:r}=i.detail;if(!["address1","address2","City"].includes(this.name))return;let a="";this.name==="address1"?a=t:this.name==="address2"?a=r:this.name==="City"&&(a=e),this.value=a,this.touched=!0,this.updateValidationState()}connectedCallback(){this.validationPattern=this.setPattern()}handleExternalDocUpdate(i){this.name===X.DOCUMENT_NUMBER&&(this.value=i.detail||"",this.touched=!0,this.inputReference&&(this.inputReference.value=this.value),this.sendInputValue.emit({name:this.name,value:this.value}),this.updateValidationState())}handleDocReset(){this.name===X.DOCUMENT_NUMBER&&(this.value="",this.touched=!1,this.isValid=!1,this.errorMessage="",this.inputReference&&(this.inputReference.value=""),this.validityStateHandler({valid:!1,name:this.name}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentWillLoad(){this.defaultValue&&(this.value=this.defaultValue)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.haspostalcodelookup&&["address1","address2","City","PostalCode"].includes(this.name)&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.isValidValue()}validateDocument(i,e){const t=i.trim();return e===X.PASSPORT?X.PASSPORT_NUMERIC_REGEX.test(t)?{valid:!0}:{valid:!1,errorKey:$e.PASSPORT_INVALID}:e===X.SOUTH_AFRICAN_ID?t.length!==X.SOUTH_AFRICAN_ID_LENGTH?{valid:!1,errorKey:$e.SA_ID_LENGTH}:Ks(t)?{valid:!0}:{valid:!1,errorKey:$e.SA_ID_INVALID}:{valid:!0}}updateValidationState(){const i=this.isValidValue();if(this.isValid=i,!this.touched){this.errorMessage="";return}this.errorMessage=i?"":this.setErrorMessage()}isValidValue(){if(!this.inputReference)return!1;if(this.enableSouthAfricanMode&&this.name===X.DOCUMENT_NUMBER){const e=window.documentTypeValue;return this.validateDocument(this.value,e).valid}return this.value.trim()===""&&!this.validation.mandatory||this.inputReference.validity.valid&&(!this.inputReference.value||this.inputReference.value.match(this.validationPattern)!==null)}setPattern(){var i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i,e,t,r;const a=this.value.trim();if(this.enableSouthAfricanMode&&this.name===X.DOCUMENT_NUMBER){const o=window.documentTypeValue,n=this.validateDocument(this.value,o);return n.valid?"":b(n.errorKey,this.language)}if(a===""&&!this.validation.mandatory)return"";if(this.inputReference.validity.valueMissing)return b($e.REQUIRED,this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong){const o=this.validation.minLength,n=this.validation.maxLength;return o===n?b($e.FIXED_LENGTH,this.language,{values:{length:o}}):b($e.LENGTH,this.language,{values:{minLength:o,maxLength:n}})}if(this.inputReference.value.match(this.validationPattern)==null){const o=(i=this.validation.custom.find(s=>s.rule==="regex"))===null||i===void 0?void 0:i.errorKey,n=(e=this.validation.custom.find(s=>s.rule==="regex"))===null||e===void 0?void 0:e.errorMessage;return b(`${o}`,this.language)||n}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const o=(t=this.validation.custom.find(s=>s.rule==="duplicate-input"))===null||t===void 0?void 0:t.errorKey,n=(r=this.validation.custom.find(s=>s.rule==="duplicate-input"))===null||r===void 0?void 0:r.errorMessage;return b(`${o}`,this.language)?b(`${o}`,this.language):n}return""}renderTooltip(){return this.showTooltip?h.h("div",{class:`text__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){let i="";return this.touched&&(i=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"4a3851c57b50e346914a5a3c9cf1ba286e3f7aec",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:e=>this.stylingContainer=e},h.h("div",{key:"8badf61de6285389c56aceda2b57dc777eccad62",class:"text__wrapper--flex"},h.h("label",{key:"ecf44727e4e536345649b0aa88f57faf63eafcb1",class:`text__label ${this.validation.mandatory?"text__label--required":""}`,htmlFor:`${this.name}__input`},this.displayName),h.h("div",{key:"45ad8e3feed46925034aa2b3c3964ee59d6bab69",class:"text__wrapper--relative"},this.tooltip&&h.h("img",{key:"28386df278867594c5e71ab7a4b376b62031b2de",class:"text__tooltip-icon",src:se,alt:"",ref:e=>this.tooltipIconReference=e,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),h.h("input",{key:"f6c63d967c6db438fa3aeaa52e14195c16dfab87",name:this.name,id:`${this.name}__input`,value:this.value,type:"text",class:`text__input ${i}`,placeholder:`${this.placeholder}`,ref:e=>this.inputReference=e,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.enableSouthAfricanMode?"":this.validation.minLength,maxlength:this.enableSouthAfricanMode?"":this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),h.h("small",{key:"bfed249b930afb155f933eae8a62ada508a05de5",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};$s.style=Xf;const Qf='*,*::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}',Jf=Qf,Hs=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.callBackObject={},this.subFieldsObject={},this.value="",this.handleRevealField=(e,t)=>{e.stopPropagation(),window.postMessage({type:`registration${t}Clicked`},window.location.href)},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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=this.defaultValue==="true"}handleStylingChange(i,e){i!==e&&this.setClientStyling()}validityStateHandler(i){this.sendValidityState.emit(i)}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.options.length!==0&&this.options.forEach(i=>{this.callBackObject[i.name]=e=>{this.handleRevealField(e,i.name)},this.subFieldsObject[i.name].addEventListener("click",this.callBackObject[i.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 b("requiredError",this.language)}disconnectedCallback(){this.options.forEach(i=>{this.subFieldsObject[i.name].removeEventListener("click",this.callBackObject[i.name])})}renderLabel(){return h.h("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},h.h("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?h.h("div",{class:`togglecheckbox__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){return h.h("div",{key:"828751327e59e9649afc04c6c9f7a02ef7dcae8d",class:`togglecheckbox__wrapper ${this.name}__input`,ref:i=>this.stylingContainer=i},h.h("div",{key:"d02a2a6ef595aaf7142cbc6e9681394ee4db8fee",class:"togglecheckbox__wrapper--flex"},h.h("input",{key:"fca6401ef6eb178f53471362444d54ed69086429",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:i=>this.checkboxReference=i,name:this.name,checked:this.defaultValue==="true",readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),h.h("small",{key:"3781a8fdfeb719422693bcd541a4a3fe708e705a",class:"togglecheckbox__error-message"},this.errorMessage),h.h("div",{key:"27a4c6b047cd332407ee40c82cf7be1914ed34c9",class:"togglecheckbox__wrapper--relative"},this.tooltip&&h.h("img",{key:"f1367d7e061d20ad68c24dfbe3147e6b67df746f",class:"togglecheckbox__tooltip-icon",src:se,alt:"",ref:i=>this.tooltipIconReference=i,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),h.h("div",{key:"98d42103554de4d14a65eafd1722bf9d587a27f1",class:`togglecheckbox__fields-wrapper ${this.showFields?"":"hidden"}`},this.options.map(i=>h.h("general-input",{type:i.inputType,name:i.name,displayName:i.displayName,validation:i.validate,action:i.action||null,defaultValue:i.defaultValue,autofilled:i.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:i.tooltip,placeholder:i.placeholder==null?"":i.placeholder,ref:e=>this.subFieldsObject[i.name]=e}))))}static get watchers(){return{clientStyling:["handleStylingChange"]}}};Hs.style=Jf;const Zf="*,*::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}",ev=Zf,Bs=class{constructor(i){h.registerInstance(this,i),this.registrationWidgetLoaded=h.createEvent(this,"registrationWidgetLoaded"),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.resendCode=h.createEvent(this,"resendCode"),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.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then(r=>r.text()).then(r=>{t.innerHTML=r,this.clientStyling=r,setTimeout(()=>{this.host.shadowRoot.prepend(t)},1)})},this.setInputRef=(e,t)=>{e&&(this.inputRefs[t]=e)},this.setContainerRef=e=>{e&&(this.containerRef=e)},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 e=String(Math.floor(this.resendIntervalSecondsLeft/60));let t=String(this.resendIntervalSecondsLeft%60);return t.length===1&&(t="0"+t),`${e}:${t}`},this.handleInput=(e,t)=>{const r=e.target,o=r.value.slice(-1);if(r.value=o,!o)return;this.code[t]=o,this.enableSouthAfricanMode&&(this.revealedIndexes=[t],this.revealTimeout&&clearTimeout(this.revealTimeout),this.revealTimeout=setTimeout(()=>{this.revealedIndexes=[]},500));const n=this.inputRefs[t+1];n&&n.focus(),this.setValidity(),this.setErrorMessage()},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setStreamStyling=e=>{if(window.emMessageBus){const t=document.createElement("style");this.stylingSubscription=window.emMessageBus.subscribe(e,r=>{t.innerHTML=r,this.clientStyling=r,this.host.shadowRoot.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.enableSouthAfricanMode=void 0,this.pinAttemptsExceeded=void 0,this.clientStylingUrl="",this.mbSource=void 0,this.limitStylingAppends=!1,this.isValid=!1,this.isResendButtonAvailable=!0,this.showTooltip=!1,this.errorMessage="",this.code=[],this.resendIntervalSecondsLeft=this.resendIntervalSeconds,this.revealedIndexes=[]}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.code.join("")})}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.code.join("")})}handleStylingUrlChange(i,e){i!==e&&this.setClientStylingURL()}validityStateHandler(i){this.sendValidityState.emit(i)}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}handleStylingChange(i,e){i!==e&&this.setClientStyling()}connectedCallback(){this.validationPattern=this.setPattern(),this.code=new Array(this.validation.maxLength).fill("")}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.setValidity(),this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),!this.limitStylingAppends&&this.host&&(window.emMessageBus!=null?this.setStreamStyling(`${this.mbSource}.Style`):(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0))}handleKeyDown(i,e){if(i.key==="Backspace"){const t=[...this.code];t[e]="",this.code=t,this.enableSouthAfricanMode&&(this.revealedIndexes=this.revealedIndexes.filter(a=>a!==e));const r=this.inputRefs[e-1];r==null||r.focus()}this.setValidity(),this.setErrorMessage()}handlePaste(i){var e,t;i.preventDefault();const r=(t=(e=i.clipboardData)===null||e===void 0?void 0:e.getData("text"))===null||t===void 0?void 0:t.trim();if(!r)return;const a=r.slice(0,this.validation.maxLength).split("");this.code=[...a,...new Array(this.validation.maxLength-a.length).fill("")],this.enableSouthAfricanMode&&(this.revealedIndexes=a.map((n,s)=>s),this.revealTimeout&&clearTimeout(this.revealTimeout),this.revealTimeout=setTimeout(()=>{this.revealedIndexes=[]},500));const o=this.inputRefs[Math.min(a.length,this.inputRefs.length-1)];o==null||o.focus(),this.setValidity(),this.setErrorMessage(),this.enableSouthAfricanMode&&(this.valueHandler({name:this.name,value:this.code.join("")}),this.validityStateHandler({valid:this.isValid,name:this.name}))}setValidity(){const i=this.code.join(""),e=i.length===this.validation.maxLength,t=i.match(this.validationPattern)!==null;this.isValid=e&&t}setPattern(){var i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i;if(this.code.join("").match(this.validationPattern)!==null)this.errorMessage="";else{const t=(i=this.validation.custom.find(r=>r.rule==="regex"))===null||i===void 0?void 0:i.errorKey;t&&(this.errorMessage=b(t,this.language))}}renderTooltip(){return this.showTooltip?h.h("div",{class:`text__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}getInputDisplayValue(i){const e=this.code[i];return e?this.enableSouthAfricanMode?this.revealedIndexes.includes(i)?e:"*":e:""}render(){return h.h("div",{key:"08b9139f1c2236dd40a045517a9623ad966f29d3",class:"twofa",ref:i=>this.stylingContainer=i},h.h("div",{key:"7528885100be3d450ec52aafd6085a4c852710c8",class:"twofa__error-message"},h.h("p",{key:"51dab3f02156b5eb3b7408f06f2d359cfbda11a7"},this.errorMessage)),h.h("div",{key:"f336f89ecee0724663b1bbb4d443bb834336b5c1",class:"twofa__description",innerHTML:b("twofaDescription",this.language,{values:{destination:this.destination}})}),h.h("div",{key:"5127127ccc8e50428f8319fddc9e21606f3b4148",class:"twofa__input-wrapper",ref:this.setContainerRef},this.code.map((i,e)=>h.h("input",{key:e,ref:t=>this.setInputRef(t,e),id:`otp-input-${e}`,type:"text",maxLength:2,value:this.getInputDisplayValue(e),onInput:t=>this.handleInput(t,e),onKeyDown:t=>this.handleKeyDown(t,e),onPaste:t=>this.handlePaste(t)}))),h.h("div",{key:"be82ae1192129d571275b78c8097c3023468cf3e",class:"twofa__button-wrapper"},h.h("p",{key:"11de61d738ffa74bfd44f0d7c88fc4e456647d0c",class:"twofa__resend-message"},b("twofaResendMessage",this.language)),h.h("button",{key:"84d5c55c4d9bf024164ec52e2100cfcc8c236ac2",class:`twofa__resend-button ${this.pinAttemptsExceeded?"twofa__resend-button--disabled":""}`,onClick:this.resendCodeHandler,disabled:!this.isResendButtonAvailable||this.pinAttemptsExceeded},this.isResendButtonAvailable?b("twofaResendButton",this.language):this.formatTime())))}get host(){return h.getElement(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"],clientStylingUrl:["handleStylingUrlChange"],clientStyling:["handleStylingChange"]}}};Bs.style=ev;const tv=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}",iv=tv,Us=class{constructor(i){h.registerInstance(this,i),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(i,e){e!==i&&this.handleStructure(i)}handleStylingProps(i){switch(typeof i){case"number":return i===0?0:`${i}px`;case"undefined":return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(i)||i.endsWith("px")||i.endsWith("%")?i:"unset";default:return"unset"}}handleStructure(i){switch(i){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return h.h("div",{class:"SkeletonContainer"},h.h("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return h.h("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return h.h("div",{class:"SkeletonContainer"},h.h("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return h.h("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map((i,e)=>h.h("div",{key:e,class:"SkeletonText "+(this.animation?"Skeleton":"")})))}renderRectangle(){return h.h("div",{class:"SkeletonContainer"},h.h("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return h.h("div",{class:"SkeletonContainer"},h.h("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let i="";switch(this.structure){case"logo":i=`
|
|
6904
|
+
}`,$f=Ff,Ns=class{constructor(i){h.registerInstance(this,i),this.sendOriginalValidityState=h.createEvent(this,"sendOriginalValidityState"),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=e=>{this.value=e.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=e=>{e.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=e=>{this.value=e.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 e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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.noValidation=!1,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.clientStyling="",this.enableSouthAfricanMode=void 0,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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&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(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(i){this.sendValidityState.emit(i)}valueHandler(i){this.sendInputValue.emit(i)}originalValidityChangedHandler(i){this.isDuplicateInput&&(i.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,this.value!==""&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(i){this.isDuplicateInput&&this.name===i.detail.name+"Duplicate"&&(this.duplicateInputValue=i.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===i.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===i.detail.name&&this.touched===!0&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(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",i=>{this.handleRevealField(i)}),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(i){if(this.noValidation){this.passwordComplexity=[];return}this.passwordComplexity=this.validation.custom.filter(e=>e.rule==="regex").map(e=>{const t=new RegExp(e.pattern);let r=!1;return i&&(r=t.test(i)),{rule:e.displayName,ruleKey:e.errorKey,passed:r}})}setValidity(){var i,e;return this.noValidation?!0:this.isDuplicateInput&&this.duplicateInputValue!==this.value?!1:!((i=this.passwordComplexity)===null||i===void 0)&&i.every(t=>t.passed)?(e=this.inputReference)===null||e===void 0?void 0:e.validity.valid:!1}setPattern(){var i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i,e,t,r,a;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return b("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return b("requiredError",this.language);if(this.isDuplicateInput&&!this.originalValid)return b("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const o=(i=this.validation.custom.find(s=>s.rule==="regex"))===null||i===void 0?void 0:i.errorKey,n=(e=this.validation.custom.find(s=>s.rule==="regex"))===null||e===void 0?void 0:e.errorMessage;return b(`${o}`,this.language)?b(`${o}`,this.language):n}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const o=(t=this.validation.custom.find(s=>s.rule==="duplicate-input"))===null||t===void 0?void 0:t.errorKey,n=(r=this.validation.custom.find(s=>s.rule==="duplicate-input"))===null||r===void 0?void 0:r.errorMessage;return b(`${o}`,this.language)?b(`${o}`,this.language):n}if(!(!((a=this.passwordComplexity)===null||a===void 0)&&a.every(o=>o.passed))&&!this.showPopup)return b("invalidPassword",this.language)}renderTooltip(){return this.showTooltip?h.h("div",{class:`password__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}renderComplexityPopup(){const i=this.passwordComplexity.length,t=this.passwordComplexity.filter(a=>a.passed).length/i,r=this.passwordComplexity.every(a=>a.passed);return h.h("div",{class:`password__complexity ${this.showPopup?"":"password__complexity--hidden"}`},h.h("div",{class:"password__complexity--strength"},h.h("p",{class:"password__complexity--text"},b("passwordStrength",this.language)," ",h.h("span",{class:"password__complexity--text-bold"},b(`${r?"passwordStrengthStrong":"passwordStrengthWeak"}`,this.language))),h.h("meter",{value:t,min:"0",max:"1"})),h.h("div",null,this.passwordComplexity.map((a,o)=>h.h("div",{key:o},h.h("input",{class:"password__complexity--checkbox",type:"checkbox",checked:a.passed,disabled:!0}),h.h("span",null,b(`${a.ruleKey}`,this.language)?b(`${a.ruleKey}`,this.language):a.rule)))))}renderCustomComplexityPopup(){return h.h("div",{class:`customreg-password__complexity ${this.showPopup?"":"customreg-password__complexity--hidden"}`},h.h("p",{class:"customreg-password__complexity--title"},b("PasswordMustContain",this.language)),h.h("div",{class:"customreg-password__complexity--rules"},this.passwordComplexity.map((i,e)=>h.h("div",{class:"customreg-password__complexity--rule",key:e},h.h("span",{class:`customreg-password__complexity--icon ${i.passed?X.PASSWORD_COMPLEXITY_PASSED:X.PASSWORD_COMPLEXITY_FAILED}`},i.passed?fa.PASSED:fa.FAILED),h.h("span",null,b(i.ruleKey,this.language)||i.rule)))))}render(){let i="";return this.touched&&(i=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"fe895585dd908f75eee4ba797dc9c02b237bed7f",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:e=>this.stylingContainer=e},h.h("div",{key:"844bdb3dab98e62cc5d92a761b85adcdc44831d0",class:"password__wrapper--flex"},h.h("label",{key:"28041267a6df666e7df3660a907f995eff092ae1",class:`password__label ${this.validation.mandatory?"password__label--required":""}`,htmlFor:`${this.name}__input`},this.displayName),h.h("div",{key:"79c300643134802f04d8f909fe7bb3895911c88a",class:"password__wrapper--relative"},this.tooltip&&h.h("img",{key:"43ae58549e42ba59054162c25887ec36eb826aaa",class:"password__tooltip-icon",src:le,alt:"",ref:e=>this.tooltipIconReference=e,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),h.h("vaadin-password-field",{key:"0edcfed0ea65666537240f531e5239bd5b11181e",type:"password",id:`${this.name}__input`,class:`password__input ${i}`,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}),!this.noValidation&&h.h("small",{key:"c8aeba074e66b771d745194fec535aa0b82de6d8",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.hidePasswordComplexity&&!this.isDuplicateInput&&(this.enableSouthAfricanMode?this.renderCustomComplexityPopup():this.renderComplexityPopup()))}get element(){return h.getElement(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};Ns.style=$f;const Hf='*,*::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}.input__text-wrapper{position:relative}.input__addresses-container{position:relative;left:0;width:100%;background:var(--emw--color-white);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1);max-height:200px;overflow-y:auto;z-index:999;margin-top:4px}.input__addresses-container .options{padding:4px 0}.input__addresses-container .option{padding:8px 12px;cursor:pointer;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6);font-size:14px;line-height:1.4;transition:background-color 0.2s ease;color:var(--emw--registration-gray-800, #333)}.input__addresses-container .option:last-child{border-bottom:none}.input__addresses-container .option:hover{background-color:var(--emw--registration-lightgray-100, #f8f9fa)}.input__addresses-container .option:active{background-color:var(--emw--registration-lightgray-200, #e9ecef)}.input__addresses-container::-webkit-scrollbar{width:6px}.input__addresses-container::-webkit-scrollbar-track{background:var(--emw--registration-lightgray-150, #f1f1f1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb{background:var(--emw--registration-lightgray-300, #c1c1c1);border-radius:3px}.input__addresses-container::-webkit-scrollbar-thumb:hover{background:var(--emw--registration-lightgray-400, #a8a8a8)}.postalcode__no-results-message{color:var(--emw--color-error, var(--emw--color-red, #ed0909));margin-top:10px}.address__manual-input-msg{text-decoration:underline;margin-top:10px;cursor:pointer;transition:opacity 0.3s ease}.address__manual-input-msg:active{opacity:0.7}.postalcode__loading-spinner{display:flex;align-items:center;gap:8px;padding:12px;color:var(--emw--registration-gray-600, #666);border:1px solid var(--emw--color-gray-100, #E6E6E6);border-top:none;background-color:var(--emw--registration-lightgray-50, #f9f9f9)}.loading-spinner{width:14px;height:14px;border:2px solid var(--emw--color-gray-100, #E6E6E6);border-top:2px solid var(--emw--registration-gray-600, #666);border-radius:50%;animation:spin 0.8s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}',Bf=Hf,Ls=class{constructor(i){h.registerInstance(this,i),this.sendAddressValue=h.createEvent(this,"sendAddressValue"),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.value="",this.validationPattern="",this.hasManualAddressBeenTriggered=!1,this.touched=!1,this.maxPostalCodeLength="10",this.handleInput=e=>{const r=e.target.value.toUpperCase();this.value=r,this.touched=!0,this.currentPostalCode=r,this.showNoResultsMessage=!1,this.inputReference&&(this.inputReference.value=r),this.value.length<this.postalcodelength&&(this.openAddressDropdown=!1,this.isFetchingAddresses=!1),(this.value===""||this.value.length<1)&&(this.openAddressDropdown=!1,this.isFetchingAddresses=!1),this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout(()=>{this.value.length>=this.postalcodelength&&(sessionStorage.setItem("currentPostalCode",this.value),this.showNoResultsMessage=!1,this.addresses&&this.addresses.length>0&&(this.openAddressDropdown=!0));const a=this.isValid;this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),a!==this.isValid&&this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)},300)},this.handleBlur=e=>{this.value=e.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.showNoResultsMessage=!1,this.openAddressDropdown||(this.showNoResultsMessage=!1)},this.handleFocus=()=>{this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&(this.openAddressDropdown=!0)},this.handlePostalCode=(e,t)=>{e.stopPropagation();const r=`${t.number}`.trim(),a=`${t.street}`.trim(),o=`${t.city}`.trim();this.sendAddressValue.emit({city:o,address1:r,address2:a}),this.value=this.currentPostalCode.toLocaleUpperCase(),this.touched=!0,this.isValid=!0,this.openAddressDropdown=!1,this.showNoResultsMessage=!1,this.isFetchingAddresses=!1,this.valueHandler({name:this.name,value:this.value}),this.validityStateHandler({valid:!0,name:this.name}),this.valueHandler({name:"address1",value:r}),this.valueHandler({name:"City",value:o}),a&&this.valueHandler({name:"address2",value:a}),this.refreshTrigger++},this.enterAddressManually=()=>{const e=window.targetInputRefs;if(!e)return;const t=[{name:"PostalCode",ref:e.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:e.address1},{name:"address2",ref:e.address2},{name:"City",ref:e.City}],a=[{name:"PostalCode",ref:e.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:e.address1},{name:"City",ref:e.City}].find(n=>{var s;const l=((s=n.ref)===null||s===void 0?void 0:s.value)||"";return n.minLength?l.length===0||l.length<n.minLength:l.length===0}),o=(a==null?void 0:a.ref)||e.address1||e.PostalCode;o.scrollIntoView({behavior:"smooth",block:"center"}),this.hasManualAddressBeenTriggered||(this.hasManualAddressBeenTriggered=!0,t.forEach(n=>{var s;if(n.ref){const l=((s=n.ref.shadowRoot)===null||s===void 0?void 0:s.querySelector("input"))||n.ref;if(l){l.classList.add("pulse-border");const d=()=>{l.classList.remove("pulse-border"),l.removeEventListener("animationend",d)};l.addEventListener("animationend",d)}}})),o.focus()},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.handleOutsideClick=e=>{if(!this.openAddressDropdown)return;const t=e.composedPath?e.composedPath():[],r=t.includes(this.inputReference),a=t.includes(this.addressesDropdownRef),o=t.some(n=>{var s;return n instanceof Element&&((s=n.classList)===null||s===void 0?void 0:s.contains("option"))});!r&&!a&&!o&&(this.openAddressDropdown=!1,this.showNoResultsMessage=!1)},this.name="PostalCode",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.emitValue=void 0,this.clientStyling="",this.postalcodelength=void 0,this.addresses=void 0,this.ignoreCountry=!1,this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedCountryCode="",this.currentPostalCode="",this.openAddressDropdown=!1,this.showNoResultsMessage=!1,this.refreshTrigger=0,this.isFetchingAddresses=!1}handleStylingChange(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value}),i===!0&&!this.value.length&&this.valueHandler({name:this.name,value:this.value})}handleAddresses(i){i&&i.length>0?(this.openAddressDropdown=!0,this.showNoResultsMessage=!1):(this.openAddressDropdown=!1,this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength&&setTimeout(()=>{this.currentPostalCode.length>=this.postalcodelength&&!this.isFetchingAddresses&&(this.showNoResultsMessage=!0)},200)),this.isFetchingAddresses=!1}validityStateHandler(i){this.sendValidityState.emit(i)}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}handleCountryCodeUpdate(i){const{name:e,value:t}=i.detail;this.selectedCountryCode=t,e==="CountryCode"&&(this.resetPostalCodeField(),this.refreshTrigger++)}handleFetchStarted(){this.showNoResultsMessage=!1,this.isFetchingAddresses=!0,this.openAddressDropdown=!1}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentWillLoad(){this.defaultValue&&(this.value=this.defaultValue)}componentDidLoad(){this.defaultValue&&this.valueHandler({name:this.name,value:this.value}),this.inputReference&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.setValidity(),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}setValidity(){if(!this.inputReference)return!1;const i=this.inputReference.validity.valid,e=!this.inputReference.value||this.inputReference.value.match(this.validationPattern)!==null;return i&&e}setPattern(){var i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i,e;if(!this.touched)return"";if(this.inputReference.validity.valueMissing)return b(se.REQUIRED,this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong){const{minLength:t,maxLength:r}=this.validation;return t===r?b(se.FIXED_LENGTH,this.language,{values:{length:t}}):b(se.LENGTH,this.language,{values:{minLength:t,maxLength:r}})}if(this.inputReference.value.match(this.validationPattern)==null){const t=(i=this.validation.custom.find(a=>a.rule==="regex"))===null||i===void 0?void 0:i.errorKey,r=(e=this.validation.custom.find(a=>a.rule==="regex"))===null||e===void 0?void 0:e.errorMessage;return b(`${t}`,this.language)||r}return""}resetPostalCodeField(){this.value="",this.currentPostalCode="",this.showNoResultsMessage=!1,this.openAddressDropdown=!1,this.isFetchingAddresses=!1,sessionStorage.removeItem("currentPostalCode"),this.inputReference&&(this.inputReference.value=""),this.valueHandler({name:this.name,value:""}),this.validityStateHandler({valid:!1,name:this.name})}renderTooltip(){return this.showTooltip?h.h("div",{class:`text__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}determineInputValue(){return this.inputReference&&this.name&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.value}render(){var i,e;let t="";this.touched&&(t=this.isValid==!0||this.isValid==null?"":"text__input--invalid");let r=this.selectedCountryCode==="UK"||this.selectedCountryCode==="GB"||this.ignoreCountry,a=((i=this.addresses)===null||i===void 0?void 0:i.length)>0&&this.openAddressDropdown&&r,o=this.showNoResultsMessage&&this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&((e=this.addresses)===null||e===void 0?void 0:e.length)===0&&r,n=this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength;return h.h("div",{key:"e358dddfc4b20b0847d03e3f12ff637922470105",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:s=>this.stylingContainer=s},h.h("div",{key:"b806cac9ad62480a1be6bf802528c60c79804e94",class:"text__wrapper--flex"},h.h("label",{key:"4fb327989e8b828559c01601eea47bdd58da4bd3",class:`text__label ${this.validation.mandatory?"text__label--required":""}`,htmlFor:`${this.name}__input`},this.displayName),h.h("div",{key:"6c293495a8935db477cbcac2eb9102bffeb85ddb",class:"text__wrapper--relative"},this.tooltip&&h.h("img",{key:"848bb5b44d834c4f0e4a78cfebef0ecf1b88fd2e",class:"text__tooltip-icon",src:le,alt:"",ref:s=>this.tooltipIconReference=s,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),h.h("div",{key:"7f6195e5cfc5bfabc9854ec6acc19c1e52e70f1b",class:"input__text-wrapper"},h.h("input",{key:"4369b4a99016a7aebbb396bdda35c31d92e4d557",name:this.name,id:`${this.name}__input`,value:this.determineInputValue(),type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:s=>this.inputReference=s,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.maxPostalCodeLength,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!r&&h.h("p",{key:"0e3c0fcb974d2f3dae76f9afdbf173fcc25d258f",class:"address__manual-input-msg",onClick:()=>this.enterAddressManually()},b("enterIEAddressManually",this.language)),a&&h.h("div",{key:"1c644f87f2617180e6356c724d72b6d3fc8e472e",class:"input__addresses-container",ref:s=>this.addressesDropdownRef=s},h.h("div",{key:"f2a7b8133908441a3cf67eb48928a2d61d17e32f",class:"options"},this.addresses.map((s,l)=>h.h("div",{key:l,class:"option",onClick:d=>this.handlePostalCode(d,s)},s.number," ",s.street," ",s.city)))),n&&h.h("div",{key:"c0cb29f7d174ca8981c8b9dfd2ee9b972b0fd1ea",class:"postalcode__loading-spinner"},h.h("div",{key:"76f17cb0a440f7ed9cc8de3620b55136549586e6",class:"loading-spinner"}),h.h("span",{key:"e10c4177fb0f21f142fd3120177e450413687cf3"},b("searchingForAddresses",this.language))),o&&h.h("div",{key:"f729f6206cc900a2c94e3df0e8b08cc3dc5b751f",class:"postalcode__no-results-message"},b("postalLookUpNoAddressFound",this.language))),h.h("small",{key:"c8a79e601f22444b34dc7d037c94f92875f51aad",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],addresses:["handleAddresses"]}}};Ls.style=Bf;const Uf="*,*::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}",qf=Uf,zs=class{constructor(i){h.registerInstance(this,i),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(i){this.sendInputValue.emit(i)}validityStateHandler(i){this.sendValidityState.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(i){this.value=i.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 b("requiredError",this.language)}renderTooltip(){return this.showTooltip?h.h("div",{class:`radio__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){return h.h("fieldset",{key:"33493de460303a32a37d253a0fd5f9da59676542",class:`radio__fieldset ${this.name}__input`,ref:i=>this.stylingContainer=i},h.h("legend",{key:"8aef7aa84a119742e05d72d976c936a560154b3f",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map(i=>h.h("div",{class:"radio__wrapper"},h.h("input",{type:"radio",class:"radio__input",id:`${i.label}__input`,ref:e=>this.inputReference=e,value:i.value,name:this.name,required:this.validation.mandatory,onClick:e=>this.handleClick(e)}),h.h("label",{htmlFor:`${i.label}__input`},i.label))),h.h("small",{key:"bec44ed4007e408ddeb0b0293b82e034c8e165f2",class:"radio__error-message"},this.errorMessage),this.tooltip&&h.h("img",{key:"a3b0a041beabe3f14661c0af8cd970040d060435",class:"radio__tooltip-icon",src:le,alt:"",ref:i=>this.tooltipIconReference=i,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};zs.style=qf;const jf='*,*::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}',Wf=jf,Rs=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.touched=!1,this.handleComboChange=e=>{this.touched=!0;const t=e.target.value,r=this.options.find(a=>a.value.toLowerCase()===t.toLowerCase());r?this.value=r.value:this.value=t,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=e=>{const t=e.currentTarget;t.opened||(this.touched=!0,this.value=t.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}))},this.handleSelectChange=e=>{this.touched=!0,this.value=e.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(i){this.sendValidityState.emit(i)}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}connectedCallback(){var i;this.displayedOptions=this.options.map(e=>({label:e.label,value:e.value})),this.isComboBox=((i=this.displayedOptions)===null||i===void 0?void 0:i.length)>6}componentWillLoad(){if(this.action&&!this.options.length&&this.action.split(" ")[0]=="GET"){const i=this.action.split(" ")[1];return this.getOptions(i).then(e=>{var t;const r=Object.keys(e)[0];this.displayedOptions=e[r].map(a=>({label:a.Name,value:a.Alpha2Code})),this.isComboBox=((t=this.displayedOptions)===null||t===void 0?void 0:t.length)>6})}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.vaadinCombo.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.inputReference&&(this.inputReference.value=this.value)),this.isValid=this.setValidity(),!this.isComboBox&&this.vaadinCombo&&this.vaadinCombo.addEventListener("opened-changed",i=>{if(i.detail.value===!0)this.errorMessage="";else{const e=i.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(i){const e=new URL(i);return new Promise((t,r)=>{fetch(e.href).then(a=>a.json()).then(a=>{t(a)}).catch(a=>{console.error(a),r(a)})})}setValidity(){var i;return!((i=this.validation)===null||i===void 0)&&i.mandatory?!!this.value:!0}setErrorMessage(){var i,e,t;if(!((e=(i=this.inputReference)===null||i===void 0?void 0:i.validity)===null||e===void 0)&&e.valueMissing||!((t=this.vaadinCombo)===null||t===void 0)&&t.invalid)return b("requiredError",this.language)}renderTooltip(){return this.showTooltip?h.h("div",{class:`select__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){var i,e;let t="";return this.touched&&(t=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"b0ed504667761e5fd77e0ac13382b467448a1944",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:r=>this.stylingContainer=r},h.h("div",{key:"b48d38dc4c2cb3442ff6773a1b1d13191ec4d0e6",class:"select__wrapper--flex"},h.h("label",{key:"ad592c8c98ecbec1961d22cdfeb8cec910291ea8",class:"select__label",htmlFor:`${this.name}__input`},this.displayName,h.h("span",{key:"b3c0f2fe9a2d26ade1626878ed9bc1f0b86a23ad",class:this.validation.mandatory?"select__label--required":""})),h.h("div",{key:"29d0f504d0f51175818dffffb882ac4e6e9c3bde",class:"select__wrapper--relative"},this.tooltip&&h.h("img",{key:"66e524ffebc43f9418e90b3bd2d7ae62eba47da3",class:"select__tooltip-icon",src:le,alt:"",ref:r=>this.tooltipIconReference=r,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),this.isComboBox?h.h("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:r=>this.vaadinCombo=r,readOnly:this.autofilled,required:(i=this.validation)===null||i===void 0?void 0:i.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleComboChange,onBlur:this.handleBlur}):h.h("vaadin-select",{name:this.name,popover:!1,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:r=>this.vaadinCombo=r,readOnly:this.autofilled,required:(e=this.validation)===null||e===void 0?void 0:e.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleSelectChange,"no-vertical-overlap":!0,noVerticalOverlap:!0}),h.h("small",{key:"0143b538740c3a8e9bfcab6bbb44660355c40cf7",class:"select__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Rs.style=Wf;const Yf='*,*::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;padding-left:4px}.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){height:100%;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__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}',Gf=Yf,Fs=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.validationPattern="",this.touched=!1,this.handleInput=e=>{this.setPhoneValue(e.target.value),this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout(()=>{this.isValid=this.isValidValue(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},500)},this.handleBlur=()=>{this.touched=!0,this.isValid=this.isValidValue(),this.errorMessage=this.setErrorMessage()},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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,this.disablePhonePrefix=!1,this.phoneValue="",this.phoneCodesOptions=void 0}setPhoneValue(i){const e=i.replace(/[^0-9]/g,"");this.phoneValue=e,this.inputReference&&(this.inputReference.value=this.phoneValue)}handleStylingChange(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(i){this.sendValidityState.emit(i)}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}connectedCallback(){var i;this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.setPhoneValue((i=this.defaultValue.phone)!==null&&i!==void 0?i:""),this.phoneCodesOptions=[{label:this.prefixValue,value:this.prefixValue}])}componentWillLoad(){if(this.action&&this.action.split(" ")[0]=="GET"){const i=this.action.split(" ")[1];this.getPhoneCodes(i).then(e=>{this.phoneCodesOptions=e.phoneCodes.map(t=>typeof t=="object"&&t.Prefix?{label:t.Prefix,value:t.Prefix}:{label:t,value:t}),this.disablePhonePrefix=this.phoneCodesOptions.length<=1})}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.isValidValue(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(i){const e=new URL(i);return new Promise((t,r)=>{fetch(e.href).then(a=>a.json()).then(a=>{t(a)}).catch(a=>{console.error(a),r(a)})})}handlePrefixInput(i){this.prefixValue=i.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}isValidValue(){return!this.inputReference||this.validation.mandatory&&(!this.phoneValue||this.phoneValue.trim()==="")?!1:!this.phoneValue||this.phoneValue.trim()===""?!this.validation.mandatory:!(this.validation.minLength&&this.phoneValue.length<this.validation.minLength||this.validation.maxLength&&this.phoneValue.length>this.validation.maxLength||this.validationPattern&&!new RegExp(this.validationPattern).test(this.phoneValue))}setPattern(){var i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i,e;if(this.inputReference.validity.patternMismatch){const a=(i=this.validation.custom.find(n=>n.rule==="regex"))===null||i===void 0?void 0:i.errorKey,o=(e=this.validation.custom.find(n=>n.rule==="regex"))===null||e===void 0?void 0:e.errorMessage;return b(`${a}`,this.language)?b(`${a}`,this.language):o}const{minLength:t,maxLength:r}=this.validation;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong||t&&this.phoneValue&&this.phoneValue.length<t||r&&this.phoneValue&&this.phoneValue.length>r)return t===r?b(se.FIXED_LENGTH,this.language,{values:{length:t}}):b(se.LENGTH,this.language,{values:{minLength:t,maxLength:r}});if(this.inputReference.validity.valueMissing)return b(se.REQUIRED,this.language)}renderTooltip(){return this.showTooltip?h.h("div",{class:`tel__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){var i;let e="";return this.touched&&(e=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"bf824bf310bec50746fb6b82cd8f7decbcfc284b",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},h.h("div",{key:"0b6c42e7aca5686f310ffdcecb96cf909e83521f",class:"tel__wrapper--flex-label"},h.h("label",{key:"ddf2fa885ac53e7f337525357a7dce52f911213d",class:`tel__label ${this.validation.mandatory?"tel__label--required":""}`,htmlFor:`${this.name}__input`},this.displayName),h.h("div",{key:"e21a84509b32f379bb3ce92137255caf99a86dc5",class:"tel__wrapper--relative"},this.tooltip&&h.h("img",{key:"9ff0a8c19aa067c1e7799227617405e373b344e4",class:"tel__tooltip-icon",src:le,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),h.h("div",{key:"5db13af7e421480b89253970a5f2470f999c922d",class:`tel__wrapper--flex ${e}`},h.h("vaadin-combo-box",{key:"164fe2bd2940bd5a251fda48b28f1af1bc3e78be",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.disablePhonePrefix,onChange:t=>this.handlePrefixInput(t)}),h.h("input",{key:"90ae038a383645d6579fb68bc5adbe8a2b1d676c",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:(i=this.phoneValue)!==null&&i!==void 0?i:"",placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),h.h("small",{key:"a68f95384965384a67d042b89264dbda03f25b7a",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Fs.style=Gf;const Kf='*,*::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}.pulse-border{border:1px solid var(--emw--registration-red-600, #cc4c4c);animation:pulse 0.5s ease-in-out 2 forwards}@keyframes pulse{0%{border-color:var(--emw--registration-red-600, #cc4c4c)}50%{border-color:var(--emw--registration-red-400, #e57373)}100%{border-color:var(--emw--color-gray-100, #E6E6E6)}}',Xf=Kf,$s=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.postalcodelength=5,this.touched=!1,this.handleInput=e=>{const t=e.target,r=this.enableSouthAfricanMode&&(this.name===X.FIRSTNAME_ON_DOCUMENT||this.name===X.LASTNAME_ON_DOCUMENT)?t.value.replace(X.NON_LETTERS_REGEX,""):t.value;r!==t.value&&(t.value=r),this.value=r,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout(()=>{this.updateValidationState(),this.emitValueHandler(!0)},500)},this.handleBlur=e=>{this.value=e.target.value,this.touched=!0,this.updateValidationState()},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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.haspostalcodelookup=void 0,this.enableSouthAfricanMode=void 0,this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedCountryCode=""}handleStylingChange(i,e){i!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(i){this.sendValidityState.emit(i)}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}valueChangedHandler(i){this.isDuplicateInput&&this.name===i.detail.name+"Duplicate"&&(this.duplicateInputValue=i.detail.value,this.touched&&this.updateValidationState()),this.name===i.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===i.detail.name&&this.touched&&this.updateValidationState()}handleValidationChange(i){i.detail.field===this.name&&(this.validation=i.detail.validation,this.validationPattern=this.setPattern(),this.touched&&(this.isValid=this.isValidValue(),this.errorMessage=this.setErrorMessage()))}handleCountryCodeUpdate(i){const{name:e,value:t}=i.detail;this.selectedCountryCode=t,e==="CountryCode"&&["address1","address2","City"].includes(this.name)&&(this.value="",this.touched=!1,this.errorMessage="",this.isValid=!1,this.inputReference&&(this.inputReference.value=""),this.valueHandler({name:this.name,value:""}),this.validityStateHandler({valid:!1,name:this.name}))}handleAddressSelection(i){const{city:e,address1:t,address2:r}=i.detail;if(!["address1","address2","City"].includes(this.name))return;let a="";this.name==="address1"?a=t:this.name==="address2"?a=r:this.name==="City"&&(a=e),this.value=a,this.touched=!0,this.updateValidationState()}connectedCallback(){this.validationPattern=this.setPattern()}handleExternalDocUpdate(i){this.name===X.DOCUMENT_NUMBER&&(this.value=i.detail||"",this.touched=!0,this.inputReference&&(this.inputReference.value=this.value),this.sendInputValue.emit({name:this.name,value:this.value}),this.updateValidationState())}handleDocReset(){this.name===X.DOCUMENT_NUMBER&&(this.value="",this.touched=!1,this.isValid=!1,this.errorMessage="",this.inputReference&&(this.inputReference.value=""),this.validityStateHandler({valid:!1,name:this.name}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentWillLoad(){this.defaultValue&&(this.value=this.defaultValue)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.haspostalcodelookup&&["address1","address2","City","PostalCode"].includes(this.name)&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.isValidValue()}validateDocument(i,e){const t=i.trim();return e===X.PASSPORT?X.PASSPORT_NUMERIC_REGEX.test(t)?{valid:!0}:{valid:!1,errorKey:se.PASSPORT_INVALID}:e===X.SOUTH_AFRICAN_ID?t.length!==X.SOUTH_AFRICAN_ID_LENGTH?{valid:!1,errorKey:se.SA_ID_LENGTH}:Ks(t)?{valid:!0}:{valid:!1,errorKey:se.SA_ID_INVALID}:{valid:!0}}updateValidationState(){const i=this.isValidValue();if(this.isValid=i,!this.touched){this.errorMessage="";return}this.errorMessage=i?"":this.setErrorMessage()}isValidValue(){if(!this.inputReference)return!1;if(this.enableSouthAfricanMode&&this.name===X.DOCUMENT_NUMBER){const e=window.documentTypeValue;return this.validateDocument(this.value,e).valid}return this.value.trim()===""&&!this.validation.mandatory||this.inputReference.validity.valid&&(!this.inputReference.value||this.inputReference.value.match(this.validationPattern)!==null)}setPattern(){var i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i,e,t,r;const a=this.value.trim();if(this.enableSouthAfricanMode&&this.name===X.DOCUMENT_NUMBER){const o=window.documentTypeValue,n=this.validateDocument(this.value,o);return n.valid?"":b(n.errorKey,this.language)}if(a===""&&!this.validation.mandatory)return"";if(this.inputReference.validity.valueMissing)return b(se.REQUIRED,this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong){const{minLength:o,maxLength:n}=this.validation;return o===n?b(se.FIXED_LENGTH,this.language,{values:{length:o}}):b(se.LENGTH,this.language,{values:{minLength:o,maxLength:n}})}if(this.inputReference.value.match(this.validationPattern)==null){const o=(i=this.validation.custom.find(s=>s.rule==="regex"))===null||i===void 0?void 0:i.errorKey,n=(e=this.validation.custom.find(s=>s.rule==="regex"))===null||e===void 0?void 0:e.errorMessage;return b(`${o}`,this.language)||n}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const o=(t=this.validation.custom.find(s=>s.rule==="duplicate-input"))===null||t===void 0?void 0:t.errorKey,n=(r=this.validation.custom.find(s=>s.rule==="duplicate-input"))===null||r===void 0?void 0:r.errorMessage;return b(`${o}`,this.language)?b(`${o}`,this.language):n}return""}renderTooltip(){return this.showTooltip?h.h("div",{class:`text__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){let i="";return this.touched&&(i=this.isValid==!0||this.isValid==null?"":"text__input--invalid"),h.h("div",{key:"aacb35e1808720cfdb24708254c01cb5be0fe6b6",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:e=>this.stylingContainer=e},h.h("div",{key:"14a292cc7661d663698384d989d57d21786210b9",class:"text__wrapper--flex"},h.h("label",{key:"c04b29364c4b54e9aad3036264044177e4a2dc51",class:`text__label ${this.validation.mandatory?"text__label--required":""}`,htmlFor:`${this.name}__input`},this.displayName),h.h("div",{key:"eb8aee30e47241b533c7ca8fcb354c782b4e2be1",class:"text__wrapper--relative"},this.tooltip&&h.h("img",{key:"23d4b70d93910f43ce0ea54c1bcffd81dfc54ebc",class:"text__tooltip-icon",src:le,alt:"",ref:e=>this.tooltipIconReference=e,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),h.h("input",{key:"3f901d85111256370811f4abe51bcd5b2971b60c",name:this.name,id:`${this.name}__input`,value:this.value,type:"text",class:`text__input ${i}`,placeholder:`${this.placeholder}`,ref:e=>this.inputReference=e,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.enableSouthAfricanMode?"":this.validation.minLength,maxlength:this.enableSouthAfricanMode?"":this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),h.h("small",{key:"1661215687f1eecd622b2610c3e056f45944fee3",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};$s.style=Xf;const Qf='*,*::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}',Jf=Qf,Hs=class{constructor(i){h.registerInstance(this,i),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.callBackObject={},this.subFieldsObject={},this.value="",this.handleRevealField=(e,t)=>{e.stopPropagation(),window.postMessage({type:`registration${t}Clicked`},window.location.href)},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},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=this.defaultValue==="true"}handleStylingChange(i,e){i!==e&&this.setClientStyling()}validityStateHandler(i){this.sendValidityState.emit(i)}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.options.length!==0&&this.options.forEach(i=>{this.callBackObject[i.name]=e=>{this.handleRevealField(e,i.name)},this.subFieldsObject[i.name].addEventListener("click",this.callBackObject[i.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 b("requiredError",this.language)}disconnectedCallback(){this.options.forEach(i=>{this.subFieldsObject[i.name].removeEventListener("click",this.callBackObject[i.name])})}renderLabel(){return h.h("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},h.h("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?h.h("div",{class:`togglecheckbox__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}render(){return h.h("div",{key:"828751327e59e9649afc04c6c9f7a02ef7dcae8d",class:`togglecheckbox__wrapper ${this.name}__input`,ref:i=>this.stylingContainer=i},h.h("div",{key:"d02a2a6ef595aaf7142cbc6e9681394ee4db8fee",class:"togglecheckbox__wrapper--flex"},h.h("input",{key:"fca6401ef6eb178f53471362444d54ed69086429",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:i=>this.checkboxReference=i,name:this.name,checked:this.defaultValue==="true",readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),h.h("small",{key:"3781a8fdfeb719422693bcd541a4a3fe708e705a",class:"togglecheckbox__error-message"},this.errorMessage),h.h("div",{key:"27a4c6b047cd332407ee40c82cf7be1914ed34c9",class:"togglecheckbox__wrapper--relative"},this.tooltip&&h.h("img",{key:"f1367d7e061d20ad68c24dfbe3147e6b67df746f",class:"togglecheckbox__tooltip-icon",src:le,alt:"",ref:i=>this.tooltipIconReference=i,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),h.h("div",{key:"98d42103554de4d14a65eafd1722bf9d587a27f1",class:`togglecheckbox__fields-wrapper ${this.showFields?"":"hidden"}`},this.options.map(i=>h.h("general-input",{type:i.inputType,name:i.name,displayName:i.displayName,validation:i.validate,action:i.action||null,defaultValue:i.defaultValue,autofilled:i.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:i.tooltip,placeholder:i.placeholder==null?"":i.placeholder,ref:e=>this.subFieldsObject[i.name]=e}))))}static get watchers(){return{clientStyling:["handleStylingChange"]}}};Hs.style=Jf;const Zf="*,*::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}",ev=Zf,Bs=class{constructor(i){h.registerInstance(this,i),this.registrationWidgetLoaded=h.createEvent(this,"registrationWidgetLoaded"),this.sendValidityState=h.createEvent(this,"sendValidityState"),this.sendInputValue=h.createEvent(this,"sendInputValue"),this.resendCode=h.createEvent(this,"resendCode"),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.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then(r=>r.text()).then(r=>{t.innerHTML=r,this.clientStyling=r,setTimeout(()=>{this.host.shadowRoot.prepend(t)},1)})},this.setInputRef=(e,t)=>{e&&(this.inputRefs[t]=e)},this.setContainerRef=e=>{e&&(this.containerRef=e)},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 e=String(Math.floor(this.resendIntervalSecondsLeft/60));let t=String(this.resendIntervalSecondsLeft%60);return t.length===1&&(t="0"+t),`${e}:${t}`},this.handleInput=(e,t)=>{const r=e.target,o=r.value.slice(-1);if(r.value=o,!o)return;this.code[t]=o,this.enableSouthAfricanMode&&(this.revealedIndexes=[t],this.revealTimeout&&clearTimeout(this.revealTimeout),this.revealTimeout=setTimeout(()=>{this.revealedIndexes=[]},500));const n=this.inputRefs[t+1];n&&n.focus(),this.setValidity(),this.setErrorMessage()},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setStreamStyling=e=>{if(window.emMessageBus){const t=document.createElement("style");this.stylingSubscription=window.emMessageBus.subscribe(e,r=>{t.innerHTML=r,this.clientStyling=r,this.host.shadowRoot.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.enableSouthAfricanMode=void 0,this.pinAttemptsExceeded=void 0,this.clientStylingUrl="",this.mbSource=void 0,this.limitStylingAppends=!1,this.isValid=!1,this.isResendButtonAvailable=!0,this.showTooltip=!1,this.errorMessage="",this.code=[],this.resendIntervalSecondsLeft=this.resendIntervalSeconds,this.revealedIndexes=[]}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValue==!0&&this.valueHandler({name:this.name,value:this.code.join("")})}emitValueHandler(i){i==!0&&this.isValid&&this.valueHandler({name:this.name,value:this.code.join("")})}handleStylingUrlChange(i,e){i!==e&&this.setClientStylingURL()}validityStateHandler(i){this.sendValidityState.emit(i)}valueHandler(i){this.sendInputValue.emit(i)}handleClickOutside(i){const e=i.composedPath();!e.includes(this.tooltipIconReference)&&!e.includes(this.tooltipReference)&&(this.showTooltip=!1)}handleStylingChange(i,e){i!==e&&this.setClientStyling()}connectedCallback(){this.validationPattern=this.setPattern(),this.code=new Array(this.validation.maxLength).fill("")}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.setValidity(),this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),!this.limitStylingAppends&&this.host&&(window.emMessageBus!=null?this.setStreamStyling(`${this.mbSource}.Style`):(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0))}handleKeyDown(i,e){if(i.key==="Backspace"){const t=[...this.code];t[e]="",this.code=t,this.enableSouthAfricanMode&&(this.revealedIndexes=this.revealedIndexes.filter(a=>a!==e));const r=this.inputRefs[e-1];r==null||r.focus()}this.setValidity(),this.setErrorMessage()}handlePaste(i){var e,t;i.preventDefault();const r=(t=(e=i.clipboardData)===null||e===void 0?void 0:e.getData("text"))===null||t===void 0?void 0:t.trim();if(!r)return;const a=r.slice(0,this.validation.maxLength).split("");this.code=[...a,...new Array(this.validation.maxLength-a.length).fill("")],this.enableSouthAfricanMode&&(this.revealedIndexes=a.map((n,s)=>s),this.revealTimeout&&clearTimeout(this.revealTimeout),this.revealTimeout=setTimeout(()=>{this.revealedIndexes=[]},500));const o=this.inputRefs[Math.min(a.length,this.inputRefs.length-1)];o==null||o.focus(),this.setValidity(),this.setErrorMessage(),this.enableSouthAfricanMode&&(this.valueHandler({name:this.name,value:this.code.join("")}),this.validityStateHandler({valid:this.isValid,name:this.name}))}setValidity(){const i=this.code.join(""),e=i.length===this.validation.maxLength,t=i.match(this.validationPattern)!==null;this.isValid=e&&t}setPattern(){var i,e;if(((i=this.validation.custom)===null||i===void 0?void 0:i.length)>0)return(e=this.validation.custom.find(t=>t.rule==="regex"))===null||e===void 0?void 0:e.pattern}setErrorMessage(){var i;if(this.code.join("").match(this.validationPattern)!==null)this.errorMessage="";else{const t=(i=this.validation.custom.find(r=>r.rule==="regex"))===null||i===void 0?void 0:i.errorKey;t&&(this.errorMessage=b(t,this.language))}}renderTooltip(){return this.showTooltip?h.h("div",{class:`text__tooltip ${this.showTooltip?"visible":""}`,ref:i=>this.tooltipReference=i,innerHTML:this.tooltip}):null}getInputDisplayValue(i){const e=this.code[i];return e?this.enableSouthAfricanMode?this.revealedIndexes.includes(i)?e:"*":e:""}render(){return h.h("div",{key:"08b9139f1c2236dd40a045517a9623ad966f29d3",class:"twofa",ref:i=>this.stylingContainer=i},h.h("div",{key:"7528885100be3d450ec52aafd6085a4c852710c8",class:"twofa__error-message"},h.h("p",{key:"51dab3f02156b5eb3b7408f06f2d359cfbda11a7"},this.errorMessage)),h.h("div",{key:"f336f89ecee0724663b1bbb4d443bb834336b5c1",class:"twofa__description",innerHTML:b("twofaDescription",this.language,{values:{destination:this.destination}})}),h.h("div",{key:"5127127ccc8e50428f8319fddc9e21606f3b4148",class:"twofa__input-wrapper",ref:this.setContainerRef},this.code.map((i,e)=>h.h("input",{key:e,ref:t=>this.setInputRef(t,e),id:`otp-input-${e}`,type:"text",maxLength:2,value:this.getInputDisplayValue(e),onInput:t=>this.handleInput(t,e),onKeyDown:t=>this.handleKeyDown(t,e),onPaste:t=>this.handlePaste(t)}))),h.h("div",{key:"be82ae1192129d571275b78c8097c3023468cf3e",class:"twofa__button-wrapper"},h.h("p",{key:"11de61d738ffa74bfd44f0d7c88fc4e456647d0c",class:"twofa__resend-message"},b("twofaResendMessage",this.language)),h.h("button",{key:"84d5c55c4d9bf024164ec52e2100cfcc8c236ac2",class:`twofa__resend-button ${this.pinAttemptsExceeded?"twofa__resend-button--disabled":""}`,onClick:this.resendCodeHandler,disabled:!this.isResendButtonAvailable||this.pinAttemptsExceeded},this.isResendButtonAvailable?b("twofaResendButton",this.language):this.formatTime())))}get host(){return h.getElement(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"],clientStylingUrl:["handleStylingUrlChange"],clientStyling:["handleStylingChange"]}}};Bs.style=ev;const tv=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}",iv=tv,Us=class{constructor(i){h.registerInstance(this,i),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(i,e){e!==i&&this.handleStructure(i)}handleStylingProps(i){switch(typeof i){case"number":return i===0?0:`${i}px`;case"undefined":return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(i)||i.endsWith("px")||i.endsWith("%")?i:"unset";default:return"unset"}}handleStructure(i){switch(i){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return h.h("div",{class:"SkeletonContainer"},h.h("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return h.h("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return h.h("div",{class:"SkeletonContainer"},h.h("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return h.h("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map((i,e)=>h.h("div",{key:e,class:"SkeletonText "+(this.animation?"Skeleton":"")})))}renderRectangle(){return h.h("div",{class:"SkeletonContainer"},h.h("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return h.h("div",{class:"SkeletonContainer"},h.h("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let i="";switch(this.structure){case"logo":i=`
|
|
6905
6905
|
:host {
|
|
6906
6906
|
--emw-skeleton-logo-width: ${this.stylingValue.width};
|
|
6907
6907
|
--emw-skeleton-logo-height: ${this.stylingValue.height};
|