{"version":3,"file":"ThemeToggle.vksbSLSe.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/hfKWUHoVSPY2mBIUcmRh/b9bzXKxAkBIWiZCiWPnr/ThemeToggle.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";import{useState,useEffect}from\"react\";import{createPortal}from\"react-dom\";const SPRING={type:\"spring\",stiffness:380,damping:26};const THEME_VARS_ID=\"tb-theme-vars\";const PORTAL_ID=\"tb-toggle-portal\";const NAV_OVERRIDE_ID=\"tb-nav-override\";const THEME_CSS=`\n:root, :root[data-framer-theme=\"dark\"] {\n  --tb-bg: rgb(10, 10, 10);\n  --tb-surface: rgb(16, 18, 22);\n  --tb-card: rgb(13, 15, 19);\n  --tb-text: rgb(245, 245, 245);\n  --tb-text-85: rgba(245, 245, 245, 0.85);\n  --tb-text-75: rgba(245, 245, 245, 0.75);\n  --tb-text-65: rgba(245, 245, 245, 0.65);\n  --tb-text-45: rgba(245, 245, 245, 0.45);\n  --tb-text-30: rgba(245, 245, 245, 0.30);\n  --tb-text-18: rgba(245, 245, 245, 0.18);\n  --tb-divider: rgba(255, 255, 255, 0.07);\n  --tb-border: rgba(255, 255, 255, 0.06);\n  --tb-border-04: rgba(255, 255, 255, 0.04);\n  --tb-border-14: rgba(255, 255, 255, 0.14);\n  --tb-border-15: rgba(255, 255, 255, 0.15);\n  --tb-white-03: rgba(255, 255, 255, 0.03);\n  --tb-badge-bg: rgba(10, 10, 10, 0.85);\n  --tb-highlight: rgba(255, 255, 255, 0.16);\n  --tb-shadow-heavy: rgba(0, 0, 0, 0.55);\n  --tb-inset: rgba(255, 255, 255, 0.04);\n  --tb-green: rgb(74, 222, 128);\n  --tb-green-06: rgba(74, 222, 128, 0.06);\n  --tb-green-07: rgba(74, 222, 128, 0.07);\n  --tb-green-15: rgba(74, 222, 128, 0.15);\n  --tb-green-18: rgba(74, 222, 128, 0.18);\n  --tb-green-20: rgba(74, 222, 128, 0.20);\n  --tb-green-glow: rgba(74, 222, 128, 0.70);\n  --tb-pca: rgb(96, 165, 250);\n  --tb-pca-04: rgba(96, 165, 250, 0.04);\n  --tb-pca-06: rgba(96, 165, 250, 0.06);\n  --tb-pca-08: rgba(96, 165, 250, 0.08);\n  --tb-pca-12: rgba(96, 165, 250, 0.12);\n  --tb-pca-18: rgba(96, 165, 250, 0.18);\n  --tb-pca-20: rgba(96, 165, 250, 0.20);\n  --tb-pca-35: rgba(96, 165, 250, 0.35);\n  --tb-pca-45: rgba(96, 165, 250, 0.45);\n  --tb-ss: rgb(244, 114, 182);\n  --tb-ss-08: rgba(244, 114, 182, 0.08);\n  --tb-ss-18: rgba(244, 114, 182, 0.18);\n  --tb-nav-track: rgba(255, 255, 255, 0.08);\n  --tb-nav-dot: rgba(255, 255, 255, 0.18);\n  --tb-nav-label: rgba(255, 255, 255, 0.30);\n}\n:root[data-framer-theme=\"light\"] {\n  --tb-bg: rgb(250, 250, 250);\n  --tb-surface: rgb(235, 236, 240);\n  --tb-card: rgb(225, 227, 232);\n  --tb-text: rgb(12, 12, 12);\n  --tb-text-85: rgba(12, 12, 12, 0.85);\n  --tb-text-75: rgba(12, 12, 12, 0.75);\n  --tb-text-65: rgba(12, 12, 12, 0.65);\n  --tb-text-45: rgba(12, 12, 12, 0.45);\n  --tb-text-30: rgba(12, 12, 12, 0.30);\n  --tb-text-18: rgba(12, 12, 12, 0.18);\n  --tb-divider: rgba(0, 0, 0, 0.08);\n  --tb-border: rgba(0, 0, 0, 0.07);\n  --tb-border-04: rgba(0, 0, 0, 0.04);\n  --tb-border-14: rgba(0, 0, 0, 0.10);\n  --tb-border-15: rgba(0, 0, 0, 0.12);\n  --tb-white-03: rgba(0, 0, 0, 0.02);\n  --tb-badge-bg: rgba(245, 245, 245, 0.88);\n  --tb-highlight: rgba(0, 0, 0, 0.06);\n  --tb-shadow-heavy: rgba(0, 0, 0, 0.12);\n  --tb-inset: rgba(0, 0, 0, 0.03);\n  --tb-green: rgb(22, 163, 74);\n  --tb-green-06: rgba(22, 163, 74, 0.06);\n  --tb-green-07: rgba(22, 163, 74, 0.07);\n  --tb-green-15: rgba(22, 163, 74, 0.15);\n  --tb-green-18: rgba(22, 163, 74, 0.18);\n  --tb-green-20: rgba(22, 163, 74, 0.20);\n  --tb-green-glow: rgba(22, 163, 74, 0.60);\n  --tb-pca: rgb(37, 99, 235);\n  --tb-pca-04: rgba(37, 99, 235, 0.04);\n  --tb-pca-06: rgba(37, 99, 235, 0.06);\n  --tb-pca-08: rgba(37, 99, 235, 0.08);\n  --tb-pca-12: rgba(37, 99, 235, 0.12);\n  --tb-pca-18: rgba(37, 99, 235, 0.18);\n  --tb-pca-20: rgba(37, 99, 235, 0.20);\n  --tb-pca-35: rgba(37, 99, 235, 0.35);\n  --tb-pca-45: rgba(37, 99, 235, 0.45);\n  --tb-ss: rgb(190, 24, 93);\n  --tb-ss-08: rgba(190, 24, 93, 0.08);\n  --tb-ss-18: rgba(190, 24, 93, 0.18);\n  --tb-nav-track: rgba(0, 0, 0, 0.12);\n  --tb-nav-dot: rgba(0, 0, 0, 0.18);\n  --tb-nav-label: rgba(0, 0, 0, 0.35);\n}\n`;const NAV_OVERRIDE_CSS=`\n:root[data-framer-theme=\"light\"] [data-framer-name=\"Navigation 2\"] {\n  background-color: rgb(250, 250, 250) !important;\n}\n:root[data-framer-theme=\"light\"] [data-framer-name=\"BottomLine\"] {\n  background-color: rgba(0, 0, 0, 0.08) !important;\n}\n:root[data-framer-theme=\"light\"] [data-framer-name=\"Navigation 2\"] p,\n:root[data-framer-theme=\"light\"] [data-framer-name=\"Navigation 2\"] a,\n:root[data-framer-theme=\"light\"] [data-framer-name=\"Navigation 2\"] span {\n  color: rgb(12, 12, 12) !important;\n}\n`;function injectThemeVars(){if(typeof document===\"undefined\")return;if(document.getElementById(THEME_VARS_ID))return;const style=document.createElement(\"style\");style.id=THEME_VARS_ID;style.textContent=THEME_CSS;document.head.appendChild(style);}function injectNavOverride(){if(typeof document===\"undefined\")return;if(document.getElementById(NAV_OVERRIDE_ID))return;const style=document.createElement(\"style\");style.id=NAV_OVERRIDE_ID;style.textContent=NAV_OVERRIDE_CSS;document.head.appendChild(style);}function MoonIcon(){return /*#__PURE__*/_jsx(\"svg\",{width:\"15\",height:\"15\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"rgba(245,245,245,0.85)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z\"})});}function SunIcon(){return /*#__PURE__*/_jsxs(\"svg\",{width:\"15\",height:\"15\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"rgba(30,30,30,0.85)\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"circle\",{cx:\"12\",cy:\"12\",r:\"5\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"12\",y1:\"1\",x2:\"12\",y2:\"3\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"12\",y1:\"21\",x2:\"12\",y2:\"23\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"4.22\",y1:\"4.22\",x2:\"5.64\",y2:\"5.64\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"18.36\",y1:\"18.36\",x2:\"19.78\",y2:\"19.78\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"1\",y1:\"12\",x2:\"3\",y2:\"12\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"21\",y1:\"12\",x2:\"23\",y2:\"12\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"4.22\",y1:\"19.78\",x2:\"5.64\",y2:\"18.36\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"18.36\",y1:\"5.64\",x2:\"19.78\",y2:\"4.22\"})]});}export default function ThemeToggle({position=\"bottom-right\",offsetX=24,offsetY=24}){const[isDark,setIsDark]=useState(true);const[portalEl,setPortalEl]=useState(null);useEffect(()=>{injectThemeVars();injectNavOverride();const stored=localStorage.getItem(\"framer-theme\");const prefersDark=window.matchMedia(\"(prefers-color-scheme: dark)\").matches;const dark=stored?stored===\"dark\":prefersDark;setIsDark(dark);document.documentElement.setAttribute(\"data-framer-theme\",dark?\"dark\":\"light\");let el=document.getElementById(PORTAL_ID);if(!el){el=document.createElement(\"div\");el.id=PORTAL_ID;el.style.cssText=\"position:fixed;top:0;left:0;width:0;height:0;z-index:9999;pointer-events:none;\";document.body.appendChild(el);}setPortalEl(el);},[]);const toggle=()=>{const next=!isDark;setIsDark(next);localStorage.setItem(\"framer-theme\",next?\"dark\":\"light\");document.documentElement.setAttribute(\"data-framer-theme\",next?\"dark\":\"light\");};const placement=position===\"bottom-center\"?{bottom:offsetY,left:\"50%\",transform:\"translateX(-50%)\"}:position===\"bottom-left\"?{bottom:offsetY,left:offsetX}:{bottom:offsetY,right:offsetX};if(!portalEl)return null;const bg=isDark?\"rgba(16,18,22,0.88)\":\"rgba(240,240,240,0.88)\";const border=isDark?\"1px solid rgba(255,255,255,0.09)\":\"1px solid rgba(0,0,0,0.07)\";const shadow=isDark?\"0 4px 24px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.06) inset\":\"0 4px 24px rgba(0,0,0,0.12), 0 1px 0 rgba(255,255,255,0.8) inset\";return /*#__PURE__*/createPortal(/*#__PURE__*/_jsx(\"div\",{style:{position:\"fixed\",zIndex:9999,pointerEvents:\"auto\",...placement},children:/*#__PURE__*/_jsx(motion.button,{onClick:toggle,whileHover:{scale:1.08},whileTap:{scale:.93},transition:SPRING,\"aria-label\":isDark?\"Switch to light mode\":\"Switch to dark mode\",style:{width:44,height:44,borderRadius:\"50%\",border,background:bg,backdropFilter:\"blur(14px)\",WebkitBackdropFilter:\"blur(14px)\",boxShadow:shadow,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",outline:\"none\",position:\"relative\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(AnimatePresence,{mode:\"wait\",initial:false,children:isDark?/*#__PURE__*/_jsx(motion.span,{initial:{opacity:0,rotate:-30,scale:.8},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:30,scale:.8},transition:{duration:.2,ease:[.22,1,.36,1]},style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",position:\"absolute\"},children:/*#__PURE__*/_jsx(MoonIcon,{})},\"moon\"):/*#__PURE__*/_jsx(motion.span,{initial:{opacity:0,rotate:30,scale:.8},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:-30,scale:.8},transition:{duration:.2,ease:[.22,1,.36,1]},style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",position:\"absolute\"},children:/*#__PURE__*/_jsx(SunIcon,{})},\"sun\")})})}),portalEl);}addPropertyControls(ThemeToggle,{position:{type:ControlType.Enum,title:\"Position\",options:[\"bottom-right\",\"bottom-left\",\"bottom-center\"],optionTitles:[\"Bottom Right\",\"Bottom Left\",\"Bottom Center\"],defaultValue:\"bottom-right\"},offsetX:{type:ControlType.Number,title:\"Offset X\",defaultValue:24,min:0,max:120,step:4,hidden:props=>props.position===\"bottom-center\"},offsetY:{type:ControlType.Number,title:\"Offset Y\",defaultValue:24,min:0,max:120,step:4}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ThemeToggle\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ThemeToggle.map"],"mappings":"kQAqGE,SAAS,GAAiB,CAAyC,GAArC,OAAO,SAAW,KAAsB,SAAS,eAAe,EAAc,CAAC,OAAO,IAAM,EAAM,SAAS,cAAc,QAAQ,CAAC,EAAM,GAAG,EAAc,EAAM,YAAY,EAAU,SAAS,KAAK,YAAY,EAAM,CAAE,SAAS,GAAmB,CAAyC,GAArC,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