{"version":3,"file":"shared-lib.WCZPRsWW.mjs","names":["useState","useCallback"],"sources":["https:/framerusercontent.com/modules/oFilURrSznECd5a7WMZh/p0V2ekeOf4veLzVTUx5Y/Password_protection.js","https:/framerusercontent.com/modules/gBQXTAK58mOl7JRUJr5D/wn3sQ7ylrnjV5acQw2II/siteMetadata.js"],"sourcesContent":["/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useCallback,useEffect}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";export default function PasswordProtectedScreen(props){const isFramerEditor=()=>{if(typeof window===\"undefined\")return false;if(window.FramerDesignTimeModeEnabled!==undefined)return true;if(window.Framer?.CurrentContext?.isDesignTime)return true;if(window.document?.documentElement.hasAttribute(\"data-framer-preview-mode\"))return false;const url=window.location.href;return url.includes(\"framer.com\")&&(url.includes(\"/editor\")||url.includes(\"/projects\")||!url.includes(\"/preview\"));};if(isFramerEditor())return null;const{password,hint,sessionKey=\"framer_auth\",sessionDuration=168,rememberLabel=\"Remember me on this device\",overlayType=\"color\",overlayColor=\"#000000\",overlayImage,icon,iconSize=64,iconRounded=false,modalBackground=\"#000000\",modalBorderColor=\"#ffffff\",inputBackground=\"#000000\",inputTextColor=\"#ffffff\",inputBorderColor=\"#ffffff\",buttonBackground=\"#000000\",buttonTextColor=\"#ffffff\",buttonBorderColor=\"#ffffff\",textColor=\"#ffffff\",errorTextColor=\"#ff6b6b\"}=props;const storageKey=`${sessionKey}_session`;const hasValidSession=()=>{if(typeof window===\"undefined\")return false;try{const stored=window.localStorage.getItem(storageKey);if(!stored)return false;const{expiry}=JSON.parse(stored);return Date.now()<expiry;}catch{return false;}};const[inputValue,setInputValue]=useState(\"\");const[rememberMe,setRememberMe]=useState(false);const[isAuthenticated,setIsAuthenticated]=useState(hasValidSession);const[error,setError]=useState(\"\");// Clean up an expired stored session on mount.\nuseEffect(()=>{if(typeof window===\"undefined\")return;try{const stored=window.localStorage.getItem(storageKey);if(!stored)return;const{expiry}=JSON.parse(stored);if(Date.now()>=expiry){window.localStorage.removeItem(storageKey);}}catch{window.localStorage.removeItem(storageKey);}},[storageKey]);const handlePasswordSubmit=useCallback(()=>{if(inputValue===password){if(rememberMe&&typeof window!==\"undefined\"){const expiry=Date.now()+sessionDuration*60*60*1e3;try{window.localStorage.setItem(storageKey,JSON.stringify({expiry}));}catch{// ignore — quota or private mode\n}}setIsAuthenticated(true);}else{setError(\"Incorrect password. Please try again.\");setInputValue(\"\");}},[inputValue,password,rememberMe,sessionDuration,storageKey]);const handleKeyPress=useCallback(e=>{if(e.key===\"Enter\")handlePasswordSubmit();},[handlePasswordSubmit]);const getOverlayStyle=()=>overlayType===\"image\"&&overlayImage?{backgroundImage:`url(${overlayImage})`,backgroundSize:\"cover\"}:{backgroundColor:overlayColor};if(isAuthenticated)return null;return /*#__PURE__*/_jsx(motion.div,{initial:{opacity:1},exit:{opacity:0},transition:{duration:.3},style:{position:\"fixed\",top:0,left:0,right:0,bottom:0,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",padding:\"20px\",zIndex:9999,...getOverlayStyle()},children:/*#__PURE__*/_jsxs(motion.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{delay:.1},style:{maxWidth:\"400px\",width:\"100%\",textAlign:\"center\",backgroundColor:modalBackground,border:`1px solid ${modalBorderColor}`,padding:\"32px\",borderRadius:\"16px\"},children:[icon&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",justifyContent:\"center\",marginBottom:\"16px\"},children:/*#__PURE__*/_jsx(\"img\",{src:icon,alt:\"\",style:{width:`${iconSize}px`,height:`${iconSize}px`,objectFit:\"cover\",borderRadius:iconRounded?\"50%\":\"0px\"}})}),/*#__PURE__*/_jsx(\"h2\",{style:{marginTop:0,marginBottom:\"8px\",color:textColor,fontWeight:500},children:\"Enter Password\"}),hint&&/*#__PURE__*/_jsxs(\"p\",{style:{opacity:.6,marginBottom:\"24px\",color:textColor},children:[\"Hint: \",hint]}),/*#__PURE__*/_jsx(\"input\",{type:\"password\",value:inputValue,onChange:e=>setInputValue(e.target.value),onKeyPress:handleKeyPress,style:{padding:\"12px 16px\",borderRadius:\"8px\",border:`1px solid ${inputBorderColor}`,fontSize:\"16px\",width:\"100%\",marginBottom:\"12px\",backgroundColor:inputBackground,color:inputTextColor,outline:\"none\",boxSizing:\"border-box\"},placeholder:\"Enter password\",autoFocus:true}),/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",alignItems:\"center\",gap:\"8px\",marginBottom:\"16px\",color:textColor,opacity:.8,fontSize:\"13px\",cursor:\"pointer\",userSelect:\"none\"},children:[/*#__PURE__*/_jsx(\"input\",{type:\"checkbox\",checked:rememberMe,onChange:e=>setRememberMe(e.target.checked),style:{width:\"16px\",height:\"16px\",cursor:\"pointer\",accentColor:textColor}}),rememberLabel]}),error&&/*#__PURE__*/_jsx(motion.p,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},style:{color:errorTextColor,margin:\"8px 0 16px\"},children:error}),/*#__PURE__*/_jsx(motion.button,{whileHover:{scale:1.03},whileTap:{scale:.98},onClick:handlePasswordSubmit,style:{padding:\"12px 24px\",borderRadius:\"8px\",border:`1px solid ${buttonBorderColor}`,backgroundColor:buttonBackground,color:buttonTextColor,fontSize:\"16px\",cursor:\"pointer\",width:\"100%\",fontWeight:\"500\"},children:\"Continue\"})]})});}PasswordProtectedScreen.defaultProps={password:\"secret123\",hint:\"forgot? minh.phan@octave.com\",sessionKey:\"framer_auth\",sessionDuration:168,rememberLabel:\"Remember me on this device\",overlayType:\"color\",overlayColor:\"#000000\",iconSize:64,iconRounded:false,modalBackground:\"#000000\",modalBorderColor:\"#ffffff\",inputBackground:\"#000000\",inputTextColor:\"#ffffff\",inputBorderColor:\"#ffffff\",buttonBackground:\"#000000\",buttonTextColor:\"#ffffff\",buttonBorderColor:\"#ffffff\",textColor:\"#ffffff\",errorTextColor:\"#ff6b6b\"};addPropertyControls(PasswordProtectedScreen,{password:{type:ControlType.String,title:\"Password\",defaultValue:\"secret123\"},hint:{type:ControlType.String,title:\"Hint\",defaultValue:\"forgot? minh.phan@octave.com\"},sessionKey:{type:ControlType.String,title:\"Session Key\",defaultValue:\"framer_auth\",description:\"Unique ID for this protected page. Change if you have multiple password gates so they don't share a session.\"},sessionDuration:{type:ControlType.Number,title:\"Remember Duration (hrs)\",defaultValue:168,min:1,max:8760,step:1,description:\"How long the 'Remember me' option keeps the session valid.\"},rememberLabel:{type:ControlType.String,title:\"Remember Label\",defaultValue:\"Remember me on this device\"},icon:{type:ControlType.Image,title:\"Icon\",description:\"Image shown above the heading.\"},iconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:64,min:16,max:256,step:1,unit:\"px\"},iconRounded:{type:ControlType.Boolean,title:\"Rounded Icon\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},overlayType:{type:ControlType.Enum,title:\"Overlay Type\",options:[\"color\",\"image\"],optionTitles:[\"Color\",\"Image\"],defaultValue:\"color\"},overlayColor:{type:ControlType.Color,title:\"Overlay Color\",defaultValue:\"#000000\",hidden:props=>props.overlayType!==\"color\"},overlayImage:{type:ControlType.Image,title:\"Overlay Image\",hidden:props=>props.overlayType!==\"image\"},modalBackground:{type:ControlType.Color,title:\"Modal Background\",defaultValue:\"#000000\"},modalBorderColor:{type:ControlType.Color,title:\"Modal Border\",defaultValue:\"#ffffff\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#ffffff\"},inputBackground:{type:ControlType.Color,title:\"Input Background\",defaultValue:\"#000000\"},inputTextColor:{type:ControlType.Color,title:\"Input Text\",defaultValue:\"#ffffff\"},inputBorderColor:{type:ControlType.Color,title:\"Input Border\",defaultValue:\"#ffffff\"},buttonBackground:{type:ControlType.Color,title:\"Button Background\",defaultValue:\"#000000\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text\",defaultValue:\"#ffffff\"},buttonBorderColor:{type:ControlType.Color,title:\"Button Border\",defaultValue:\"#ffffff\"},errorTextColor:{type:ControlType.Color,title:\"Error Text\",defaultValue:\"#ff6b6b\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PasswordProtectedScreen\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Password_protection.map","// Generated by Framer (b16259d)\nexport default function metadata(params,activeLocale){return{description:\"The next chapter of the Octave expeirence\",favicon:\"https://framerusercontent.com/assets/cPHxz6ZePIcgCHaxXLNqRag.png\",robots:\"max-image-preview:large\",title:\"O/UXD \"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"yPAGoM,SAAwB,EAAwB,EAAM,CAA8a,QAApZ,CAAC,GAAU,IAAS,OAAY,MAAO,GAAoE,GAA3D,EAAO,8BAA8B,IAAA,IAAyB,EAAO,QAAQ,gBAAgB,aAAa,MAAO,GAAK,GAAG,EAAO,UAAU,gBAAgB,aAAa,2BAA2B,CAAC,MAAO,GAAM,IAAM,EAAI,EAAO,SAAS,KAAK,OAAO,EAAI,SAAS,aAAa,GAAG,EAAI,SAAS,UAAU,EAAE,EAAI,SAAS,YAAY,EAAE,CAAC,EAAI,SAAS,WAAW,KAAuB,CAAC,OAAO,KAAK,GAAK,CAAC,WAAS,OAAK,aAAW,cAAc,kBAAgB,IAAI,gBAAc,6BAA6B,cAAY,QAAQ,eAAa,UAAU,eAAa,OAAK,WAAS,GAAG,cAAY,GAAM,kBAAgB,UAAU,mBAAiB,UAAU,kBAAgB,UAAU,iBAAe,UAAU,mBAAiB,UAAU,mBAAiB,UAAU,kBAAgB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