System.register(["./p-641f968d.system.js","./p-1a673057.system.js","./p-8a6494c7.system.js","./p-7562cd98.system.js"],(function(r){"use strict";var e,t,i,a,o,s,l,n;return{setters:[function(r){e=r.h},function(r){t=r.c},function(r){i=r.A;a=r.a;o=r.H;s=r.b;l=r.E},function(r){n=r.T}],execute:function(){r("P",p);var d={Wrapper:i,Column:a,HostBlock:o,":host":{margin:"0 auto",width:"100%"},ButtonsContainer:s,ErrorStyle:l};var u="\nsqm-portal-register {\n  margin: 0 auto;\n  width: 100%;\n  display: block;\n}\n\n:host{\n  display: block;\n}\n\n:host([hidden]) {\n  display: none;\n}\n";var m=t(d);var v=m.toString();function p(r){var t,i,a,o,s,l,d,p,c,b,g,f,x,E,y,w,h,S,F,T;var q=r.states,P=r.refs,M=r.callbacks,j=r.content;if(q.error){window.scrollTo({top:0,left:0,behavior:"smooth"})}return e("div",{class:m.classes.Wrapper,part:"sqm-base"},e("style",{type:"text/css"},u,v),e(n,{type:"h3"},j.pageLabel),e("sl-form",{class:m.classes.Column,"onSl-submit":M.submit,ref:function(r){return P.formRef.current=r},novalidate:true},((t=q.registrationFormState)===null||t===void 0?void 0:t.disabled)?e("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},e("div",{part:"erroralert-text"},q.registrationFormState.disabledMessage)):q.error&&e("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},e("div",{part:"erroralert-text"},r.states.error)),j.formData,!q.hideInputs&&e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"email",name:"/email",label:j.emailLabel||"Email",disabled:q.loading||((i=q.registrationFormState)===null||i===void 0?void 0:i.disabled)||q.emailDisabled,required:true,validationError:function(r){var e=r.value;if(!e){return j.requiredFieldErrorMessage}if(!e.includes("@")){return j.invalidEmailErrorMessage}}},((o=(a=q.registrationFormState)===null||a===void 0?void 0:a.initialData)===null||o===void 0?void 0:o.email)?{value:(l=(s=q.registrationFormState)===null||s===void 0?void 0:s.initialData)===null||l===void 0?void 0:l.email}:{},((p=(d=q.registrationFormState)===null||d===void 0?void 0:d.validationErrors)===null||p===void 0?void 0:p.email)?{class:m.classes.ErrorStyle,helpText:((b=(c=q.registrationFormState)===null||c===void 0?void 0:c.validationErrors)===null||b===void 0?void 0:b.email)||j.requiredFieldErrorMessage}:[])),!(q.hideInputs||q.hidePasswords)&&e("sqm-password-field",{fieldLabel:j.passwordLabel,"disable-validation":!q.enablePasswordValidation,meetsRequirementsText:j.meetsRequirementsText,doesNotMeetRequirementsText:j.doesNotMeetRequirementsText,minErrorText:j.minErrorText,uppercaseErrorText:j.uppercaseErrorText,lowercaseErrorText:j.lowercaseErrorText,hasErrorText:j.hasErrorText}),j.passwordField,!(q.hideInputs||q.hidePasswords)&&q.confirmPassword&&e("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"password",name:"/confirmPassword",label:j.confirmPasswordLabel,disabled:q.loading||((g=q.registrationFormState)===null||g===void 0?void 0:g.disabled),required:true},((x=(f=q.registrationFormState)===null||f===void 0?void 0:f.initialData)===null||x===void 0?void 0:x.confirmPassword)?{value:(y=(E=q.registrationFormState)===null||E===void 0?void 0:E.initialData)===null||y===void 0?void 0:y.confirmPassword}:{},((h=(w=q.registrationFormState)===null||w===void 0?void 0:w.validationErrors)===null||h===void 0?void 0:h.confirmPassword)?{class:m.classes.ErrorStyle,helpText:((F=(S=q.registrationFormState)===null||S===void 0?void 0:S.validationErrors)===null||F===void 0?void 0:F.confirmPassword)||j.requiredFieldErrorMessage}:[])),j.emailOptIn,j.terms,e("div",{class:m.classes.ButtonsContainer},e("sl-button",{submit:true,loading:q.loading,disabled:(T=q.registrationFormState)===null||T===void 0?void 0:T.disabled,exportparts:"base: primarybutton-base",type:"primary"},j.submitLabel||"Register"),j.secondaryButton)))}}}}));