{"version":3,"file":"Password_Gate.Dv1CFWYJ.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/i2noCOBvAqbqWKbDmSd4/DDZcWOrKdQD2u2gEDZNh/Password_Gate.js"],"sourcesContent":["/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";export default function PasswordGate(props){const{accessKey,title,subtitle,hint,footerText,inputBg,inputTextColor,inputPlaceholder,buttonText,buttonBg,buttonTextColor,errorColor,darkMode}=props;const[enteredKey,setEnteredKey]=useState(\"\");const[isUnlocked,setIsUnlocked]=useState(false);const[error,setError]=useState(\"\");const[isVisible,setIsVisible]=useState(true);const isFramerEditor=()=>{if(typeof window===\"undefined\")return false;if(window.FramerDesignTimeModeEnabled!==undefined)return true;if(window.Framer?.CurrentContext?.isDesignTime)return true;if(document?.documentElement?.hasAttribute(\"data-framer-preview-mode\"))return false;const url=window.location.href;return url.includes(\"framer.com\")&&!url.includes(\"/preview\");};if(isFramerEditor()||!isVisible)return null;const validateAccess=()=>{if(enteredKey===accessKey){setIsUnlocked(true);window.location.href=\"https://onboarding.joinmarvellous.com/\";}else{setError(\"Invalid Invite Code\");setEnteredKey(\"\");}};if(isUnlocked)return null;const isDark=darkMode;const cardBg=isDark?\"#121212\":\"#ffffff\";const textColor=isDark?\"#f5f5f5\":\"#000000\";const footerColor=isDark?\"#999999\":\"#666666\";return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(motion.div,{onClick:e=>e.stopPropagation(),initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},style:{position:\"relative\",width:\"auto\",maxWidth:\"90vw\",backgroundColor:cardBg,borderRadius:12,padding:24,boxShadow:\"0 8px 40px rgba(0,0,0,0.1)\",display:\"flex\",flexDirection:\"column\",gap:16,color:textColor,fontFamily:\"Montserrat, sans-serif\"},className:\"PasswordGateCard\",children:[/*#__PURE__*/_jsx(\"button\",{onClick:()=>setIsVisible(false),style:{position:\"absolute\",top:12,right:12,background:\"none\",border:\"none\",fontSize:18,fontWeight:\"bold\",color:\"#000\",cursor:\"pointer\",lineHeight:1},\"aria-label\":\"Close\",children:\"\\xd7\"}),/*#__PURE__*/_jsx(\"h2\",{style:{fontSize:18,fontWeight:600,margin:0},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{fontSize:14,margin:0,lineHeight:1.6,opacity:.9},children:subtitle}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:8,flexWrap:\"wrap\"},children:[/*#__PURE__*/_jsx(\"input\",{type:\"password\",value:enteredKey,onChange:e=>setEnteredKey(e.target.value),onKeyDown:e=>e.key===\"Enter\"&&validateAccess(),placeholder:inputPlaceholder,style:{flex:1,padding:\"10px 14px\",fontSize:14,borderRadius:6,border:\"none\",backgroundColor:inputBg,color:inputTextColor,fontFamily:\"inherit\"}}),/*#__PURE__*/_jsx(\"button\",{onClick:validateAccess,style:{padding:\"10px 20px\",fontSize:14,borderRadius:6,border:\"none\",backgroundColor:buttonBg,color:buttonTextColor,cursor:\"pointer\",fontWeight:500,fontFamily:\"inherit\"},children:buttonText})]}),error&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:13,color:errorColor,margin:0},children:error}),hint&&/*#__PURE__*/_jsxs(\"p\",{style:{fontSize:13,opacity:.6,margin:0},children:[\"Hint: \",hint]}),/*#__PURE__*/_jsx(\"hr\",{style:{border:\"none\",borderTop:isDark?\"1px solid #333\":\"1px solid #eee\",margin:0}}),/*#__PURE__*/_jsx(\"p\",{style:{fontSize:12,color:footerColor,margin:0,lineHeight:1.6},children:footerText})]}),/*#__PURE__*/_jsx(\"style\",{children:`\n                @media (max-width: 480px) {\n                    .PasswordGateCard {\n                        padding: 16px !important;\n                    }\n                }\n                `})]});}PasswordGate.defaultProps={accessKey:\"secret123\",title:\"Access Required\",subtitle:\"This case study is protected due to confidentiality agreements and is intended only for professional viewing.\",hint:\"\",footerText:\"To request access, please email XYZ@gmail.com – I usually respond within 90min unless I’m asleep.\",inputBg:\"#f1f1f1\",inputTextColor:\"#000000\",inputPlaceholder:\"Enter access key\",buttonText:\"Unlock\",buttonBg:\"#000000\",buttonTextColor:\"#ffffff\",errorColor:\"#e63946\",darkMode:false};addPropertyControls(PasswordGate,{accessKey:{type:ControlType.String,title:\"Access Key\"},title:{type:ControlType.String,title:\"Title\"},subtitle:{type:ControlType.String,title:\"Subtitle\",multiline:true},hint:{type:ControlType.String,title:\"Hint\"},footerText:{type:ControlType.String,title:\"Footer Text\",multiline:true},inputBg:{type:ControlType.Color,title:\"Input Background\"},inputTextColor:{type:ControlType.Color,title:\"Input Text Color\"},inputPlaceholder:{type:ControlType.String,title:\"Input Placeholder\"},buttonText:{type:ControlType.String,title:\"Button Text\"},buttonBg:{type:ControlType.Color,title:\"Button Background\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text Color\"},errorColor:{type:ControlType.Color,title:\"Error Text Color\"},darkMode:{type:ControlType.Boolean,title:\"Dark Mode\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PasswordGate\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Password_Gate.map"],"mappings":"8OAGoM,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,YAAU,QAAM,WAAS,OAAK,aAAW,UAAQ,iBAAe,mBAAiB,aAAW,WAAS,kBAAgB,aAAW,YAAU,EAAW,CAAC,EAAW,GAAeA,EAAS,GAAG,CAAM,CAAC,EAAW,GAAeA,EAAS,GAAM,CAAM,CAAC,EAAM,GAAUA,EAAS,GAAG,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAK,CAAkX,QAAxV,CAAC,GAAU,IAAS,OAAY,MAAO,GAAoE,GAA3D,E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