{"version":3,"file":"Examples.CBFV3dc5.mjs","names":["useState","useState"],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/UCL9J0YJPymKdadcXvZj/WtRxxKyJKMdzZQLO0WgI/Examples.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","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import{useState}from\"react\";// import { AnimatePresence, motion, domAnimation } from \"framer-motion\"\nimport{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";const useStore=createStore({background:\"#0099FF\"});export function kAlphaEventNotifyCTA(Component){function getCookie(name){const cookieValue=document.cookie.match(\"(^|;)\\\\s*\"+name+\"\\\\s*=\\\\s*([^;]+)\");return cookieValue?cookieValue.pop():\"\";}return props=>{const[isSubmit,setIsSubmit]=useState(false);return /*#__PURE__*/ _jsx(\"div\",{style:{cursor:\"pointer\"},children:/*#__PURE__*/ _jsx(Component,{...props,onClick:isSubmit===true?()=>{alert(\"이미 K-알파 프로모션에 참여하셨습니다\");}:e=>{setIsSubmit(true);let uid=getCookie(\"uid\");if(uid){var url=\"https://us-central1-mozziyulmu.cloudfunctions.net/boolio/send-hubspot\";const data={uid:uid};const response=fetch(url,{method:\"POST\",headers:{\"Content-Type\":\"application/json; charset=utf-8\"},body:JSON.stringify(data)}).then(res=>res.json()).then(res=>{alert(\"K-알파 프로모션에 참여해 주셔서 감사합니다\");});}else{location.href=\"https://www.boolio.co.kr/event/alpha-kr\";}}})});};}export function gradientBlur(Component){return props=>{return /*#__PURE__*/ _jsx(\"div\",{style:{display:\"block\",width:\"100%\",height:\"200px\",position:\"absolute\",bottom:0,pointerEvents:\"none\",backgroundImage:\"linear-gradient(to bottom, rgba(255,255,255,0) 0%, white 100%)\"},children:/*#__PURE__*/ _jsx(Component,{...props})});};}export function showInApp(Component){return props=>{const newProps={...props};return /*#__PURE__*/ _jsx(\"div\",{className:\"boolio-show-in-app show-in-app\",style:{display:\"none\"},children:/*#__PURE__*/ _jsx(Component,{...newProps})});};}export function hideInApp(Component){return props=>{var _className;const newProps={...props,className:((_className=props.className)!==null&&_className!==void 0?_className:\"\")+\" boolio-hide-in-app hide-in-app\"};return /*#__PURE__*/ _jsx(Component,{...newProps});};}export function customerArticlePop(Component){return props=>{return /*#__PURE__*/ _jsx(Component,{...props,onClick:()=>{if(document.referrer===\"\"||!document.referrer){location.href=\"https://robo.boolio.co.kr/customer/\";return;}var referrerUrl=new URL(document.referrer);if(referrerUrl.pathname!==\"/customer\"&&referrerUrl.pathname!==\"/app-customer\"){location.href=\"https://robo.boolio.co.kr/customer/\";return;}else{history.back();return;}}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"hideInApp\":{\"type\":\"reactHoc\",\"name\":\"hideInApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showInApp\":{\"type\":\"reactHoc\",\"name\":\"showInApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"kAlphaEventNotifyCTA\":{\"type\":\"reactHoc\",\"name\":\"kAlphaEventNotifyCTA\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"customerArticlePop\":{\"type\":\"reactHoc\",\"name\":\"customerArticlePop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"gradientBlur\":{\"type\":\"reactHoc\",\"name\":\"gradientBlur\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"kLAA8E,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,EAAS,EAAS,EAAW,EAAE,EAAW,OAAO,GAAW,SAAS,OAAO,OAAO,C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