{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/QX6lqMbA1mruJOTrLU5e/JMg0iNFDsoKlDjGvggZ2/FORM.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers/\n/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth full\n * @framerSupportedLayoutHeight full\n */export default function FORM(props){// This is a React component containing an Example component\n// - Replace <Example /> with your own code\n// - Find inspiration: https://www.framer.com/developers/\nconst DEV_BACKEND=`http://localhost:5011/optins/`;const PROD_BACKEND=`https://crmback.cashondelivery.fr/optins/`;async function PostRequest({name,email,phone,from}){const request=await fetch(`${PROD_BACKEND}${from.optin_id}`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({name,email,phone,from})});if(request.status===200){return;}throw new Error(\"Error\");}return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n\ninput::placeholder {\n\n  opacity: 0.3;\n  color: #F2BE11; \n}\n '::-webkit-input-placeholder': {\nopacity: 0.3;\n  color: #F2BE11; \n        \n}\n\n\n/*// Glow Border Animation //*/\n\n.animated-border-box, .animated-border-box-glow{\n\n    width:100%;\nfont-size: 16px;\n\ncursor: pointer;\n\n  color: #000000;\n  font-weight: bold;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n\n  height: 50px;\n  \n  position: absolute;\n  overflow: hidden; \n  z-index: 0;\n  /* Border Radius */\n\tborder-radius: 10px;\n      border:black !important;\n    outline:none !important;\n}\n\n.animated-border-box-glow{\n  overflow: hidden;\n  /* Glow Blur */\n  filter: blur(10px);\n\n}\n\n.animated-border-box:before, .animated-border-box-glow:before {\n  content: '';\n  z-index: -2;\n  text-align: center;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%) rotate(0deg);\n  position: absolute;\n\twidth: 99999px;\n\theight: 99999px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 0 0;\n  /*border color, change middle color*/\n    border:none !important;\n    outline:none !important;\n\tbackground-image: conic-gradient(rgba(0,0,0,0), #ffcd27, rgba(0,0,0,0) 25%);\n  /* change speed here */\n\tanimation: rotate 4s linear infinite;\n}\n.animated-border-box{\n    background:transparent;\n}\n.animated-border-box:after {\n\tcontent: '';\n\tposition: absolute;\n\tz-index: -1;\n  /* border width */\n\tleft: 2px;\n\ttop: 2px;\n  /* double the px from the border width left */\n\twidth: calc(100% - 4px);\n\theight: calc(100% - 4px);\n  /*bg color*/\n\tbackground: #F2BE11;\n  /*box border radius*/\n\tborder-radius: 7px;\n    border:none !important;\n    outline:none !important;\n}\n\n@keyframes rotate {\n\t100% {\n\t\ttransform: translate(-50%, -50%) rotate(1turn);\n\t}\n}\n\n/*// Border Animation END//*/\n\n\n\n/*// Ignore This //*/\nbody {\n  margin: 0px;\n}\n\n.center-box{\n   position:relative;\n    width:100%;\n    height:50px;\n \n\n}\n}\n            `}),/*#__PURE__*/_jsx(\"form\",{style:FORM_STYLE,onSubmit:async event=>{event.preventDefault();const EMAIL_INPUT=document.getElementById(\"email\")?.value;const NAME_INPUT=document.getElementById(\"name\")?.value;const PHONE_INPUT=document.getElementById(\"phone\")?.value;const submitBTN=document.getElementById(\"submitbtn\");submitBTN.style.cursor=\"not-allowed\";submitBTN.style.opacity=.5;submitBTN.disabled=true;try{await PostRequest({name:NAME_INPUT,email:EMAIL_INPUT,phone:PHONE_INPUT||\"\",from:{optin_id:props.id_optin,url:window.location.href}});if(window?.fbq)window.fbq(\"track\",\"Lead\");window.location.href=props.redirect_to;}catch(error){console.log(error);}},children:/*#__PURE__*/_jsxs(\"div\",{id:\"grid_cols_1\",style:GRID_COLS_1_STYLE,children:[/*#__PURE__*/_jsx(\"input\",{style:INPUT_STYLE,id:\"name\",placeholder:\"Pr\\xe9nom\"}),/*#__PURE__*/_jsx(\"input\",{id:\"email\",type:\"email\",required:true,style:INPUT_STYLE,placeholder:\"Email\"}),/*#__PURE__*/_jsx(\"input\",{id:\"phone\",type:\"tel\",required:true,style:INPUT_STYLE,placeholder:\"T\\xe9l\\xe9phone\"}),/*#__PURE__*/_jsxs(\"div\",{class:\"center-box\",children:[/*#__PURE__*/_jsx(\"div\",{class:\"animated-border-box-glow\"}),/*#__PURE__*/_jsx(\"button\",{id:\"submitbtn\",class:\"animated-border-box\",children:props.button_cta})]})]})})]});}const INPUT_STYLE={//no outline\noutline:\"none\",width:\"100%\",height:\"100%\",color:\"#F2BE11\",borderRadius:\"10px\",padding:\"10px\",fontSize:\"16px\",backgroundColor:\"transparent\",border:\"1px solid #F2BE11\"};const GRID_COLS_1_STYLE={width:\"100%\",//gap\ngap:10,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",padding:20,borderRadius:10};const CONT_STYLE={width:\"100%\",height:\"100%\",positon:\"relative\"};const FORM_STYLE={width:\"100%\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\"};addPropertyControls(FORM,{redirect_to:{type:ControlType.String,defaultValue:\"/cour-offert\"},id_optin:{type:ControlType.String,defaultValue:\"organique01\"},button_cta:{type:ControlType.String,defaultValue:\"Voir le cours offert\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FORM\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"full\",\"framerSupportedLayoutHeight\":\"full\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FORM.map"],
  "mappings": "yGAQkB,SAARA,EAAsBC,EAAM,CAGtC,IAAMC,EAAY,gCAAsCC,EAAa,4CAA4C,eAAeC,EAAY,CAAC,KAAAC,EAAK,MAAAC,EAAM,MAAAC,EAAM,KAAAC,CAAI,EAAE,CAAuK,IAAxJ,MAAM,MAAM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e,QAAQ,EAAEC,EAAoBC,EAAK,CAAC,YAAY,CAAC,KAAKC,EAAY,OAAO,aAAa,cAAc,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,aAAa,aAAa,EAAE,WAAW,CAAC,KAAKA,EAAY,OAAO,aAAa,sBAAsB,CAAC,CAAC",
  "names": ["FORM", "props", "DEV_BACKEND", "PROD_BACKEND", "PostRequest", "name", "email", "phone", "from", "u", "l", "p", "FORM_STYLE", "event", "EMAIL_INPUT", "NAME_INPUT", "PHONE_INPUT", "submitBTN", "window", "error", "GRID_COLS_1_STYLE", "INPUT_STYLE", "FORM_STYLE", "addPropertyControls", "FORM", "ControlType"]
}
