{"version":3,"file":"ThentyForm.t1hgULyi.mjs","names":["useRef","useState","useRef","textOptions","useRef","useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/e61m4Fbk5eP9eHvcc7Z8/H9AcDGcCkQB5BUQZdxUl/SubmitButton.js","https:/framerusercontent.com/modules/qERhjgPA4cB5k1EvYnU6/jP9hO16IwQv4zVHfJYdW/ThentyErrorMessage.js","https:/framerusercontent.com/modules/qWJhxYMaYl3NiGIZjw7a/hvyYHyyN5exkpGRJWsU5/ThentyForm.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,useRef}from\"react\";import{FormState,Events,StandardButton,standardButtonPropertyControls,useThentyForm}from\"https://framerusercontent.com/modules/diyk5889JEo4mM5y5sJr/k488EAt1FhWtVFD0n6vD/ThentyShared.js\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 300\n * @framerDisableUnlink\n */export default function SubmitButton(props){const{defaultText,successText,errorText,successEvent,errorEvent,loadingEvent}=props;const ref=useRef(null);const[loading,setLoading]=useState(false);const{formState,setFormState,fireFormEvent}=useThentyForm(ref);useEffect(()=>{switch(formState){case FormState.Success:successEvent?.();setLoading(false);break;case FormState.Error:errorEvent?.();setLoading(false);break;case FormState.Loading:loadingEvent?.();setLoading(true);break;}},[formState]);const onClick=()=>{fireFormEvent(Events.SubmitButtonClick);};return /*#__PURE__*/_jsx(StandardButton,{ref:ref,...props,loading:loading,\"data-thenty-submit-button\":true,onClick:onClick,\"data-no-enter-focus\":true,children:formState===FormState.Success?successText||defaultText:formState===FormState.Error?errorText||defaultText:defaultText});}SubmitButton.displayName=\"Thenty Submit Button\";addPropertyControls(SubmitButton,{defaultText:{type:ControlType.String,placeholder:\"Button Text\",defaultValue:\"Submit\",title:\"Default\"},successText:{type:ControlType.String,placeholder:\"Success Text\",defaultValue:\"Success!\",title:\"Success\"},errorText:{type:ControlType.String,placeholder:\"Error Text\",defaultValue:\"Error\",title:\"Error\"},...standardButtonPropertyControls({defaultColor:\"#FFFFFF\",defaultFill:\"#0075FF\",defaultHoverFill:\"#1A81FF\",hasDefaultBorder:false,loadingSpinner:true}),successEvent:{type:ControlType.EventHandler,title:\"Success\"},errorEvent:{type:ControlType.EventHandler,title:\"Error\"},loadingEvent:{type:ControlType.EventHandler,title:\"Loading\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SubmitButton\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"300\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget,withCSS}from\"framer\";import{useRef}from\"react\";import{textOptions,textOptionsToStyles,useThentyForm}from\"https://framerusercontent.com/modules/diyk5889JEo4mM5y5sJr/k488EAt1FhWtVFD0n6vD/ThentyShared.js\";const CANVAS_HIDDEN_CLASS_NAME=\"thenty-error-canvas-hidden\";const HIDDEN_CLASS_NAME=\"thenty-error-hidden\";function ThentyFormErrorMessageComponent(props){const{font,color,prefix,suffix,style,textOptions}=props;const Tag=props.tag||\"p\";const isCanvas=RenderTarget.current()===RenderTarget.canvas;const ref=useRef(null);const{formError}=useThentyForm(ref);let className=\"\";if(isCanvas){className=CANVAS_HIDDEN_CLASS_NAME;}else if(!formError){className=HIDDEN_CLASS_NAME;}return /*#__PURE__*/_jsxs(Tag,{ref:ref,className:className,style:{color,margin:0,whiteSpace:style?.width?undefined:\"nowrap\",fontWeight:400,textAlign:\"center\",...textOptionsToStyles(textOptions),...font,...style},children:[prefix,isCanvas?\"Error message\":formError,suffix]});}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 300\n * @framerDisableUnlink\n */const ThentyFormErrorMessage=withCSS(ThentyFormErrorMessageComponent,[`[data-framer-component-container=\"true\"] div:has(> .${CANVAS_HIDDEN_CLASS_NAME}) { display: none !important; }`,`div:has(> .${HIDDEN_CLASS_NAME}) { display: none !important; }`,`.${HIDDEN_CLASS_NAME} { display: none !important; }`],\"\");export default ThentyFormErrorMessage;ThentyFormErrorMessage.displayName=\"Thenty Error Message\";addPropertyControls(ThentyFormErrorMessage,{font:{type:\"font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:12,lineHeight:1.4,textAlign:\"center\"}},color:{type:ControlType.Color,defaultValue:\"#FF5A6F\"},prefix:{type:ControlType.String,defaultValue:\"\"},suffix:{type:ControlType.String,defaultValue:\"\"},textOptions:textOptions()});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ThentyFormErrorMessage\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicWidth\":\"300\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget,Link}from\"framer\";import{useRef,useEffect,useState}from\"react\";import{HiddenComponentLabel,FormState,Events,ThentyLogo,useThentyForm,useThenty,GoogleProductStateKey}from\"https://framerusercontent.com/modules/diyk5889JEo4mM5y5sJr/k488EAt1FhWtVFD0n6vD/ThentyShared.js\";import{thentyAuth}from\"https://cdn.thenty.io/beta/thenty-sdk.min.js\";const formInputNames=[\"email_address\",\"password\",\"name\",\"conditions\"];const updateProfilePrefillInputs=[\"email_address\",\"name\"];var FormType;(function(FormType){FormType[\"SignUp\"]=\"signUp\";FormType[\"LogIn\"]=\"logIn\";FormType[\"ForgotPassword\"]=\"forgotPassword\";FormType[\"UpdateProfile\"]=\"updateProfile\";FormType[\"UpdatePassword\"]=\"updatePassword\";FormType[\"AcceptInvite\"]=\"acceptInvite\";})(FormType||(FormType={}));const FORM_TYPE_NAME={[\"signUp\"]:\"Sign Up\",[\"logIn\"]:\"Log In\",[\"forgotPassword\"]:\"Forgot Password\",[\"updateProfile\"]:\"Update Profile\",[\"updatePassword\"]:\"Update Password\",[\"acceptInvite\"]:\"Accept Invite\"};/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerDisableUnlink\n */export default function ThentyForm({formType,productId,redirectLink,redirectDelay,prefillUrlParameters,successEvent,errorEvent,loadingEvent}){const isCanvas=RenderTarget.current()===RenderTarget.canvas;const ref=useRef(null);const redirectLinkRef=useRef(null);const[redirectHref,setRedirectHref]=useState(redirectLink);const{formRef,setFormState,fireFormEvent}=useThentyForm(ref);const{authorization}=useThenty();const onError=error=>{setFormState(FormState.Error);if(typeof error===\"string\"){fireFormEvent(Events.Error,error);}else if(error instanceof Error){fireFormEvent(Events.Error,error.message);}errorEvent?.();};useEffect(()=>{const onSubmitButtonClick=async()=>{const form=formRef.current;if(!form){return;}const formData=collectFormData(form);setFormState(FormState.Loading);loadingEvent?.();let endpoint=\"\";let data=formData;let method=\"POST\";let updateAuthorization=false;let authValue=undefined;switch(formType){case\"signUp\":endpoint=`/auth/members/register`;data={...data,...getThentyFetchData(productId)};updateAuthorization=true;break;case\"logIn\":endpoint=`/auth/members/login`;updateAuthorization=true;break;case\"forgotPassword\":endpoint=`/auth/members/reset`;break;case\"updateProfile\":endpoint=`/members/${authorization?.member?.id}`;method=\"PUT\";authValue=authorization?.authorization?.key;if(!data.hasOwnProperty(\"email_address\")&&authorization?.member?.email){data={...data,email_address:authorization.member.email};}break;case\"updatePassword\":case\"acceptInvite\":const url=window?.location?new URL(window.location.toString()):null;const token=url?.searchParams?.get(\"token\");endpoint=`/auth/members/password/${token}`;method=\"PUT\";break;}if(endpoint){try{const responseBody=await thentyAuth.fetchGeneric(endpoint,method,data,authValue);if(updateAuthorization){thentyAuth.setAuthorization(responseBody);}setFormState(FormState.Success);successEvent?.();let hasRedirect=redirectLink?true:false;const responseRedirectUrl=responseBody?.redirect_url;if(responseRedirectUrl&&!hasRedirect){const relativePath=getRelativePath(responseRedirectUrl);setRedirectHref(relativePath);hasRedirect=true;}if(hasRedirect&&redirectLinkRef.current){setTimeout(()=>{if(redirectLinkRef.current){redirectLinkRef.current.click();}},Math.max(redirectDelay*1e3,100));}}catch(error){onError(error);}}};const onGoogleSignIn=async()=>{try{const responseBody=await thentyAuth.fetchGeneric(`/oauth/members/code/google`,\"POST\",getThentyFetchData(productId));if(productId&&localStorage){localStorage.setItem(GoogleProductStateKey,productId);}if(responseBody.redirect_url){window.open(toURLPath(responseBody.redirect_url),\"_self\");}}catch(error){onError(error);}};const handleEnterKey=e=>{if(e.key===\"Enter\"&&e.target.tagName!==\"TEXTAREA\"){e.preventDefault();const form=formRef.current;if(!form)return;const inputs=getInputsInForm(form);const currentIndex=inputs.indexOf(e.target);if(currentIndex===inputs.length-1){// If on last input, submit the form\nfireFormEvent(Events.SubmitButtonClick);}else if(currentIndex!==-1){// Focus next input\ninputs[currentIndex+1].focus();}}};if(ref.current){const form=ref.current.parentElement.parentElement;if(form){form.setAttribute(\"data-thenty-form\",\"true\");formRef.current=form;window.dispatchEvent(new Event(Events.FormInitialized));// Add keypress event listener\nform.addEventListener(\"keydown\",handleEnterKey);// Check URL parameters for prefill values\nif(prefillUrlParameters){const urlParams=new URLSearchParams(window?.location?.search);const nameParam=urlParams.get(prefillUrlParameters.name);if(nameParam){prefillInput(form,\"name\",nameParam);}const emailParam=urlParams.get(prefillUrlParameters.email);if(emailParam){prefillInput(form,\"email_address\",emailParam);}}form.addEventListener(Events.SubmitButtonClick,onSubmitButtonClick);form.addEventListener(Events.GoogleSignIn,onGoogleSignIn);// Pre-fill update profile fields\nif(formType===\"updateProfile\"&&!isCanvas){if(authorization?.member){setFormState(FormState.Default);for(const[key,value]of Object.entries(authorization.member)){if(updateProfilePrefillInputs.includes(key)||key.startsWith(\"custom:\")){prefillInput(form,key,value);}// Legacy fix for cognito change\nif(key===\"email\"){prefillInput(form,\"email_address\",value);}}}}}}return()=>{if(formRef.current){formRef.current.removeEventListener(Events.SubmitButtonClick,onSubmitButtonClick);formRef.current.removeEventListener(Events.GoogleSignIn,onGoogleSignIn);formRef.current.removeEventListener(\"keydown\",handleEnterKey);}};},[]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(HiddenComponentLabel,{ref:ref,\"data-thenty-form-manager\":true,children:[/*#__PURE__*/_jsx(ThentyLogo,{}),/*#__PURE__*/_jsxs(\"span\",{children:[FORM_TYPE_NAME[formType],\" Form\"]})]}),/*#__PURE__*/_jsx(Link,{ref:redirectLinkRef,href:redirectHref,openInNewTab:false,smoothScroll:false,children:/*#__PURE__*/_jsx(\"a\",{style:{display:\"none\"}})})]});}ThentyForm.displayName=\"Thenty Form Manager\";addPropertyControls(ThentyForm,{formType:{type:ControlType.Enum,defaultValue:\"signUp\",options:Object.keys(FORM_TYPE_NAME),optionTitles:Object.values(FORM_TYPE_NAME),displaySegmentedControl:true,segmentedControlDirection:\"vertical\"},productId:{type:ControlType.String,defaultValue:\"\",placeholder:\"Thenty Product ID\",title:\"Product ID\",hidden:props=>props.formType!==\"signUp\"},redirectLink:{type:ControlType.Link,title:\"Redirect Override\",description:\"Note: This will override the redirect URL returned from thenty including stripe checkout links\"},redirectDelay:{type:ControlType.Number,defaultValue:0,min:0,step:.1,displayStepper:true,title:\"Delay\"},prefillUrlParameters:{type:ControlType.Object,optional:true,defaultValue:{name:\"name\",email:\"email_address\"},title:\"Prefill\",controls:{name:{type:ControlType.String,defaultValue:\"name\",title:\"Name\"},email:{type:ControlType.String,defaultValue:\"email_address\",title:\"Email\",description:\"Prefill the name and email fields with URL parameters.\"}}},successEvent:{type:ControlType.EventHandler,title:\"Success\"},errorEvent:{type:ControlType.EventHandler,title:\"Error\"},loadingEvent:{type:ControlType.EventHandler,title:\"Loading\"}});function collectFormData(form){const data={};const inputs=form.querySelectorAll(\"input, textarea, select\");let isValid=true;let errorMessage=\"\";for(let i=0;i<inputs.length;i++){const input=inputs[i];if(input&&input.name&&!input.disabled&&input.type!==\"submit\"&&input.type!==\"button\"&&(formInputNames.includes(input.name)||input.name.startsWith(\"custom:\")||input.hasAttribute(\"required\"))){// Check if the field is required and empty\nif(input.hasAttribute(\"required\")&&!input.value.trim()){isValid=false;errorMessage=`${input.name} is required.`;input.focus();input.setCustomValidity(\"Please fill out this field.\");input.reportValidity();break;}else{input.setCustomValidity(\"\");}// Validate email address\nif(input.name===\"email_address\"&&input.value.trim()){if(!isValidEmail(input.value.trim())){isValid=false;errorMessage=\"Please enter a valid email address.\";input.focus();input.setCustomValidity(\"Please enter a valid email address.\");input.reportValidity();break;}}if(input.type===\"checkbox\"||input.type===\"radio\"){// For checkboxes and radio buttons, only include if checked\nif(input.checked){data[input.name]=input.value;}}else{// For all other inputs (text, number, etc.), add the value directly\ndata[input.name]=input.value;}}}return data;}function getThentyFetchData(productId){const urlParams=new URLSearchParams(window?.location?.search);const planId=urlParams?.get(\"planID\");const rewardfulReferral=window?.Rewardful?.referral;const promotekitReferral=window?.promotekit_referral;return{...productId?{planIdOverride:productId}:{},...planId&&{planIdOverride:planId},...rewardfulReferral&&{rewardfulReferral},...promotekitReferral&&{promotekitReferral}};}function prefillInput(form,inputName,value){const input=form.querySelector(`\n\t\tinput[name=\"${inputName}\" i]:not([data-framerforms-no-prefill]),\n\t\tselect[name=\"${inputName}\" i]:not([data-framerforms-no-prefill]),\n\t\ttextarea[name=\"${inputName}\" i]:not([data-framerforms-no-prefill])`);if(input){if(input.tagName==\"INPUT\"&&input.getAttribute(\"type\")==\"hidden\"){if(input.hasAttribute(\"data-framerforms-set-value-event\")){input.dispatchEvent(new CustomEvent(\"framerFormsSetValue\",{bubbles:true,detail:value}));}}else{const elementType=input.tagName==\"INPUT\"?window.HTMLInputElement:input.tagName==\"TEXTAREA\"?window.HTMLTextAreaElement:input.tagName==\"SELECT\"?window.HTMLSelectElement:null;if(elementType){const nativeInputValueSetter=Object.getOwnPropertyDescriptor(elementType.prototype,\"value\").set;nativeInputValueSetter.call(input,value);input.dispatchEvent(new Event(\"input\",{bubbles:true}));}else{input.value=value;}}}}const getRelativePath=url=>{if(typeof window===\"undefined\"){return url;}// If it's already a relative path starting with '/', return it as is\nif(url.startsWith(\"/\")){return thentyAuth.assessPathForAccess(url);}// If it's an absolute URL, check if it's on the same domain\nif(url.startsWith(\"http\")){try{const urlObj=new URL(url);const currentDomain=window.location.origin;if(urlObj.origin===currentDomain){return thentyAuth.assessPathForAccess(urlObj.pathname,urlObj.search+urlObj.hash);}return url;}catch(e){// If URL is invalid, return the original input\nreturn url;}}// For any other case, add a leading '/'\nreturn thentyAuth.assessPathForAccess(url);};const toURLPath=url=>{if(url.startsWith(\"http\")){return url;}if(url.startsWith(\"/\")){return url;}return`/${url}`;};function getInputsInForm(form){return Array.from(form.querySelectorAll(`input:not([type=\"hidden\"]):not([disabled]):not([name=\"\"]):not([tabindex=\"-1\"]):not([data-framerforms-set-value-event]),\n\t\t\ttextarea:not([disabled]):not([name=\"\"]):not([tabindex=\"-1\"]),\n\t\t\tselect:not([disabled]):not([name=\"\"]):not([tabindex=\"-1\"]),\n\t\t\tbutton:not([disabled]):not([tabindex=\"-1\"]):not([data-no-enter-focus])`)).filter(el=>window.getComputedStyle(el).display!==\"none\");}function isValidEmail(email){// Regular expression pattern for email validation\nconst emailRegex=/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;// Test the email against the regex pattern\nreturn emailRegex.test(email);}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ThentyForm\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__Framer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