{"version":3,"file":"GuideCO2Check.ll7fd40s.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/9dunAW1gwkOelWAzGodc/86SHC08q7MGqD5QBdI5d/GuideCO2Check.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{useIsStaticRenderer}from\"framer\";const BANDS=[{max:20,name:\"Running warm\",text:\"A shorter exhale often travels with faster, higher breathing and a lower comfort with CO2. Nothing to fix in a panic, but a sign your system may be spending energy it doesn’t need to. Galpin’s calibration would start you with short, gentle slow-breathing, around 2 to 3 seconds each way.\"},{max:40,name:\"Moderate\",text:\"A solid, middle-of-the-range result. Comfortable, unforced slow breathing over a few weeks tends to move this. Try slow-breathing sides of around 4 to 6 seconds.\"},{max:60,name:\"Good comfort\",text:\"A relaxed, economical relationship with CO2. You can likely slow your breathing further and stay comfortable. Keep tracking your own trend rather than the band.\"},{max:999,name:\"High comfort\",text:\"A long, controlled exhale and an easy relationship with CO2. From here the number matters far less than consistency. Watch your own baseline over time.\"}];const INK=\"#262628\";const MUTED=\"#575757\";const FAINT=\"#696969\";const HAIR=\"rgba(28,29,29,0.12)\";const DARK=\"#07090E\";const SLATE=\"#93A4B6\";const CIRC=553;/**\n * The carbon-dioxide comfort check for the Essential Guides: a timed\n * slow-exhale self-test with result bands (Mackenzie / SHIFT). Framed as a\n * self-awareness tool, never a diagnosis. Includes the safety note.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function GuideCO2Check(props){const isStatic=useIsStaticRenderer();const[running,setRunning]=useState(false);const[seconds,setSeconds]=useState(0);const[finalTime,setFinalTime]=useState(null);const startRef=useRef(0);const rafRef=useRef(null);useEffect(()=>{return()=>{if(rafRef.current!==null)cancelAnimationFrame(rafRef.current);};},[]);function tick(){const s=(performance.now()-startRef.current)/1e3;setSeconds(s);rafRef.current=requestAnimationFrame(tick);}function handleMain(){if(isStatic)return;if(!running){startRef.current=performance.now();startTransition(()=>{setRunning(true);setFinalTime(null);setSeconds(0);});rafRef.current=requestAnimationFrame(tick);}else{if(rafRef.current!==null)cancelAnimationFrame(rafRef.current);const s=(performance.now()-startRef.current)/1e3;startTransition(()=>{setRunning(false);setSeconds(s);setFinalTime(s);});}}function handleReset(){if(rafRef.current!==null)cancelAnimationFrame(rafRef.current);startTransition(()=>{setRunning(false);setSeconds(0);setFinalTime(null);});}const frac=Math.min(seconds/80,1);const band=finalTime!==null?BANDS.find(b=>finalTime<b.max)||BANDS[BANDS.length-1]:null;const markerPct=finalTime!==null?Math.max(0,Math.min(100,finalTime/80*100)):0;const btnBase={font:\"600 15px/1 'Hanken Grotesk', system-ui, sans-serif\",borderRadius:10,padding:\"13px 26px\",cursor:\"pointer\"};return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,position:\"relative\",display:\"flex\",flexDirection:\"column\",gap:20,background:\"#FFFFFF\",border:\"1px solid rgba(28,29,29,0.12)\",borderRadius:20,padding:\"clamp(20px, 5vw, 36px)\",fontFamily:\"'Hanken Grotesk', system-ui, sans-serif\",color:INK},role:\"group\",\"aria-label\":\"Carbon dioxide comfort check, a slow exhale self test\",children:[/*#__PURE__*/_jsx(\"div\",{style:{font:\"600 11px/1.2 'Hanken Grotesk', system-ui, sans-serif\",letterSpacing:\"1.4px\",textTransform:\"uppercase\",color:SLATE},children:\"Interactive \\xb7 The CO2 comfort check\"}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,font:\"400 15px/1.6 'Hanken Grotesk', system-ui, sans-serif\",color:MUTED},children:\"Sit down and breathe normally for a few breaths. Take an easy, normal inhale through the nose. Then exhale as slowly, quietly and evenly as you can. Press Start as you begin the exhale, and Stop the moment you need to inhale again. No straining, no forcing the last drops of air out.\"}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",gap:16,padding:\"10px 0 4px\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:200,height:200},children:[/*#__PURE__*/_jsxs(\"svg\",{viewBox:\"0 0 200 200\",width:\"200\",height:\"200\",\"aria-hidden\":\"true\",children:[/*#__PURE__*/_jsx(\"circle\",{cx:\"100\",cy:\"100\",r:\"88\",fill:\"none\",stroke:\"rgba(28,29,29,0.12)\",strokeWidth:\"2\"}),/*#__PURE__*/_jsx(\"circle\",{cx:\"100\",cy:\"100\",r:\"88\",fill:\"none\",stroke:SLATE,strokeWidth:\"4\",strokeLinecap:\"round\",strokeDasharray:CIRC,strokeDashoffset:CIRC*(1-frac),transform:\"rotate(-90 100 100)\"})]}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",inset:0,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",gap:2},\"aria-live\":\"polite\",children:[/*#__PURE__*/_jsx(\"span\",{style:{font:\"500 13px/1.3 'Hanken Grotesk', system-ui, sans-serif\",color:FAINT},children:running?\"Exhale slowly…\":finalTime!==null?\"Your slow-exhale time\":\"Ready when you are\"}),/*#__PURE__*/_jsx(\"span\",{style:{font:\"500 40px/1.1 'Hanken Grotesk', system-ui, sans-serif\",color:INK,fontVariantNumeric:\"tabular-nums\"},children:finalTime!==null?finalTime.toFixed(1):Math.floor(seconds)}),/*#__PURE__*/_jsx(\"span\",{style:{font:\"400 12px/1.2 'Hanken Grotesk', system-ui, sans-serif\",color:FAINT},children:\"seconds\"})]})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:10},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:handleMain,style:{...btnBase,background:running?\"#FFFFFF\":DARK,color:running?INK:\"#FFFFFF\",border:running?`1px solid ${HAIR}`:`1px solid ${DARK}`},children:running?\"Stop\":\"Start\"}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:handleReset,style:{...btnBase,background:\"#FFFFFF\",color:MUTED,border:`1px solid ${HAIR}`},children:\"Reset\"})]})]}),band&&finalTime!==null&&/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:10,background:\"#F8F6F2\",borderRadius:14,padding:\"18px 20px\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",height:6,borderRadius:3,background:\"rgba(28,29,29,0.12)\"},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:-4,left:`${markerPct}%`,width:14,height:14,marginLeft:-7,borderRadius:\"50%\",background:DARK,border:\"2px solid #FFFFFF\"}})}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",justifyContent:\"space-between\",font:\"400 11px/1.2 'Hanken Grotesk', system-ui, sans-serif\",color:FAINT},children:[/*#__PURE__*/_jsx(\"span\",{children:\"0s\"}),/*#__PURE__*/_jsx(\"span\",{children:\"20\"}),/*#__PURE__*/_jsx(\"span\",{children:\"40\"}),/*#__PURE__*/_jsx(\"span\",{children:\"60\"}),/*#__PURE__*/_jsx(\"span\",{children:\"80s+\"})]}),/*#__PURE__*/_jsx(\"div\",{style:{font:\"500 18px/1.3 'Hanken Grotesk', system-ui, sans-serif\",color:INK},children:band.name}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,font:\"400 14px/1.55 'Hanken Grotesk', system-ui, sans-serif\",color:MUTED},children:band.text})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:8,borderTop:`1px solid rgba(28,29,29,0.12)`,paddingTop:16},children:[/*#__PURE__*/_jsx(\"span\",{style:{font:\"600 11px/1.2 'Hanken Grotesk', system-ui, sans-serif\",letterSpacing:\"1.3px\",textTransform:\"uppercase\",color:MUTED},children:\"Read this first\"}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,font:\"400 13px/1.55 'Hanken Grotesk', system-ui, sans-serif\",color:MUTED},children:\"This is a slow exhale, never a breath-hold. Do it sitting down. Never near water or while driving. Stop at once if you feel dizzy or lightheaded; that is your cue to breathe normally. The bands come from Brian Mackenzie / SHIFT and are a rough guide only. The real signal is your own number over time, measured the same way, not where you sit against anyone else. This is a self-awareness check, not a medical test or a measure of anxiety.\"})]})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GuideCO2Check\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GuideCO2Check.map"],"mappings":"sLAOG,SAAwB,EAAc,EAAM,CAAC,IAAM,EAAS,EAAoB,EAAO,CAAC,EAAQ,GAAYA,EAAS,EAAK,EAAO,CAAC,EAAQ,GAAYA,EAAS,CAAC,EAAO,CAAC,EAAU,GAAcA,EAAS,IAAI,EAAQ,EAASC,EAAO,CAAC,EAAQ,EAAOA,EAAO,IAAI,EAAE,UAAyB,CAAI,EAAO,UAAU,MAAK,qBAAqB,EAAO,OAAO,CAAE,EAAI,CAAC,CAAC,EAAE,SAAS,GAAM,CAAC,IAAM,GAAG,YAAY,IAAI,EAAE,EAAS,SAAS,IAAI,EAAW,CAAC,EAAE,EAAO,QAAQ,sBAAsB,CAAI,CAAE,CAAC,SAAS,GAAY,CAAI,MAAgB,GAAG,CAAC,EAAS,EAAS,QAAQ,YAAY,IAAI,EAAE,MAAoB,CAAC,EAAW,EAAI,EAAE,EAAa,IAAI,EAAE,EAAW,CAAC,CAAE,CAAC,EAAE,EAAO,QAAQ,sBAAsB,CAAI,MAAO,CAAI,EAAO,UAAU,MAAK,qBAAqB,EAAO,OAAO,EAAE,IAAM,GAAG,YAAY,IAAI,EAAE,EAAS,SAAS,IAAI,MAAoB,CAAC,EAAW,EAAK,EAAE,EAAW,CAAC,EAAE,EAAa,CAAC,CAAE,CAAC,CAAE,CAAC,CAAC,SAAS,GAAa,CAAI,EAAO,UAAU,MAAK,qBAAqB,EAAO,OAAO,EAAE,MAAoB,CAAC,EAAW,EAAK,EAAE,EAAW,CA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