rsnext/packages/next/compiled/loader-utils2/index.js

1 line
49 KiB
JavaScript
Raw Normal View History

(()=>{var e={16:function(e){(function(t){"use strict";var r,s=20,n=1,i=1e6,o=1e6,u=-7,c=21,f="[big.js] ",a=f+"Invalid ",l=a+"decimal places",p=a+"rounding mode",h=f+"Division by zero",g={},d=void 0,_=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function _Big_(){function Big(e){var t=this;if(!(t instanceof Big))return e===d?_Big_():new Big(e);if(e instanceof Big){t.s=e.s;t.e=e.e;t.c=e.c.slice()}else{parse(t,e)}t.constructor=Big}Big.prototype=g;Big.DP=s;Big.RM=n;Big.NE=u;Big.PE=c;Big.version="5.2.2";return Big}function parse(e,t){var r,s,n;if(t===0&&1/t<0)t="-0";else if(!_.test(t+=""))throw Error(a+"number");e.s=t.charAt(0)=="-"?(t=t.slice(1),-1):1;if((r=t.indexOf("."))>-1)t=t.replace(".","");if((s=t.search(/e/i))>0){if(r<0)r=s;r+=+t.slice(s+1);t=t.substring(0,s)}else if(r<0){r=t.length}n=t.length;for(s=0;s<n&&t.charAt(s)=="0";)++s;if(s==n){e.c=[e.e=0]}else{for(;n>0&&t.charAt(--n)=="0";);e.e=r-s-1;e.c=[];for(r=0;s<=n;)e.c[r++]=+t.charAt(s++)}return e}function round(e,t,r,s){var n=e.c,i=e.e+t+1;if(i<n.length){if(r===1){s=n[i]>=5}else if(r===2){s=n[i]>5||n[i]==5&&(s||i<0||n[i+1]!==d||n[i-1]&1)}else if(r===3){s=s||!!n[0]}else{s=false;if(r!==0)throw Error(p)}if(i<1){n.length=1;if(s){e.e=-t;n[0]=1}else{n[0]=e.e=0}}else{n.length=i--;if(s){for(;++n[i]>9;){n[i]=0;if(!i--){++e.e;n.unshift(1)}}}for(i=n.length;!n[--i];)n.pop()}}else if(r<0||r>3||r!==~~r){throw Error(p)}return e}function stringify(e,t,r,s){var n,o,u=e.constructor,c=!e.c[0];if(r!==d){if(r!==~~r||r<(t==3)||r>i){throw Error(t==3?a+"precision":l)}e=new u(e);r=s-e.e;if(e.c.length>++s)round(e,r,u.RM);if(t==2)s=e.e+r+1;for(;e.c.length<s;)e.c.push(0)}n=e.e;o=e.c.join("");r=o.length;if(t!=2&&(t==1||t==3&&s<=n||n<=u.NE||n>=u.PE)){o=o.charAt(0)+(r>1?"."+o.slice(1):"")+(n<0?"e":"e+")+n}else if(n<0){for(;++n;)o="0"+o;o="0."+o}else if(n>0){if(++n>r)for(n-=r;n--;)o+="0";else if(n<r)o=o.slice(0,n)+"."+o.slice(n)}else if(r>1){o=o.charAt(0)+"."+o.slice(1)}return e.s<0&&(!c||t==4)?"-"+o:o}g.abs=function(){var e=new this.constructor(this);e.s=1;return e};g.cmp=function(e){var t,r=this,s=r.c,n=(e=new r.constructor(e)).c,i=r.s,o=e.s,u=r.e,c=e.e;if(!s[0]||!n[0])return!s[0]?!n[0]?0:-o:i;if(i!=o)return i;t=i<0;if(u!=c)return u>c^t?1:-1;o=(u=s.length)<(c=n.length)?u:c;for(i=-1;++i<o;){if(s[i]!=n[i])return s[i]>n[i]^t?1:-1}return u==c?0:u>c^t?1:-1};g.div=function(e){var t=this,r=t.constructor,s=t.c,n=(e=new r(e)).c,o=t.s==e.s?1:-1,u=r.DP;if(u!==~~u||u<0||u>i)throw Error(l);if(!n[0])throw Error(h);if(!s[0])return new r(o*0);var c,f,a,p,g,_=n.slice(),b=c=n.length,w=s.length,m=s.slice(0,c),q=m.length,x=e,v=x.c=[],y=0,R=u+(x.e=t.e-e.e)+1;x.s=o;o=R<0?0:R;_.unshift(0);for(;q++<c;)m.push(0);do{for(a=0;a<10;a++){if(c!=(q=m.length)){p=c>q?1:-1}else{for(g=-1,p=0;++g<c;){if(n[g]!=m[g]){p=n[g]>m[g]?1:-1;break}}}if(p<0){for(f=q==c?n:_;q;){if(m[--q]<f[q]){g=q;for(;g&&!m[--g];)m[g]=9;--m[g];m[q]+=10}m[q]-=f[q]}for(;!m[0];)m.shift()}else{break}}v[y++]=p?a:++a;if(m[0]&&p)m[q]=s[b]||0;else m=[s[b]]}while((b++<w||m[0]!==d)&&o--);if(!v[0]&&y!=1){v.shift();x.e--}if(y>R)round(x,u,r.RM,m[0]!==d);return x};g.eq=function(e){return!this.cmp(e)};g.gt=function(e){return this.cmp(e)>0};g.gte=function(e){return this.cmp(e)>-1};g.lt=function(e){return this.cmp(e)<0};g.lte=function(e){return this.cmp(e)<1};g.minus=g.sub=function(e){var t,r,s,n,i=this,o=i.constructor,u=i.s,c=(e=new o(e)).s;if(u!=c){e.s=-c;return i.plus(e)}var f=i.c.slice(),a=i.e,l=e.c,p=e.e;if(!f[0]||!l[0]){return l[0]?(e.s=-c,e):new o(f[0]?i:0)}if(u=a-p){if(n=u<0){u=-u;s=f}else{p=a;s=l}s.reverse();for(c=u;c--;)s.push(0);s.reverse()}else{r=((n=f.length<l.length)?f:l).length;for(u=c=0;c<r;c++){if(f[c]!=l[c]){n=f[c]<l[c];break}}}if(n){s=f;f=l;l=s;e.s=-e.s}if((c=(r=l.length)-(t=f.length))>0)for(;c--;)f[t++]=0;for(c=t;r>u;){if(f[--r]<l[r]){for(t=r;t&&!f[--t];)f[t]=9;--f[t];f[r]+=10}f[r]-=l[r]}for(;f[--c]===0;)f.pop();for(;f[0]===0;){f.shift();--p}if(!f[0]){e.s=1;f=[p=0]}e.c=f;e.e=p;return e};g.mod=function(e){var t,r=this,s=r.constructor,n=r.s,i=(e=new s(e)).s;if(!e.c[0])throw Error(h);r.s=e.s=1;t=e.cmp(r)==1;r.s=n;e.s=i;if(t)return new s(r);n=s.DP;i=s.RM;s.DP=s.RM=0;r