{"version":3,"file":"PasswordProtectionOverride.CZ4K0TLS.mjs","names":["useState","__legacyOverrideHOC_DataObserverContext","_jsx","__esmMin","init_npm_react_18_3_1","oe","ce","init_jsx_runtime","c","p","_e","init_framer_D1IzEvwH","DataObserverContext","PasswordProtectionOverride","isAuthenticated","setIsAuthenticated","password","setPassword","error","setError","isHovered","setIsHovered","authStatus","withPasswordProtectionOverride","C","props","init_PasswordProtectionOverride"],"sources":["https:/framerusercontent.com/modules/5HiGJLDEsLBgc3iAxRmB/rWrgZ1tHz7Fn7Bqq1is1/PasswordProtectionOverride.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";// This override can be applied to any page or component to add password protection\nexport function PasswordProtectionOverride(props){// State to track if user is authenticated\nconst[isAuthenticated,setIsAuthenticated]=useState(false);// State for password input\nconst[password,setPassword]=useState(\"\");// State for error message\nconst[error,setError]=useState(\"\");// State for button hover\nconst[isHovered,setIsHovered]=useState(false);// Replace this with your desired password\nconst correctPassword=\"progress.ember_tang9oak\";useEffect(()=>{// Check if already authenticated\nconst authStatus=localStorage.getItem(\"auth\")===\"true\";setIsAuthenticated(authStatus);},[]);// Handle password submission\nconst handleSubmit=e=>{e.preventDefault();if(password===correctPassword){// Store authentication in localStorage\nlocalStorage.setItem(\"auth\",\"true\");setIsAuthenticated(true);setError(\"\");}else{setError(\"Incorrect password. Please try again.\");}};// If authenticated, return without modifications\nif(isAuthenticated){return{};}// If not authenticated, return an overlay component\nreturn{// This will override the component's children, adding the modal on top\nchildren:/*#__PURE__*/_jsx(\"div\",{style:{position:\"fixed\",top:0,left:0,width:\"100%\",height:\"100%\",backgroundColor:\"#FCF6F2\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",zIndex:9999},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:\"90%\",maxWidth:\"400px\",padding:\"30px\",backgroundColor:\"white\",borderRadius:\"0px\",boxShadow:\"0 4px 10px rgba(0,0,0,0.1)\"},children:[/*#__PURE__*/_jsx(\"h2\",{style:{marginTop:0,marginBottom:\"20px\"},children:\"Enter Password\"}),/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleSubmit,children:[/*#__PURE__*/_jsx(\"input\",{type:\"password\",value:password,onChange:e=>setPassword(e.target.value),placeholder:\"Password\",style:{width:\"100%\",padding:\"16px 0px\",fontSize:\"24px\",border:\"0px\",borderBottom:\"1.5px solid #2B2927\",borderRadius:\"0px\",marginBottom:\"52px\"}}),error&&/*#__PURE__*/_jsx(\"p\",{style:{color:\"red\",margin:\"10px 0\"},children:error}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),style:{width:\"100%\",padding:\"12px 24px 12px 24px\",backgroundColor:isHovered?\"#444240\":\"#2B2927\",color:\"white\",border:\"none\",borderRadius:\"1000px\",fontSize:\"16px\",cursor:\"pointer\",transition:\"background-color 0.2s ease\"},children:\"Submit\"})]})]})})};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withPasswordProtectionOverride(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...PasswordProtectionOverride(props)});};}withPasswordProtectionOverride.displayName=\"PasswordProtectionOverride\";\nexport const __FramerMetadata__ = {\"exports\":{\"withPasswordProtectionOverride\":{\"type\":\"reactHoc\",\"name\":\"withPasswordProtectionOverride\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"PasswordProtectionOverride\":{\"type\":\"override\",\"name\":\"PasswordProtectionOverride\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PasswordProtectionOverride.map"],"mappings":"A,yLACA,SAAgBa,EAA2B,EAAM,CACjD,GAAK,CAACC,EAAgBC,GAAoBf,EAAS,EAAK,EACnD,CAACgB,EAASC,GAAajB,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