{"version":3,"file":"Typeform.akyR2PPP.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/uyKL83UOiQk88ZAT4YJF/aUG7IYZiBdIFSn5FtKj5/Typeform.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef,useEffect}from\"react\";import{addPropertyControls,ControlType,withCSS,motion}from\"framer\";import{containerStyles}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";import{createWidget}from\"https://cdn.skypack.dev/@typeform/embed@1.32.0\";import{emptyStateStyle,stateParagraphStyle,stateTitleStyle}from\"https://framer.com/m/framer/integrations-styles.js@0.2.0\";const Widget=withCSS(function Widget({id,style,onSubmit,hideFooter,hideHeaders,disableAutoFocus,...props}){const container=useRef(null);useEffect(()=>{if(typeof window===\"undefined\"||!container.current)return;const parentParams=new URLSearchParams(window.location.search);const transitiveParams=[...parentParams].map(([key])=>key);const widget=createWidget(id,{width:\"100%\",height:\"100%\",container:container.current,transitiveSearchParams:transitiveParams,onSubmit,hideFooter,hideHeaders,disableAutoFocus});return()=>widget.unmount();},[id,onSubmit,hideFooter,hideHeaders,disableAutoFocus]);return /*#__PURE__*/_jsx(\"div\",{style:style,className:\"framer-typeform\",ref:container,...props});},[\".framer-typeform div, .framer-typeform iframe { width: 100%; height: 100%; border: none !important; }\"]);/**\n * TYPEFORM\n *\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 600\n *\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function Typeform({formId,style,onSubmit,hideFooter,hideHeaders,autoFocus,...props}){function handleSubmit(e){if(onSubmit!==undefined){onSubmit(e);}if(globalThis.__send_framer_conversion__){globalThis.__send_framer_conversion__(\"typeform\");}}return formId?/*#__PURE__*/_jsx(motion.div,{style:{...containerStyles,...style},...props,children:/*#__PURE__*/_jsx(Widget,{id:formId,style:{width:\"100%\",height:\"100%\"},onSubmit:handleSubmit,hideFooter:hideFooter,hideHeaders:hideHeaders,disableAutoFocus:!autoFocus})}):/*#__PURE__*/_jsxs(motion.div,{style:{...emptyStateStyle,...style},...props,children:[/*#__PURE__*/_jsx(\"h1\",{style:stateTitleStyle,children:\"Typeform\"}),/*#__PURE__*/_jsx(\"p\",{style:stateParagraphStyle,children:\"Set a form ID in the Properties.\"})]});}addPropertyControls(Typeform,{formId:{title:\"ID\",type:ControlType.String,placeholder:\"12ABCD34\",defaultValue:\"R2s5BM\",description:\"Create a [Typeform](https://www.typeform.com/) account, add a form and copy its ID. [Learn more…](https://www.framer.com/sites/integrations/typeform/)\"},hideFooter:{title:\"Footer\",type:ControlType.Boolean,enabledTitle:\"Hide\",disabledTitle:\"Show\",defaultValue:false},hideHeaders:{title:\"Headers\",type:ControlType.Boolean,enabledTitle:\"Hide\",disabledTitle:\"Show\",defaultValue:false},autoFocus:{title:\"Auto-focus\",type:ControlType.Boolean,enabledTitle:\"On\",disabledTitle:\"Off\",defaultValue:true},onSubmit:{type:ControlType.EventHandler}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Typeform\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"800\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"600\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Typeform.map"],"mappings":"2cAUG,SAAwB,EAAS,CAAC,SAAO,QAAM,WAAS,aAAW,cAAY,YAAU,GAAG,GAAO,CAAC,SAAS,EAAa,EAAE,CAAI,IAAW,IAAA,IAAW,EAAS,CAAC,EAAM,WAAW,4BAA4B,WAAW,2BAA2B,UAAU,CAAG,CAAC,OAAO,EAAoB,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,GAAG,EAAgB,GAAG,CAAK,EAAE,GAAG,EAAM,SAAsB,EAAK,EAAO,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