{"version":3,"file":"Backend_Overrides.CODdBsse.mjs","names":["useStore","useState","_Fragment"],"sources":["https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/ppibhvVMxMqQFgB1G3zN/jRUozGUhIObq57DdXRr9/Backend_Overrides.js"],"sourcesContent":["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{useEffect}from\"react\";const DEFAULT_INPUT_VALUE=1e3;const useStore=createStore({inputValue:DEFAULT_INPUT_VALUE,companySize:\"1-50\"});export function withFirstNameInput(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,value:store.firstName,onChange:e=>setStore({firstName:e.target.value})});};}export function withLastNameInput(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,value:store.lastName,onChange:e=>setStore({lastName:e.target.value})});};}export function withEmailInput(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,value:store.companyEmail,onChange:e=>setStore({companyEmail:e.target.value})});};}export function withCompanyInput(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,value:store.company,onChange:e=>setStore({company:e.target.value})});};}export function withCompanySizeInput(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,value:store.companySize,defaultValue:\"1-50\",onChange:e=>setStore({companySize:e.target.value})});};}export function withMessageInput(Component){return props=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{...props,value:store.message,onChange:e=>setStore({message:e.target.value})});};}export function withSubmitButton(Component){return props=>{const[store,setStore]=useStore();const{firstName,lastName,companyEmail,companySize,company}=store;useEffect(()=>{setStore({location:window.location.search});},[]);// const search =\nconst params=new URLSearchParams(store.location);var utm_source=params.get(\"utm_source\");var utm_medium=params.get(\"utm_medium\");var utm_campaign=params.get(\"utm_campaign\");const handleSubmit=()=>{//            const { email, size } = store // Email ve size değerlerini al\nif(firstName&&lastName&&companyEmail&&companySize&&company){if(companySize===\"1-50\"){var url=`https://www.onclarity.com/form-submit`;}else if(companySize===\"51-200\"){var url=`https://www.onclarity.com/book-a-demo`;}else if(companySize===\"201-1000\"){var url=`https://www.onclarity.com/book-a-demo`;}else{var url=`https://www.onclarity.com/book-a-demo`;}url=url+\"?firstname=\"+firstName+\"&lastname=\"+lastName+\"&email=\"+companyEmail+\"&company=\"+company;if(utm_source){url=url+\"&utm_source=\"+utm_source;if(utm_medium){url=url+\"&utm_medium=\"+utm_medium;if(utm_campaign){url=url+\"&utm_campaign=\"+utm_campaign;}}}window.location.href=url;}else{return;}};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                       .active{\n                        pointer-events:none !important;\n                        opacity: .5 !important;\n                       }\n                    `}),/*#__PURE__*/_jsx(Component,{...props,className:`${!firstName&&\"active\"} ${!lastName&&\"active\"} ${!companyEmail&&\"active\"} ${!company&&\"active\"} `,onClick:handleSubmit})]});};}export function changeURL(Component){return props=>{const[store,setStore]=useStore();useEffect(()=>{setStore({location:window.location.search});},[]);// const search =\nconst params=new URLSearchParams(store.location);var utm_source=params.get(\"utm_source\");var utm_medium=params.get(\"utm_medium\");var utm_campaign=params.get(\"utm_campaign\");var firstname=params.get(\"firstname\");var lastname=params.get(\"lastname\");var email=params.get(\"email\");var company=params.get(\"company\");var data_url=\"https://meetings.hubspot.com/abed-kasaji/demo\";data_url=data_url+\"?embed=true\";\"&firstname=\"+firstname+\"&lastname=\"+lastname+\"&email=\"+email+\"&company=\"+company;if(utm_source){data_url=\"data_url\"+\"&utm_source=\"+utm_source;if(utm_medium){data_url=data_url+\"&utm_medium=\"+utm_medium;if(utm_campaign){data_url=data_url+\"&utm_campaign=\"+utm_campaign;}}}var data_html=`<!-- Start of Meetings Embed Script -->\n    <div class=\"meetings-iframe-container\" data-src=\"`+data_url+`\"\n            data-sandbox=\"allow-same-origin allow-scripts allow-forms allow-popups allow-top-navigation allow-top-navigation-by-user-activation\"\n            >\n            </div>\n    <script type=\"text/javascript\" src=\"https://static.hsappstatic.net/MeetingsEmbed/ex/MeetingsEmbedCode.js\"></script>\n<style>\n  .meetings-iframe-container {\n    min-width: 312px;\n    width: 100%;\n    height: 710px;\n  }\n  \n  .meetings-iframe-container iframe {\n    width: 100%;\n    height: 100%;\n  }\n  \n  /* Desktop view */\n  @media (min-width: 768px) {\n    .meetings-iframe-container {\n      min-width: 500px;\n      height: 800px;\n    }\n  }\n</style>\n  <!-- End of Meetings Embed Script -->`;return /*#__PURE__*/_jsx(Component,{...props,html:data_html});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSubmitButton\":{\"type\":\"reactHoc\",\"name\":\"withSubmitButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEmailInput\":{\"type\":\"reactHoc\",\"name\":\"withEmailInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMessageInput\":{\"type\":\"reactHoc\",\"name\":\"withMessageInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCompanyInput\":{\"type\":\"reactHoc\",\"name\":\"withCompanyInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLastNameInput\":{\"type\":\"reactHoc\",\"name\":\"withLastNameInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFirstNameInput\":{\"type\":\"reactHoc\",\"name\":\"withFirstNameInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCompanySizeInput\":{\"type\":\"reactHoc\",\"name\":\"withCompanySizeInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"changeURL\":{\"type\":\"reactHoc\",\"name\":\"changeURL\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Backend_Overrides.map"],"mappings":"oTAA8E,SAAgB,EAAY,EAAO,CACjH,IAAM,EAAU,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAG,EAAO,CAAC,CAAC,CAAC,CAClD,EAAa,GAAU,CAC1B,OAAO,GAAW,aAAY,EAAS,EAAS,EAAU,MAAM,EAAE,EAAU,MAAM,OAAO,OAAO,CAAC,GAAG,EAAU,MAAM,GAAG,EAAS,CAAC,EAChI,EAAW,OAAO,GAAS,SAAS,OAAO,OAAO,CAAC,GAAG,EAAO,CAAC,CAAC,EAC7D,EAAa,IAAI,IACjB,EAAc,GAAU,CAC3B,OAAO,GAAW,aAAY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