{"version":3,"file":"ScrollProgress.DfpMSLTD.mjs","names":["Component","useState"],"sources":["https:/framerusercontent.com/modules/L88oIFNGe5U1zktZ8J5J/R9utDKa6Wb37LQr7605J/O6XsolL1I.js","https:/framerusercontent.com/modules/e8zrbNxbCDrIyuHX9SqG/egYtJAWp0KabjkVWkduM/PreviousPage.js","https:/framerusercontent.com/modules/XMuLdEIPSwvkCAQwWHXK/ffnuOTVkrBMqX3mEIqBG/ScrollProgress.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask='url(\\'data:image/svg+xml,<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 16 7 L 3.83 7 L 9.42 1.41 L 8 0 L 0 8 L 8 16 L 9.41 14.59 L 3.83 9 L 16 9 Z\" fill=\"var(--esondr, rgb(0,0,0))\" height=\"16px\" id=\"EjpIhA2IQ\" transform=\"translate(4 4)\" width=\"16px\"/></svg>\\') alpha no-repeat center / auto var(--framer-icon-mask-mode, add), var(--framer-icon-mask, none)';const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(motion.div,{...rest,layoutId:layoutId,ref:ref}):/*#__PURE__*/_jsx(\"div\",{...rest,ref:ref});});const getProps=({fill,height,id,width,...props})=>{return{...props,K5AAorpEW:fill??props.K5AAorpEW??\"rgb(0, 0, 0)\"};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,K5AAorpEW,...restProps}=getProps(props);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-C6EvP\",className),layoutId:layoutId,ref:ref,style:{\"--esondr\":K5AAorpEW,...style}});});const css=[`.framer-C6EvP { -webkit-mask: ${mask}; aspect-ratio: 1; background-color: var(--esondr); mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"K5AAorpEW\":\"fill\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Arrow Back\",\"color\":{\"type\":\"variable\",\"value\":\"esondr\"},\"set\":{\"localId\":\"vectorSet/DnLsXE00W\",\"id\":\"DnLsXE00W\",\"moduleId\":\"JIScivAkNLgXrcOUxHXD\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-C6EvP\");Icon.displayName=\"Arrow Back\";export default Icon;addPropertyControls(Icon,{K5AAorpEW:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Fill\",type:ControlType.Color}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerVector\":\"{\\\"name\\\":\\\"Arrow Back\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"esondr\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/DnLsXE00W\\\",\\\"id\\\":\\\"DnLsXE00W\\\",\\\"moduleId\\\":\\\"JIScivAkNLgXrcOUxHXD\\\"}}\",\"framerIntrinsicHeight\":\"24\",\"framerVariables\":\"{\\\"K5AAorpEW\\\":\\\"fill\\\"}\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerDisableUnlink\":\"true\",\"framerIntrinsicWidth\":\"24\",\"framerImmutableVariables\":\"true\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// A custom Framer code override by Chris Kellett - Framerverse\n// Get more components at www.framerverse.com\n// Previous Page Overide\n// Version 1.0\nimport{jsx as _jsx}from\"react/jsx-runtime\";/**\n * This override adds a click handler to go back in browser history\n * @param Component - The component to apply the override to\n * @returns A component with the history back functionality\n */export function withHistoryBack(Component){// This part runs once when creating the override\nreturn props=>{// This function handles the actual navigation\nconst handleGoBack=()=>{// Check if we can go back in history\nif(window.history.length>1){window.history.back();}else{// If no history exists, log a message\nconsole.log(\"No previous page in history\");}};// Return the component with our click handler\nreturn /*#__PURE__*/_jsx(Component,{...props,onClick:handleGoBack});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withHistoryBack\":{\"type\":\"reactHoc\",\"name\":\"withHistoryBack\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PreviousPage.map","// Scroll Progress Bar for Reading (green, no border radius, min height 5)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * Scroll Progress Bar\n * Shows reading progress as a bar at the top of the page.\n *\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 8\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ScrollProgress(props){const{height,background,progressColor,duration,easing,style}=props;const[progress,setProgress]=useState(0);useEffect(()=>{function updateProgress(){if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const scrollTop=window.scrollY||document.documentElement.scrollTop;const docHeight=document.documentElement.scrollHeight-window.innerHeight;const percent=docHeight>0?Math.min(1,Math.max(0,scrollTop/docHeight)):0;startTransition(()=>setProgress(percent));}updateProgress();window.addEventListener(\"scroll\",updateProgress,{passive:true});window.addEventListener(\"resize\",updateProgress);return()=>{window.removeEventListener(\"scroll\",updateProgress);window.removeEventListener(\"resize\",updateProgress);};},[]);if(RenderTarget.current()===RenderTarget.thumbnail)return null;return /*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",minHeight:4,height,background,position:\"relative\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:0,top:0,height:\"100%\",width:`${progress*100}%`,background:progressColor,transition:`width ${duration}ms ${easing}`},\"aria-valuenow\":Math.round(progress*100),\"aria-valuemin\":0,\"aria-valuemax\":100,role:\"progressbar\"})});}addPropertyControls(ScrollProgress,{height:{type:ControlType.Number,title:\"Height\",defaultValue:4,min:4,max:32,unit:\"px\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#EEEEEE\"},progressColor:{type:ControlType.Color,title:\"Progress\",defaultValue:\"#3DBA3B\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:200,min:50,max:2e3,unit:\"ms\",displayStepper:true},easing:{type:ControlType.Enum,title:\"Easing\",options:[\"linear\",\"ease\",\"ease-in\",\"ease-out\",\"ease-in-out\",\"cubic-bezier(.4,1,.4,1)\",\"cubic-bezier(.4,0,.2,1)\"],optionTitles:[\"Linear\",\"Ease\",\"Ease In\",\"Ease Out\",\"Ease In Out\",\"Cubic (Smooth)\",\"Cubic (Material)\"],defaultValue:\"cubic-bezier(.4,1,.4,1)\",displaySegmentedControl:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollProgress\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"8\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollProgress.map"],"mappings":"qbAC2C,IAAsE,IAA4B,CAAoC,EAAK,iaAAya,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAO,IAAI,CAAC,GAAG,EAAc,WAAa,MAAI,CAAC,CAAc,EAAK,MAAM,CAAC,GAAG,EAAS,MAAI,CAAC,EAAG,CAAO,GAAU,CAAC,OAAK,SAAO,KAAG,Q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