{"version":3,"file":"HubSpotForm.DmU2O2gH.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/xPCAcYLPJelusL4T5tfW/3YDsFuvz5sbgWlyhu9p9/HubSpotForm.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * HubSpot form embed (new HubSpot forms: hs-form-frame).\n * Recreates the frame and re-runs the embed script on every mount,\n * so the form also appears after client-side page navigation.\n *\n * Scroll on: the form fills the instance height and scrolls inside it\n * (use with a fixed-height card). Scroll off: the form grows to its full\n * height with no inner scrollbar (use with a fit-content card, e.g. on phone).\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any\n */export default function HubSpotForm(props){const{portalId=\"244821515\",formId=\"204dbeb2-1ce7-4f6d-936a-d030863a3df6\",region=\"na2\",minHeight=480,scroll=true}=props;const ref=useRef(null);const isCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{const host=ref.current;if(isCanvas||!host||typeof window===\"undefined\")return;host.innerHTML=\"\";const frame=document.createElement(\"div\");frame.className=\"hs-form-frame\";frame.setAttribute(\"data-region\",region);frame.setAttribute(\"data-form-id\",formId);frame.setAttribute(\"data-portal-id\",portalId);host.appendChild(frame);const script=document.createElement(\"script\");script.src=`https://js-${region}.hsforms.net/forms/embed/${portalId}.js`;script.defer=true;host.appendChild(script);return()=>{host.innerHTML=\"\";};},[portalId,formId,region,isCanvas]);if(isCanvas){return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:scroll?\"100%\":\"auto\",minHeight,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",border:\"1px dashed rgba(6, 80, 63, 0.4)\",borderRadius:8,color:\"rgb(6, 80, 63)\",fontSize:14,textAlign:\"center\",padding:24,boxSizing:\"border-box\"},children:[\"HubSpot form \",formId.slice(0,8),\"… renders in Preview and on the live site\"]});}return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{position:\"relative\",width:\"100%\",minHeight,...scroll?{height:\"100%\",overflowY:\"auto\",WebkitOverflowScrolling:\"touch\",overscrollBehavior:\"contain\"}:{height:\"auto\",overflow:\"visible\"}}});}addPropertyControls(HubSpotForm,{portalId:{type:ControlType.String,title:\"Portal ID\",defaultValue:\"244821515\"},formId:{type:ControlType.String,title:\"Form ID\",defaultValue:\"204dbeb2-1ce7-4f6d-936a-d030863a3df6\"},region:{type:ControlType.String,title:\"Region\",defaultValue:\"na2\"},minHeight:{type:ControlType.Number,title:\"Min Height\",defaultValue:480,min:0,max:2e3},scroll:{type:ControlType.Boolean,title:\"Scroll\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\",description:\"Off: form grows to full height, no inner scrollbar. Use with a fit-content card.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HubSpotForm\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HubSpotForm.map"],"mappings":"6MAWG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,WAAS,YAAY,SAAO,uCAAuC,SAAO,MAAM,YAAU,IAAI,SAAO,IAAM,EAAY,EAAIA,EAAO,IAAI,EAAQ,EAAS,EAAa,QAAQ,IAAI,EAAa,OAAm+B,OAA59B,MAAc,CAAC,IAAM,EAAK,EAAI,QAAQ,GAAG,GAAU,CAAC,GAAa,IAAS,OAAY,OAAO,EAAK,UAAU,GAAG,IAAM,EAAM,SAAS,cAAc,KAAK,EAAE,EAAM,UAAU,gBAAgB,EAAM,aAAa,cAAc,CAAM,EAAE,EAAM,aAAa,eAAe,CAAM,EAAE,EAAM,aAAa,iBAAiB,CAAQ,EAAE,EAAK,YAAY,CAAK,EAAE,IAAM,EAAO,S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