Equation.js/equation.min.js

4 lines
78 KiB
JavaScript
Raw Normal View History

2015-08-25 21:54:20 +00:00
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Equation=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c["default"]={PI:Math.PI,E:Math.E,RAND:Math.random},b.exports=c["default"]},{}],2:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=function(a){var b=a.split("1");return{left:b[0].length,right:b[1].length}};c.parseFormat=d;var e=function(a){return!isNaN(+a)};c.isNumber=e;var f=function(a){function b(b){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){return a.map(function(a){return e(a)?parseFloat(a):Array.isArray(a)?f(a):a})});c.parseNumbers=f;var g=function(a,b){for(var c=a,d=0;b>d;++d)c=c[c.length-1];return c};c.dive=g;var h=function(a){function b(b,c){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a,b){var c=void 0===arguments[2]?0:arguments[2];if(2>b)return{arr:a,index:c};var d=a.reduce(function(a,d,e){if(Array.isArray(d)){var f=h(d,b-1,e),g=f.arr,i=f.index,j=a.concat(g);return c=i,j}return a},[]);return{arr:d,index:c}});c.deep=h;var i=function(a){function b(b,c,d){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a,b,c){var d=[];if(!b.some(Array.isArray))return a[b[0]]=c,c;var e=!0,f=!1,g=void 0;try{for(var h,j=b[Symbol.iterator]();!(e=(h=j.next()).done);e=!0){var k=h.value;d.push(i(a,k,c))}}catch(l){f=!0,g=l}finally{try{!e&&j["return"]&&j["return"]()}finally{if(f)throw g}}return d});c.diveTo=i;var j=function(a){function b(b){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){return Array.isArray(a)&&a.some(Array.isArray)?a.reduce(function(a,b){return a.concat(j(b))},[]):a});c.flatten=j;var k=function(a){return a.toString().replace(/\W/g,"")};c.removeSymbols=k},{}],3:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(Array.isArray(a))return a;if(Symbol.iterator in Object(a)){var c=[],d=!0,e=!1,f=void 0;try{for(var g,h=a[Symbol.iterator]();!(d=(g=h.next()).done)&&(c.push(g.value),!b||c.length!==b);d=!0);}catch(i){e=!0,f=i}finally{try{!d&&h["return"]&&h["return"]()}finally{if(e)throw f}}return c}throw new TypeError("Invalid attempt to destructure non-iterable instance")},f=function(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}return Array.from(a)};Object.defineProperty(c,"__esModule",{value:!0}),a("babel/polyfill");var g=a("./readstream"),h=d(g),i=a("./operators"),j=d(i),k=a("./constants"),l=d(k),m=a("./helpers"),n=d(m),o={solve:function(a){a=z(a);var b=t(a);return b=w(b),b=n.parseNumbers(b),b=p(b)},equation:function(a){var b=t(a),c=[];return b.forEach(function d(a){return Array.isArray(a)?a.forEach(d):void(C(a)&&c.push(n.removeSymbols(a)))}),function(){for(var a=arguments.length,d=Array(a),e=0;a>e;e++)d[e]=arguments[e];return b.forEach(function f(a,b,e){if(Array.isArray(a))return a.forEach(f);var g=c.indexOf(a);g>-1&&(e[b]=d[g])}),b=w(b),b=n.parseNumbers(b),b=p(b)}},registerOperator:function(a,b){j["default"][a]=b},registerConstant:function(a,b){l["default"][a]=b}},p=function(a){function b(b){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){var b=a.some(function(a){return j["default"][a]&&j["default"][a].hasExpression});return!b&&a.some(Array.isArray)?(a=a.ma
},e.setDescs=F=function(a,b){q(a);for(var c,d=e.getKeys(b),f=d.length,g=0;f>g;)e.setDesc(a,c=d[g++],b[c]);return a}),l(l.S+l.F*!f,"Object",{getOwnPropertyDescriptor:e.getDesc,defineProperty:e.setDesc,defineProperties:F});var I="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),J=I.concat("length","prototype"),K=I.length,L=function(){var a,b=i("iframe"),c=K,d=">";for(b.style.display="none",h.appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write("<script>document.F=Object</script"+d),a.close(),L=a.F;c--;)delete L.prototype[I[c]];return L()},M=function(a,b){return function(c){var d,e=t(c),f=0,g=[];for(d in e)d!=o&&j(e,d)&&g.push(d);for(;b>f;)j(e,d=a[f++])&&(~G(g,d)||g.push(d));return g}},N=function(){};l(l.S,"Object",{getPrototypeOf:e.getProto=e.getProto||function(a){return a=s(a),j(a,o)?a[o]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?z:null},getOwnPropertyNames:e.getNames=e.getNames||M(J,J.length,!0),create:e.create=e.create||function(a,b){var c;return null!==a?(N.prototype=q(a),c=new N,N.prototype=null,c[o]=a):c=L(),void 0===b?c:F(c,b)},keys:e.getKeys=e.getKeys||M(I,K,!1)});var O=function(a,b,c){if(!(b in H)){for(var d=[],e=0;b>e;e++)d[e]="a["+e+"]";H[b]=Function("F,a","return new F("+d.join(",")+")")}return H[b](a,c)};l(l.P,"Function",{bind:function(a){var b=r(this),c=B.call(arguments,1),d=function(){var e=c.concat(B.call(arguments));return this instanceof d?O(b,e.length,e):m(b,e,a)};return p(b.prototype)&&(d.prototype=b.prototype),d}});var P=y(function(){h&&B.call(h)});l(l.P+l.F*P,"Array",{slice:function(a,b){var c=w(this.length),d=k(this);if(b=void 0===b?c:b,"Array"==d)return B.call(this,a,b);for(var e=v(a,c),f=v(b,c),g=w(f-e),h=Array(g),i=0;g>i;i++)h[i]="String"==d?this.charAt(e+i):this[e+i];return h}}),l(l.P+l.F*(x!=Object),"Array",{join:function(){return C.apply(x(this),arguments)}}),l(l.S,"Array",{isArray:function(a){return"Array"==k(a)}});var Q=function(a){return function(b,c){r(b);var d=x(this),e=w(d.length),f=a?e-1:0,g=a?-1:1;if(arguments.length<2)for(;;){if(f in d){c=d[f],f+=g;break}if(f+=g,a?0>f:f>=e)throw TypeError("Reduce of empty array with no initial value")}for(;a?f>=0:e>f;f+=g)f in d&&(c=b(c,d[f],f,this));return c}},R=function(a){return function(b){return a(this,b,arguments[1])}};l(l.P,"Array",{forEach:e.each=e.each||R(n(0)),map:R(n(1)),filter:R(n(2)),some:R(n(3)),every:R(n(4)),reduce:Q(!1),reduceRight:Q(!0),indexOf:R(G),lastIndexOf:function(a,b){var c=t(this),d=w(c.length),e=d-1;for(arguments.length>1&&(e=Math.min(e,u(b))),0>e&&(e=w(d+e));e>=0;e--)if(e in c&&c[e]===a)return e;return-1}}),l(l.S,"Date",{now:function(){return+new Date}});var S=function(a){return a>9?a:"0"+a},T=new Date(-5e13-1),U=!(T.toISOString&&"0385-07-25T07:06:39.999Z"==T.toISOString()&&y(function(){new Date(0/0).toISOString()}));l(l.P+l.F*U,"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=0>b?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+S(a.getUTCMonth()+1)+"-"+S(a.getUTCDate())+"T"+S(a.getUTCHours())+":"+S(a.getUTCMinutes())+":"+S(a.getUTCSeconds())+"."+(c>99?c:"0"+S(c))+"Z"}})},{"./$":46,"./$.a-function":7,"./$.an-object":8,"./$.array-includes":9,"./$.array-methods":10,"./$.cof":13,"./$.def":20,"./$.dom-create":22,"./$.fails":25,"./$.has":31,"./$.html":33,"./$.invoke":34,"./$.iobject":35,"./$.is-object":38,"./$.property-desc":57,"./$.support-desc":71,"./$.to-index":74,"./$.to-integer":75,"./$.to-iobject":76,"./$.to-length":77,"./$.to-object":78,"./$.uid":79}],84:[function(a,b,c){"use strict";var d=a("./$.def"),e=a("./$.to-object"),f=a("./$.to-index"),g=a("./$.to-length");d(d.P,"Array",{copyWithin:function(a,b){var c=e(this),d=g(c.length),h=f(a,d),i=f(b,d),j=arguments[2],k=void 0===j?d:f(j,d),l=Math.min(k-i,d-h),m=1;for(h>i&&i+l>h&&(m=-1,i=i+l-1,h=h+l-1);l-->0;)i in c?c[h]=c[i]:delete c[h],h+=m,i+=m;return c}}),a("./$.unscope")("copyWithin")},{"./$.def":20,"./$.to-index":7
}],175:[function(a,b,c){var d=a("./$.def"),e=a("./$.replacer")(/[\\^$*+?.()|[\]{}]/g,"\\$&");d(d.S,"RegExp",{escape:function(a){return e(a)}})},{"./$.def":20,"./$.replacer":59}],176:[function(a,b,c){var d=a("./$.def");d(d.P,"Set",{toJSON:a("./$.collection-to-json")("Set")})},{"./$.collection-to-json":15,"./$.def":20}],177:[function(a,b,c){"use strict";var d=a("./$.def"),e=a("./$.string-at")(!0);d(d.P,"String",{at:function(a){return e(this,a)}})},{"./$.def":20,"./$.string-at":66}],178:[function(a,b,c){"use strict";var d=a("./$.def"),e=a("./$.string-pad");d(d.P,"String",{padLeft:function(a){return e(this,a,arguments[1],!0)}})},{"./$.def":20,"./$.string-pad":68}],179:[function(a,b,c){"use strict";var d=a("./$.def"),e=a("./$.string-pad");d(d.P,"String",{padRight:function(a){return e(this,a,arguments[1],!1)}})},{"./$.def":20,"./$.string-pad":68}],180:[function(a,b,c){"use strict";a("./$.string-trim")("trimLeft",function(a){return function(){return a(this,1)}})},{"./$.string-trim":70}],181:[function(a,b,c){"use strict";a("./$.string-trim")("trimRight",function(a){return function(){return a(this,2)}})},{"./$.string-trim":70}],182:[function(a,b,c){var d=a("./$"),e=a("./$.def"),f=a("./$.core").Array||Array,g={},h=function(b,c){d.each.call(b.split(","),function(b){void 0==c&&b in f?g[b]=f[b]:b in[]&&(g[b]=a("./$.ctx")(Function.call,[][b],c))})};h("pop,reverse,shift,keys,values,entries",1),h("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),h("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),e(e.S,"Array",g)},{"./$":46,"./$.core":18,"./$.ctx":19,"./$.def":20}],183:[function(a,b,c){a("./es6.array.iterator");var d=a("./$.global"),e=a("./$.hide"),f=a("./$.iterators"),g=a("./$.wks")("iterator"),h=d.NodeList,i=d.HTMLCollection,j=h&&h.prototype,k=i&&i.prototype,l=f.NodeList=f.HTMLCollection=f.Array;!h||g in j||e(j,g,l),!i||g in k||e(k,g,l)},{"./$.global":30,"./$.hide":32,"./$.iterators":45,"./$.wks":81,"./es6.array.iterator":89}],184:[function(a,b,c){var d=a("./$.def"),e=a("./$.task");d(d.G+d.B,{setImmediate:e.set,clearImmediate:e.clear})},{"./$.def":20,"./$.task":73}],185:[function(a,b,c){var d=a("./$.global"),e=a("./$.def"),f=a("./$.invoke"),g=a("./$.partial"),h=d.navigator,i=!!h&&/MSIE .\./.test(h.userAgent),j=function(a){return i?function(b,c){return a(f(g,[].slice.call(arguments,2),"function"==typeof b?b:Function(b)),c)}:a};e(e.G+e.B+e.F*i,{setTimeout:j(d.setTimeout),setInterval:j(d.setInterval)})},{"./$.def":20,"./$.global":30,"./$.invoke":34,"./$.partial":55}],186:[function(a,b,c){a("./modules/es5"),a("./modules/es6.symbol"),a("./modules/es6.object.assign"),a("./modules/es6.object.is"),a("./modules/es6.object.set-prototype-of"),a("./modules/es6.object.to-string"),a("./modules/es6.object.freeze"),a("./modules/es6.object.seal"),a("./modules/es6.object.prevent-extensions"),a("./modules/es6.object.is-frozen"),a("./modules/es6.object.is-sealed"),a("./modules/es6.object.is-extensible"),a("./modules/es6.object.get-own-property-descriptor"),a("./modules/es6.object.get-prototype-of"),a("./modules/es6.object.keys"),a("./modules/es6.object.get-own-property-names"),a("./modules/es6.function.name"),a("./modules/es6.function.has-instance"),a("./modules/es6.number.constructor"),a("./modules/es6.number.epsilon"),a("./modules/es6.number.is-finite"),a("./modules/es6.number.is-integer"),a("./modules/es6.number.is-nan"),a("./modules/es6.number.is-safe-integer"),a("./modules/es6.number.max-safe-integer"),a("./modules/es6.number.min-safe-integer"),a("./modules/es6.number.parse-float"),a("./modules/es6.number.parse-int"),a("./modules/es6.math.acosh"),a("./modules/es6.math.asinh"),a("./modules/es6.math.atanh"),a("./modules/es6.math.cbrt"),a("./modules/es6.math.clz32"),a("./modules/es6.math.cosh"),a("./modules/es6.math.expm1"),a("./modules/es6.math.fround"),a("./modules/es6.math.hypot"),a("./modules/es6.math.imul"),a("./modules/es6.math.log10"),a("./modules/es6.math.log1p"),a("./modules/es6.math.log2"),a("./modules/es6.math.sign"),a("./modules/es6.math.sinh"),a("./modules/es6.math.tanh"),a("./mo