import{__exports as r}from"../../../_virtual/es.number.to-exponential.mjs";import{__require as e}from"../internals/export.mjs";import{__require as t}from"../internals/function-uncurry-this.mjs";import{__require as i}from"../internals/to-integer-or-infinity.mjs";import{__require as n}from"../internals/this-number-value.mjs";import{__require as o}from"../internals/string-repeat.mjs";import{__require as a}from"../internals/math-log10.mjs";import{__require as s}from"../internals/fails.mjs";var m;function u(){if(m)return r;m=1;var u=e(),f=t(),_=i(),l=n(),p=o(),c=a(),v=s(),h=RangeError,g=String,j=isFinite,q=Math.abs,x=Math.floor,b=Math.pow,d=Math.round,M=f(1.1.toExponential),w=f(p),E=f("".slice),N="-6.9000e-11"===M(-69e-12,4)&&"1.25e+0"===M(1.255,2)&&"1.235e+4"===M(12345,3)&&"3e+1"===M(25,0);return u({target:"Number",proto:!0,forced:!N||!(v(function(){M(1,1/0)})&&v(function(){M(1,-1/0)}))||!!v(function(){M(1/0,1/0),M(NaN,1/0)})},{toExponential:function(r){var e=l(this);if(void 0===r)return M(e);var t=_(r);if(!j(e))return String(e);if(t<0||t>20)throw new h("Incorrect fraction digits");if(N)return M(e,t);var i,n,o,a,s="";if(e<0&&(s="-",e=-e),0===e)n=0,i=w("0",t+1);else{var m=c(e);n=x(m);var u=b(10,n-t),f=d(e/u);2*e>=(2*f+1)*u&&(f+=1),f>=b(10,t+1)&&(f/=10,n+=1),i=g(f)}return 0!==t&&(i=E(i,0,1)+"."+E(i,1)),0===n?(o="+",a="0"):(o=n>0?"+":"-",a=g(q(n))),s+(i+="e"+o+a)}}),r}export{u as __require};