@everymatrix/general-input 1.86.5 → 1.86.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/checkbox-group-input_14.cjs.entry.js +114 -5
- package/dist/cjs/general-input.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/general-input/general-input.js +126 -2
- package/dist/collection/components/twofa-input/twofa-input.js +100 -2
- package/dist/esm/checkbox-group-input_14.entry.js +114 -5
- package/dist/esm/general-input.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/general-input/checkbox-group-input_14.entry.js +1 -1
- package/dist/general-input/general-input.esm.js +1 -1
- package/dist/types/components/general-input/general-input.d.ts +20 -0
- package/dist/types/components/twofa-input/twofa-input.d.ts +15 -0
- package/dist/types/components.d.ts +50 -0
- package/package.json +1 -1
|
@@ -6654,4 +6654,4 @@ Is("vaadin-tabs",vi`
|
|
|
6654
6654
|
</div>
|
|
6655
6655
|
|
|
6656
6656
|
<div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
|
|
6657
|
-
`}static get is(){return"vaadin-tabs"}}li(ac);const lc=class{constructor(e){t(this,e),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.noValidation=!1,this.clientStyling="",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}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])r[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return this.haspostalcodelookup&&"PostalCode"===this.name?i("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}):i("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,haspostalcodelookup:this.haspostalcodelookup});case"email":return i("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return i("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return i("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return i("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return i("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick});case"password":return i("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,hidePasswordComplexity:this.hidePasswordComplexity,"no-validation":this.noValidation,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return i("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"twofa":return i("twofa-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,destination:this.twofaDestination,"resend-interval-seconds":this.twofaResendIntervalSeconds});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(o,{key:"ee5eae5b620c2818dda1aa5f547b06efce171360",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};lc.style=":host{display:block;height:100%}";const hc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.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 t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow)return n("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}});if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"f0e6e6edb5d8e3f509474ef5536cb7ef717a5ee9",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"c991d1e6ed0f9910104b46105daad5332200ee21",class:"number__wrapper--flex"},i("label",{key:"d6912229dac4712f4f8e77a90f7ba0ebb7dd5548",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"5733806c60cad364e61fc66e25f89a44159e8ad9",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"7ba9ca8048d04c41f800fccf03297e2db9a9115d",class:"number__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"32c782d0fd58b6507a0e3fbcc8f934f2c4e8e1d7",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"2167549cb0c3ea2440b72c9219b599b1d49c9026",class:"number__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};hc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emw--color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';const dc=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.noValidation=!1,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){const e=t.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",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.noValidation?[]:this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern);let s=!1;return t&&(s=i.test(t)),{rule:e.displayName,ruleKey:e.errorKey,passed:s}}))}setValidity(){var t,e;return!!this.noValidation||(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s,o;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.isDuplicateInput&&!this.originalValid)return n("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}return(null===(o=this.passwordComplexity)||void 0===o?void 0:o.every((t=>t.passed)))||this.showPopup?void 0:n("invalidPassword",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,s=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},n("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},n(s?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,n(`${t.ruleKey}`,this.language)?n(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"db7a6a87af3de451485c603a2f28f25806838d20",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"146ace196e1343f778232c0e2ff07556c0a09e1e",class:"password__wrapper--flex"},i("label",{key:"0d0cb672dfc7a43535a299b45752f43a87f73760",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"1eac72dfdadd0f50bd2db6b0fc44320dd2f287bf",class:"password__wrapper--relative"},this.tooltip&&i("img",{key:"bb327b9a403c1fc5628c4ba2da8d1a2b62888db5",class:"password__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{key:"7962f122d1bfb0ac0a5176a743e1224dccba4910",type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!this.noValidation&&i("small",{key:"efadfea8911ba72161aef495d1fb5857f14a319b",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.hidePasswordComplexity&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return s(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};dc.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.password {\n font-family: "Roboto";\n font-style: normal;\n}\n.password__wrapper {\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n container-type: inline-size;\n}\n.password__wrapper--autofilled {\n pointer-events: none;\n}\n.password__wrapper--autofilled .password__label {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__wrapper--autofilled .password__input::part(input-field) {\n color: var(--emw--color-black, #000000);\n}\n.password__wrapper--flex {\n display: flex;\n gap: 5px;\n}\n.password__wrapper--relative {\n position: relative;\n}\n.password__label {\n font-family: inherit;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 20px;\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__label--required::after {\n content: "*";\n font-family: inherit;\n color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n margin-left: 2px;\n}\n.password__input {\n width: inherit;\n border: none;\n}\n.password__input[focused]::part(input-field) {\n border-color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n}\n.password__input[invalid]::part(input-field) {\n border: 1px solid var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__input::part(input-field) {\n border-radius: 4px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-100, #E6E6E6);\n color: var(--emw--color-black, #000000);\n background-color: var(--emw--color-white, #FFFFFF);\n font-family: inherit;\n font-style: normal;\n font-weight: 300;\n font-size: 16px;\n line-height: 1.5;\n position: relative;\n margin-bottom: unset;\n height: 44px;\n padding: 0;\n width: 100%;\n}\n.password__input::part(reveal-button) {\n position: relative;\n right: 10px;\n}\n.password__input::part(reveal-button)::before {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__input > input {\n padding: 5px 15px;\n}\n.password__input > input:placeholder-shown {\n color: var(--emw--color-gray-150, #828282);\n}\n.password__error-message {\n position: absolute;\n top: calc(100% + 5px);\n left: 0;\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__complexity {\n height: 150px;\n position: relative;\n padding: 10px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n justify-content: center;\n margin-top: 20px;\n font-weight: 300;\n background: var(--emw--color-white, #FFFFFF);\n -webkit-border-radius: 5px;\n -moz-border-radius: 5px;\n border-radius: 5px;\n border: 1px solid #B0B0B0;\n box-sizing: content-box;\n /* works only in this order */\n}\n.password__complexity meter {\n border-color: transparent; /* Needed for Safari */\n}\n.password__complexity meter[value="1"]::-moz-meter-bar {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter[value="1"]::-webkit-meter-optimum-value {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter:not([value="1"])::-moz-meter-bar {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity--strength {\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.password__complexity--strength meter::-moz-meter-bar { /* Firefox Pseudo Class */\n background: #B0B0B0;\n}\n.password__complexity--hidden {\n display: none;\n}\n.password__complexity--text-bold {\n font-weight: 500;\n}\n.password__complexity--checkbox {\n margin-right: 5px;\n}\n.password__complexity:after {\n content: "";\n position: absolute;\n width: 25px;\n height: 25px;\n border-top: 1px solid var(--emw--color-gray-150, #828282);\n border-right: 0 solid var(--emw--color-gray-150, #828282);\n border-left: 1px solid var(--emw--color-gray-150, #828282);\n border-bottom: 0 solid var(--emw--color-gray-150, #828282);\n bottom: 92%;\n left: 50%;\n margin-left: -25px;\n transform: rotate(45deg);\n margin-top: -25px;\n background-color: var(--emw--color-white, #FFFFFF);\n}\n@container (max-width: 300px) {\n .password__complexity {\n height: 190px;\n }\n .password__complexity:after {\n width: 14px;\n height: 14px;\n bottom: 96%;\n left: 57%;\n }\n}\n.password__tooltip-icon {\n width: 16px;\n height: auto;\n}\n.password__tooltip {\n position: absolute;\n top: 0;\n left: 20px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-150, #828282);\n color: #2B2D3F;\n padding: 10px;\n border-radius: 5px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n z-index: 10;\n}\n.password__tooltip.visible {\n opacity: 1;\n}';const cc=class{constructor(i){t(this,i),this.sendAddressValue=e(this,"sendAddressValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.hasManualAddressBeenTriggered=!1,this.touched=!1,this.maxPostalCodeLength="10",this.handleInput=t=>{const e=t.target.value.toUpperCase();this.value=e,this.touched=!0,this.currentPostalCode=e,this.showNoResultsMessage=!1,this.inputReference&&(this.inputReference.value=e),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 t=this.isValid;this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),t!==this.isValid&&this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),300)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.showNoResultsMessage=!1,this.openAddressDropdown||(this.showNoResultsMessage=!1)},this.handleFocus=()=>{this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&(this.openAddressDropdown=!0)},this.handlePostalCode=(t,e)=>{t.stopPropagation();const i=`${e.street}`.trim(),s=`${e.number}`.trim(),o=`${e.city}`.trim();this.sendAddressValue.emit({city:o,address1:i,address2:s}),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:i}),this.valueHandler({name:"City",value:o}),s&&this.valueHandler({name:"address2",value:s}),this.refreshTrigger++},this.enterAddressManually=()=>{const t=window.targetInputRefs;if(!t)return;const e=[{name:"PostalCode",ref:t.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:t.address1},{name:"address2",ref:t.address2},{name:"City",ref:t.City}],i=[{name:"PostalCode",ref:t.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:t.address1},{name:"City",ref:t.City}].find((t=>{var e;const i=(null===(e=t.ref)||void 0===e?void 0:e.value)||"";return t.minLength?0===i.length||i.length<t.minLength:0===i.length})),s=(null==i?void 0:i.ref)||t.address1||t.PostalCode;s.scrollIntoView({behavior:"smooth",block:"center"}),this.hasManualAddressBeenTriggered||(this.hasManualAddressBeenTriggered=!0,e.forEach((t=>{var e;if(t.ref){const i=(null===(e=t.ref.shadowRoot)||void 0===e?void 0:e.querySelector("input"))||t.ref;if(i){i.classList.add("pulse-border");const t=()=>{i.classList.remove("pulse-border"),i.removeEventListener("animationend",t)};i.addEventListener("animationend",t)}}}))),s.focus()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.handleOutsideClick=t=>{if(!this.openAddressDropdown)return;const e=t.composedPath?t.composedPath():[],i=e.includes(this.inputReference),s=e.includes(this.addressesDropdownRef),o=e.some((t=>{var e;return t instanceof Element&&(null===(e=t.classList)||void 0===e?void 0:e.contains("option"))}));i||s||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(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value}),!0!==t||this.value.length||this.valueHandler({name:this.name,value:this.value})}handleAddresses(t){t&&t.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(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleCountryCodeUpdate(t){const{name:e,value:i}=t.detail;this.selectedCountryCode=i,"CountryCode"===e&&(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)}componentDidLoad(){this.defaultValue&&(this.value=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 t=this.inputReference.validity.valid,e=!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern);return t&&e}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(!this.touched)return"";if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)||s}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?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}determineInputValue(){return this.inputReference&&this.name&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.value}render(){var t,e;let s="";this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid");let o="UK"===this.selectedCountryCode||"GB"===this.selectedCountryCode||this.ignoreCountry,r=(null===(t=this.addresses)||void 0===t?void 0:t.length)>0&&this.openAddressDropdown&&o,l=this.showNoResultsMessage&&this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&0===(null===(e=this.addresses)||void 0===e?void 0:e.length)&&o,h=this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength;return i("div",{key:"a7d101d7ad51ca56156726b47b4ff97cdea7fca2",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"74f9b8cfb12094588642e5a56323cea96472f8c9",class:"text__wrapper--flex"},i("label",{key:"b779b88d908598f09a92a7388e0dfe7bda6157ed",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"b545e7c3f701e1ce10742f96075bcd84d3dccb85",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"3dfbb3f5286d2be08f361f8a6c746b765e5f7901",class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"0ce15664e22cf519df696084d6397be11a4c1932",class:"input__text-wrapper"},i("input",{key:"92506c5d469f87ef9a24a7f262d4a8c7dd441526",name:this.name,id:`${this.name}__input`,value:this.determineInputValue(),type:"text",class:`text__input ${s}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.maxPostalCodeLength,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!o&&i("p",{key:"836f5177d7a9013992989e7e8466396164f9dc8e",class:"address__manual-input-msg",onClick:()=>this.enterAddressManually()},n("enterIEAddressManually",this.language)),r&&i("div",{key:"077e3995330e2471cc9a838e88a35c60d03348aa",class:"input__addresses-container",ref:t=>this.addressesDropdownRef=t},i("div",{key:"2085a2fa95d95b1fcee0d3cbb45c240329cec4e8",class:"options"},this.addresses.map(((t,e)=>i("div",{key:e,class:"option",onClick:e=>this.handlePostalCode(e,t)},t.street," ",t.number," ",t.city))))),h&&i("div",{key:"5fb758ac04ee4a6af58e78d77e6ca024353a4b0e",class:"postalcode__loading-spinner"},i("div",{key:"d134446874122c8cde1070a7d1f4a95b7d0d65c0",class:"loading-spinner"}),i("span",{key:"1b2a451f6a52584f978783d43b60ccc8e0d20e29"},n("searchingForAddresses",this.language))),l&&i("div",{key:"c188c5debee4c194e87971d40ed981b3e095a5ae",class:"postalcode__no-results-message"},n("postalLookUpNoAddressFound",this.language))),i("small",{key:"c3499d3404bf807140815cceafe9104ee23dad25",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],addresses:["handleAddresses"]}}};cc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.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)}}';const uc=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){const e=t.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(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{key:"88357307488334074a397c636210575b8af1e2c3",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{key:"25f656d5b155c392cad79c89410833c3491531f8",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{key:"08def575050905f964d6921d4ed4f071fccdf4da",class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"485fa4888f626f1cf44f179f498f257af6c41b58",class:"radio__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};uc.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";const pc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.handleComboChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=t=>{const e=t.currentTarget;e.opened||(this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}))},this.handleSelectChange=t=>{this.touched=!0,this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t;this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value}))),this.isComboBox=(null===(t=this.displayedOptions)||void 0===t?void 0:t.length)>6}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{var e;const i=Object.keys(t)[0];this.displayedOptions=t[i].map((t=>({label:t.Name,value:t.Alpha2Code}))),this.isComboBox=(null===(e=this.displayedOptions)||void 0===e?void 0:e.length)>6}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.vaadinCombo.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue.toUpperCase(),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",(t=>{if(!0===t.detail.value)this.errorMessage="";else{const e=t.currentTarget;this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})}}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){var t;return!(null===(t=this.validation)||void 0===t?void 0:t.mandatory)||!!this.value}setErrorMessage(){var t,e,i;if((null===(e=null===(t=this.inputReference)||void 0===t?void 0:t.validity)||void 0===e?void 0:e.valueMissing)||(null===(i=this.vaadinCombo)||void 0===i?void 0:i.invalid))return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t,e;let s="";return this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"c23be50b865c381ce6d2bd77ab77f39b96af39d7",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"ec7daae517c439317a8596e835328d17f098eb49",class:"select__wrapper--flex"},i("label",{key:"d35d77810716e1afc25661d9c0679e34f500f751",class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{key:"74cb4c953064b2d989e866d2f7537f11f6cf7491",class:"select__wrapper--relative"},this.tooltip&&i("img",{key:"388ea5893a4f45e3cf7263a89c2ee93522b46819",class:"select__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),this.isComboBox?i("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(t=this.validation)||void 0===t?void 0:t.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleComboChange,onBlur:this.handleBlur}):i("vaadin-select",{name:this.name,popover:!1,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(e=this.validation)||void 0===e?void 0:e.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleSelectChange,"no-vertical-overlap":!0,noVerticalOverlap:!0}),i("small",{key:"9fa3c3fcac5a26b28a9730ce3a2f57cdecbaaa4a",class:"select__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};pc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%;--_invalid-hover-highlight:transparent;--vaadin-input-field-invalid-hover-highlight:transparent}vaadin-combo-box>input{background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emw--color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]:not(.text__input--invalid)::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.select__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emw--color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const mc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.setPhoneValue(t.target.value),this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.touched||(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.showLabels=void 0,this.action=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.disablePhonePrefix=!1,this.phoneValue="",this.phoneCodesOptions=void 0}setPhoneValue(t){const e=t.replace(/[^0-9]/g,"");this.phoneValue=e,this.inputReference&&(this.inputReference.value=this.phoneValue)}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t;this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.setPhoneValue(null!==(t=this.defaultValue.phone)&&void 0!==t?t:""),this.phoneCodesOptions=[{label:this.prefixValue,value:this.prefixValue}])}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>"object"==typeof t&&t.Prefix?{label:t.Prefix,value:t.Prefix}:{label:t,value:t})),this.disablePhonePrefix=this.phoneCodesOptions.length<=1}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?n("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t;let e="";return this.touched&&(e=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"9b01d1059b470ec9f57c6f852df12aa17d7a58e2",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"7ad94c73b7b14f63d1b0aa395cd4b2220d80bf7f",class:"tel__wrapper--flex-label"},i("label",{key:"2995bfd5f655c71a454281edf967ab4afff2b61c",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"45c874ffd76f0c56eb971728acc6bcf3c31afc64",class:"tel__wrapper--relative"},this.tooltip&&i("img",{key:"3ecfbb61507ea4fbe02c804679293adf7961ce18",class:"tel__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"b2dc1d8af7ea60bc56347ae73c315cf5539d6e7a",class:`tel__wrapper--flex ${e}`},i("vaadin-combo-box",{key:"3ad4d43799026bd4f3b06d9ad94eee17e81daced",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.disablePhonePrefix,onChange:t=>this.handlePrefixInput(t)}),i("input",{key:"6773fa69b3f657ccc4798db91b3c9966ef1ad6bc",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:null!==(t=this.phoneValue)&&void 0!==t?t:"",placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{key:"799b137bb4cf96cb7cffa77a6934eeab3e34f4ee",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};mc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emw--color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);overflow:hidden;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}';const vc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.postalcodelength=5,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.haspostalcodelookup=void 0,this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedCountryCode=""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleValidationChange(t){t.detail.field===this.name&&(this.validation=t.detail.validation,this.validationPattern=this.setPattern(),this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()))}handleCountryCodeUpdate(t){const{name:e,value:i}=t.detail;this.selectedCountryCode=i,"CountryCode"===e&&["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(t){const{city:e,address1:i,address2:s}=t.detail;if(!["address1","address2","City"].includes(this.name))return;let o="";"address1"===this.name?o=i:"address2"===this.name?o=s:"City"===this.name&&(o=e),this.value=o,this.touched=!0,this.isValid=!0,this.valueHandler({name:this.name,value:o}),this.validityStateHandler({valid:!0,name:this.name})}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.haspostalcodelookup&&["address1","address2","City","PostalCode"].includes(this.name)&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.setValidity()}setValidity(){if(!this.inputReference)return!1;if(""===this.value.trim()&&!this.validation.mandatory)return!0;const t=this.inputReference.validity.valid,e=!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern);return t&&e}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(""===this.value.trim()&&!this.validation.mandatory)return"";if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)||s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid");const e=this.value||this.defaultValue;return i("div",{key:"66ee941684d2294250344f156d65cfc740d3b27e",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"1881c5c7e9313d9d08861b3223ffe03227f73d58",class:"text__wrapper--flex"},i("label",{key:"f0059b865e3f2de4bb8f892d559acc4d18443e8e",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"bcb10756a212cbf77841eba6437b770c7470e19d",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"72d6f946f788c3ba9a27cde8a21942f9cbeac154",class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"6076879f85ab22c0be60ea87f9ae0e24520fe315",name:this.name,id:`${this.name}__input`,value:e,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"75558d8b0709fd01cc8e1cee9baf235f2129ff89",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};vc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.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)}}';const fc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.callBackObject={},this.subFieldsObject={},this.value="",this.handleRevealField=(t,e)=>{t.stopPropagation(),window.postMessage({type:`registration${e}Clicked`},window.location.href)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.options=void 0,this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.showFields="true"===this.defaultValue}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.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(){0!==this.options.length&&this.options.forEach((t=>{this.callBackObject[t.name]=e=>{this.handleRevealField(e,t.name)},this.subFieldsObject[t.name].addEventListener("click",this.callBackObject[t.name])}))}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.valueHandler({name:this.name,value:this.checkboxReference.checked?"true":"false",type:"toggle"})}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return n("requiredError",this.language)}disconnectedCallback(){this.options.forEach((t=>{this.subFieldsObject[t.name].removeEventListener("click",this.callBackObject[t.name])}))}renderLabel(){return i("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},i("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"58e1c4145712f9547f59eaf43015d46c13e04f2c",class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"5230bc70f55ee7d3d4db2eed2b17c3e4f3ce9a23",class:"togglecheckbox__wrapper--flex"},i("input",{key:"063c24818b3f4c5fa8362751640c8e51b9ff2868",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.checkboxReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),i("small",{key:"df35a1484f167b4bad9e4c82d82e069260be6608",class:"togglecheckbox__error-message"},this.errorMessage),i("div",{key:"6783791e9d5e882cc47cfdf501737c0309deb9ec",class:"togglecheckbox__wrapper--relative"},this.tooltip&&i("img",{key:"8bc868f9d6828fe65a6ad684c0c50d6dbf434239",class:"togglecheckbox__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("div",{key:"9258e49a1730b9bcec06ae2be98644a729a8741b",class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,ref:e=>this.subFieldsObject[t.name]=e})))))}static get watchers(){return{clientStyling:["handleStylingChange"]}}};fc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';const bc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.resendCode=e(this,"resendCode",7),this.validationPattern="",this.stylingContainer=null,this.tooltipReference=null,this.tooltipIconReference=null,this.inputRefs=[],this.containerRef=null,this.resendInterval=null,this.resendCodeHandler=()=>{this.triggerResendInterval(),this.resendCode.emit()},this.setInputRef=(t,e)=>{t&&(this.inputRefs[e]=t)},this.setContainerRef=t=>{t&&(this.containerRef=t)},this.triggerResendInterval=()=>{this.isResendButtonAvailable=!1,this.resendInterval&&clearInterval(this.resendInterval),this.resendInterval=setInterval((()=>{--this.resendIntervalSecondsLeft<=0&&(clearInterval(this.resendInterval),this.resendIntervalSecondsLeft=this.resendIntervalSeconds,this.isResendButtonAvailable=!0)}),1e3)},this.formatTime=()=>{const t=String(Math.floor(this.resendIntervalSecondsLeft/60));let e=String(this.resendIntervalSecondsLeft%60);return 1===e.length&&(e="0"+e),`${t}:${e}`},this.handleInput=(t,e)=>{const i=t.target,s=i.value;if(i.value=s.charAt(s.length>1?1:0),!s)return;this.code[e]=i.value;const o=this.inputRefs[e+1];o&&o.focus(),this.setValidity(),this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name="",this.displayName="",this.placeholder="",this.validation=void 0,this.tooltip="",this.language="en",this.emitValue=!0,this.destination="",this.resendIntervalSeconds=60,this.clientStyling="",this.limitStylingAppends=!1,this.isValid=!1,this.isResendButtonAvailable=!0,this.showTooltip=!1,this.errorMessage="",this.code=[],this.resendIntervalSecondsLeft=this.resendIntervalSeconds}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.code.join("")})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.code.join("")})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.code=new Array(this.validation.maxLength).fill("")}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.setValidity()}handleKeyDown(t,e){if("Backspace"===t.key){this.code[e]="",this.inputRefs[e]&&(this.inputRefs[e].value="");const t=this.inputRefs[e-1];t&&(null==t||t.focus())}this.setValidity(),this.setErrorMessage()}handlePaste(t){var e;t.preventDefault();const i=null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text").trim();if(!i)return;const s=i.slice(0,this.validation.maxLength).split("");this.code=[...s,...new Array(this.validation.maxLength-s.length).fill("")],s.forEach(((t,e)=>{this.inputRefs[e].value=t}));const o=this.inputRefs[Math.min(s.length,this.inputRefs.length-1)];o&&o.focus(),this.setValidity(),this.setErrorMessage()}setValidity(){const t=this.code.join(""),e=t.length===this.validation.maxLength,i=null!==t.match(this.validationPattern);this.isValid=e&&i}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t;if(null!==this.code.join("").match(this.validationPattern))this.errorMessage="";else{const e=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey;e&&(this.errorMessage=n(e,this.language))}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"8672e39d15057a9e866ba1cb79e50f2d319aa989",class:"twofa",ref:t=>this.stylingContainer=t},i("div",{key:"ae7f658dd357340918e6f9565934660b3ef944ac",class:"twofa__error-message"},i("p",{key:"8ef6aecdc7a31b1c4b801f69c8970b8df79bd127"},this.errorMessage)),i("div",{key:"86966527af6e1c3313847f0ae07f89d3ae3411fb",class:"twofa__description",innerHTML:n("twofaDescription",this.language,{values:{destination:this.destination}})}),i("div",{key:"e8ebb1da615c25ddce6e06c4aee158355dc433c3",class:"twofa__input-wrapper",ref:this.setContainerRef},this.code.map(((t,e)=>i("input",{key:e,ref:t=>this.setInputRef(t,e),id:`otp-input-${e}`,type:"text",maxLength:2,value:t,onInput:t=>this.handleInput(t,e),onKeyDown:t=>this.handleKeyDown(t,e),onPaste:t=>this.handlePaste(t)})))),i("div",{key:"707d2423dd21097dbc591bd15fbf57b5c2e7bddc",class:"twofa__button-wrapper"},i("p",{key:"abc31161f53c6b41aef93b0f27fefced03bac990",class:"twofa__resend-message"},n("twofaResendMessage",this.language)),i("button",{key:"3f7e329e16a524a4849ffb6b98e0df2f4dec136c",class:"twofa__resend-button",onClick:this.resendCodeHandler,disabled:!this.isResendButtonAvailable},this.isResendButtonAvailable?n("twofaResendButton",this.language):this.formatTime())))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};bc.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.twofa{display:flex;flex-direction:column;gap:10px}.twofa__description{display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center}.twofa__error-message{text-align:center;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.twofa__input-wrapper{display:flex;justify-content:center}.twofa__input-wrapper input{width:35px;height:35px;padding:10px;text-align:center;border-radius:var(--emw--border-radius-small, 5px);margin-left:5px;margin-right:5px;border:2px solid var(--emw--otp-border-color, #55525c);font-weight:var(--emw-font-weight-bold, 800);outline:none;transition:all 0.1s}.twofa__input-wrapper input:focus{border:2px solid var(--emw--color-primary, #22B04E);box-shadow:0 0 2px 2px var(--emw--color-primary, #22B04E)}.twofa__button-wrapper{justify-content:center;text-align:center}.twofa__button-wrapper button{border:none;background:none;font-weight:var(--emw-font-weight-bold, 800);color:var(--emw--color-primary, #22B04E);cursor:pointer}";export{l as checkbox_group_input,h as checkbox_input,Ke as date_input,Qe as email_input,lc as general_input,hc as number_input,dc as password_input,cc as postalcode_input,uc as radio_input,pc as select_input,mc as tel_input,vc as text_input,fc as toggle_checkbox_input,bc as twofa_input}
|
|
6657
|
+
`}static get is(){return"vaadin-tabs"}}li(ac);const lc=class{constructor(i){t(this,i),this.registrationWidgetLoaded=e(this,"registrationWidgetLoaded",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(t)},this.setStreamStyling=t=>{if(window.emMessageBus){const e=document.createElement("style");this.stylingSubscription=window.emMessageBus.subscribe(t,(t=>{e.innerHTML=t,this.clientStyling=t,this.host.shadowRoot.prepend(e)}))}},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,this.clientStyling=t,setTimeout((()=>{this.host.shadowRoot.prepend(e)}),1)}))},this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.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.mbSource=void 0,this.limitStylingAppends=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])r[e][i]=t[e][i]})),e(!0)}))})))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentDidLoad(){this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),!this.limitStylingAppends&&this.host&&(null!=window.emMessageBus?this.setStreamStyling(`${this.mbSource}.Style`):(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0))}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return this.haspostalcodelookup&&"PostalCode"===this.name?i("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}):i("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,haspostalcodelookup:this.haspostalcodelookup});case"email":return i("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return i("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return i("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return i("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return i("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick});case"password":return i("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,hidePasswordComplexity:this.hidePasswordComplexity,"no-validation":this.noValidation,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return i("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"twofa":return i("twofa-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,destination:this.twofaDestination,"resend-interval-seconds":this.twofaResendIntervalSeconds,"mb-source":this.mbSource});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(o,{key:"134ef4b9ef8814a9b77c5db5b5085b0fe4e79c92",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}get host(){return s(this)}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};lc.style=":host{display:block;height:100%}";const hc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.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 t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow)return n("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}});if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"f0e6e6edb5d8e3f509474ef5536cb7ef717a5ee9",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"c991d1e6ed0f9910104b46105daad5332200ee21",class:"number__wrapper--flex"},i("label",{key:"d6912229dac4712f4f8e77a90f7ba0ebb7dd5548",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"5733806c60cad364e61fc66e25f89a44159e8ad9",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"7ba9ca8048d04c41f800fccf03297e2db9a9115d",class:"number__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"32c782d0fd58b6507a0e3fbcc8f934f2c4e8e1d7",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"2167549cb0c3ea2440b72c9219b599b1d49c9026",class:"number__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};hc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emw--color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';const dc=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleRevealField=t=>{t.stopPropagation(),window.postMessage({type:`registrationShow${this.name}`},window.location.href)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.noValidation=!1,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.hidePasswordComplexity=!1,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.passwordComplexity=void 0,this.showPopup=void 0,this.value=""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){const e=t.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",(t=>{this.handleRevealField(t)})),this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}disconnectedCallback(){this.passwordButton.removeEventListener("click",this.handleRevealField)}calculateComplexity(t){this.passwordComplexity=this.noValidation?[]:this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern);let s=!1;return t&&(s=i.test(t)),{rule:e.displayName,ruleKey:e.errorKey,passed:s}}))}setValidity(){var t,e;return!!this.noValidation||(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s,o;if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.isDuplicateInput&&!this.originalValid)return n("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}return(null===(o=this.passwordComplexity)||void 0===o?void 0:o.every((t=>t.passed)))||this.showPopup?void 0:n("invalidPassword",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,s=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},n("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},n(s?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,n(`${t.ruleKey}`,this.language)?n(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"db7a6a87af3de451485c603a2f28f25806838d20",class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"146ace196e1343f778232c0e2ff07556c0a09e1e",class:"password__wrapper--flex"},i("label",{key:"0d0cb672dfc7a43535a299b45752f43a87f73760",class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"1eac72dfdadd0f50bd2db6b0fc44320dd2f287bf",class:"password__wrapper--relative"},this.tooltip&&i("img",{key:"bb327b9a403c1fc5628c4ba2da8d1a2b62888db5",class:"password__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{key:"7962f122d1bfb0ac0a5176a743e1224dccba4910",type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!this.noValidation&&i("small",{key:"efadfea8911ba72161aef495d1fb5857f14a319b",class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.hidePasswordComplexity&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return s(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};dc.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.password {\n font-family: "Roboto";\n font-style: normal;\n}\n.password__wrapper {\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 5px;\n container-type: inline-size;\n}\n.password__wrapper--autofilled {\n pointer-events: none;\n}\n.password__wrapper--autofilled .password__label {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__wrapper--autofilled .password__input::part(input-field) {\n color: var(--emw--color-black, #000000);\n}\n.password__wrapper--flex {\n display: flex;\n gap: 5px;\n}\n.password__wrapper--relative {\n position: relative;\n}\n.password__label {\n font-family: inherit;\n font-style: normal;\n font-weight: 500;\n font-size: 16px;\n line-height: 20px;\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__label--required::after {\n content: "*";\n font-family: inherit;\n color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n margin-left: 2px;\n}\n.password__input {\n width: inherit;\n border: none;\n}\n.password__input[focused]::part(input-field) {\n border-color: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n}\n.password__input[invalid]::part(input-field) {\n border: 1px solid var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__input::part(input-field) {\n border-radius: 4px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-100, #E6E6E6);\n color: var(--emw--color-black, #000000);\n background-color: var(--emw--color-white, #FFFFFF);\n font-family: inherit;\n font-style: normal;\n font-weight: 300;\n font-size: 16px;\n line-height: 1.5;\n position: relative;\n margin-bottom: unset;\n height: 44px;\n padding: 0;\n width: 100%;\n}\n.password__input::part(reveal-button) {\n position: relative;\n right: 10px;\n}\n.password__input::part(reveal-button)::before {\n color: var(--emw--registration-typography, var(--emw--color-black, #000000));\n}\n.password__input > input {\n padding: 5px 15px;\n}\n.password__input > input:placeholder-shown {\n color: var(--emw--color-gray-150, #828282);\n}\n.password__error-message {\n position: absolute;\n top: calc(100% + 5px);\n left: 0;\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n}\n.password__complexity {\n height: 150px;\n position: relative;\n padding: 10px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n justify-content: center;\n margin-top: 20px;\n font-weight: 300;\n background: var(--emw--color-white, #FFFFFF);\n -webkit-border-radius: 5px;\n -moz-border-radius: 5px;\n border-radius: 5px;\n border: 1px solid #B0B0B0;\n box-sizing: content-box;\n /* works only in this order */\n}\n.password__complexity meter {\n border-color: transparent; /* Needed for Safari */\n}\n.password__complexity meter[value="1"]::-moz-meter-bar {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter[value="1"]::-webkit-meter-optimum-value {\n background-color: var(--emw--color-valid, #48952a);\n}\n.password__complexity meter:not([value="1"])::-moz-meter-bar {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value {\n background-color: var(--emw--color-error, #FD2839);\n}\n.password__complexity--strength {\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n}\n.password__complexity--strength meter::-moz-meter-bar { /* Firefox Pseudo Class */\n background: #B0B0B0;\n}\n.password__complexity--hidden {\n display: none;\n}\n.password__complexity--text-bold {\n font-weight: 500;\n}\n.password__complexity--checkbox {\n margin-right: 5px;\n}\n.password__complexity:after {\n content: "";\n position: absolute;\n width: 25px;\n height: 25px;\n border-top: 1px solid var(--emw--color-gray-150, #828282);\n border-right: 0 solid var(--emw--color-gray-150, #828282);\n border-left: 1px solid var(--emw--color-gray-150, #828282);\n border-bottom: 0 solid var(--emw--color-gray-150, #828282);\n bottom: 92%;\n left: 50%;\n margin-left: -25px;\n transform: rotate(45deg);\n margin-top: -25px;\n background-color: var(--emw--color-white, #FFFFFF);\n}\n@container (max-width: 300px) {\n .password__complexity {\n height: 190px;\n }\n .password__complexity:after {\n width: 14px;\n height: 14px;\n bottom: 96%;\n left: 57%;\n }\n}\n.password__tooltip-icon {\n width: 16px;\n height: auto;\n}\n.password__tooltip {\n position: absolute;\n top: 0;\n left: 20px;\n background-color: var(--emw--color-white, #FFFFFF);\n border: 1px solid var(--emw--color-gray-150, #828282);\n color: #2B2D3F;\n padding: 10px;\n border-radius: 5px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n z-index: 10;\n}\n.password__tooltip.visible {\n opacity: 1;\n}';const cc=class{constructor(i){t(this,i),this.sendAddressValue=e(this,"sendAddressValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.hasManualAddressBeenTriggered=!1,this.touched=!1,this.maxPostalCodeLength="10",this.handleInput=t=>{const e=t.target.value.toUpperCase();this.value=e,this.touched=!0,this.currentPostalCode=e,this.showNoResultsMessage=!1,this.inputReference&&(this.inputReference.value=e),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 t=this.isValid;this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),t!==this.isValid&&this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),300)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.showNoResultsMessage=!1,this.openAddressDropdown||(this.showNoResultsMessage=!1)},this.handleFocus=()=>{this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&(this.openAddressDropdown=!0)},this.handlePostalCode=(t,e)=>{t.stopPropagation();const i=`${e.street}`.trim(),s=`${e.number}`.trim(),o=`${e.city}`.trim();this.sendAddressValue.emit({city:o,address1:i,address2:s}),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:i}),this.valueHandler({name:"City",value:o}),s&&this.valueHandler({name:"address2",value:s}),this.refreshTrigger++},this.enterAddressManually=()=>{const t=window.targetInputRefs;if(!t)return;const e=[{name:"PostalCode",ref:t.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:t.address1},{name:"address2",ref:t.address2},{name:"City",ref:t.City}],i=[{name:"PostalCode",ref:t.PostalCode,minLength:this.postalcodelength},{name:"address1",ref:t.address1},{name:"City",ref:t.City}].find((t=>{var e;const i=(null===(e=t.ref)||void 0===e?void 0:e.value)||"";return t.minLength?0===i.length||i.length<t.minLength:0===i.length})),s=(null==i?void 0:i.ref)||t.address1||t.PostalCode;s.scrollIntoView({behavior:"smooth",block:"center"}),this.hasManualAddressBeenTriggered||(this.hasManualAddressBeenTriggered=!0,e.forEach((t=>{var e;if(t.ref){const i=(null===(e=t.ref.shadowRoot)||void 0===e?void 0:e.querySelector("input"))||t.ref;if(i){i.classList.add("pulse-border");const t=()=>{i.classList.remove("pulse-border"),i.removeEventListener("animationend",t)};i.addEventListener("animationend",t)}}}))),s.focus()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.handleOutsideClick=t=>{if(!this.openAddressDropdown)return;const e=t.composedPath?t.composedPath():[],i=e.includes(this.inputReference),s=e.includes(this.addressesDropdownRef),o=e.some((t=>{var e;return t instanceof Element&&(null===(e=t.classList)||void 0===e?void 0:e.contains("option"))}));i||s||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(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value}),!0!==t||this.value.length||this.valueHandler({name:this.name,value:this.value})}handleAddresses(t){t&&t.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(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}handleCountryCodeUpdate(t){const{name:e,value:i}=t.detail;this.selectedCountryCode=i,"CountryCode"===e&&(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)}componentDidLoad(){this.defaultValue&&(this.value=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 t=this.inputReference.validity.valid,e=!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern);return t&&e}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(!this.touched)return"";if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)||s}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?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}determineInputValue(){return this.inputReference&&this.name&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.value}render(){var t,e;let s="";this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid");let o="UK"===this.selectedCountryCode||"GB"===this.selectedCountryCode||this.ignoreCountry,r=(null===(t=this.addresses)||void 0===t?void 0:t.length)>0&&this.openAddressDropdown&&o,l=this.showNoResultsMessage&&this.currentPostalCode&&this.currentPostalCode.length>=this.postalcodelength&&0===(null===(e=this.addresses)||void 0===e?void 0:e.length)&&o,h=this.isFetchingAddresses&&this.currentPostalCode.length>=this.postalcodelength;return i("div",{key:"a7d101d7ad51ca56156726b47b4ff97cdea7fca2",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"74f9b8cfb12094588642e5a56323cea96472f8c9",class:"text__wrapper--flex"},i("label",{key:"b779b88d908598f09a92a7388e0dfe7bda6157ed",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"b545e7c3f701e1ce10742f96075bcd84d3dccb85",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"3dfbb3f5286d2be08f361f8a6c746b765e5f7901",class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"0ce15664e22cf519df696084d6397be11a4c1932",class:"input__text-wrapper"},i("input",{key:"92506c5d469f87ef9a24a7f262d4a8c7dd441526",name:this.name,id:`${this.name}__input`,value:this.determineInputValue(),type:"text",class:`text__input ${s}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.maxPostalCodeLength,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),!o&&i("p",{key:"836f5177d7a9013992989e7e8466396164f9dc8e",class:"address__manual-input-msg",onClick:()=>this.enterAddressManually()},n("enterIEAddressManually",this.language)),r&&i("div",{key:"077e3995330e2471cc9a838e88a35c60d03348aa",class:"input__addresses-container",ref:t=>this.addressesDropdownRef=t},i("div",{key:"2085a2fa95d95b1fcee0d3cbb45c240329cec4e8",class:"options"},this.addresses.map(((t,e)=>i("div",{key:e,class:"option",onClick:e=>this.handlePostalCode(e,t)},t.street," ",t.number," ",t.city))))),h&&i("div",{key:"5fb758ac04ee4a6af58e78d77e6ca024353a4b0e",class:"postalcode__loading-spinner"},i("div",{key:"d134446874122c8cde1070a7d1f4a95b7d0d65c0",class:"loading-spinner"}),i("span",{key:"1b2a451f6a52584f978783d43b60ccc8e0d20e29"},n("searchingForAddresses",this.language))),l&&i("div",{key:"c188c5debee4c194e87971d40ed981b3e095a5ae",class:"postalcode__no-results-message"},n("postalLookUpNoAddressFound",this.language))),i("small",{key:"c3499d3404bf807140815cceafe9104ee23dad25",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],addresses:["handleAddresses"]}}};cc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.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)}}';const uc=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.optionsGroup=void 0,this.validation=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){const e=t.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(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{key:"88357307488334074a397c636210575b8af1e2c3",class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{key:"25f656d5b155c392cad79c89410833c3491531f8",class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{key:"08def575050905f964d6921d4ed4f071fccdf4da",class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"485fa4888f626f1cf44f179f498f257af6c41b58",class:"radio__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};uc.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}";const pc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.handleComboChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.handleBlur=t=>{const e=t.currentTarget;e.opened||(this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}))},this.handleSelectChange=t=>{this.touched=!0,this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t;this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value}))),this.isComboBox=(null===(t=this.displayedOptions)||void 0===t?void 0:t.length)>6}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{var e;const i=Object.keys(t)[0];this.displayedOptions=t[i].map((t=>({label:t.Name,value:t.Alpha2Code}))),this.isComboBox=(null===(e=this.displayedOptions)||void 0===e?void 0:e.length)>6}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.vaadinCombo.querySelector("input"),this.defaultValue&&(this.value=this.defaultValue.toUpperCase(),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",(t=>{if(!0===t.detail.value)this.errorMessage="";else{const e=t.currentTarget;this.touched=!0,this.value=e.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})}}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){var t;return!(null===(t=this.validation)||void 0===t?void 0:t.mandatory)||!!this.value}setErrorMessage(){var t,e,i;if((null===(e=null===(t=this.inputReference)||void 0===t?void 0:t.validity)||void 0===e?void 0:e.valueMissing)||(null===(i=this.vaadinCombo)||void 0===i?void 0:i.invalid))return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t,e;let s="";return this.touched&&(s=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"c23be50b865c381ce6d2bd77ab77f39b96af39d7",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"ec7daae517c439317a8596e835328d17f098eb49",class:"select__wrapper--flex"},i("label",{key:"d35d77810716e1afc25661d9c0679e34f500f751",class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{key:"74cb4c953064b2d989e866d2f7537f11f6cf7491",class:"select__wrapper--relative"},this.tooltip&&i("img",{key:"388ea5893a4f45e3cf7263a89c2ee93522b46819",class:"select__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),this.isComboBox?i("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(t=this.validation)||void 0===t?void 0:t.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleComboChange,onBlur:this.handleBlur}):i("vaadin-select",{name:this.name,popover:!1,id:`${this.name}__input`,class:`select__input ${s} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",ref:t=>this.vaadinCombo=t,readOnly:this.autofilled,required:null===(e=this.validation)||void 0===e?void 0:e.mandatory,value:this.value,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleSelectChange,"no-vertical-overlap":!0,noVerticalOverlap:!0}),i("small",{key:"9fa3c3fcac5a26b28a9730ce3a2f57cdecbaaa4a",class:"select__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};pc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%;--_invalid-hover-highlight:transparent;--vaadin-input-field-invalid-hover-highlight:transparent}vaadin-combo-box>input{background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--registration-typography, var(--emw--color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emw--color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]:not(.text__input--invalid)::part(input-field){border-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.select__input[invalid]::part(input-field){border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emw--color-black, #000000)}.select__input::part(input-field){border-radius:4px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const mc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.setPhoneValue(t.target.value),this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.touched||(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.showLabels=void 0,this.action=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.disablePhonePrefix=!1,this.phoneValue="",this.phoneCodesOptions=void 0}setPhoneValue(t){const e=t.replace(/[^0-9]/g,"");this.phoneValue=e,this.inputReference&&(this.inputReference.value=this.phoneValue)}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}connectedCallback(){var t;this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.setPhoneValue(null!==(t=this.defaultValue.phone)&&void 0!==t?t:""),this.phoneCodesOptions=[{label:this.prefixValue,value:this.prefixValue}])}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>"object"==typeof t&&t.Prefix?{label:t.Prefix,value:t.Prefix}:{label:t,value:t})),this.disablePhonePrefix=this.phoneCodesOptions.length<=1}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):s}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?n("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){var t;let e="";return this.touched&&(e=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"9b01d1059b470ec9f57c6f852df12aa17d7a58e2",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"7ad94c73b7b14f63d1b0aa395cd4b2220d80bf7f",class:"tel__wrapper--flex-label"},i("label",{key:"2995bfd5f655c71a454281edf967ab4afff2b61c",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"45c874ffd76f0c56eb971728acc6bcf3c31afc64",class:"tel__wrapper--relative"},this.tooltip&&i("img",{key:"3ecfbb61507ea4fbe02c804679293adf7961ce18",class:"tel__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"b2dc1d8af7ea60bc56347ae73c315cf5539d6e7a",class:`tel__wrapper--flex ${e}`},i("vaadin-combo-box",{key:"3ad4d43799026bd4f3b06d9ad94eee17e81daced",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.disablePhonePrefix,onChange:t=>this.handlePrefixInput(t)}),i("input",{key:"6773fa69b3f657ccc4798db91b3c9966ef1ad6bc",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:null!==(t=this.phoneValue)&&void 0!==t?t:"",placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{key:"799b137bb4cf96cb7cffa77a6934eeab3e34f4ee",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};mc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emw--color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);overflow:hidden;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}';const vc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,this.postalcodelength=5,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.haspostalcodelookup=void 0,this.isValid=void 0,this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedCountryCode=""}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleValidationChange(t){t.detail.field===this.name&&(this.validation=t.detail.validation,this.validationPattern=this.setPattern(),this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()))}handleCountryCodeUpdate(t){const{name:e,value:i}=t.detail;this.selectedCountryCode=i,"CountryCode"===e&&["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(t){const{city:e,address1:i,address2:s}=t.detail;if(!["address1","address2","City"].includes(this.name))return;let o="";"address1"===this.name?o=i:"address2"===this.name?o=s:"City"===this.name&&(o=e),this.value=o,this.touched=!0,this.isValid=!0,this.valueHandler({name:this.name,value:o}),this.validityStateHandler({valid:!0,name:this.name})}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.haspostalcodelookup&&["address1","address2","City","PostalCode"].includes(this.name)&&(window.targetInputRefs=window.targetInputRefs||{},window.targetInputRefs[this.name]=this.inputReference),this.isValid=this.setValidity()}setValidity(){if(!this.inputReference)return!1;if(""===this.value.trim()&&!this.validation.mandatory)return!0;const t=this.inputReference.validity.valid,e=!this.inputReference.value||null!==this.inputReference.value.match(this.validationPattern);return t&&e}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(""===this.value.trim()&&!this.validation.mandatory)return"";if(this.inputReference.validity.valueMissing)return n("requiredError",this.language);if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(null==this.inputReference.value.match(this.validationPattern)){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)||s}if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid");const e=this.value||this.defaultValue;return i("div",{key:"66ee941684d2294250344f156d65cfc740d3b27e",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"1881c5c7e9313d9d08861b3223ffe03227f73d58",class:"text__wrapper--flex"},i("label",{key:"f0059b865e3f2de4bb8f892d559acc4d18443e8e",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"bcb10756a212cbf77841eba6437b770c7470e19d",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"72d6f946f788c3ba9a27cde8a21942f9cbeac154",class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"6076879f85ab22c0be60ea87f9ae0e24520fe315",name:this.name,id:`${this.name}__input`,value:e,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"75558d8b0709fd01cc8e1cee9baf235f2129ff89",class:"text__error-message"},this.errorMessage))}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};vc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emw--color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emw--registration-typography, var(--emw--color-black, #000000))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);background-color:var(--emw--color-white, #FFFFFF);color:var(--emw--color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.text__input--invalid{border:1px solid var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__input::placeholder{color:var(--emw--color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}.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)}}';const fc=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.callBackObject={},this.subFieldsObject={},this.value="",this.handleRevealField=(t,e)=>{t.stopPropagation(),window.postMessage({type:`registration${e}Clicked`},window.location.href)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.options=void 0,this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.showFields="true"===this.defaultValue}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.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(){0!==this.options.length&&this.options.forEach((t=>{this.callBackObject[t.name]=e=>{this.handleRevealField(e,t.name)},this.subFieldsObject[t.name].addEventListener("click",this.callBackObject[t.name])}))}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.valueHandler({name:this.name,value:this.checkboxReference.checked?"true":"false",type:"toggle"})}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return n("requiredError",this.language)}disconnectedCallback(){this.options.forEach((t=>{this.subFieldsObject[t.name].removeEventListener("click",this.callBackObject[t.name])}))}renderLabel(){return i("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},i("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"58e1c4145712f9547f59eaf43015d46c13e04f2c",class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"5230bc70f55ee7d3d4db2eed2b17c3e4f3ce9a23",class:"togglecheckbox__wrapper--flex"},i("input",{key:"063c24818b3f4c5fa8362751640c8e51b9ff2868",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.checkboxReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),i("small",{key:"df35a1484f167b4bad9e4c82d82e069260be6608",class:"togglecheckbox__error-message"},this.errorMessage),i("div",{key:"6783791e9d5e882cc47cfdf501737c0309deb9ec",class:"togglecheckbox__wrapper--relative"},this.tooltip&&i("img",{key:"8bc868f9d6828fe65a6ad684c0c50d6dbf434239",class:"togglecheckbox__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("div",{key:"9258e49a1730b9bcec06ae2be98644a729a8741b",class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,ref:e=>this.subFieldsObject[t.name]=e})))))}static get watchers(){return{clientStyling:["handleStylingChange"]}}};fc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #22B04E))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';const bc=class{constructor(i){t(this,i),this.registrationWidgetLoaded=e(this,"registrationWidgetLoaded",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.resendCode=e(this,"resendCode",7),this.validationPattern="",this.stylingContainer=null,this.tooltipReference=null,this.tooltipIconReference=null,this.inputRefs=[],this.containerRef=null,this.resendInterval=null,this.resendCodeHandler=()=>{this.triggerResendInterval(),this.resendCode.emit()},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,this.clientStyling=t,setTimeout((()=>{this.host.shadowRoot.prepend(e)}),1)}))},this.setInputRef=(t,e)=>{t&&(this.inputRefs[e]=t)},this.setContainerRef=t=>{t&&(this.containerRef=t)},this.triggerResendInterval=()=>{this.isResendButtonAvailable=!1,this.resendInterval&&clearInterval(this.resendInterval),this.resendInterval=setInterval((()=>{--this.resendIntervalSecondsLeft<=0&&(clearInterval(this.resendInterval),this.resendIntervalSecondsLeft=this.resendIntervalSeconds,this.isResendButtonAvailable=!0)}),1e3)},this.formatTime=()=>{const t=String(Math.floor(this.resendIntervalSecondsLeft/60));let e=String(this.resendIntervalSecondsLeft%60);return 1===e.length&&(e="0"+e),`${t}:${e}`},this.handleInput=(t,e)=>{const i=t.target,s=i.value;if(i.value=s.charAt(s.length>1?1:0),!s)return;this.code[e]=i.value;const o=this.inputRefs[e+1];o&&o.focus(),this.setValidity(),this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setStreamStyling=t=>{if(window.emMessageBus){const e=document.createElement("style");this.stylingSubscription=window.emMessageBus.subscribe(t,(t=>{e.innerHTML=t,this.clientStyling=t,this.host.shadowRoot.prepend(e)}))}},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.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}handleStylingChange(t,e){t!==e&&this.setClientStyling()}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.code.join("")})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.code.join("")})}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){const e=t.composedPath();e.includes(this.tooltipIconReference)||e.includes(this.tooltipReference)||(this.showTooltip=!1)}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&&(null!=window.emMessageBus?this.setStreamStyling(`${this.mbSource}.Style`):(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0))}handleKeyDown(t,e){if("Backspace"===t.key){this.code[e]="",this.inputRefs[e]&&(this.inputRefs[e].value="");const t=this.inputRefs[e-1];t&&(null==t||t.focus())}this.setValidity(),this.setErrorMessage()}handlePaste(t){var e;t.preventDefault();const i=null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text").trim();if(!i)return;const s=i.slice(0,this.validation.maxLength).split("");this.code=[...s,...new Array(this.validation.maxLength-s.length).fill("")],s.forEach(((t,e)=>{this.inputRefs[e].value=t}));const o=this.inputRefs[Math.min(s.length,this.inputRefs.length-1)];o&&o.focus(),this.setValidity(),this.setErrorMessage()}setValidity(){const t=this.code.join(""),e=t.length===this.validation.maxLength,i=null!==t.match(this.validationPattern);this.isValid=e&&i}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t;if(null!==this.code.join("").match(this.validationPattern))this.errorMessage="";else{const e=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey;e&&(this.errorMessage=n(e,this.language))}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"45f0c8c7d88898a5474bff460ce962e8bb1e8634",class:"twofa",ref:t=>this.stylingContainer=t},i("div",{key:"b40e81587ad9c7b67c112c8867104e761db7e3bc",class:"twofa__error-message"},i("p",{key:"760c694f6f71f040e85f81a67d3d41524c23130f"},this.errorMessage)),i("div",{key:"2b437a5108e3989d2ddf596dc4a97d2071448154",class:"twofa__description",innerHTML:n("twofaDescription",this.language,{values:{destination:this.destination}})}),i("div",{key:"84df3ebbe4077ba8462c08cc7956349ec4a55b79",class:"twofa__input-wrapper",ref:this.setContainerRef},this.code.map(((t,e)=>i("input",{key:e,ref:t=>this.setInputRef(t,e),id:`otp-input-${e}`,type:"text",maxLength:2,value:t,onInput:t=>this.handleInput(t,e),onKeyDown:t=>this.handleKeyDown(t,e),onPaste:t=>this.handlePaste(t)})))),i("div",{key:"abdf6e2a3ff7ef6436b59206c40ada5305543db3",class:"twofa__button-wrapper"},i("p",{key:"e0859c58e48741eb379fbcaf23519bb90404489b",class:"twofa__resend-message"},n("twofaResendMessage",this.language)),i("button",{key:"89aa3a93a9b97029fd315450892cef5edd5d5294",class:"twofa__resend-button",onClick:this.resendCodeHandler,disabled:!this.isResendButtonAvailable},this.isResendButtonAvailable?n("twofaResendButton",this.language):this.formatTime())))}get host(){return s(this)}static get watchers(){return{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],clientStylingUrl:["handleStylingUrlChange"]}}};bc.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.twofa{display:flex;flex-direction:column;gap:10px}.twofa__description{display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center}.twofa__error-message{text-align:center;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.twofa__input-wrapper{display:flex;justify-content:center}.twofa__input-wrapper input{width:35px;height:35px;padding:10px;text-align:center;border-radius:var(--emw--border-radius-small, 5px);margin-left:5px;margin-right:5px;border:2px solid var(--emw--otp-border-color, #55525c);font-weight:var(--emw-font-weight-bold, 800);outline:none;transition:all 0.1s}.twofa__input-wrapper input:focus{border:2px solid var(--emw--color-primary, #22B04E);box-shadow:0 0 2px 2px var(--emw--color-primary, #22B04E)}.twofa__button-wrapper{justify-content:center;text-align:center}.twofa__button-wrapper button{border:none;background:none;font-weight:var(--emw-font-weight-bold, 800);color:var(--emw--color-primary, #22B04E);cursor:pointer}";export{l as checkbox_group_input,h as checkbox_input,Ke as date_input,Qe as email_input,lc as general_input,hc as number_input,dc as password_input,cc as postalcode_input,uc as radio_input,pc as select_input,mc as tel_input,vc as text_input,fc as toggle_checkbox_input,bc as twofa_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as l}from"./index-ca174b7a.js";export{s as setNonce}from"./index-ca174b7a.js";import{g as i}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((async e=>(await i(),l([["checkbox-group-input_14",[[1,"general-input",{type:[513],name:[513],displayName:[513,"display-name"],placeholder:[513],action:[513],validation:[16],options:[520],language:[513],autofilled:[516],tooltip:[513],defaultValue:[520,"default-value"],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],hidePasswordComplexity:[516,"hide-password-complexity"],noValidation:[516,"no-validation"],clientStyling:[520,"client-styling"],dateFormat:[513,"date-format"],translationUrl:[513,"translation-url"],emitOnClick:[516,"emit-on-click"],twofaDestination:[513,"twofa-destination"],twofaResendIntervalSeconds:[514,"twofa-resend-interval-seconds"],haspostalcodelookup:[516],postalcodelength:[514],addresses:[520],ignoreCountry:[516,"ignore-country"]}],[1,"toggle-checkbox-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],options:[16],autofilled:[516],tooltip:[513],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32],showFields:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"]}],[1,"checkbox-group-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],options:[16],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32],selectedValues:[32],showCheckboxes:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}],[1,"checkbox-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"date-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],dateFormat:[513,"date-format"],emitOnClick:[516,"emit-on-click"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"email-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[10,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"number-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"password-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],validation:[16],noValidation:[516,"no-validation"],language:[513],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],hidePasswordComplexity:[516,"hide-password-complexity"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32],passwordComplexity:[32],showPopup:[32],value:[32]},[[16,"sendOriginalValidityState","originalValidityChangedHandler"],[16,"sendInputValue","valueChangedHandler"],[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}],[1,"postalcode-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],postalcodelength:[520],addresses:[520],ignoreCountry:[516,"ignore-country"],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32],selectedCountryCode:[32],currentPostalCode:[32],openAddressDropdown:[32],showNoResultsMessage:[32],refreshTrigger:[32],isFetchingAddresses:[32]},[[10,"click","handleClickOutside"],[8,"countryCodeUpdated","handleCountryCodeUpdate"],[8,"addressFetchStarted","handleFetchStarted"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],addresses:["handleAddresses"]}],[1,"radio-input",{name:[513],displayName:[513,"display-name"],optionsGroup:[16],validation:[16],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"select-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],action:[513],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],options:[16],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"tel-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],showLabels:[516,"show-labels"],action:[513],validation:[16],defaultValue:[520,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32],disablePhonePrefix:[32],phoneValue:[32],phoneCodesOptions:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"text-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],checkValidity:[516,"check-validity"],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],haspostalcodelookup:[516],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32],selectedCountryCode:[32]},[[10,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"],[16,"validationChange","handleValidationChange"],[8,"countryCodeUpdated","handleCountryCodeUpdate"],[16,"sendAddressValue","handleAddressSelection"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"twofa-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],tooltip:[513],language:[513],emitValue:[516,"emit-value"],destination:[513],resendIntervalSeconds:[514,"resend-interval-seconds"],clientStyling:[513,"client-styling"],limitStylingAppends:[32],isValid:[32],isResendButtonAvailable:[32],showTooltip:[32],errorMessage:[32],code:[32],resendIntervalSecondsLeft:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}]]]],e))));
|
|
1
|
+
import{p as e,b as l}from"./index-ca174b7a.js";export{s as setNonce}from"./index-ca174b7a.js";import{g as i}from"./app-globals-0f993ce5.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((async e=>(await i(),l([["checkbox-group-input_14",[[1,"general-input",{type:[513],name:[513],displayName:[513,"display-name"],placeholder:[513],action:[513],validation:[16],options:[520],language:[513],autofilled:[516],tooltip:[513],defaultValue:[520,"default-value"],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],hidePasswordComplexity:[516,"hide-password-complexity"],noValidation:[516,"no-validation"],clientStyling:[520,"client-styling"],clientStylingUrl:[513,"client-styling-url"],dateFormat:[513,"date-format"],translationUrl:[513,"translation-url"],emitOnClick:[516,"emit-on-click"],twofaDestination:[513,"twofa-destination"],twofaResendIntervalSeconds:[514,"twofa-resend-interval-seconds"],haspostalcodelookup:[516],postalcodelength:[514],addresses:[520],ignoreCountry:[516,"ignore-country"],mbSource:[513,"mb-source"],limitStylingAppends:[32]},null,{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}],[1,"toggle-checkbox-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],options:[16],autofilled:[516],tooltip:[513],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32],showFields:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"]}],[1,"checkbox-group-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],options:[16],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32],selectedValues:[32],showCheckboxes:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}],[1,"checkbox-input",{name:[513],displayName:[513,"display-name"],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"date-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],dateFormat:[513,"date-format"],emitOnClick:[516,"emit-on-click"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"email-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[10,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"number-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"password-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],validation:[16],noValidation:[516,"no-validation"],language:[513],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],hidePasswordComplexity:[516,"hide-password-complexity"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32],passwordComplexity:[32],showPopup:[32],value:[32]},[[16,"sendOriginalValidityState","originalValidityChangedHandler"],[16,"sendInputValue","valueChangedHandler"],[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}],[1,"postalcode-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],postalcodelength:[520],addresses:[520],ignoreCountry:[516,"ignore-country"],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32],selectedCountryCode:[32],currentPostalCode:[32],openAddressDropdown:[32],showNoResultsMessage:[32],refreshTrigger:[32],isFetchingAddresses:[32]},[[10,"click","handleClickOutside"],[8,"countryCodeUpdated","handleCountryCodeUpdate"],[8,"addressFetchStarted","handleFetchStarted"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],addresses:["handleAddresses"]}],[1,"radio-input",{name:[513],displayName:[513,"display-name"],optionsGroup:[16],validation:[16],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"select-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],action:[513],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],options:[16],validation:[16],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],errorMessage:[32],isValid:[32],limitStylingAppends:[32],showTooltip:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"tel-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],showLabels:[516,"show-labels"],action:[513],validation:[16],defaultValue:[520,"default-value"],autofilled:[516],tooltip:[513],language:[513],emitValue:[516,"emit-value"],clientStyling:[513,"client-styling"],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32],disablePhonePrefix:[32],phoneValue:[32],phoneCodesOptions:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"text-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],defaultValue:[513,"default-value"],autofilled:[516],tooltip:[513],language:[513],checkValidity:[516,"check-validity"],emitValue:[516,"emit-value"],isDuplicateInput:[516,"is-duplicate-input"],clientStyling:[513,"client-styling"],haspostalcodelookup:[516],isValid:[32],errorMessage:[32],limitStylingAppends:[32],showTooltip:[32],selectedCountryCode:[32]},[[10,"click","handleClickOutside"],[16,"sendInputValue","valueChangedHandler"],[16,"validationChange","handleValidationChange"],[8,"countryCodeUpdated","handleCountryCodeUpdate"],[16,"sendAddressValue","handleAddressSelection"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"]}],[1,"twofa-input",{name:[513],displayName:[513,"display-name"],placeholder:[513],validation:[16],tooltip:[513],language:[513],emitValue:[516,"emit-value"],destination:[513],resendIntervalSeconds:[514,"resend-interval-seconds"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],mbSource:[513,"mb-source"],limitStylingAppends:[32],isValid:[32],isResendButtonAvailable:[32],showTooltip:[32],errorMessage:[32],code:[32],resendIntervalSecondsLeft:[32]},[[10,"click","handleClickOutside"]],{clientStyling:["handleStylingChange"],isValid:["validityChanged"],emitValue:["emitValueHandler"],clientStylingUrl:["handleStylingUrlChange"]}]]]],e))));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
1
2
|
import type { ValidationSchema } from '../../utils/types';
|
|
2
3
|
import "../../../../../../dist/libs/vaadin-facade/index";
|
|
3
4
|
export declare class GeneralInput {
|
|
@@ -65,6 +66,10 @@ export declare class GeneralInput {
|
|
|
65
66
|
* Client custom styling via inline style
|
|
66
67
|
*/
|
|
67
68
|
clientStyling: any;
|
|
69
|
+
/**
|
|
70
|
+
* Client custom styling via url
|
|
71
|
+
*/
|
|
72
|
+
clientStylingUrl: string;
|
|
68
73
|
/**
|
|
69
74
|
* Date format for date picker.
|
|
70
75
|
*/
|
|
@@ -101,7 +106,22 @@ export declare class GeneralInput {
|
|
|
101
106
|
* For cases where the country field is not included in the register form
|
|
102
107
|
*/
|
|
103
108
|
ignoreCountry: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Client custom styling via message bus
|
|
111
|
+
*/
|
|
112
|
+
mbSource: string;
|
|
113
|
+
limitStylingAppends: boolean;
|
|
114
|
+
registrationWidgetLoaded: EventEmitter;
|
|
115
|
+
host: HTMLElement;
|
|
116
|
+
private stylingSubscription;
|
|
117
|
+
handleStylingChange(newValue: string, oldValue: string): void;
|
|
118
|
+
handleStylingUrlChange(newValue: string, oldValue: string): void;
|
|
104
119
|
connectedCallback(): void;
|
|
120
|
+
disconnectedCallback(): void;
|
|
121
|
+
setClientStyling: () => void;
|
|
122
|
+
setStreamStyling: (domain: any) => void;
|
|
123
|
+
setClientStylingURL: () => void;
|
|
124
|
+
componentDidLoad(): void;
|
|
105
125
|
handleClick: (event: MouseEvent) => void;
|
|
106
126
|
renderInput(): any;
|
|
107
127
|
render(): any;
|
|
@@ -41,6 +41,14 @@ export declare class TwofaInput {
|
|
|
41
41
|
* Client custom styling via inline style
|
|
42
42
|
*/
|
|
43
43
|
clientStyling: string;
|
|
44
|
+
/**
|
|
45
|
+
* Client custom styling via url
|
|
46
|
+
*/
|
|
47
|
+
clientStylingUrl: string;
|
|
48
|
+
/**
|
|
49
|
+
* Client custom styling via message bus
|
|
50
|
+
*/
|
|
51
|
+
mbSource: string;
|
|
44
52
|
private limitStylingAppends;
|
|
45
53
|
isValid: boolean;
|
|
46
54
|
isResendButtonAvailable: boolean;
|
|
@@ -48,6 +56,9 @@ export declare class TwofaInput {
|
|
|
48
56
|
errorMessage: string;
|
|
49
57
|
code: string[];
|
|
50
58
|
resendIntervalSecondsLeft: number;
|
|
59
|
+
registrationWidgetLoaded: EventEmitter;
|
|
60
|
+
host: HTMLElement;
|
|
61
|
+
private stylingSubscription;
|
|
51
62
|
private validationPattern;
|
|
52
63
|
private stylingContainer;
|
|
53
64
|
private tooltipReference;
|
|
@@ -58,6 +69,7 @@ export declare class TwofaInput {
|
|
|
58
69
|
handleStylingChange(newValue: string, oldValue: string): void;
|
|
59
70
|
validityChanged(): void;
|
|
60
71
|
emitValueHandler(newValue: boolean): void;
|
|
72
|
+
handleStylingUrlChange(newValue: string, oldValue: string): void;
|
|
61
73
|
sendValidityState: EventEmitter<InputStateEvent>;
|
|
62
74
|
validityStateHandler(inputStateEvent: InputStateEvent): void;
|
|
63
75
|
sendInputValue: EventEmitter<InputValueEvent>;
|
|
@@ -66,8 +78,10 @@ export declare class TwofaInput {
|
|
|
66
78
|
resendCodeHandler: () => void;
|
|
67
79
|
handleClickOutside(event: MouseEvent): void;
|
|
68
80
|
connectedCallback(): void;
|
|
81
|
+
disconnectedCallback(): void;
|
|
69
82
|
componentDidRender(): void;
|
|
70
83
|
componentDidLoad(): void;
|
|
84
|
+
setClientStylingURL: () => void;
|
|
71
85
|
setInputRef: (el: HTMLInputElement, idx: number) => void;
|
|
72
86
|
setContainerRef: (el: HTMLDivElement) => void;
|
|
73
87
|
triggerResendInterval: () => void;
|
|
@@ -79,6 +93,7 @@ export declare class TwofaInput {
|
|
|
79
93
|
setPattern(): string;
|
|
80
94
|
setErrorMessage(): void;
|
|
81
95
|
setClientStyling: () => void;
|
|
96
|
+
setStreamStyling: (domain: any) => void;
|
|
82
97
|
renderTooltip(): any;
|
|
83
98
|
render(): any;
|
|
84
99
|
}
|