{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/6EnCE2gJgg3FqUtuFmSi/nZuhLCf0e4pm6mpMt23D/Marketoform.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,useRef}from\"react\";import{SettingsMessage}from\"https://framer.com/m/Utils-QTIc.js@PVRWqcAS5FromVQ03eYl\";export default function MarketoForm(props){const{embed,style}=props;const[isEmbedValid,setIsEmbedValid]=useState(false);const[formId,setFormId]=useState(null);const[isLoading,setIsLoading]=useState(true);const scriptRef=useRef(null);const formLoadedRef=useRef(false);if(!embed||embed.length===0){return /*#__PURE__*/_jsx(SettingsMessage,{title:\"Marketo Embed Component\",description:\"Enter the Marketo Embed Code here\",containerStyle:style});}useEffect(()=>{setIsLoading(true);formLoadedRef.current=false// Reset on each embed change\n;const embedRegex=/MktoForms2\\.loadForm\\(\"(.+?)\", \"(.+?)\", (\\d+)(?:, .+?)?\\);/;const embedMatch=embed.match(embedRegex);if(!embedMatch){setIsEmbedValid(false);setIsLoading(false);return;}const[,link,value,id]=embedMatch;const newFormId=`mktoForm_${id}`;setFormId(newFormId);const embedFirstLine=`<script src=\"${link}/js/forms2/js/forms2.min.js\"></script>`;const isValidEmbed=embed.startsWith(embedFirstLine)&&value&&id&&link;setIsEmbedValid(isValidEmbed);if(isValidEmbed){const loadForm=()=>{const existingForm=document.getElementById(newFormId);if(existingForm){existingForm.innerHTML=\"\";}if(!formLoadedRef.current&&window.MktoForms2){window.MktoForms2.loadForm(link,value,id);formLoadedRef.current=true;}};if(!scriptRef.current){const newScript=document.createElement(\"script\");newScript.src=`${link}/js/forms2/js/forms2.min.js`;newScript.async=true;newScript.onload=loadForm;document.body.appendChild(newScript);scriptRef.current=newScript;}else{if(window.MktoForms2){loadForm();}}}setIsLoading(false);return()=>{if(scriptRef.current){try{document.body.removeChild(scriptRef.current);scriptRef.current=null;}catch(error){console.error(\"Error removing script:\",error);}}const existingForm=document.getElementById(newFormId);if(existingForm){existingForm.innerHTML=\"\";}formLoadedRef.current=false;};},[embed]);return /*#__PURE__*/_jsx(_Fragment,{children:isLoading?/*#__PURE__*/_jsx(_Fragment,{}):isEmbedValid?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:customCSS}),/*#__PURE__*/_jsx(\"div\",{className:\"form-container\",children:/*#__PURE__*/_jsx(\"div\",{className:\"form-wrapper\",children:/*#__PURE__*/_jsx(\"form\",{id:formId,className:\"styled-form\"})})})]}):/*#__PURE__*/_jsx(SettingsMessage,{title:\"Your embed code is incorrect!\",description:\"Update the Marketo embed form in the component property.\",containerStyle:style,icon:\"\uD83D\uDEA8\"})});}const customCSS=`\n/* Container */\n.form-container {\n    padding: 40px;\n    background: #f5f5f5;\n    border: 1px solid #eee;\n    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);\n    /* REMOVE display: flex and justify-content */\n}\n\n/* Wrapper for centering */\n.form-wrapper {\n   max-width: 720px;\n   width: 100%;\n   margin: 0 auto;\n}\n\n\n/* Header */\n.form-title {\n   font-size: 32px;\n   font-weight: 600;\n   text-align: center;\n   margin-bottom: 32px;\n   font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n}\n\n\n/* Base field styling */\n.mktoForm input[type=\"text\"],\n.mktoForm input[type=\"email\"],\n.mktoForm input[type=\"tel\"],\n.mktoForm select.mktoField {\n   width: 100% !important;\n   max-width: 100% !important;\n   min-width: 100% !important;\n   padding: 14px 16px;\n   font-size: 16px;\n   border: 1px solid #ccc;\n   border-radius: 0px;\n   background-color: #fff;\n   margin-bottom: 10px;\n   box-sizing: border-box;\n   display: block;\n}\n\n\n/* Labels */\n.mktoForm label.mktoLabel {\n   font-size: 16px;\n   color: #000;\n   margin-bottom: 6px;\n   display: block;\n   font-weight: 400;\n\n\n}\n/* Remove built-in grid/column layout */\n.mktoForm .mktoFormRow,\n.mktoForm .mktoFieldDescriptor,\n.mktoForm .mktoFormCol {\n   width: 100% !important;\n   float: none !important;\n   display: block !important;\n}\n\n\n/* Extra layout cleanup to fix column alignment */\n.mktoForm .mktoOffset {\n   display: none !important;\n   width: 0 !important;\n}\n\n\n.mktoForm .mktoFormCol {\n   float: none !important;\n   width: 100% !important;\n   max-width: 100% !important;\n   display: block !important;\n}\n\n\n.mktoForm .mktoFormRow {\n   display: block !important;\n   width: 100% !important;\n}\n\n\n/* Checkbox layout */\n.mktoForm .mktoCheckboxList {\n   display: flex;\n   align-items: flex-start;\n   gap: 12px;\n   margin-bottom: 20px;\n   flex-wrap: wrap;\n   padding-top: 0 !important;\n   margin-top: 0 !important;\n}\n\n\n.mktoForm .mktoCheckboxList input[type=\"checkbox\"] {\n   flex-shrink: 0;\n   width: 18px;\n   height: 18px;\n   margin-top: 3px;\n   accent-color: #000;\n}\n\n\n.mktoForm .mktoCheckboxList label {\n   font-size: 14px;\n   line-height: 1.5;\n   color: #000;\n   font-weight: 400;\n   display: flex;\n   align-items: flex-start;\n   gap: 12px;\n   flex: 1;\n}\n\n\n/* Link styling */\n.mktoForm .mktoCheckboxList a {\n   color: #000 !important;\n   text-decoration: underline;\n}\n\n\n/* Submit button */\n.mktoForm .mktoButton {\n   background-color: #000;\n   color: #fff;\n   font-size: 14px;\n   padding: 12px 24px;\n   border: none;\n   border-radius: 40px;\n   font-weight: 500;\n   cursor: pointer;\n   display: inline-block;\n   margin-top: 12px;\n   display: block;\n   margin: 20px auto 0 auto; /* top right bottom left */\n}\n\n\n.mktoForm .mktoButton:hover {\n   background-color: #333;\n}\n\n\n/* Hide asterisks */\n.mktoForm .mktoAsterix {\n   display: none !important;\n}\n\n\n/* Responsive */\n@media (max-width: 640px) {\n   .form-container {\n       padding: 24px;\n   }\n\n\n   .mktoForm .mktoButton {\n       width: 100%;\n   }\n\n\n   .mktoForm .mktoCheckboxList {\n       flex-direction: column;\n       align-items: flex-start;\n   }\n\n\n   .mktoForm .mktoCheckboxList label {\n       flex: none;\n   }\n}\n.mktoForm .mktoFormCol[style],\n.mktoForm .mktoFieldDescriptor[style],\n.mktoForm .mktoFormRow[style] {\n   width: 100% !important;\n   max-width: 100% !important;\n}\n.mktoForm select.mktoField {\n   width: 100% !important;\n   max-width: 100% !important;\n   min-width: 100% !important;\n   box-sizing: border-box;\n}\n.mktoForm select.mktoField {\n   all: unset;\n   display: block;\n   width: 100% !important;\n   max-width: 100% !important;\n   min-width: 100% !important;\n   padding: 14px 16px;\n   font-size: 16px;\n   border: 1px solid #ccc;\n   border-radius: 0px;\n   background-color: #fff;\n   margin-bottom: 10px;\n   box-sizing: border-box;\n   appearance: none;\n   -webkit-appearance: none;\n   -moz-appearance: none;\n}\n.mktoForm .mktoFieldWrap {\n   width: 100% !important;\n   max-width: 100% !important;\n   padding-left: 0;\n   padding-right: 0;\n   margin-left: auto;\n   margin-right: auto;\n   box-sizing: border-box;\n   display: block;\n}\n.mktoForm .mktoFieldWrap[style] {\n   width: 100% !important;\n   max-width: 100% !important;\n   min-width: 100% !important;\n   box-sizing: border-box !important;\n}\n/* Force checkbox area to be full width */\n.mktoForm .mktoLogicalField.mktoCheckboxList[style] {\n   width: 100% !important;\n   max-width: 100% !important;\n   min-width: 100% !important;\n   display: block !important;\n}\n/* Fix label width on long question (e.g., \"Why do you want to partner...\") */\n.mktoForm label.mktoLabel.mktoHasWidth[style] {\n   width: 100% !important;\n   max-width: 100% !important;\n   display: block !important;\n   white-space: normal;\n   word-break: break-word;\n}\n.mktoForm.mktoHasWidth {\n  width: 100% !important;\n  max-width: 720px !important;\n  margin: 0 auto !important;\n}`;MarketoForm.displayName=\"Marketo Form\";addPropertyControls(MarketoForm,{embed:{title:\"Embed Code\",type:ControlType.String,displayTextArea:true,description:\"[Where to find my Marketo embed form](https://experienceleague.adobe.com/en/docs/marketo/using/product-docs/demand-generation/forms/form-actions/embed-a-form-on-your-website).\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name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OAAO,gBAAgB,GAAK,YAAY,iLAAiL,CAAC,CAAC",
  "names": ["MarketoForm", "props", "embed", "style", "isEmbedValid", "setIsEmbedValid", "ye", "formId", "setFormId", "isLoading", "setIsLoading", "scriptRef", "pe", "formLoadedRef", "p", "SettingsMessage", "ue", "embedRegex", "embedMatch", "link", "value", "id", "newFormId", "embedFirstLine", "isValidEmbed", "loadForm", "existingForm", "window", "newScript", "error", "l", "u", "customCSS", "addPropertyControls", "ControlType"]
}
