import{_ as t}from"./sortQuotesByDeliverySpeedEstimate-554f0c2a.js";import{useState as e,useEffect as r}from"react";function o(o,n){var a=e(o),c=t(a,2),u=c[0],i=c[1];return r(function(){var t=setTimeout(function(){i(o)},n);return function(){clearTimeout(t)}},[o]),u}const n={BIF:0,BYR:0,CLP:0,DJF:0,GNF:0,JPY:0,KMF:0,KRW:0,MGA:0,PYG:0,RWF:0,VND:0,VUV:0,XAF:0,XOF:0,XPF:0,HUF:0,BHD:3,JOD:3,KWD:3,OMR:3,TND:3},a="en-GB";function c(){return"1,234"===(1234..toLocaleString&&1234..toLocaleString(a))}const u=(t="")=>{const e=t.toUpperCase();return Object.prototype.hasOwnProperty.call(n,e)?n[e]:2},i=t=>c()?1.1.toLocaleString(t)[1]:".";function p(t,e,r){const o=function(t){if(!t)return a;try{const e=t.replace(/_/,"-");return Intl.NumberFormat(e),e}catch(t){return a}}(r),n=u(e),p=c()?1e4.toLocaleString(o)[2]:",",s=i(o),l=(t?`${t}`:"").replace(new RegExp(`\\${p}`,"g"),"").replace(new RegExp(`\\${s}`,"g"),".").replace(/[^0-9.]/g,""),F=parseFloat(parseFloat(l).toFixed(n));return Math.abs(F)}export{p,o as u};
//# sourceMappingURL=parseAmount-94e96b42.js.map
