{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/2Z0T5qY29VmFFNrDxCyV/gtuAwnotXuiOTmh6fzWk/pop_up_form.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\";/**\n * @framerDisableUnlink\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerIntrinsicWidth 600\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicHeight 400\n */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);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);const embedRegex=/MktoForms2\\.loadForm\\(\"(.+?)\", \"(.+?)\", (\\d+)(?:, .+?)?\\);/;const embedMatch=embed.match(embedRegex);if(!embedMatch){setIsEmbedValid(false);setIsLoading(false);return;}const[,link,value,id]=embedMatch;setFormId(`mktoForm_${id}`);const embedFirstLine=`<script src=\"${link}/js/forms2/js/forms2.min.js\"></script>`;const isValidEmbed=embed.startsWith(embedFirstLine)&&value&&id&&link;setIsEmbedValid(isValidEmbed);if(isValidEmbed){if(!scriptRef.current){const newScript=document.createElement(\"script\");newScript.src=`${link}/js/forms2/js/forms2.min.js`;newScript.async=true;newScript.onload=()=>{if(window.MktoForms2){window.MktoForms2.loadForm(link,value,id);}};document.body.appendChild(newScript);scriptRef.current=newScript;}else{if(window.MktoForms2){window.MktoForms2.loadForm(link,value,id);}}}setIsLoading(false);return()=>{if(scriptRef.current){try{document.body.removeChild(scriptRef.current);scriptRef.current=null;}catch(error){console.error(\"Error removing script:\",error);}}};},[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\n/* Wrapper for centering */\n.form-wrapper {\n  max-width: 720px;\n  width: 100%;\n  margin: 0 auto;\n}\n\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\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: 10px 11px;\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\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  margin-top: 0 !important;\n  padding-top: 0 !important;\n\n\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  padding-top: 0 !important;\n  margin-top: 0 !important;\n}\n\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\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\n\n.mktoForm .mktoFormRow {\n  display: block !important;\n  width: 100% !important;\n}\n\n\n\n\n/* Checkbox layout */\n.mktoForm .mktoCheckboxList {\n  display: flex;\n  align-items: flex-start;\n  gap: 2px;\n  margin-bottom: 10px;\n  flex-wrap: wrap;\n  padding-top: 0 !important;\n  margin-top: 0 !important;\n}\n\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\n\n.mktoForm .mktoCheckboxList label {\n  font-size: 14px;\n  line-height: 1;\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\n\n/* Link styling */\n.mktoForm .mktoCheckboxList a {\n  color: #000 !important;\n  text-decoration: underline;\n}\n\n\n\n\n/* Submit button */\n.mktoForm .mktoButton {\n  background-color: #000;\n  color: #fff;\n  font-size: 14px;\n  padding: 12px 10px;\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\n\n.mktoForm .mktoButton:hover {\n  background-color: #333;\n}\n\n\n\n\n/* Hide asterisks */\n.mktoForm .mktoAsterix {\n  display: none !important;\n}\n\n\n\n\n/* Responsive */\n@media (max-width: 640px) {\n  .form-container {\n      padding: 24px;\n  }\n\n\n\n\n  .mktoForm .mktoButton {\n      width: 100%;\n  }\n\n\n\n\n  .mktoForm .mktoCheckboxList {\n      flex-direction: column;\n      align-items: flex-start;\n  }\n\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: 10px 12px;\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  margin-bottom: 0 !important;\n  padding-top: 0 !important;\n  margin-top: 0 !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}\n`;MarketoForm.displayName=\"Marketo Form Popup\";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\":\"MarketoForm\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"* @framerSupportedLayoutWidth any-prefer-fixed\",\"framerIntrinsicWidth\":\"600\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"400\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./pop_up_form.map"],
  "mappings": "kKAMkB,SAARA,EAA6BC,EAAM,CAAC,GAAK,CAAC,MAAAC,EAAM,MAAAC,CAAK,EAAEF,EAAW,CAACG,EAAaC,CAAe,EAAEC,EAAS,EAAK,EAAO,CAACC,EAAOC,CAAS,EAAEF,EAAS,IAAI,EAAO,CAACG,EAAUC,CAAY,EAAEJ,EAAS,EAAI,EAAQK,EAAUC,EAAO,IAAI,EAAE,MAAG,CAACV,GAAOA,EAAM,SAAS,EAAuBW,EAAKC,EAAgB,CAAC,MAAM,0BAA0B,YAAY,oCAAoC,eAAeX,CAAK,CAAC,GAAGY,EAAU,IAAI,CAACL,EAAa,EAAI,EAAE,IAAMM,EAAW,6DAAmEC,EAAWf,EAAM,MAAMc,CAAU,EAAE,GAAG,CAACC,EAAW,CAACZ,EAAgB,EAAK,EAAEK,EAAa,EAAK,EAAE,MAAO,CAAC,GAAK,CAAC,CAACQ,EAAKC,EAAMC,CAAE,EAAEH,EAAWT,EAAU,YAAYY,CAAE,EAAE,EAAE,IAAMC,EAAe,gBAAgBH,CAAI,0CAA+CI,EAAapB,EAAM,WAAWmB,CAAc,GAAGF,GAAOC,GAAIF,EAAmC,GAA9Bb,EAAgBiB,CAAY,EAAKA,EAAc,GAAIX,EAAU,QAAqSY,EAAO,YAAYA,EAAO,WAAW,SAASL,EAAKC,EAAMC,CAAE,MAAxV,C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AAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA+Rh/D3B,EAAY,YAAY,qBAAqB4B,EAAoB5B,EAAY,CAAC,MAAM,CAAC,MAAM,aAAa,KAAK6B,EAAY,OAAO,gBAAgB,GAAK,YAAY,iLAAiL,CAAC,CAAC",
  "names": ["MarketoForm", "props", "embed", "style", "isEmbedValid", "setIsEmbedValid", "ye", "formId", "setFormId", "isLoading", "setIsLoading", "scriptRef", "pe", "p", "SettingsMessage", "ue", "embedRegex", "embedMatch", "link", "value", "id", "embedFirstLine", "isValidEmbed", "window", "newScript", "error", "l", "customCSS", "addPropertyControls", "ControlType"]
}
