{"version":3,"file":"AuthorNameComponent.BJNbXfse.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/Jkbn3WfnKPT5VT6g6Get/8k7KDw3KWiThdFcFycQd/AuthorNameComponent.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export default function NameInput(){const[name,setName]=useState(\"\");useEffect(()=>{const stored=localStorage.getItem(\"writerName\");if(stored)setName(stored);},[]);const handleChange=e=>{const value=e.target.value;setName(value);// Debounce saving to localStorage\nclearTimeout(window.nameSaveTimer);window.nameSaveTimer=setTimeout(()=>{localStorage.setItem(\"writerName\",value);setCookie(\"writer_name\",value);},300);};return /*#__PURE__*/_jsx(\"input\",{type:\"text\",placeholder:\"Enter here\",value:name,onChange:handleChange,style:inputStyle});}function setCookie(key,value,days=7){const expires=new Date(Date.now()+days*864e5).toUTCString();const domain=\".getmemowrite.com\"// Leading dot makes it work across subdomains\n;document.cookie=`${encodeURIComponent(key)}=${encodeURIComponent(value)}; expires=${expires}; path=/; domain=${domain}; Secure; SameSite=Lax`;}const containerStyle={background:\"#FFF7E5\",padding:\"0px\",borderRadius:\"12px\",border:\"1px solid #000000\",width:\"100%\",boxSizing:\"border-box\"};const inputStyle={width:\"100%\",padding:\"16px\",fontSize:\"16px\",borderRadius:\"8px\",border:\"1px solid #000000\",outline:\"none\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"NameInput\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AuthorNameComponent.map"],"mappings":"uIAAiF,SAAwB,GAAW,CAAC,GAAK,CAAC,EAAK,GAASA,EAAS,GAAG,CACI,OADH,MAAc,CAAC,IAAM,EAAO,aAAa,QAAQ,aAAa,CAAI,GAAO,EAAQ,EAAO,EAAG,EAAE,CAAC,CACvE,EAAK,QAAQ,CAAC,KAAK,OAAO,YAAY,aAAa,MAAM,EAAK,SAD6B,GAAG,CAAC,IAAM,EAAM,EAAE,OAAO,MAAM,EAAQ,EAAM,CACrT,aAAa,EAAO,cAAc,CAAC,EAAO,cAAc,eAAe,CAAC,aAAa,QAAQ,aAAa,EAAM,CAAC,EAAU,cAAc,EAAM,EAAG,IAAI,EAA2G,MAAM,EAAW,CAAC,CAAE,SAAS,EAAU,EAAI,EAAM,EAAK,EAAE,CAAC,IAAM,EAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAK,MAAM,CAAC,aAAa,CACpX,SAAS,OAAO,GAAG,mBAAmB,EAAI,CAAC,GAAG,mBAAmB,EAAM,CAAC,YAAY,EAAQ,iFAFlD,IAAsC,CAEkN,EAAW,CAAC,MAAM,OAAO,QAAQ,OAAO,SAAS,OAAO,aAAa,MAAM,OAAO,oBAAoB,QAAQ,OAAO"}