{"version":3,"file":"Embed.BJbKDoO5.mjs","names":["useState","React","useState","useRef","__esmMin","_e","de","p","c","init_jsx_runtime","init_npm_react_18_3_1","e","ce","motion","init_framer_motion_DhsWWWsN","addPropertyControls","init_framer_BWFVvmND","ControlType","emptyStateStyle","useIsOnCanvas","init_OIjZRBmWDcIE2B6qgG1j","containerStyles","NumberCounter","props","count","setCount","startNumber","isVisible","setIsVisible","ref","observer","entry","entries","endNumber","intervalId","prevCount","loop","speed","formatCount","decimalSeparator","number","NumberCounterStyles","fontSize","font","fontColor","prefix","suffix","init_Counter","init_default_utils","Embed","type","url","EmbedURL","html","EmbedHTML","Instructions","centerTextStyle","onCanvas","state","setState","isLastEffect","load","response","isBlocked","message","error","ErrorMessage","LoadingIndicator","iframeStyle","getSandbox","result","hasScript","div","executeScripts","htmlStyle","node","script","name","value","child","init_Embed"],"sources":["https:/framerusercontent.com/modules/ezyX6ESQdM7Jwy9w8K3k/8ItUU1ipe0TOkhkZ8CWl/Counter.js","https:/framer.com/m/framer/default-utils.js","https:/framerusercontent.com/modules/o1PI5S8YtkA5bP5g4dFz/9zLIz4fn80IR9zpOx18Q/Embed.js"],"sourcesContent":["import{jsxs as _jsxs}from\"react/jsx-runtime\";import React,{useState,useEffect}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";const NumberCounterStyles={display:\"flex\",justifyContent:\"left\",alignItems:\"left\"};export function NumberCounter(props){const{startNumber,endNumber,speed,prefix,suffix,loop,decimalSeparator,fontSize,font,fontColor}=props;const[count,setCount]=useState(startNumber);const[isVisible,setIsVisible]=useState(false);const ref=React.useRef(null);useEffect(()=>{const observer=new IntersectionObserver(entries=>{const entry=entries[0];setIsVisible(entry.isIntersecting);});if(ref.current){observer.observe(ref.current);}return()=>{if(ref.current){observer.unobserve(ref.current);}};},[]);useEffect(()=>{if(isVisible&&startNumber!==endNumber){const intervalId=setInterval(()=>{if(count<endNumber){setCount(prevCount=>prevCount+1);}else if(loop){setCount(startNumber);}},speed);return()=>{clearInterval(intervalId);};}},[count,startNumber,endNumber,loop,isVisible]);const formatCount=number=>{if(decimalSeparator===\"comma\"){return number.toLocaleString(\"en-US\");}else if(decimalSeparator===\"period\"){return number.toLocaleString(\"en-US\").replace(/,/g,\".\");}else{return number.toFixed(0);}};return /*#__PURE__*/ _jsxs(motion.div,{ref:ref,style:{...NumberCounterStyles,gap:`${fontSize/2}px`,flexDirection:\"row\",alignItems:\"left\",fontSize:`${fontSize}px`,fontFamily:font.fontFamily,fontWeight:font.fontWeight,color:fontColor},children:[prefix,formatCount(count),suffix]});}NumberCounter.defaultProps={startNumber:0,endNumber:10,speed:100,prefix:\"\",suffix:\"\",loop:false,decimalSeparator:\"comma\",fontSize:16,font:{fontFamily:\"Arial\",fontWeight:400,systemFont:true},fontColor:\"#707070\"};addPropertyControls(NumberCounter,{font:{title:\"Font\",type:ControlType.Font,defaultValue:{fontFamily:\"Arial\",fontWeight:400,systemFont:true}},fontSize:{title:\"Font Size\",type:ControlType.Number,min:8,max:200,step:1},fontColor:{type:ControlType.Color,title:\"Font Color\"},startNumber:{type:ControlType.Number,title:\"Start Number\",defaultValue:0,displayStepper:true},endNumber:{type:ControlType.Number,title:\"End Number\",defaultValue:10,displayStepper:true},decimalSeparator:{type:ControlType.Enum,title:\"Decimal Separator\",defaultValue:\"comma\",options:[\"comma\",\"period\",\"none\"],optionTitles:[\"Comma (1,000)\",\"Period (1.000)\",\"None\"]},speed:{type:ControlType.Number,title:\"Speed (ms)\",defaultValue:100,min:0,max:1e3,step:10},prefix:{type:ControlType.String,title:\"Prefix\",defaultValue:\"\"},suffix:{type:ControlType.String,title:\"Suffix\",defaultValue:\"\"},loop:{type:ControlType.Boolean,title:\"Loop Animation\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"NumberCounter\":{\"type\":\"reactComponent\",\"name\":\"NumberCounter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Counter.map","/*\n * index (framer/default-utils@0.45.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/G4IfyjvwmaeSBpdb4TWu/OIjZRBmWDcIE2B6qgG1j/index.js\"\n","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{useIsOnCanvas,emptyStateStyle,containerStyles}from\"https://framer.com/m/framer/default-utils.js\";/**\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 400\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n *\n * @framerDisableUnlink\n */ export default function Embed({type,url,html}){if(type===\"url\"&&url){return /*#__PURE__*/ _jsx(EmbedURL,{url:url});}if(type===\"html\"&&html){return /*#__PURE__*/ _jsx(EmbedHTML,{html:html});}return /*#__PURE__*/ _jsx(Instructions,{});};addPropertyControls(Embed,{type:{type:ControlType.Enum,defaultValue:\"url\",displaySegmentedControl:true,options:[\"url\",\"html\"],optionTitles:[\"URL\",\"HTML\"]},url:{title:\"URL\",type:ControlType.String,description:\"Some websites don’t support embedding.\",hidden(props){return props.type!==\"url\";}},html:{title:\"HTML\",displayTextArea:true,type:ControlType.String,hidden(props){return props.type!==\"html\";}}});function Instructions(){return /*#__PURE__*/ _jsx(\"div\",{style:{...emptyStateStyle,overflow:\"hidden\"},children:/*#__PURE__*/ _jsx(\"div\",{style:centerTextStyle,children:\"To embed a website or widget, add it to the properties\\xa0panel.\"})});}function EmbedURL({url}){// Add https:// if the URL does not have a protocol.\nif(!/[a-z]+:\\/\\//.test(url)){url=\"https://\"+url;}const onCanvas=useIsOnCanvas();// We need to check if the url is blocked inside an iframe by the X-Frame-Options\n// or Content-Security-Policy headers on the backend.\nconst[state,setState]=useState(onCanvas?undefined:false);useEffect(()=>{// We only want to check on the canvas.\n// On the website we want to avoid the additional delay.\nif(!onCanvas)return;// TODO: We could also use AbortController here.\nlet isLastEffect=true;setState(undefined);async function load(){const response=await fetch(\"https://api.framer.com/functions/check-iframe-url?url=\"+encodeURIComponent(url));if(response.status==200){const{isBlocked}=await response.json();if(isLastEffect){setState(isBlocked);}}else{const message=await response.text();console.error(message);const error=new Error(\"This site can’t be reached.\");setState(error);}}load().catch(error=>{console.error(error);setState(error);});return()=>{isLastEffect=false;};},[url]);if(!url.startsWith(\"https://\")){return /*#__PURE__*/ _jsx(ErrorMessage,{message:\"Unsupported protocol.\"});}if(state===undefined){return /*#__PURE__*/ _jsx(LoadingIndicator,{});}if(state instanceof Error){return /*#__PURE__*/ _jsx(ErrorMessage,{message:state.message});}if(state===true){const message=`Can't embed ${url} due to its content security policy.`;return /*#__PURE__*/ _jsx(ErrorMessage,{message:message});}return /*#__PURE__*/ _jsx(\"iframe\",{src:url,style:iframeStyle,loading:\"lazy\",// @ts-ignore\nfetchPriority:onCanvas?\"low\":\"auto\",referrerPolicy:\"no-referrer\",sandbox:getSandbox(onCanvas)});}const iframeStyle={width:\"100%\",height:\"100%\",border:\"none\"};function getSandbox(onCanvas){const result=[\"allow-same-origin\",\"allow-scripts\"];if(!onCanvas){result.push(\"allow-downloads\",\"allow-forms\",\"allow-modals\",\"allow-orientation-lock\",\"allow-pointer-lock\",\"allow-popups\",\"allow-popups-to-escape-sandbox\",\"allow-presentation\",\"allow-storage-access-by-user-activation\",\"allow-top-navigation-by-user-activation\");}return result.join(\" \");}function EmbedHTML({html}){const ref=useRef();// If the HTML contains a script tag we can't use\n// dangerouslySetInnerHTML because it doesn't execute\n// scripts on the client. Otherwise, we can benefit\n// from SSG by using dangerouslySetInnerHTML.\nconst hasScript=html.includes(\"</script>\");useEffect(()=>{if(!hasScript)return;const div=ref.current;div.innerHTML=html;executeScripts(div);return()=>{div.innerHTML=\"\";};},[html,hasScript]);return /*#__PURE__*/ _jsx(\"div\",{ref:ref,style:htmlStyle,dangerouslySetInnerHTML:!hasScript?{__html:html}:undefined});}const htmlStyle={width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\"};// This function replaces scripts with executable ones.\n// https://stackoverflow.com/questions/1197575/can-scripts-be-inserted-with-innerhtml\nfunction executeScripts(node){if(node instanceof Element&&node.tagName===\"SCRIPT\"){const script=document.createElement(\"script\");script.text=node.innerHTML;for(const{name,value}of node.attributes){script.setAttribute(name,value);}node.parentElement.replaceChild(script,node);}else{for(const child of node.childNodes){executeScripts(child);}}}// Generic components\nfunction LoadingIndicator(){return /*#__PURE__*/ _jsx(\"div\",{className:\"framerInternalUI-componentPlaceholder\",style:{...containerStyles,overflow:\"hidden\"},children:/*#__PURE__*/ _jsx(\"div\",{style:centerTextStyle,children:\"Loading…\"})});}function ErrorMessage({message}){return /*#__PURE__*/ _jsx(\"div\",{className:\"framerInternalUI-errorPlaceholder\",style:{...containerStyles,overflow:\"hidden\"},children:/*#__PURE__*/ _jsxs(\"div\",{style:centerTextStyle,children:[\"Error: \",message]})});}const centerTextStyle={textAlign:\"center\",minWidth:140};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Embed\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerDisableUnlink\":\"\",\"framerIntrinsicWidth\":\"600\",\"framerIntrinsicHeight\":\"400\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Embed.map"],"mappings":"A,oUAAmQ,SAAgBsB,EAAc,EAAM,CAAC,GAAK,CAAC,cAAY,YAAU,QAAM,SAAO,SAAO,OAAK,mBAAiB,WAAS,OAAK,aAAWC,EAAW,CAACC,EAAMC,GAAUzB,EAAS0B,CAAW,EAAO,CAACC,EAAUC,GAAc5B,EAAS,EAAK,EAAQ6B,EAAI5B,EAAM,OAAO,IAAI,EAAEW,MAAc,C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