{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/FsubDUzkyfyj8Dqr7aQq/bmLA9TvQ9u5QdRqPxhvK/CashAdvanceCalculatorOverrides.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{createStore}from\"https://framerusercontent.com/modules/NF27GMRnRQIwaQZ2G9YY/yEILKTPL9l4PImY26MTI/CreateStore.js\";import{formatPrice,useLocale}from\"https://framerusercontent.com/modules/RRKeJWRObO6zvJYvvGR6/Qsx4ZWLAxrWSMmYgPYrT/Helpers.js\";const useMonthlyTpv=createStore(1e4);const useMonthsOperating=createStore(8);export function withMonthlyTpv(Component){return props=>{const[monthlyTpv,setMonthlyTpv]=useMonthlyTpv();const locale=useLocale();const text=formatPrice(monthlyTpv,locale,0);return /*#__PURE__*/_jsx(Component,{text:text,...props});};}export function withMonthsOperating(Component){return props=>{const[monthsOperating,setMonthsOperating]=useMonthsOperating();const text=String(monthsOperating);return /*#__PURE__*/_jsx(Component,{text:text,...props});};}export function withEligibleAmount(Component){return props=>{const locale=useLocale();const[monthlyTpv,setMonthlyTpv]=useMonthlyTpv();const[monthsOperating,setMonthsOperating]=useMonthsOperating();const eligibilityAmount=monthlyTpv*calculateEligibilityMultiple(monthsOperating,monthlyTpv);const text=formatPrice(eligibilityAmount,locale,0);return /*#__PURE__*/_jsx(Component,{text:text,...props});};}const calculateEligibilityMultiple=(monthsOperating,monthlyTpv)=>{if(monthsOperating<8||monthlyTpv<2e3)return 1;if(monthsOperating<9||monthlyTpv<2500)return 1.2;if(monthsOperating<10||monthlyTpv<4e3)return 1.3;if(monthsOperating<11||monthlyTpv<5e3)return 1.5;if(monthsOperating<12||monthlyTpv<6e3)return 1.6;return 2;};export function MonthlyTpvSlider(props){const{min=1e3,max=5e5,step=1e3}=props;const[monthlyTpv,setMonthlyTpv]=useMonthlyTpv();const handleChange=e=>{const newValue=e.target.value;setMonthlyTpv(newValue);};return /*#__PURE__*/_jsx(\"input\",{type:\"range\",min:min,max:max,step:step,value:monthlyTpv,onChange:handleChange});}addPropertyControls(MonthlyTpvSlider,{min:{type:ControlType.Number,title:\"Min\",defaultValue:1e3},max:{type:ControlType.Number,title:\"Max\",defaultValue:5e5},step:{type:ControlType.Number,title:\"Step\",defaultValue:1e3}});export function MonthsOperating(props){const{min=4,max=12,step=1}=props;const[monthsOperating,setMonthsOperating]=useMonthsOperating();const handleChange=e=>{const newValue=e.target.value;setMonthsOperating(newValue);};return /*#__PURE__*/_jsx(\"input\",{type:\"range\",min:min,max:max,step:step,value:monthsOperating,onChange:handleChange});}export default function SliderStyles(props){return /*#__PURE__*/_jsx(\"style\",{children:rangeSliderCSS});}const rangeSliderCSS=`\n    /********** Range Input Styles **********/\n\n    /*Range Reset*/\n    input[type=\"range\"] {\n        -webkit-appearance: none;\n        appearance: none;\n        background: transparent;\n        cursor: pointer;\n        width: 100%;\n    }\n\n    /* Removes default focus */\n    input[type=\"range\"]:focus {\n        outline: none;\n    }\n\n    /***** Chrome, Safari, Opera and Edge Chromium styles *****/\n\n    /* slider track */        \n    input[type=\"range\"]::-webkit-slider-runnable-track {\n        background-color: #999999;\n        border-radius: 0.5rem;\n        height: 0.25rem;\n    }\n\n    /* slider thumb */\n    input[type=\"range\"]::-webkit-slider-thumb {\n        -webkit-appearance: none;\n        appearance: none;\n        margin-top: -0.375rem;\n\n        /*custom styles*/\n        background-color: #008BB9;\n        height: 1rem;\n        width: 1rem;\n        border-radius: 1rem;\n    }\n\n    input[type=\"range\"]:focus::-webkit-slider-thumb {   \n        border: 1px solid #008BB9;\n        outline: 3px solid #008BB9;\n        outline-offset: 0.125rem; \n    }\n\n    /******** Firefox styles ********/\n    /* slider track */\n    input[type=\"range\"]::-moz-range-track {\n        background-color: #999999;\n        border-radius: 0.5rem;\n        height: 0.25rem;\n    }\n\n    /* slider thumb */\n    input[type=\"range\"]::-moz-range-thumb {\n        border: none;\n        border-radius: 0;\n\n        /*custom styles*/\n        background-color: #008BB9;\n        height: 1rem;\n        width: 1rem;\n        border-radius: 1rem;\n    }\n\n    input[type=\"range\"]:focus::-moz-range-thumb {\n        border: 1px solid #008BB9;\n        outline: 3px solid #008BB9;\n        outline-offset: 0.125rem;\n    }\n`;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SliderStyles\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMonthlyTpv\":{\"type\":\"reactHoc\",\"name\":\"withMonthlyTpv\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEligibleAmount\":{\"type\":\"reactHoc\",\"name\":\"withEligibleAmount\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMonthsOperating\":{\"type\":\"reactHoc\",\"name\":\"withMonthsOperating\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"MonthsOperating\":{\"type\":\"reactComponent\",\"name\":\"MonthsOperating\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"MonthlyTpvSlider\":{\"type\":\"reactComponent\",\"name\":\"MonthlyTpvSlider\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "gJAAqV,IAAMA,EAAcC,EAAY,GAAG,EAAQC,EAAmBD,EAAY,CAAC,EAAS,SAASE,EAAeC,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,EAAWC,CAAa,EAAEP,EAAc,EAAQQ,EAAOC,EAAU,EAAQC,EAAKC,EAAYL,EAAWE,EAAO,CAAC,EAAE,OAAoBI,EAAKR,EAAU,CAAC,KAAKM,EAAK,GAAGL,CAAK,CAAC,CAAE,CAAE,CAAQ,SAASQ,EAAoBT,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACS,EAAgBC,CAAkB,EAAEb,EAAmB,EAAQQ,EAAK,OAAOI,CAAe,EAAE,OAAoBF,EAAKR,EAAU,CAAC,KAAKM,EAAK,GAAGL,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,EAAEjB,EAAW,CAACS,EAAgBC,CAAkB,EAAEb,EAAmB,EAAsF,OAAoBU,EAAK,QAAQ,CAAC,KAAK,QAAQ,IAAIQ,EAAI,IAAIC,EAAI,KAAKC,EAAK,MAAMR,EAAgB,SAAhKS,GAAG,CAAC,IAAMC,EAASD,EAAE,OAAO,MAAMR,EAAmBS,CAAQ,CAAE,CAAsH,CAAC,CAAE,CAAgB,SAARI,EAA8BvB,EAAM,CAAC,OAAoBO,EAAK,QAAQ,CAAC,SAASiB,CAAc,CAAC,CAAE,CAAC,IAAMA,EAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
  "names": ["useMonthlyTpv", "createStore", "useMonthsOperating", "withMonthlyTpv", "Component", "props", "monthlyTpv", "setMonthlyTpv", "locale", "useLocale", "text", "formatPrice", "p", "withMonthsOperating", "monthsOperating", "setMonthsOperating", "withEligibleAmount", "eligibilityAmount", "calculateEligibilityMultiple", "MonthlyTpvSlider", "min", "max", "step", "e", "newValue", "addPropertyControls", "ControlType", "MonthsOperating", "SliderStyles", "rangeSliderCSS"]
}
