{"version":3,"file":"Phone_validate.CPocBxRO.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/pB7GeSCngRMEeT4egx4B/j7ZhhkgBQq08f62sh6vZ/Phone_validate.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect}from\"react\";export function withValidate(Component){return props=>{const inputElement=useRef(null);useEffect(()=>{if(inputElement.current){const input=inputElement.current.children[0];// Set input attributes\ninput.minLength=10;input.maxLength=10;input.autocomplete=\"off\";input.autocorrect=\"off\";input.autocapitalize=\"none\";input.spellcheck=false;// Add regex logic — allow only numbers\nconst handleInput=e=>{const target=e.target;const filtered=target.value.replace(/\\D/g,\"\")// remove non-digits\n;if(filtered!==target.value){target.value=filtered;target.dispatchEvent(new Event(\"input\",{bubbles:true}))// trigger React update\n;}};input.addEventListener(\"input\",handleInput);// Clean up\nreturn()=>{input.removeEventListener(\"input\",handleInput);};}},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:inputElement});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withValidate\":{\"type\":\"reactHoc\",\"name\":\"withValidate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Phone_validate.map"],"mappings":"yHAA+E,SAAgB,EAAa,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAaA,EAAO,KAAK,CAKlG,OALmG,MAAc,CAAC,GAAG,EAAa,QAAQ,CAAC,IAAM,EAAM,EAAa,QAAQ,SAAS,GACxP,EAAM,UAAU,GAAG,EAAM,UAAU,GAAG,EAAM,aAAa,MAAM,EAAM,YAAY,MAAM,EAAM,eAAe,OAAO,EAAM,WAAW,GACpI,IAAM,EAAY,GAAG,CAAC,IAAM,EAAO,EAAE,OAAa,EAAS,EAAO,MAAM,QAAQ,MAAM,GAAG,CACrF,IAAW,EAAO,QAAO,EAAO,MAAM,EAAS,EAAO,cAAc,IAAI,MAAM,QAAQ,CAAC,QAAQ,GAAK,CAAC,CAAC,GAE1G,OADI,EAAM,iBAAiB,QAAQ,EAAY,KACrC,CAAC,EAAM,oBAAoB,QAAQ,EAAY,IAAM,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,IAAI,EAAa,CAAC,mBALvF,IAAoC"}