{"version":3,"file":"ChecklistDownload.6V9o2KMs.mjs","names":["useState","__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","init_jsx_runtime","c","p","_e","window","init_framer_DKgW_P28","addPropertyControls","ControlType","readCookie","match","name","sendToHubSpot","hutk","fields","firstname","lastname","email","f","PORTAL_ID","FORM_GUID","ChecklistDownload","props","done","setDone","compact","layout","showCover","cover","onSubmit","event","data","get","k","w","field","inRow","styles","label","pdf","buttonLabel","FONT","__FramerMetadata__","init_ChecklistDownload","\"exports\"","\"default\"","\"type\"","\"name\"","\"slots\"","\"annotations\"","\"framerContractVersion\"","\"framerSupportedLayoutWidth\"","\"framerSupportedLayoutHeight\"","\"__FramerMetadata__\""],"sources":["https:/framerusercontent.com/modules/XhxpEhZLbD8VAWp2QO3Q/yxuiySjw0bVN3e3bgEfE/ChecklistDownload.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";// Gated download for the AR payment portal vendor checklist, built to sit\n// inside CMS rich text (blog). A code component because design components\n// embedded in rich text render at their fixed base width and overflow on\n// mobile; this one fills the text column and wraps below ~520px.\n// On submit: sends the contact to HubSpot, then shows the PDF download.\nconst PORTAL_ID=\"41154456\";const FORM_GUID=\"d43c0a58-3046-404b-97d1-1af204dc6944\"// \"AR Payment Portal Vendor Checklist\"\n;const FONT=`\"Plus Jakarta Sans\", \"Plus Jakarta Sans Placeholder\", sans-serif`;function readCookie(name){const match=document.cookie.match(new RegExp(\"(?:^|; )\"+name+\"=([^;]*)\"));return match?decodeURIComponent(match[1]):undefined;}function sendToHubSpot(firstname,lastname,email){const hutk=readCookie(\"hubspotutk\");const fields=[{objectTypeId:\"0-1\",name:\"firstname\",value:firstname},{objectTypeId:\"0-1\",name:\"lastname\",value:lastname},{objectTypeId:\"0-1\",name:\"email\",value:email}].filter(f=>f.value);fetch(`https://api.hsforms.com/submissions/v3/integration/submit/${PORTAL_ID}/${FORM_GUID}`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},keepalive:true,body:JSON.stringify({fields,context:{...hutk?{hutk}:{},pageUri:window.location.href,pageName:document.title}})}).catch(()=>{});}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function ChecklistDownload(props){const{layout=\"default\",pdf,cover,buttonLabel=\"Download the checklist\"}=props;const[done,setDone]=useState(false);const compact=layout===\"compact\";const showCover=layout!==\"plain\"&&!!cover;const onSubmit=event=>{event.preventDefault();const data=new FormData(event.currentTarget);const get=k=>String(data.get(k)??\"\").trim();sendToHubSpot(get(\"firstname\"),get(\"lastname\"),get(\"email\"));// GA conversion (see the \"Form conversion tracking plan\", Nov 11)\ntry{const w=window;if(typeof w.gtag===\"function\")w.gtag(\"event\",\"generate_lead\",{form_name:\"ar_portal_checklist\",transport_type:\"beacon\"});else if(Array.isArray(w.dataLayer))w.dataLayer.push({event:\"generate_lead\",form_name:\"ar_portal_checklist\"});}catch{}setDone(true);};const field=(name,label,type,autoComplete,inRow=false)=>/*#__PURE__*/_jsxs(\"label\",{style:inRow?{...styles.field,flex:\"1 1 140px\"}:styles.field,children:[/*#__PURE__*/_jsx(\"span\",{style:compact?styles.srOnly:styles.label,children:label}),/*#__PURE__*/_jsx(\"input\",{name:name,type:type,required:true,autoComplete:autoComplete,placeholder:compact?label:undefined,style:styles.input})]});return /*#__PURE__*/_jsxs(\"div\",{className:\"dill-checklist\",style:{...styles.card,padding:compact?20:28,gap:compact?20:28},children:[/*#__PURE__*/_jsx(\"style\",{children:`.dill-checklist form, .dill-checklist label, .dill-checklist input, .dill-checklist button, .dill-checklist a, .dill-checklist h3, .dill-checklist p, .dill-checklist img { margin: 0 !important; }`}),showCover&&/*#__PURE__*/_jsx(\"img\",{src:cover,alt:\"AR payment portal vendor checklist (PDF)\",style:{...styles.cover,flexBasis:compact?120:200,maxWidth:compact?120:200}}),/*#__PURE__*/_jsx(\"div\",{style:styles.body,children:done?/*#__PURE__*/_jsxs(\"div\",{style:{...styles.stack,gap:14},role:\"status\",children:[/*#__PURE__*/_jsx(\"div\",{style:styles.check,\"aria-hidden\":true,children:/*#__PURE__*/_jsx(\"svg\",{width:\"22\",height:\"22\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"#16A34A\",strokeWidth:\"2.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M20 6 9 17l-5-5\"})})}),/*#__PURE__*/_jsx(\"h3\",{style:styles.h3,children:\"Your checklist is ready\"}),/*#__PURE__*/_jsx(\"p\",{style:styles.body2,children:\"Download the PDF and bring it to your next vendor demo.\"}),/*#__PURE__*/_jsx(\"a\",{href:pdf,target:\"_blank\",rel:\"noopener\",style:styles.button,children:\"Download the PDF\"})]}):/*#__PURE__*/_jsxs(\"form\",{onSubmit:onSubmit,\"data-hs-do-not-collect\":\"true\",style:{...styles.stack,gap:compact?10:14},children:[/*#__PURE__*/_jsxs(\"div\",{style:styles.row,children:[field(\"firstname\",\"First name\",\"text\",\"given-name\",true),field(\"lastname\",\"Last name\",\"text\",\"family-name\",true)]}),field(\"email\",\"Email\",\"email\",\"email\"),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:{...styles.button,border:\"none\",cursor:\"pointer\"},children:buttonLabel})]})})]});}const styles={card:{position:\"relative\",width:\"100%\",boxSizing:\"border-box\",display:\"flex\",flexWrap:\"wrap\",alignItems:\"center\",background:\"#F5F7FD\",border:\"1px solid #DDE3F5\",borderRadius:20,fontFamily:FONT},cover:{flexGrow:0,flexShrink:0,width:\"100%\",height:\"auto\",aspectRatio:\"4 / 3\",objectFit:\"cover\",borderRadius:8,border:\"1px solid #DDE3F5\",boxShadow:\"0px 10px 24px rgba(20, 27, 58, 0.12)\",boxSizing:\"border-box\"},body:{flex:\"1 1 260px\",minWidth:0,margin:0},stack:{display:\"flex\",flexDirection:\"column\",alignItems:\"stretch\",margin:0},row:{display:\"flex\",flexWrap:\"wrap\",gap:12},field:{minWidth:0,margin:0,display:\"flex\",flexDirection:\"column\",gap:6},label:{fontSize:14,lineHeight:\"1.4em\",fontWeight:700,color:\"#141B3A\"},srOnly:{position:\"absolute\",width:1,height:1,overflow:\"hidden\",clip:\"rect(0 0 0 0)\",whiteSpace:\"nowrap\"},input:{width:\"100%\",margin:0,height:46,boxSizing:\"border-box\",padding:\"12px 14px\",border:\"1px solid #C6D2F7\",borderRadius:10,background:\"#FFFFFF\",fontFamily:FONT,fontWeight:500,fontSize:15,color:\"#141B3A\",outlineColor:\"#3762FA\"},button:{display:\"block\",margin:0,width:\"100%\",boxSizing:\"border-box\",padding:\"16px 24px\",borderRadius:12,background:\"#3762FA\",color:\"#FFFFFF\",fontFamily:FONT,fontWeight:800,fontSize:17,lineHeight:\"1.2em\",textAlign:\"center\",textDecoration:\"none\"},check:{width:48,height:48,borderRadius:24,background:\"#E7F6EC\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},h3:{margin:0,fontSize:20,lineHeight:\"1.3em\",letterSpacing:\"-0.005em\",fontWeight:800,color:\"#141B3A\"},body2:{margin:0,fontSize:17,lineHeight:\"1.6em\",fontWeight:500,color:\"#4A5270\"}};addPropertyControls(ChecklistDownload,{layout:{type:ControlType.Enum,title:\"Layout\",options:[\"default\",\"compact\",\"plain\"],optionTitles:[\"Default\",\"Compact\",\"Form only\"],defaultValue:\"default\"},buttonLabel:{type:ControlType.String,title:\"Button\",defaultValue:\"Download the checklist\"},pdf:{type:ControlType.String,title:\"PDF URL\",defaultValue:\"https://framerusercontent.com/assets/3CBh98ksg8c7CuFoPqIwKMm7pYw.pdf\"},cover:{type:ControlType.String,title:\"Cover URL\",defaultValue:\"https://framerusercontent.com/images/YO6gNCcljWyui62KdzaVyozjE.png\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ChecklistDownload\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"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