{"version":3,"file":"ProgressBar.DVYcsu24.mjs","names":["useState","useRef","useState","useRef","__esmMin","init_npm_react_18_3_1","_e","p","c","init_jsx_runtime","ce","de","addPropertyControls","init_framer_DymZktPS","ControlType","RenderTarget","Icon","useInstanceId","useVideoStore","getVideoId","init_VideoFrameShared","VideoButton","_state_videoRef","_state_playerRef","props","videoState","setVideoState","videoId","setVideoId","state","ref","icon","defaultIcon","onClick","type","skipTime","_props_clickEvent","init_VideoButton","ProgressBar","isCanvas","id","isDragging","setIsDragging","dragValue","setDragValue","videoTime","setVideoTime","loadedTime","setLoadedTime","duration","inputRef","wasPlayingRef","callback","time","value","handleCSS","handle","lineCSS","line","percent","getPercentage","loadedPercent","onChange","newTime","event","onDragStart","onDragEnd","min","max","init_ProgressBar"],"sources":["https:/framerusercontent.com/modules/qocbKKZPr1xgBC57i5yM/oH7a0MP4wp4i67iebOiM/VideoButton.js","https:/framerusercontent.com/modules/YmggAKcrSS4eit65RsW2/cQymKoK8X7rYL52maiLM/ProgressBar.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState,useRef}from\"react\";import{Icon,useVideoStore,getVideoId}from\"https://framerusercontent.com/modules/6ffgsaDzsjdxRp9dCkQD/MorESSBKyWuMljhmD7Xu/VideoFrameShared.js\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 40\n * @framerIntrinsicHeight 40\n * @framerDisableUnlink\n */export default function VideoButton(props){var _state_videoRef,_state_playerRef;const{type,skipTime}=props;const[videoState,setVideoState]=useVideoStore();const[videoId,setVideoId]=useState(null);const state=videoState[videoId];const ref=useRef(null);const videoRef=state===null||state===void 0?void 0:(_state_videoRef=state.videoRef)===null||_state_videoRef===void 0?void 0:_state_videoRef.current;const playerRef=state===null||state===void 0?void 0:(_state_playerRef=state.playerRef)===null||_state_playerRef===void 0?void 0:_state_playerRef.current;useEffect(()=>{setVideoState({});},[]);useEffect(()=>{const videoId=getVideoId(ref.current);setVideoId(videoId);},[ref]);let icon=null;let defaultIcon=null;let onClick=null;switch(type){case\"play\":icon=(state===null||state===void 0?void 0:state.playing)?props.pauseIcon:props.playIcon;defaultIcon=(state===null||state===void 0?void 0:state.playing)?`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='currentColor' class='icon icon-tabler icons-tabler-filled icon-tabler-player-pause'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z' /%3E%3Cpath d='M17 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z' /%3E%3C/svg%3E\")`:`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='currentColor' class='icon icon-tabler icons-tabler-filled icon-tabler-player-play'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setPlaying){state.setPlaying(!state.playing);}};break;case\"fullscreen\":icon=props.fullscreenIcon;defaultIcon=`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-arrows-maximize'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M16 4l4 0l0 4' /%3E%3Cpath d='M14 10l6 -6' /%3E%3Cpath d='M8 20l-4 0l0 -4' /%3E%3Cpath d='M4 20l6 -6' /%3E%3Cpath d='M16 20l4 0l0 -4' /%3E%3Cpath d='M14 14l6 6' /%3E%3Cpath d='M8 4l-4 0l0 4' /%3E%3Cpath d='M4 4l6 6' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setFullscreen){state.setFullscreen(!state.fullscreen);}};break;case\"skipForward\":icon=props.skipIcon;defaultIcon=`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-reload'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747' /%3E%3Cpath d='M20 4v5h-5' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setTime){state.setTime(state.getTime()+skipTime);}};break;case\"skipBackward\":icon=props.skipIcon;defaultIcon=`url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.06694 13.041C4.25577 14.4809 4.83302 15.8423 5.73677 16.9792C6.64053 18.116 7.83669 18.9853 9.19698 19.494C10.5573 20.0027 12.0304 20.1315 13.4583 19.8666C14.8862 19.6017 16.2151 18.953 17.3024 17.9903C18.3897 17.0275 19.1944 15.787 19.6303 14.4016C20.0661 13.0163 20.1166 11.5384 19.7764 10.1266C19.4361 8.7147 18.718 7.42208 17.699 6.38734C16.6799 5.3526 15.3984 4.61477 13.9919 4.25298C10.0929 3.25298 6.05694 5.25998 4.56694 8.99998' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M4 4V9H9' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setTime){state.setTime(state.getTime()-skipTime);}};break;case\"mute\":icon=(state===null||state===void 0?void 0:state.muted)?props.unmuteIcon:props.muteIcon;defaultIcon=(state===null||state===void 0?void 0:state.muted)?`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-volume-off'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M15 8a5 5 0 0 1 1.912 4.934m-1.377 2.602a5 5 0 0 1 -.535 .464' /%3E%3Cpath d='M17.7 5a9 9 0 0 1 2.362 11.086m-1.676 2.299a9 9 0 0 1 -.686 .615' /%3E%3Cpath d='M9.069 5.054l.431 -.554a.8 .8 0 0 1 1.5 .5v2m0 4v8a.8 .8 0 0 1 -1.5 .5l-3.5 -4.5h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l1.294 -1.664' /%3E%3Cpath d='M3 3l18 18' /%3E%3C/svg%3E\")`:`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-volume'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M15 8a5 5 0 0 1 0 8' /%3E%3Cpath d='M17.7 5a9 9 0 0 1 0 14' /%3E%3Cpath d='M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a.8 .8 0 0 1 1.5 .5v14a.8 .8 0 0 1 -1.5 .5l-3.5 -4.5' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setMuted){state.setMuted(!state.muted);}};break;case\"pictureInPicture\":icon=props.pictureInPictureIcon;defaultIcon=`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-picture-in-picture'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M11 19h-6a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v4' /%3E%3Cpath d='M14 14m0 1a1 1 0 0 1 1 -1h5a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1z' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setPiP){state.setPiP(!state.pip);}};break;case\"restart\":icon=props.restartIcon;defaultIcon=`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='currentColor' class='icon icon-tabler icons-tabler-filled icon-tabler-player-track-prev'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M20.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z' /%3E%3Cpath d='M9.341 4.247l-8 7a1 1 0 0 0 0 1.506l8 7c.647 .565 1.659 .106 1.659 -.753v-14c0 -.86 -1.012 -1.318 -1.659 -.753z' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setTime){state.setTime(0);}};break;case\"toggleLoop\":icon=(state===null||state===void 0?void 0:state.loop)?props.loopOnIcon:props.loopOffIcon;defaultIcon=(state===null||state===void 0?void 0:state.loop)?`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-repeat'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3' /%3E%3Cpath d='M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3' /%3E%3C/svg%3E\")`:`url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='icon icon-tabler icons-tabler-outline icon-tabler-repeat-off'%3E%3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M4 12v-3c0 -1.336 .873 -2.468 2.08 -2.856m3.92 -.144h10m-3 -3l3 3l-3 3' /%3E%3Cpath d='M20 12v3a3 3 0 0 1 -.133 .886m-1.99 1.984a3 3 0 0 1 -.877 .13h-13m3 3l-3 -3l3 -3' /%3E%3Cpath d='M3 3l18 18' /%3E%3C/svg%3E\")`;onClick=()=>{if(state===null||state===void 0?void 0:state.setLoop){state.setLoop(!state.loop);}};break;}return /*#__PURE__*/_jsx(\"div\",{\"data-videoframe\":true,ref:ref,onMouseEnter:props.hoverEvent,onClick:()=>{var _props_clickEvent;onClick===null||onClick===void 0?void 0:onClick();(_props_clickEvent=props.clickEvent)===null||_props_clickEvent===void 0?void 0:_props_clickEvent.call(props);},style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",...props.style},children:/*#__PURE__*/_jsx(Icon,{image:icon,color:props.iconColor,size:props.iconSize,defaultImage:defaultIcon})});}VideoButton.displayName=\"Video Button\";addPropertyControls(VideoButton,{type:{type:ControlType.Enum,defaultValue:\"play\",options:[\"play\",\"fullscreen\",\"skipForward\",\"skipBackward\",\"mute\",\"pictureInPicture\",\"restart\",\"toggleLoop\"],optionTitles:[\"Play/Pause\",\"Fullscreen\",\"Skip Forward\",\"Skip Backward\",\"Mute\",\"Picture-in-Picture\",\"Restart\",\"Toggle Loop\"],title:\"Action\"},skipTime:{type:ControlType.Number,defaultValue:10,min:1,step:1,displayStepper:true,unit:\"s\",title:\"Time\",hidden:props=>props.type!==\"skipForward\"&&props.type!==\"skipBackward\"},playIcon:{type:ControlType.ResponsiveImage,hidden:props=>props.type!==\"play\"},pauseIcon:{type:ControlType.ResponsiveImage,hidden:props=>props.type!==\"play\"},fullscreenIcon:{type:ControlType.ResponsiveImage,title:\"Fullscreen\",hidden:props=>props.type!==\"fullscreen\"},minimizeIcon:{type:ControlType.ResponsiveImage,title:\"Minimize\",hidden:props=>props.type!==\"fullscreen\"},skipIcon:{type:ControlType.ResponsiveImage,title:\"Icon\",hidden:props=>props.type!==\"skipForward\"&&props.type!==\"skipBackward\"},muteIcon:{type:ControlType.ResponsiveImage,title:\"Mute\",hidden:props=>props.type!==\"mute\"},unmuteIcon:{type:ControlType.ResponsiveImage,title:\"Unmute\",hidden:props=>props.type!==\"mute\"},pictureInPictureIcon:{type:ControlType.ResponsiveImage,title:\"Icon\",hidden:props=>props.type!==\"pictureInPicture\"},restartIcon:{type:ControlType.ResponsiveImage,title:\"Icon\",hidden:props=>props.type!==\"restart\"},loopOnIcon:{type:ControlType.ResponsiveImage,title:\"Loop On\",hidden:props=>props.type!==\"toggleLoop\"},loopOffIcon:{type:ControlType.ResponsiveImage,title:\"Loop Off\",hidden:props=>props.type!==\"toggleLoop\"},iconColor:{type:ControlType.Color,defaultValue:\"#FFF\",optional:true},iconSize:{type:ControlType.Number,defaultValue:20,min:1,step:1,displayStepper:true},hoverEvent:{type:ControlType.EventHandler,title:\"Hover\"},clickEvent:{type:ControlType.EventHandler,title:\"Click\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VideoButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"40\",\"framerIntrinsicHeight\":\"40\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useEffect,useState,useRef}from\"react\";import{useVideoStore,getVideoId,useInstanceId}from\"https://framerusercontent.com/modules/6ffgsaDzsjdxRp9dCkQD/MorESSBKyWuMljhmD7Xu/VideoFrameShared.js\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 200\n * @framerDisableUnlink\n */export default function ProgressBar(props){var _handle_border,_handle_border1;const{line,handle}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const id=useInstanceId();const[videoState,setVideoState]=useVideoStore();const[videoId,setVideoId]=useState(null);const[isDragging,setIsDragging]=useState(false);const[dragValue,setDragValue]=useState(0);const[videoTime,setVideoTime]=useState(0);const[loadedTime,setLoadedTime]=useState(0);const state=videoState[videoId];const duration=(state===null||state===void 0?void 0:state.duration)||0;const ref=useRef(null);const inputRef=useRef(null);const wasPlayingRef=useRef(false);useEffect(()=>{const callback=time=>{if(time[0]!==null){setVideoTime(time[0]);}if(time[1]!==null){setLoadedTime(time[1]);}};if(state===null||state===void 0?void 0:state.addTimeCallback){state.addTimeCallback(callback);}return()=>{if(state===null||state===void 0?void 0:state.removeTimeCallback){state.removeTimeCallback(callback);}};},[!state]);useEffect(()=>{setVideoState({});},[]);useEffect(()=>{const videoId=getVideoId(ref.current);setVideoId(videoId);},[ref]);const value=isDragging?dragValue:videoTime;const step=.1;var _handle_border_color;const handleCSS=`appearance: none;\n        -webkit-appearance: none;\n        width: ${handle.size}px;\n        height: ${handle.size}px;\n        border-radius: ${handle.radius};\n        background-color: ${handle.fill};\n        box-sizing: border-box;\n        border-width: ${((_handle_border=handle.border)===null||_handle_border===void 0?void 0:_handle_border.width)||0}px;\n        border-style: ${handle.border?\"solid\":\"none\"};\n        border-color: ${(_handle_border_color=(_handle_border1=handle.border)===null||_handle_border1===void 0?void 0:_handle_border1.color)!==null&&_handle_border_color!==void 0?_handle_border_color:\"none\"};\n        box-shadow: ${handle.shadows};`;const lineCSS=`appearance: none;\n        -webkit-appearance: none;\n        height: ${line.height}px;`;const percent=isCanvas?props.preview:getPercentage(value,0,duration);const loadedPercent=getPercentage(loadedTime,0,duration);const onChange=event=>{if(isDragging){const newTime=Number(event.target.value);setDragValue(newTime);}};const onDragStart=()=>{if(state===null||state===void 0?void 0:state.playing){wasPlayingRef.current=true;state.setPlaying(false);}setIsDragging(true);};const onDragEnd=()=>{if(state){state.setTime(dragValue);if(wasPlayingRef.current){wasPlayingRef.current=false;state.setPlaying(true);}}setIsDragging(false);};return /*#__PURE__*/_jsxs(\"div\",{\"data-videoframe\":true,ref:ref,id:id,style:{display:\"flex\",flexDirection:\"row\",alignItems:\"center\",...props.style},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",flex:1,height:Math.max(handle.size,line.height),display:\"flex\",flexDirection:\"row\",alignItems:\"center\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{height:line.height,background:loadedPercent>percent&&line.loadedFill?`linear-gradient(to right, ${line.playedFill} ${percent}%, ${line.loadedFill} ${percent}%, ${line.loadedFill} ${loadedPercent}%, ${line.unplayedFill} ${loadedPercent}%)`:`linear-gradient(to right, ${line.playedFill} ${percent}%, ${line.unplayedFill} ${percent}%)`,boxShadow:line.shadows,borderRadius:line.radius,flex:1}}),/*#__PURE__*/_jsx(\"input\",{ref:inputRef,type:\"range\",name:props.name,min:0,max:isCanvas?100:duration,step:step,value:isCanvas?props.preview:value,onChange:onChange,onMouseDown:onDragStart,onMouseUp:onDragEnd,style:{position:\"absolute\",inset:0,display:\"block\",appearance:\"none\",outline:\"none\",margin:0,cursor:\"pointer\",background:\"none\"}})]}),/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:`#${id} input[type=range]::-webkit-slider-thumb {${handleCSS}\n                        translate: 0 ${(-handle.size+line.height)/2-(line.border?Math.min(line.border.width,line.height/2):0)}px;    \n                    }\n                    #${id} input[type=range]::-moz-range-thumb {${handleCSS}}\n                    #${id} input[type=range]::-webkit-slider-runnable-track {${lineCSS}}\n                    #${id} input[type=range]::-moz-range-track {${lineCSS}}\n                    #${id} input[type=range]::-moz-range-progress {${lineCSS}}`}})]});}ProgressBar.displayName=\"Progress Bar\";addPropertyControls(ProgressBar,{line:{type:ControlType.Object,buttonTitle:\"Style\",controls:{height:{type:ControlType.Number,defaultValue:4,min:1,step:1,displayStepper:true},playedFill:{type:ControlType.Color,defaultValue:\"#FFF\",title:\"Played\"},unplayedFill:{type:ControlType.Color,defaultValue:\"rgba(187, 187, 187, 0.3)\",title:\"Unplayed\"},loadedFill:{type:ControlType.Color,optional:true,defaultValue:\"rgba(187, 187, 187, 0.5)\",title:\"Loaded\",description:\"Only for YouTube and Vimeo videos\"},radius:{type:ControlType.BorderRadius,defaultValue:\"2px\"},shadows:{type:ControlType.BoxShadow}}},handle:{type:ControlType.Object,buttonTitle:\"Style\",icon:\"boolean\",controls:{size:{type:ControlType.Number,defaultValue:16,min:0,step:1},fill:{type:ControlType.Color,defaultValue:\"#FFF\"},radius:{type:ControlType.BorderRadius,defaultValue:\"8px\"},border:{type:ControlType.Object,optional:true,controls:{color:{type:ControlType.Color,defaultValue:\"#222\"},width:{type:ControlType.Number,defaultValue:1,min:0,step:1,displayStepper:true},style:{type:ControlType.Enum,defaultValue:\"solid\",options:[\"solid\",\"dashed\",\"dotted\",\"double\"],optionTitles:[\"Solid\",\"Dashed\",\"Dotted\",\"Double\"]}}},shadows:{type:ControlType.BoxShadow,defaultValue:\"0px 4px 6px 0px rgba(0, 0, 0, 0.2)\"}}},preview:{type:ControlType.Number,defaultValue:50,min:0,max:100,step:1,unit:\"%\"}});function getPercentage(value,min,max){if(min===max){return value===min?0:100;}// Ensure min is less than max by swapping if necessary\nif(min>max){[min,max]=[max,min];}// Clamp the value to be within the min and max range\nvalue=Math.max(min,Math.min(value,max));const percentage=(value-min)/(max-min)*100;return percentage;}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProgressBar\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicWidth\":\"200\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProgressBar.map"],"mappings":"A,wRAMG,SAAwBqB,EAAY,EAAM,CAAC,IAAIC,EAAgBC,EAAiB,GAAK,CAAC,OAAK,YAAUC,EAAW,CAACC,EAAWC,GAAeR,EAAc,EAAO,CAACS,EAAQC,GAAY5B,EAAS,IAAI,EAAQ6B,EAAMJ,EAAWE,GAAeG,EAAI7B,EAAO,IAAI,EAAiB4B,GAAQ,OAA6B,EAAgBA,EAAM,WAAY,MAAsCP,EAAgB,QAAwBO,GAAQ,OAA6B,EAAiBA,EAAM,YAAa,MAAuCN,EAAiB,QAAQb,MAAc,CAACgB,EAAc,CAAC,CAAC,CAAE,EAAE,CAAC,CAAC,EAAEhB,MAAc,CAAC,IAAMiB,EAAQR,EAAWW,EAAI,OAAO,EAAEF,EAAWD,CAAO,CAAE,EAAE,CAACG,CAAG,CAAC,EAAE,IAAIC,EAAK,KAASC,EAAY,KAASC,EAAQ,KAAK,OAAOC,EAAP,CAAa,IAAI,OAAO,EAAML,GAA0C,QAASL,EAAM,UAAUA,EAAM,SAAS,EAAaK,GAA0C,QAAS,4cAA4c,kXAAkX,MAAY,CAAIA,GAA0C,YAAYA,EAAM,WAAW,CAACA,EAAM,OAAO,CAAG,EAAE,MAAM,IAAI,aAAa,EAAKL,EAAM,eAAe,EAAY,wkBAAwkB,MAAY,CAAIK,GAA0C,eAAeA,EAAM,cAAc,CAACA,E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