(window.webpackJsonp=window.webpackJsonp||[]).push([[2],[function(e,t,n){e.exports=n(223)()},function(e,t,n){"use strict";e.exports=n(218)},function(e,t,n){"use strict";n.d(t,"n",function(){return u}),n.d(t,"i",function(){return c}),n.d(t,"g",function(){return l}),n.d(t,"k",function(){return f}),n.d(t,"l",function(){return p}),n.d(t,"m",function(){return m}),n.d(t,"q",function(){return h}),n.d(t,"a",function(){return v}),n.d(t,"p",function(){return g}),n.d(t,"o",function(){return x}),n.d(t,"e",function(){return b}),n.d(t,"c",function(){return w}),n.d(t,"d",function(){return N}),n.d(t,"b",function(){return E}),n.d(t,"f",function(){return M}),n.d(t,"j",function(){return S}),n.d(t,"h",function(){return T});var r,i=n(207),o=n.n(i),a=n(0),s=n.n(a);function u(e){document.body.style.paddingRight=e>0?e+"px":null}function c(){var e=window.getComputedStyle(document.body,null);return parseInt(e&&e.getPropertyValue("padding-right")||0,10)}function l(){var e=function(){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}(),t=document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")[0],n=t?parseInt(t.style.paddingRight||0,10):0;document.body.clientWidth0;)o[n=r[i-=1]]=e[n];return o}var d={};function h(e){d[e]||("undefined"!==typeof console&&console.error(e),d[e]=!0)}var y="object"===typeof window&&window.Element||function(){};function v(e,t,n){if(!(e[t]instanceof y))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var g=s.a.oneOfType([s.a.string,s.a.func,v,s.a.shape({current:s.a.any})]),x=s.a.oneOfType([s.a.func,s.a.string,s.a.shape({$$typeof:s.a.symbol,render:s.a.func}),s.a.arrayOf(s.a.oneOfType([s.a.func,s.a.string,s.a.shape({$$typeof:s.a.symbol,render:s.a.func})]))]),b={Fade:150,Collapse:350,Modal:300,Carousel:600},w=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],N={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},E=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],M=!("undefined"===typeof window||!window.document||!window.document.createElement);function O(e){return null!==e&&(Array.isArray(e)||M&&"number"===typeof e.length)}function S(e){var t=function(e){if(function(e){return!(!e||"object"!==typeof e)&&"current"in e}(e))return e.current;if(o()(e))return e();if("string"===typeof e&&M){var t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll("#"+e)),!t.length)throw new Error("The target '"+e+"' could not be identified in the dom, tip: check spelling");return t}return e}(e);return O(t)?t[0]:t}var T=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])']},function(e,t,n){"use strict";t.name="matrix",t.factory=function(e,t,n,r){var i=r("matrix",{"":function(){return o([])},string:function(e){return o([],e)},"string, string":function(e,t){return o([],e,t)},Array:function(e){return o(e)},Matrix:function(e){return o(e,e.storage())},"Array | Matrix, string":o,"Array | Matrix, string, string":o});return i.toTex={0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},i;function o(t,n,r){return new(e.Matrix.storage(n||"default"))(t,r)}}},function(e,t,n){"use strict";e.exports=function e(t,n,r){return t&&"function"===typeof t.map?t.map(function(t){return e(t,n,r)}):n(t)}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t")}(e,t,0)},t.validateIndex=function(e,t){if(!r.default.isNumber(e)||!r.default.isInteger(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"===typeof t&&e>=t)throw new a.default(e,t)},t.resize=function(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(0===t.length)throw new Error("Resizing to scalar is not supported");t.forEach(function(e){if(!r.default.isNumber(e)||!r.default.isInteger(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+i.default.format(t)+")")});var o=void 0!==n?n:0;return function e(t,n,r,i){var o,a,s=t.length,u=n[r],c=Math.min(s,u);if(t.length=u,r=0||(i[n]=e[n]);return i}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(13);function i(e){for(var t=[],n=0;n0?1:e<0?-1:0},t.format=function(e,n){if("function"===typeof n)return n(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var i,o="auto";switch(n&&(n.notation&&(o=n.notation),t.isNumber(n)?i=n:t.isNumber(n.precision)&&(i=n.precision)),o){case"fixed":return t.toFixed(e,i);case"exponential":return t.toExponential(e,i);case"engineering":return t.toEngineering(e,i);case"auto":if(n&&n.exponential&&(void 0!==n.exponential.lower||void 0!==n.exponential.upper)){var a=r.map(n,function(e){return e});return a.exponential=void 0,void 0!==n.exponential.lower&&(a.lowerExp=Math.round(Math.log(n.exponential.lower)/Math.LN10)),void 0!==n.exponential.upper&&(a.upperExp=Math.round(Math.log(n.exponential.upper)/Math.LN10)),console.warn("Deprecation warning: Formatting options exponential.lower and exponential.upper (minimum and maximum value) are replaced with exponential.lowerExp and exponential.upperExp (minimum and maximum exponent) since version 4.0.0. Replace "+JSON.stringify(n)+" with "+JSON.stringify(a)),t.toPrecision(e,i,a)}return t.toPrecision(e,i,n&&n).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw new Error('Unknown notation "'+o+'". Choose "auto", "exponential", or "fixed".')}},t.splitNumber=function(e){var t=String(e).toLowerCase().match(/^0*?(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var n=t[1],r=t[2],i=parseFloat(t[4]||"0"),o=r.indexOf(".");i+=-1!==o?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,function(e){return i-=e.length,""}).replace(/0*$/,"").split("").map(function(e){return parseInt(e)});return 0===a.length&&(a.push(0),i++),{sign:n,coefficients:a,exponent:i}},t.toEngineering=function(e,n){if(isNaN(e)||!isFinite(e))return String(e);var r=t.roundDigits(t.splitNumber(e),n),o=r.exponent,a=r.coefficients,s=o%3===0?o:o<0?o-3-o%3:o-o%3;if(t.isNumber(n))n>a.length&&(a=a.concat(i(n-a.length)));else{var u=o>=0?o:Math.abs(s);a.length-1=0;)l++;var f=a.slice(l).join(""),p=t.isNumber(n)&&f.length||f.match(/[1-9]/)?"."+f:"",m=a.slice(0,l).join("")+p+"e"+(o>=0?"+":"")+s.toString();return r.sign+m},t.toFixed=function(e,n){if(isNaN(e)||!isFinite(e))return String(e);var r=t.splitNumber(e),o="number"===typeof n?t.roundDigits(r,r.exponent+1+n):r,a=o.coefficients,s=o.exponent+1,u=s+(n||0);return a.length0?"."+a.join(""):"")+"e"+(s>=0?"+":"")+s},t.toPrecision=function(e,n,r){if(isNaN(e)||!isFinite(e))return String(e);var o=r&&void 0!==r.lowerExp?r.lowerExp:-3,a=r&&void 0!==r.upperExp?r.upperExp:5,s=t.splitNumber(e);if(s.exponent=a)return t.toExponential(e,n);var u=n?t.roundDigits(s,n):s,c=u.coefficients,l=u.exponent;c.length0?l:0;return f<(c=i(-l).concat(c)).length-1&&c.splice(f+1,0,"."),u.sign+c.join("")},t.roundDigits=function(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t&&r.splice(t,r.length-t)[0]>=5){var i=t-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),r[--i]++}return n},t.digits=function(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length},t.DBL_EPSILON=Number.EPSILON||2.220446049250313e-16,t.nearlyEqual=function(e,n,r){if(null===r||void 0===r)return e===n;if(e===n)return!0;if(isNaN(e)||isNaN(n))return!1;if(isFinite(e)&&isFinite(n)){var i=Math.abs(e-n);return i>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},t.defaultTemplate="\\mathrm{${name}}\\left(${args}\\right)";var i={deg:"^\\circ"};t.escape=function(e){return r(e,{preserveFormatting:!0})},t.toSymbol=function(e,n){return(n="undefined"!==typeof n&&n)?i.hasOwnProperty(e)?i[e]:"\\mathrm{"+t.escape(e)+"}":t.symbols.hasOwnProperty(e)?t.symbols[e]:t.escape(e)}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=n(112);t.clone=function e(n){var o=r(n);if("number"===o||"string"===o||"boolean"===o||null===n||void 0===n)return n;if("function"===typeof n.clone)return n.clone();if(Array.isArray(n))return n.map(function(t){return e(t)});if(n instanceof Date)return new Date(n.valueOf());if(i(n))return n;if(n instanceof RegExp)throw new TypeError("Cannot clone "+n);return t.map(n,e)},t.map=function(e,n){var r={};for(var i in e)t.hasOwnProperty(e,i)&&(r[i]=n(e[i]));return r},t.extend=function(e,n){for(var r in n)t.hasOwnProperty(n,r)&&(e[r]=n[r]);return e},t.deepExtend=function e(n,r){if(Array.isArray(r))throw new TypeError("Arrays are not supported by deepExtend");for(var i in r)if(t.hasOwnProperty(r,i))if(r[i]&&r[i].constructor===Object)void 0===n[i]&&(n[i]={}),n[i].constructor===Object?e(n[i],r[i]):n[i]=r[i];else{if(Array.isArray(r[i]))throw new TypeError("Arrays are not supported by deepExtend");n[i]=r[i]}return n},t.deepEqual=function(e,n){var r,i,o;if(Array.isArray(e)){if(!Array.isArray(n))return!1;if(e.length!==n.length)return!1;for(i=0,o=e.length;i0?function e(t,n,r,i,o,a,s){var u=[];if(n===r.length-1)for(var c=0;c0?function e(t,n,r,i,o,a){var s=[];if(n===r.length-1)for(var u=0;u/g,">")}},function(e,t,n){"use strict";var r=n(13).extend,i=n(6);t.name="multiply",t.factory=function(e,t,o,a){var s=n(11),u=o(n(3)),c=o(n(28)),l=o(n(32)),f=o(n(20)),p=o(n(31)),m=o(n(14)),d=e.DenseMatrix,h=e.SparseMatrix,y=a("multiply",r({"Array, Array":function(t,n){v(i.size(t),i.size(n));var r=y(u(t),u(n));return e.isMatrix(r)?r.valueOf():r},"Matrix, Matrix":function(e,t){var n=e.size(),r=t.size();return v(n,r),1===n.length?1===r.length?function(e,t,n){if(0===n)throw new Error("Cannot multiply two empty vectors");var r,i=e._data,o=e._datatype,s=t._data,u=t._datatype,f=c,p=l;o&&u&&o===u&&"string"===typeof o&&(r=o,f=a.find(c,[r,r]),p=a.find(l,[r,r]));for(var m=p(i[0],s[0]),d=1;dT)for(var A=0,_=0;_a)for(var l=a-1,f=u.length;l0?1:-1:r(o,f);if("Array"===o||"Matrix"===o||"Array"===f||"Matrix"===f)return 0!==(i=function t(n,r){return e.isSparseMatrix(n)&&e.isSparseMatrix(r)?l(n.toJSON().values,r.toJSON().values):e.isSparseMatrix(n)?t(n.toArray(),r):e.isSparseMatrix(r)?t(n,r.toArray()):e.isDenseMatrix(n)?t(n.toJSON().data,r):e.isDenseMatrix(r)?t(n,r.toJSON().data):Array.isArray(n)?Array.isArray(r)?l(n,r):t(n,[r]):t([n],r)}(t,n))?i:r(o,f);if(o!==f)return r(o,f);if("Complex"===o)return function(e,t){return e.re>t.re?1:e.ret.im?1:e.imt.length?1:e.lengtht},"number, number":function(e,n){return e>n&&!r(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.gt(n)&&!i(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return 1===e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return d(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,d)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,d)},"Array, Array":function(e,t){return d(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return d(s(e),t)},"Matrix, Array":function(e,t){return d(e,s(t))},"SparseMatrix, any":function(e,t){return l(e,t,d,!1)},"DenseMatrix, any":function(e,t){return p(e,t,d,!1)},"any, SparseMatrix":function(e,t){return l(t,e,d,!0)},"any, DenseMatrix":function(e,t){return p(t,e,d,!0)},"Array, any":function(e,t){return p(s(e),t,d,!1).valueOf()},"any, Array":function(e,t){return p(s(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}".concat(m.operators.larger,"${args[1]}\\right)")},d}},function(e,t,n){"use strict";var r=n(4),i=n(9);t.name="isInteger",t.factory=function(e,t,n,o){var a=o("isInteger",{number:i.isInteger,BigNumber:function(e){return e.isInt()},Fraction:function(e){return 1===e.d&&isFinite(e.n)},"Array | Matrix":function(e){return r(e,a)}});return a}},function(e,t,n){"use strict";var r=n(82);e.exports=function(e){return Array.isArray(e)||r(e)}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t2?" (type: "+o(n)+", value: "+JSON.stringify(n)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+t+", unexpected type of argument"+r)):-1!==String(e).indexOf("complex numbers")?(r=arguments.length>2?" (type: "+o(n)+", value: "+JSON.stringify(n)+")":"",new TypeError("Cannot calculate "+t+", no ordering relation is defined for complex numbers"+r)):e}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e,t){for(var n=0;n=0||t.predictable?n.pow(r):new e.Complex(n.toNumber(),0).pow(r.toNumber(),0)},"Fraction, Fraction":function(e,n){if(1!==n.d){if(t.predictable)throw new Error("Function pow does not support non-integer exponents for fractions.");return d(e.valueOf(),n.valueOf())}return e.pow(n)},"Array, number":h,"Array, BigNumber":function(e,t){return h(e,t.toNumber())},"Matrix, number":y,"Matrix, BigNumber":function(e,t){return y(e,t.toNumber())},"Unit, number | BigNumber":function(e,t){return e.pow(t)}});function d(n,i){if(t.predictable&&!r(i)&&n<0)try{var o=f(i),a=p(o);if((i===a||Math.abs((i-a)/i)<1e-14)&&o.d%2===1)return(o.n%2===0?1:-1)*Math.pow(-n,i)}catch(s){}return n*n<1&&i===1/0||n*n>1&&i===-1/0?0:t.predictable&&(n<-1&&i===1/0||n>-1&&n<0&&i===-1/0)?NaN:r(i)||n>=0||t.predictable?Math.pow(n,i):new e.Complex(n,0).pow(i,0)}function h(e,t){if(!r(t)||t<0)throw new TypeError("For A^b, b must be a positive integer (value is "+t+")");var n=i(e);if(2!==n.length)throw new Error("For A^b, A must be 2 dimensional (A has "+n.length+" dimensions)");if(n[0]!==n[1])throw new Error("For A^b, A must be square (size is "+n[0]+"x"+n[1]+")");for(var o=u(n[0]).valueOf(),a=e;t>=1;)1===(1&t)&&(o=c(a,o)),t>>=1,a=c(a,a);return o}function y(e,t){return l(h(e.valueOf(),t))}return m.toTex={2:"\\left(${args[0]}\\right)".concat(s.operators.pow,"{${args[1]}}")},m}},function(e,t,n){"use strict";var r=n(9).isInteger,i=n(6).resize;t.name="zeros",t.factory=function(e,t,o,a){var s=o(n(3)),u=a("zeros",{"":function(){return"Array"===t.matrix?c([]):c([],"default")},"...number | BigNumber | string":function(e){if("string"===typeof e[e.length-1]){var n=e.pop();return c(e,n)}return"Array"===t.matrix?c(e):c(e,"default")},Array:c,Matrix:function(e){var t=e.storage();return c(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return c(e.valueOf(),t)}});return u.toTex=void 0,u;function c(t,n){var o=function(t){var n=!1;return t.forEach(function(t,r,i){e.isBigNumber(t)&&(n=!0,i[r]=t.toNumber())}),n}(t)?new e.BigNumber(0):0;if(function(e){e.forEach(function(e){if("number"!==typeof e||!r(e)||e<0)throw new Error("Parameters in function zeros must be positive integers")})}(t),n){var a=s(n);return t.length>0?a.resize(t,o):a}var u=[];return t.length>0?i(u,t,o):u}}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},T={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},C={true:!0,false:!1,null:null,undefined:void 0},A=["NaN","Infinity"];function _(e,t){return e.expression.substr(e.index,t)}function k(e){return _(e,1)}function P(e){e.index++}function j(e){return e.expression.charAt(e.index-1)}function R(e){return e.expression.charAt(e.index+1)}function I(e){for(e.tokenType=O.NULL,e.token="",e.comment="";M.isWhitespace(k(e),e.nestingLevel);)P(e);if("#"===k(e))for(;"\n"!==k(e)&&""!==k(e);)e.comment+=k(e),P(e);if(""!==k(e)){if("\n"===k(e)&&!e.nestingLevel)return e.tokenType=O.DELIMITER,e.token=k(e),void P(e);var t=k(e),n=_(e,2),r=_(e,3);if(3===r.length&&S[r])return e.tokenType=O.DELIMITER,e.token=r,P(e),P(e),void P(e);if(2===n.length&&S[n])return e.tokenType=O.DELIMITER,e.token=n,P(e),void P(e);if(S[t])return e.tokenType=O.DELIMITER,e.token=t,void P(e);if(M.isDigitDot(t)){if(e.tokenType=O.NUMBER,"."===k(e))e.token+=k(e),P(e),M.isDigit(k(e))||(e.tokenType=O.DELIMITER);else{for(;M.isDigit(k(e));)e.token+=k(e),P(e);M.isDecimalMark(k(e),R(e))&&(e.token+=k(e),P(e))}for(;M.isDigit(k(e));)e.token+=k(e),P(e);if("E"===k(e)||"e"===k(e))if(M.isDigit(R(e))||"-"===R(e)||"+"===R(e)){if(e.token+=k(e),P(e),"+"!==k(e)&&"-"!==k(e)||(e.token+=k(e),P(e)),!M.isDigit(k(e)))throw ae(e,'Digit expected, got "'+k(e)+'"');for(;M.isDigit(k(e));)e.token+=k(e),P(e);if(M.isDecimalMark(k(e),R(e)))throw ae(e,'Digit expected, got "'+k(e)+'"')}else if("."===R(e))throw P(e),ae(e,'Digit expected, got "'+k(e)+'"')}else{if(!M.isAlpha(k(e),j(e),R(e))){for(e.tokenType=O.UNKNOWN;""!==k(e);)e.token+=k(e),P(e);throw ae(e,'Syntax error in part "'+e.token+'"')}for(;M.isAlpha(k(e),j(e),R(e))||M.isDigit(k(e));)e.token+=k(e),P(e);T.hasOwnProperty(e.token)?e.tokenType=O.DELIMITER:e.tokenType=O.SYMBOL}}else e.tokenType=O.DELIMITER}function z(e){do{I(e)}while("\n"===e.token)}function D(e){e.nestingLevel++}function B(e){e.nestingLevel--}function U(e,t){var n={extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:O.NULL,nestingLevel:0,conditionalLevel:null};r(n,{expression:e,extraNodes:t}),I(n);var i=function(e){var t,n,r=[];for(""!==e.token&&"\n"!==e.token&&";"!==e.token&&((t=F(e)).comment=e.comment);"\n"===e.token||";"===e.token;)0===r.length&&t&&(n=";"!==e.token,r.push({node:t,visible:n})),I(e),"\n"!==e.token&&";"!==e.token&&""!==e.token&&((t=F(e)).comment=e.comment,n=";"!==e.token,r.push({node:t,visible:n}));return r.length>0?new p(r):(t||((t=new d(void 0)).comment=e.comment),t)}(n);if(""!==n.token)throw n.tokenType===O.DELIMITER?se(n,"Unexpected operator "+n.token):ae(n,'Unexpected part "'+n.token+'"');return i}function F(t){var n,r,i,o,a=function(e){for(var t=function(e){for(var t=L(e);"or"===e.token;)z(e),t=new g("or","or",[t,L(e)]);return t}(e);"?"===e.token;){var n=e.conditionalLevel;e.conditionalLevel=e.nestingLevel,z(e);var r=t,i=F(e);if(":"!==e.token)throw ae(e,"False part of conditional expression expected");e.conditionalLevel=null,z(e);var o=F(e);t=new m(r,i,o),e.conditionalLevel=n}return t}(t);if("="===t.token){if(e.isSymbolNode(a))return n=a.name,z(t),i=F(t),new f(new E(n),i);if(e.isAccessorNode(a))return z(t),i=F(t),new f(a.object,a.index,i);if(e.isFunctionNode(a)&&e.isSymbolNode(a.fn)&&(o=!0,r=[],n=a.name,a.args.forEach(function(t,n){e.isSymbolNode(t)?r[n]=t.name:o=!1}),o))return z(t),i=F(t),new h(n,r,i);throw ae(t,"Invalid left hand side of assignment operator =")}return a}function L(e){for(var t=q(e);"xor"===e.token;)z(e),t=new g("xor","xor",[t,q(e)]);return t}function q(e){for(var t=H(e);"and"===e.token;)z(e),t=new g("and","and",[t,H(e)]);return t}function H(e){for(var t=W(e);"|"===e.token;)z(e),t=new g("|","bitOr",[t,W(e)]);return t}function W(e){for(var t=$(e);"^|"===e.token;)z(e),t=new g("^|","bitXor",[t,$(e)]);return t}function $(e){for(var t=V(e);"&"===e.token;)z(e),t=new g("&","bitAnd",[t,V(e)]);return t}function V(e){for(var t=[G(e)],n=[],r={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};r.hasOwnProperty(e.token);){var i={name:e.token,fn:r[e.token]};n.push(i),z(e),t.push(G(e))}return 1===t.length?t[0]:2===t.length?new g(n[0].name,n[0].fn,t):new N(n.map(function(e){return e.fn}),t)}function G(e){var t,n,r,i,o;for(t=Y(e),n={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};n.hasOwnProperty(e.token);)i=n[r=e.token],z(e),o=[t,Y(e)],t=new g(r,i,o);return t}function Y(e){var t,n,r,i,o;for(t=Z(e),n={to:"to",in:"to"};n.hasOwnProperty(e.token);)i=n[r=e.token],z(e),"in"===r&&""===e.token?t=new g("*","multiply",[t,new E("in")],!0):(o=[t,Z(e)],t=new g(r,i,o));return t}function Z(e){var t,n=[];if(t=":"===e.token?new d(1):J(e),":"===e.token&&e.conditionalLevel!==e.nestingLevel){for(n.push(t);":"===e.token&&n.length<3;)z(e),")"===e.token||"]"===e.token||","===e.token||""===e.token?n.push(new E("end")):n.push(J(e));t=3===n.length?new w(n[0],n[2],n[1]):new w(n[0],n[1])}return t}function J(e){var t,n,r,i,o;for(t=X(e),n={"+":"add","-":"subtract"};n.hasOwnProperty(e.token);)i=n[r=e.token],z(e),o=[t,X(e)],t=new g(r,i,o);return t}function X(e){var t,n,r,i,o;for(n=t=Q(e),r={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};r.hasOwnProperty(e.token);)o=r[i=e.token],z(e),n=Q(e),t=new g(i,o,[t,n]);return t}function Q(t){var n,r;for(r=n=K(t);t.tokenType===O.SYMBOL||"in"===t.token&&e.isConstantNode(n)||!(t.tokenType!==O.NUMBER||e.isConstantNode(r)||e.isOperatorNode(r)&&"!"!==r.op)||"("===t.token;)r=K(t),n=new g("*","multiply",[n,r],!0);return n}function K(t){for(var n=ee(t),i=n,o=[];"/"===t.token&&e.isConstantNode(i);){if(o.push(r({},t)),z(t),t.tokenType!==O.NUMBER){r(t,o.pop());break}if(o.push(r({},t)),z(t),t.tokenType!==O.SYMBOL&&"("!==t.token){o.pop(),r(t,o.pop());break}r(t,o.pop()),o.pop(),i=ee(t),n=new g("/","divide",[n,i])}return n}function ee(e){var n,r,i,o={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return o.hasOwnProperty(e.token)?(i=o[e.token],n=e.token,z(e),r=[ee(e)],new g(n,i,r)):function(e){var n,r,i,o;return n=function(e){var n,r,i,o;for(n=function(e){var n=[];if(e.tokenType===O.SYMBOL&&e.extraNodes.hasOwnProperty(e.token)){var r=e.extraNodes[e.token];if(I(e),"("===e.token){if(n=[],D(e),I(e),")"!==e.token)for(n.push(F(e));","===e.token;)I(e),n.push(F(e));if(")"!==e.token)throw ae(e,"Parenthesis ) expected");B(e),I(e)}return new r(n)}return function(e){var n,r;return e.tokenType===O.SYMBOL||e.tokenType===O.DELIMITER&&e.token in T?(r=e.token,I(e),n=C.hasOwnProperty(r)?new d(C[r]):-1!==A.indexOf(r)?new d(u(r,"number")):new E(r),n=te(e,n)):function(e){var n,r;return'"'===e.token?(r=ne(e),n=new d(r),n=te(e,n)):function(e){var n,r;return"'"===e.token?(r=re(e),n=new d(r),n=te(e,n)):function(e){var n,r,i,o;if("["===e.token){if(D(e),I(e),"]"!==e.token){var a=ie(e);if(";"===e.token){for(i=1,r=[a];";"===e.token;)I(e),r[i]=ie(e),i++;if("]"!==e.token)throw ae(e,"End of matrix ] expected");B(e),I(e),o=r[0].items.length;for(var s=1;s0},M.isDecimalMark=function(e,t){return"."===e&&"/"!==t&&"*"!==t&&"^"!==t},M.isDigitDot=function(e){return e>="0"&&e<="9"||"."===e},M.isDigit=function(e){return e>="0"&&e<="9"},M}},function(e,t,n){"use strict";var r=n(13).extend;t.name="divide",t.factory=function(e,t,i,o){var a=i(n(23)),s=i(n(18)),u=i(n(97)),c=i(n(3)),l=i(n(31)),f=i(n(14)),p=o("divide",r({"Array | Matrix, Array | Matrix":function(e,t){return s(e,u(t))},"DenseMatrix, any":function(e,t){return f(e,t,a,!1)},"SparseMatrix, any":function(e,t){return l(e,t,a,!1)},"Array, any":function(e,t){return f(c(e),t,a,!1).valueOf()},"any, Array | Matrix":function(e,t){return s(e,u(t))}},a.signatures));return p.toTex={2:"\\frac{${args[0]}}{${args[1]}}"},p}},function(e,t,n){"use strict";var r=n(4);t.name="sqrt",t.factory=function(e,t,n,i){var o=i("sqrt",{number:a,Complex:function(e){return e.sqrt()},BigNumber:function(e){return!e.isNegative()||t.predictable?e.sqrt():a(e.toNumber())},"Array | Matrix":function(e){return r(e,o,!0)},Unit:function(e){return e.pow(.5)}});function a(n){return isNaN(n)?NaN:n>=0||t.predictable?Math.sqrt(n):new e.Complex(n,0).sqrt()}return o.toTex={1:"\\sqrt{${args[0]}}"},o}},function(e,t,n){"use strict";var r=n(82);e.exports=function e(t,n){r(t)&&(t=t.valueOf());for(var i=0,o=t.length;i=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}r.prototype=new RangeError,r.prototype.constructor=RangeError,r.prototype.name="IndexError",r.prototype.isIndexError=!0,e.exports=r},function(e,t,n){"use strict";var r=n(46),i=n(22),o=r.string,a=r.array,s=r.object,u=r.number,c=Array.isArray,l=u.isNumber,f=u.isInteger,p=o.isString,m=a.validateIndex;t.name="DenseMatrix",t.path="type",t.factory=function(e,t,u,d){var h=u(n(90)),y=u(n(115));function v(t,n){if(!(this instanceof v))throw new SyntaxError("Constructor must be called with the new operator");if(n&&!p(n))throw new Error("Invalid datatype: "+n);if(e.isMatrix(t))"DenseMatrix"===t.type?(this._data=s.clone(t._data),this._size=s.clone(t._size),this._datatype=n||t._datatype):(this._data=t.toArray(),this._size=t.size(),this._datatype=n||t._datatype);else if(t&&c(t.data)&&c(t.size))this._data=t.data,this._size=t.size,this._datatype=n||t.datatype;else if(c(t))this._data=function e(t){for(var n=0,r=t.length;nr[o]&&(r[o]=t[o],i=!0);i&&g(e,r,n)}return v.prototype=new y,v.prototype.type="DenseMatrix",v.prototype.isDenseMatrix=!0,v.prototype.getDataType=function(){return h(this._data)},v.prototype.storage=function(){return"dense"},v.prototype.datatype=function(){return this._datatype},v.prototype.create=function(e,t){return new v(e,t)},v.prototype.subset=function(t,n,r){switch(arguments.length){case 1:return function(t,n){if(!e.isIndex(n))throw new TypeError("Invalid index");if(n.isScalar())return t.get(n.min());var r=n.size();if(r.length!==t._size.length)throw new i(r.length,t._size.length);for(var o=n.min(),a=n.max(),s=0,u=t._size.length;s");var d=n.max().map(function(e){return e+1});x(t,d,o);var h=c.length;!function e(t,n,r,i,o){var a=o===i-1,s=n.dimension(o);a?s.forEach(function(e,n){m(e),t[e]=r[n[0]]}):s.forEach(function(a,s){m(a),e(t[a],n,r[s[0]],i,o+1)})}(t._data,n,r,h,0)}return t}(this,t,n,r);default:throw new SyntaxError("Wrong number of arguments")}},v.prototype.get=function(e){if(!c(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new i(e.length,this._size.length);for(var t=0;t0?t:0,r=t<0?-t:0,i=this._size[0],o=this._size[1],a=Math.min(i-r,o-n),s=[],u=0;u0?r:0,m=r<0?-r:0,h=t[0],y=t[1],g=Math.min(h-m,y-u);if(c(n)){if(n.length!==g)throw new Error("Invalid value array length");s=function(e){return n[e]}}else if(e.isMatrix(n)){var x=n.size();if(1!==x.length||x[0]!==g)throw new Error("Invalid matrix length");s=function(e){return n.get([e])}}else s=function(){return n};i||(i=e.isBigNumber(s(0))?new e.BigNumber(0):0);var b=[];if(t.length>0){b=a.resize(b,t,i);for(var w=0;w'+t+"":"i"===t?''+t+"":"Infinity"===t?''+t+"":"NaN"===t?''+t+"":"null"===t?''+t+"":"undefined"===t?''+t+"":''+t+""},p.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},p.fromJSON=function(e){return new p(e.name)},p.prototype._toTex=function(e){var t=!1;"undefined"===typeof c[this.name]&&f(this.name)&&(t=!0);var n=r.toSymbol(this.name,t);return"\\"===n[0]?n:" "+n},p}},function(e,t,n){"use strict";var r=n(9).nearlyEqual,i=n(47);t.name="compare",t.factory=function(e,t,o,a){var s=o(n(3)),u=o(n(29)),c=o(n(93)),l=o(n(30)),f=o(n(15)),p=o(n(14)),m=a("compare",{"boolean, boolean":function(e,t){return e===t?0:e>t?1:-1},"number, number":function(e,n){return e===n||r(e,n,t.epsilon)?0:e>n?1:-1},"BigNumber, BigNumber":function(n,r){return n.eq(r)||i(n,r,t.epsilon)?new e.BigNumber(0):new e.BigNumber(n.cmp(r))},"Fraction, Fraction":function(t,n){return new e.Fraction(t.compare(n))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return m(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,m)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,m,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,m,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,m)},"Array, Array":function(e,t){return m(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return m(s(e),t)},"Matrix, Array":function(e,t){return m(e,s(t))},"SparseMatrix, any":function(e,t){return l(e,t,m,!1)},"DenseMatrix, any":function(e,t){return p(e,t,m,!1)},"any, SparseMatrix":function(e,t){return l(t,e,m,!0)},"any, DenseMatrix":function(e,t){return p(t,e,m,!0)},"Array, any":function(e,t){return p(s(e),t,m,!1).valueOf()},"any, Array":function(e,t){return p(s(t),e,m,!0).valueOf()}});return m.toTex=void 0,m}},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){"use strict";var r=n(10),i=n(16),o=n(1),a=n.n(o),s=n(0),u=n.n(s),c=a.a.createContext(null);var l=function(e){e()},f=function(){return l},p=null,m={notify:function(){}};var d=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=m,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=f(),t=[],n=[];return{clear:function(){n=p,t=p},notify:function(){var r=t=n;e(function(){for(var e=0;e. You may also pass a {context : MyContext} option to connect");var R=P;return function(t){var n=t.displayName||t.name||"Component",r=i(n),s=Object(v.a)({},j,{getDisplayName:i,methodName:u,renderCountProp:f,shouldHandleStateChanges:m,storeKey:y,displayName:r,wrappedComponentName:n,WrappedComponent:t}),c=j.pure;var l=c?o.useMemo:function(e){return e()};function p(n){var i=Object(o.useMemo)(function(){return[n.context,n.forwardedRef,Object(g.a)(n,["context","forwardedRef"])]},[n]),u=i[0],c=i[1],f=i[2],p=Object(o.useMemo)(function(){return u&&u.Consumer&&Object(E.isContextConsumer)(a.a.createElement(u.Consumer,null))?u:R},[u,R]),h=Object(o.useContext)(p),y=Boolean(n.store),x=Boolean(h)&&Boolean(h.store);N()(y||x,'Could not find "store" in the context of "'+r+'". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to '+r+" in connect options.");var b=n.store||h.store,w=Object(o.useMemo)(function(){return function(t){return e(t.dispatch,s)}(b)},[b]),A=Object(o.useMemo)(function(){if(!m)return O;var e=new d(b,y?null:h.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[b,y,h]),_=A[0],k=A[1],P=Object(o.useMemo)(function(){return y?h:Object(v.a)({},h,{subscription:_})},[y,h,_]),j=Object(o.useReducer)(S,M,T),I=j[0][0],z=j[1];if(I&&I.error)throw I.error;var D=Object(o.useRef)(),B=Object(o.useRef)(f),U=Object(o.useRef)(),F=Object(o.useRef)(!1),L=l(function(){return U.current&&f===B.current?U.current:w(b.getState(),f)},[b,I,f]);C(function(){B.current=f,D.current=L,F.current=!1,U.current&&(U.current=null,k())}),C(function(){if(m){var e=!1,t=null,n=function(){if(!e){var n,r,i=b.getState();try{n=w(i,B.current)}catch(o){r=o,t=o}r||(t=null),n===D.current?F.current||k():(D.current=n,U.current=n,F.current=!0,z({type:"STORE_UPDATED",payload:{latestStoreState:i,error:r}}))}};_.onStateChange=n,_.trySubscribe(),n();return function(){if(e=!0,_.tryUnsubscribe(),t)throw t}}},[b,_,w]);var q=Object(o.useMemo)(function(){return a.a.createElement(t,Object(v.a)({},L,{ref:c}))},[c,t,L]);return Object(o.useMemo)(function(){return m?a.a.createElement(p.Provider,{value:P},q):q},[p,q,P])}var h=c?a.a.memo(p):p;if(h.WrappedComponent=t,h.displayName=r,_){var x=a.a.forwardRef(function(e,t){return a.a.createElement(h,Object(v.a)({},e,{forwardedRef:t}))});return x.displayName=r,x.WrappedComponent=t,b()(x,t)}return b()(h,t)}}var _=Object.prototype.hasOwnProperty;function k(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function P(e,t){if(k(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function $(e,t){return e===t}var V,G=function(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?A:n,i=t.mapStateToPropsFactories,o=void 0===i?B:i,a=t.mapDispatchToPropsFactories,s=void 0===a?D:a,u=t.mergePropsFactories,c=void 0===u?F:u,l=t.selectorFactory,f=void 0===l?H:l;return function(e,t,n,i){void 0===i&&(i={});var a=i,u=a.pure,l=void 0===u||u,p=a.areStatesEqual,m=void 0===p?$:p,d=a.areOwnPropsEqual,h=void 0===d?P:d,y=a.areStatePropsEqual,x=void 0===y?P:y,b=a.areMergedPropsEqual,w=void 0===b?P:b,N=Object(g.a)(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=W(e,o,"mapStateToProps"),M=W(t,s,"mapDispatchToProps"),O=W(n,c,"mergeProps");return r(f,Object(v.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:M,initMergeProps:O,pure:l,areStatesEqual:m,areOwnPropsEqual:h,areStatePropsEqual:x,areMergedPropsEqual:w},N))}}(),Y=n(38);n.d(t,"a",function(){return y}),n.d(t,"b",function(){return G}),V=Y.unstable_batchedUpdates,l=V},function(e,t,n){"use strict";e.exports=function(e){return e&&e.constructor.prototype.isMatrix||!1}},function(e,t,n){"use strict";function r(e,t,n,i){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=i,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(void 0!==i&&null!==i?"-"+i:"")+" expected)",this.stack=(new Error).stack}r.prototype=new Error,r.prototype.constructor=Error,r.prototype.name="ArgumentsError",r.prototype.isArgumentsError=!0,e.exports=r},function(e,t,n){"use strict";var r=n(17).format,i=n(11).escape;t.name="ConstantNode",t.path="expression.node",t.factory=function(e,t,o,a){var s=o(n(27)),u=o(n(40));function c(e){if(!(this instanceof c))throw new SyntaxError("Constructor must be called with the new operator");if(2===arguments.length)throw new SyntaxError("new ConstantNode(valueStr, valueType) is not supported anymore since math v4.0.0. Use new ConstantNode(value) instead, where value is a non-stringified value.");this.value=e}return c.prototype=new s,c.prototype.type="ConstantNode",c.prototype.isConstantNode=!0,c.prototype._compile=function(e,t){var n=this.value;return function(){return n}},c.prototype.forEach=function(e){},c.prototype.map=function(e){return this.clone()},c.prototype.clone=function(){return new c(this.value)},c.prototype._toString=function(e){return r(this.value,e)},c.prototype.toHTML=function(e){var t=this._toString(e);switch(u(this.value)){case"number":case"BigNumber":case"Fraction":return''+t+"";case"string":return''+t+"";case"boolean":return''+t+"";case"null":return''+t+"";case"undefined":return''+t+"";default:return''+t+""}},c.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},c.fromJSON=function(e){return new c(e.value)},c.prototype._toTex=function(e){var t=this._toString(e);switch(u(this.value)){case"string":return"\\mathtt{"+i(t)+"}";case"number":case"BigNumber":var n=t.toLowerCase().indexOf("e");return-1!==n?t.substring(0,n)+"\\cdot10^{"+t.substring(n+1)+"}":t;case"Fraction":return this.value.toLatex();default:return t}},c}},function(e,t,n){"use strict";var r=n(11),i=n(6).map,o=n(17).escape,a=n(24).isSafeMethod,s=n(24).getSafeProperty,u=n(77);t.name="OperatorNode",t.path="expression.node",t.factory=function(e,t,c,l){var f=c(n(27));function p(t,n,r,i){if(!(this instanceof p))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof t)throw new TypeError('string expected for parameter "op"');if("string"!==typeof n)throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(r)||!r.every(e.isNode))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=!0===i,this.op=t,this.fn=n,this.args=r||[]}function m(e,t,n,r,i){var o,a=u.getPrecedence(e,t),s=u.getAssociativity(e,t);if("all"===t||r.length>2&&"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier())return r.map(function(e){switch(e.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});switch(r.length){case 0:o=[];break;case 1:var c=u.getPrecedence(r[0],t);if(i&&null!==c){var l,f;if("keep"===t?(l=r[0].getIdentifier(),f=e.getIdentifier()):(l=r[0].getContent().getIdentifier(),f=e.getContent().getIdentifier()),!1===u.properties[a][f].latexLeftParens){o=[!1];break}if(!1===u.properties[c][l].latexParens){o=[!1];break}}if(null===c){o=[!1];break}if(c<=a){o=[!0];break}o=[!1];break;case 2:var p,m,d=u.getPrecedence(r[0],t),h=u.isAssociativeWith(e,r[0],t);p=null!==d&&(d===a&&"right"===s&&!h||d=2&&"OperatorNode:multiply"===e.getIdentifier()&&e.implicit&&"auto"===t&&"hide"===n&&(o=r.map(function(e,t){var n="ParenthesisNode"===e.getIdentifier();return!(!o[t]&&!n)})),o}return p.prototype=new f,p.prototype.type="OperatorNode",p.prototype.isOperatorNode=!0,p.prototype._compile=function(e,t){if("string"!==typeof this.fn||!a(e,this.fn))throw e[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var n=s(e,this.fn),r=i(this.args,function(n){return n._compile(e,t)});if(1===r.length){var o=r[0];return function(e,t,r){return n(o(e,t,r))}}if(2===r.length){var u=r[0],c=r[1];return function(e,t,r){return n(u(e,t,r),c(e,t,r))}}return function(e,t,o){return n.apply(null,i(r,function(n){return n(e,t,o)}))}},p.prototype.forEach=function(e){for(var t=0;t2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var f=r.map(function(t,n){return t=t.toString(e),i[n]&&(t="("+t+")"),t});return this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?f.join(" "):f.join(" "+this.op+" ")}return this.fn+"("+this.args.join(", ")+")"},p.prototype.toJSON=function(){return{mathjs:"OperatorNode",op:this.op,fn:this.fn,args:this.args,implicit:this.implicit}},p.fromJSON=function(e){return new p(e.op,e.fn,e.args,e.implicit)},p.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",r=this.args,i=m(this,t,n,r,!1);if(1===r.length){var a=u.getAssociativity(this,t),s=r[0].toHTML(e);return i[0]&&(s='('+s+')'),"right"===a?''+o(this.op)+""+s:s+''+o(this.op)+""}if(2===r.length){var c=r[0].toHTML(e),l=r[1].toHTML(e);return i[0]&&(c='('+c+')'),i[1]&&(l='('+l+')'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?c+''+l:c+''+o(this.op)+""+l}var f=r.map(function(t,n){return t=t.toHTML(e),i[n]&&(t='('+t+')'),t});return r.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())?this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?f.join(''):f.join(''+o(this.op)+""):''+o(this.fn)+'('+f.join(',')+')'},p.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",i=this.args,o=m(this,t,n,i,!0),a=r.operators[this.fn];if(a="undefined"===typeof a?this.op:a,1===i.length){var s=u.getAssociativity(this,t),c=i[0].toTex(e);return o[0]&&(c="\\left(".concat(c,"\\right)")),"right"===s?a+c:c+a}if(2===i.length){var l=i[0],f=l.toTex(e);o[0]&&(f="\\left(".concat(f,"\\right)"));var p,d=i[1].toTex(e);switch(o[1]&&(d="\\left(".concat(d,"\\right)")),p="keep"===t?l.getIdentifier():l.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return a+"{"+f+"}{"+d+"}";case"OperatorNode:pow":switch(f="{"+f+"}",d="{"+d+"}",p){case"ConditionalNode":case"OperatorNode:divide":f="\\left(".concat(f,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&"hide"===n)return f+"~"+d}return f+a+d}if(i.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var h=i.map(function(t,n){return t=t.toTex(e),o[n]&&(t="\\left(".concat(t,"\\right)")),t});return"OperatorNode:multiply"===this.getIdentifier()&&this.implicit?h.join("~"):h.join(a)}return"\\mathrm{"+this.fn+"}\\left("+i.map(function(t){return t.toTex(e)}).join(",")+"\\right)"},p.prototype.getIdentifier=function(){return this.type+":"+this.fn},p}},function(e,t,n){"use strict";var r=n(4);t.name="isZero",t.factory=function(e,t,n,i){var o=i("isZero",{number:function(e){return 0===e},BigNumber:function(e){return e.isZero()},Complex:function(e){return 0===e.re&&0===e.im},Fraction:function(e){return 1===e.d&&0===e.n},Unit:function(e){return o(e.value)},"Array | Matrix":function(e){return r(e,o)}});return o}},function(e,t,n){"use strict";var r=n(4);t.name="isNegative",t.factory=function(e,t,n,i){var o=i("isNegative",{number:function(e){return e<0},BigNumber:function(e){return e.isNeg()&&!e.isZero()&&!e.isNaN()},Fraction:function(e){return e.s<0},Unit:function(e){return o(e.value)},"Array | Matrix":function(e){return r(e,o)}});return o}},function(e,t,n){"use strict";var r=n(50);e.exports=function(e){for(var t=0;t15)throw new Error("Number of decimals in function round must be in te range of 0-15");return s(e,t)},Complex:function(e){return e.round()},"Complex, number":function(e,t){if(t%1)throw new TypeError(a);return e.round(t)},"Complex, BigNumber":function(e,t){if(!t.isInteger())throw new TypeError(a);var n=t.toNumber();return e.round(n)},"number, BigNumber":function(t,n){if(!n.isInteger())throw new TypeError(a);return new e.BigNumber(t).toDecimalPlaces(n.toNumber())},BigNumber:function(e){return e.toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,t){if(!t.isInteger())throw new TypeError(a);return e.toDecimalPlaces(t.toNumber())},Fraction:function(e){return e.round()},"Fraction, number":function(e,t){if(t%1)throw new TypeError(a);return e.round(t)},"Array | Matrix":function(e){return o(e,h,!0)},"SparseMatrix, number | BigNumber":function(e,t){return p(e,t,h,!1)},"DenseMatrix, number | BigNumber":function(e,t){return d(e,t,h,!1)},"number | Complex | BigNumber, SparseMatrix":function(e,t){return l(e,0)?f(t.size(),t.storage()):m(t,e,h,!0)},"number | Complex | BigNumber, DenseMatrix":function(e,t){return l(e,0)?f(t.size(),t.storage()):d(t,e,h,!0)},"Array, number | BigNumber":function(e,t){return d(c(e),t,h,!1).valueOf()},"number | Complex | BigNumber, Array":function(e,t){return d(c(t),e,h,!0).valueOf()}});return h.toTex={1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},h}},function(e,t,n){"use strict";t.name="ParenthesisNode",t.path="expression.node",t.factory=function(e,t,r,i){var o=r(n(27));function a(t){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(!e.isNode(t))throw new TypeError('Node expected for parameter "content"');this.content=t}return a.prototype=new o,a.prototype.type="ParenthesisNode",a.prototype.isParenthesisNode=!0,a.prototype._compile=function(e,t){return this.content._compile(e,t)},a.prototype.getContent=function(){return this.content.getContent()},a.prototype.forEach=function(e){e(this.content,"content",this)},a.prototype.map=function(e){return new a(e(this.content,"content",this))},a.prototype.clone=function(){return new a(this.content)},a.prototype._toString=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"("+this.content.toString(e)+")":this.content.toString(e)},a.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},a.fromJSON=function(e){return new a(e.content)},a.prototype.toHTML=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?'('+this.content.toHTML(e)+')':this.content.toHTML(e)},a.prototype._toTex=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"\\left(".concat(this.content.toTex(e),"\\right)"):this.content.toTex(e)},a}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){return(i=Object.assign||function(e){for(var t=1;t'+a(this.fn)+'('+t.join(',')+')'};var x=y.prototype.toTex;return y.prototype.toTex=function(e){var t;return e&&"object"===r(e.handler)&&s(e.handler,this.name)&&(t=e.handler[this.name](this,e)),"undefined"!==typeof t?t:x.call(this,e)},y.prototype._toTex=function(e){var t,n,i=this.args.map(function(t){return t.toTex(e)});switch(!m[this.name]||"function"!==typeof m[this.name].toTex&&"object"!==r(m[this.name].toTex)&&"string"!==typeof m[this.name].toTex||(t=m[this.name].toTex),r(t)){case"function":n=t(this,e);break;case"string":n=g(t,this,e);break;case"object":switch(r(t[i.length])){case"function":n=t[i.length](this,e);break;case"string":n=g(t[i.length],this,e)}}return"undefined"!==typeof n?n:g(o.defaultTemplate,this,e)},y.prototype.getIdentifier=function(){return this.type+":"+this.name},y}},function(e,t,n){"use strict";var r=n(46);t.name="inv",t.factory=function(e,t,i,o){var a=i(n(3)),s=i(n(23)),u=i(n(28)),c=i(n(18)),l=i(n(55)),f=i(n(175)),p=i(n(74)),m=i(n(37)),d=o("inv",{"Array | Matrix":function(t){var n=e.isMatrix(t)?t.size():r.array.size(t);switch(n.length){case 1:if(1===n[0])return e.isMatrix(t)?a([s(1,t.valueOf()[0])]):[s(1,t[0])];throw new RangeError("Matrix must be square (size: "+r.string.format(n)+")");case 2:var i=n[0],o=n[1];if(i===o)return e.isMatrix(t)?a(h(t.valueOf(),i,o),t.storage()):h(t,i,o);throw new RangeError("Matrix must be square (size: "+r.string.format(n)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+r.string.format(n)+")")}},any:function(e){return s(1,e)}});function h(e,t,n){var r,i,o,a,d;if(1===t){if(0===(a=e[0][0]))throw Error("Cannot calculate inverse, determinant is zero");return[[s(1,a)]]}if(2===t){var h=f(e);if(0===h)throw Error("Cannot calculate inverse, determinant is zero");return[[s(e[1][1],h),s(l(e[0][1]),h)],[s(l(e[1][0]),h),s(e[0][0],h)]]}var y=e.concat();for(r=0;rx&&(x=m(y[r][g]),b=r),r++;if(0===x)throw Error("Cannot calculate inverse, determinant is zero");(r=b)!==g&&(d=y[g],y[g]=y[r],y[r]=d,d=v[g],v[g]=v[r],v[r]=d);var w=y[g],N=v[g];for(r=0;r0},BigNumber:function(e){return!e.isNeg()&&!e.isZero()&&!e.isNaN()},Fraction:function(e){return e.s>0&&e.n>0},Unit:function(e){return o(e.value)},"Array | Matrix":function(e){return r(e,o)}});return o}},function(e,t,n){"use strict";var r=n(325),i=n(22);t.name="algorithm06",t.factory=function(e,t,o,a){var s=o(n(20)),u=e.SparseMatrix;return function(e,t,n){var o=e._values,c=e._size,l=e._datatype,f=t._values,p=t._size,m=t._datatype;if(c.length!==p.length)throw new i(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");var d,h=c[0],y=c[1],v=s,g=0,x=n;"string"===typeof l&&l===m&&(d=l,v=a.find(s,[d,d]),g=a.convert(0,d),x=a.find(n,[d,d]));for(var b=o&&f?[]:void 0,w=[],N=[],E=new u({values:b,index:w,ptr:N,size:[h,y],datatype:d}),M=b?[]:void 0,O=[],S=[],T=0;Te)throw new TypeError("k must be less than or equal to n");return t<(n=e-t)?i(n+1,e)/i(1,t):i(t+1,e)/i(1,n)},"BigNumber, BigNumber":function(t,n){var r,i,a,s,u=new e.BigNumber(1);if(!o(t)||!o(n))throw new TypeError("Positive integer value expected in function combinations");if(n.gt(t))throw new TypeError("k must be less than n in function combinations");for(r=t.minus(n),n.lt(r)&&(r=n),i=u,a=u,s=t.minus(r);a.lte(s);a=a.plus(1))i=i.times(r.plus(a)).dividedBy(a);return i}});return s.toTex={2:"\\binom{${args[0]}}{${args[1]}}"},s}},function(e,t,n){"use strict";t.name="range",t.factory=function(e,t,r,i){var o=r(n(3)),a=r(n(54)),s=r(n(48)),u=r(n(191)),c=r(n(120)),l=new e.BigNumber(0),f=new e.BigNumber(1),p=i("range",{string:d,"string, boolean":d,"number, number":function(e,t){return m(h(e,t,1))},"number, number, number":function(e,t,n){return m(h(e,t,n))},"number, number, boolean":function(e,t,n){return m(n?y(e,t,1):h(e,t,1))},"number, number, number, boolean":function(e,t,n,r){return m(r?y(e,t,n):h(e,t,n))},"BigNumber, BigNumber":function(e,t){return m(v(e,t,f))},"BigNumber, BigNumber, BigNumber":function(e,t,n){return m(v(e,t,n))},"BigNumber, BigNumber, boolean":function(e,t,n){return m(n?g(e,t,f):v(e,t,f))},"BigNumber, BigNumber, BigNumber, boolean":function(e,t,n,r){return m(r?g(e,t,n):v(e,t,n))}});return p.toTex=void 0,p;function m(e){return"Array"===t.matrix?e:o(e)}function d(n,r){var i=function(e){var t=e.split(":").map(function(e){return Number(e)});if(t.some(function(e){return isNaN(e)}))return null;switch(t.length){case 2:return{start:t[0],end:t[1],step:1};case 3:return{start:t[0],end:t[2],step:t[1]};default:return null}}(n);if(!i)throw new SyntaxError('String "'+n+'" is no valid range');return"BigNumber"===t.number?m((r?g:v)(new e.BigNumber(i.start),new e.BigNumber(i.end),new e.BigNumber(i.step))):m((r?y:h)(i.start,i.end,i.step))}function h(e,t,n){var r=[],i=e;if(n>0)for(;a(i,t);)r.push(i),i+=n;else if(n<0)for(;s(i,t);)r.push(i),i+=n;return r}function y(e,t,n){var r=[],i=e;if(n>0)for(;u(i,t);)r.push(i),i+=n;else if(n<0)for(;c(i,t);)r.push(i),i+=n;return r}function v(e,t,n){var r=[],i=e;if(n.gt(l))for(;a(i,t);)r.push(i),i=i.plus(n);else if(n.lt(l))for(;s(i,t);)r.push(i),i=i.plus(n);return r}function g(e,t,n){var r=[],i=e;if(n.gt(l))for(;u(i,t);)r.push(i),i=i.plus(n);else if(n.lt(l))for(;c(i,t);)r.push(i),i=i.plus(n);return r}}},function(e,t,n){"use strict";var r=n(13).clone,i=n(6),o=n(72),a=n(22);function s(e,t,n,r){if(r0&&p>u)throw new o(p,u+1)}else{var y=r(h).valueOf(),v=i.size(y);if(d[n]=y,u=p,p=v.length-1,n>0&&p!==u)throw new a(u+1,p+1)}}if(0===d.length)throw new SyntaxError("At least one matrix expected");for(var g=d.shift();d.length;)g=s(g,d.shift(),p,0);return m?l(g):g},"...string":function(e){return e.join("")}});return p.toTex=void 0,p}},function(e,t,n){"use strict";var r=n(4);t.name="isNaN",t.factory=function(e,t,n,i){return i("isNaN",{number:function(e){return Number.isNaN(e)},BigNumber:function(e){return e.isNaN()},Fraction:function(e){return!1},Complex:function(e){return e.isNaN()},Unit:function(e){return Number.isNaN(e.value)},"Array | Matrix":function(e){return r(e,Number.isNaN)}})}},function(e,t,n){"use strict";var r=n(6).size,i=n(82),o=n(72);function a(e,t,n){var r,i,o,s;if(t<=0){if(Array.isArray(e[0])){for(s=function(e){var t,n,r=e.length,i=e[0].length,o=[];for(n=0;n=s.length)throw new o(t,s.length);return i(e)?e.create(a(e.valueOf(),t,n)):a(e,t,n)}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return r})},function(e,t,n){e.exports=n(232)},,function(e,t,n){"use strict";(function(t){var r=n(35),i=n(236),o={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s={adapter:function(){var e;return"undefined"!==typeof XMLHttpRequest?e=n(146):"undefined"!==typeof t&&(e=n(146)),e}(),transformRequest:[function(e,t){return i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(e){s.headers[e]={}}),r.forEach(["post","put","patch"],function(e){s.headers[e]=r.merge(o)}),e.exports=s}).call(this,n(235))},function(e,t,n){"use strict";e.exports=function(e){return e&&e.constructor.prototype.isBigNumber||!1}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=n(269),o=n(9).format,a=n(9).isNumber;t.name="Complex",t.path="type",t.factory=function(e,t,n,s,u){return i.prototype.type="Complex",i.prototype.isComplex=!0,i.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},i.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},i.prototype.format=function(e){var t=this.im,n=this.re,r=o(this.re,e),i=o(this.im,e),s=a(e)?e:e?e.precision:null;if(null!==s){var u=Math.pow(10,-s);Math.abs(n/t)t.re?1:e.ret.im?1:e.im");if(2!==u.length)throw SyntaxError("Could not parse rule: "+i);i={l:u[0],r:u[1]};case"object":if(o={l:O(s(i.l)),r:O(s(i.r))},i.context&&(o.evaluate=i.context),i.evaluate&&(o.evaluate=s(i.evaluate)),x(o.l)){var c=E(o.l),l=new m("_p"+T++);o.expanded={},o.expanded.l=c([o.l.clone(),l]),b(o.expanded.l),w(o.expanded.l),o.expanded.r=c([o.r,l])}break;case"function":o=i;break;default:throw TypeError("Unsupported type of rule: "+a)}t.push(o)}return t}(t);for(var o=y(e,n),a={},u=(o=O(o)).toString({parenthesis:"all"});!a[u];){a[u]=!0,T=0;for(var c=0;c=2&&2===t.args.length){for(var o=function(e,t){var n,r,i=[],o=E(e);if(g(e,t))for(var a=0;a2)throw Error("Unexpected non-binary associative function: "+t.toString());return[]}for(var h=[],y=0;y0)for(t=0;t0&&e.forEach(0,n-1,function(t,n){h._forEachRow(t,g,x,b,function(r,i){r>t&&e.accumulate(r,d(l(i,n)))})});var C=n,A=e.get(n),_=s(A);e.forEach(n+1,i-1,function(e,t){var n=s(t);p(n,_)&&(C=e,_=n,A=t)}),n!==C&&(h._swapRows(n,C,w[1],g,x,b),h._swapRows(n,C,O[1],N,E,M),e.swap(n,C),function(e,t){var n=T[e],r=T[t];S[n]=t,S[r]=e,T[e]=r,T[t]=n}(n,C)),e.forEach(0,i-1,function(e,t){e<=n?(N.push(t),E.push(e)):(t=c(t,A),m(t,0)||(g.push(t),x.push(e)))})};for(n=0;n=t},"number, number":function(e,n){return e>=n||r(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.gte(n)||i(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return-1!==e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return d(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,d)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,d)},"Array, Array":function(e,t){return d(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return d(s(e),t)},"Matrix, Array":function(e,t){return d(e,s(t))},"SparseMatrix, any":function(e,t){return l(e,t,d,!1)},"DenseMatrix, any":function(e,t){return p(e,t,d,!1)},"any, SparseMatrix":function(e,t){return l(t,e,d,!0)},"any, DenseMatrix":function(e,t){return p(t,e,d,!0)},"Array, any":function(e,t){return p(s(e),t,d,!1).valueOf()},"any, Array":function(e,t){return p(s(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}".concat(m.operators.largerEq,"${args[1]}\\right)")},d}},function(e,t,n){"use strict";var r=n(46),i=r.string,o=r.array,a=Array.isArray;t.factory=function(e){var t=e.DenseMatrix;return function(n,r,s){var u=n.size();if(2!==u.length)throw new RangeError("Matrix must be two dimensional (size: "+i.format(u)+")");var c,l,f,p=u[0];if(p!==u[1])throw new RangeError("Matrix must be square (size: "+i.format(u)+")");if(e.isMatrix(r)){var m=r.size();if(1===m.length){if(m[0]!==p)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(c=[],f=r._data,l=0;l=0||t.predictable?Math.log(n):new e.Complex(n,0).log()},Complex:function(e){return e.log()},BigNumber:function(n){return!n.isNegative()||t.predictable?n.ln():new e.Complex(n.toNumber(),0).log()},"Array | Matrix":function(e){return r(e,s)},"any, any":function(e,t){return a(s(e),s(t))}});return s.toTex={1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},s}},function(e,t,n){"use strict";var r=n(124);function i(e){for(var t=e.d,n=t[0]+"",r=1;r0)if(++s>c)for(s-=c;s--;)u+="0";else s1&&(null!==l[m+1]&&void 0!==l[m+1]||(l[m+1]=0),l[m+1]+=l[m]>>1,l[m]&=1)}return l.reverse()}e.exports=function(e,t,n){var o,a,s,u,c,l=e.constructor,f=+(e.s<0),p=+(t.s<0);if(f){o=i(r(e));for(var m=0;m0;)n(s[--h],u[--y])===v&&(g=g.plus(x)),x=x.times(b);for(;y>0;)n(c,u[--y])===v&&(g=g.plus(x)),x=x.times(b);return l.config({precision:w}),0===v&&(g.s=-g.s),g}},function(e,t,n){"use strict";e.exports=function(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var t=e.constructor,n=t.precision;t.config({precision:1e9});var r=e.plus(new t(1));return r.s=-r.s||null,t.config({precision:n}),r}},function(e,t,n){"use strict";var r=n(22);t.name="algorithm08",t.factory=function(e,t,i,o){var a=i(n(20)),s=e.SparseMatrix;return function(e,t,n){var i=e._values,u=e._index,c=e._ptr,l=e._size,f=e._datatype,p=t._values,m=t._index,d=t._ptr,h=t._size,y=t._datatype;if(l.length!==h.length)throw new r(l.length,h.length);if(l[0]!==h[0]||l[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+h+")");if(!i||!p)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var v,g=l[0],x=l[1],b=a,w=0,N=n;"string"===typeof f&&f===y&&(v=f,b=o.find(a,[v,v]),w=o.convert(0,v),N=o.find(n,[v,v]));for(var E,M,O,S,T=[],C=[],A=[],_=new s({values:T,index:C,ptr:A,size:[g,x],datatype:v}),k=[],P=[],j=0;j>1)*e(r+1,n)}},function(e,t,n){"use strict";var r=n(6).size,i=n(82),o=n(72);function a(e,t,n){var r,i,o;if(t<=0){if(Array.isArray(e[0])){for(o=function(e){var t,n,r=e.length,i=e[0].length,o=[];for(n=0;n=s.length)throw new o(t,s.length);return i(e)?e.create(a(e.valueOf(),t,n)):a(e,t,n)}});return l.toTex=void 0,l}},function(e,t,n){"use strict";var r=n(9).isInteger;t.name="partitionSelect",t.factory=function(e,t,i,o){var a=i(n(76)),s=i(n(106)),u=i(n(79));function c(e,t){return-u(e,t)}return o("partitionSelect",{"Array | Matrix, number":function(e,t){return l(e,t,u)},"Array | Matrix, number, string":function(e,t,n){if("asc"===n)return l(e,t,u);if("desc"===n)return l(e,t,c);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":l});function l(t,n,i){if(!r(n)||n<0)throw new Error("k must be a non-negative integer");if(e.isMatrix(t)){if(t.size().length>1)throw new Error("Only one dimensional matrices supported");return f(t.valueOf(),n,i)}if(Array.isArray(t))return f(t,n,i)}function f(e,t,n){if(t>=e.length)throw new Error("k out of bounds");for(var r=0;r=0){var f=e[c];e[c]=e[u],e[u]=f,--c}else++u;n(e[u],l)>0&&--u,t<=u?o=u:i=u+1}return e[t]}}},function(e,t,n){"use strict";var r=n(69),i=n(107),o=n(88);t.name="max",t.factory=function(e,t,a,s){var u=a(n(48)),c=a(n(56)),l=s("max",{"Array | Matrix":p,"Array | Matrix, number | BigNumber":function(e,t){return i(e,t.valueOf(),f)},"...":function(e){if(o(e))throw new TypeError("Scalar values expected in function max");return p(e)}});return l.toTex="\\max\\left(${args}\\right)",l;function f(e,t){try{return u(e,t)?e:t}catch(n){throw c(n,"max",t)}}function p(e){var t;if(r(e,function(e){try{isNaN(e)&&"number"===typeof e?t=NaN:(void 0===t||u(e,t))&&(t=e)}catch(n){throw c(n,"max",e)}}),void 0===t)throw new Error("Cannot calculate max of an empty array");return t}}},function(e,t,n){"use strict";var r=n(69),i=n(107),o=n(88);t.name="sum",t.factory=function(e,t,a,s){var u=a(n(28)),c=a(n(56)),l=s("sum",{"Array | Matrix":f,"Array | Matrix, number | BigNumber":function(e,t){try{var n=i(e,t,u);return n}catch(r){throw c(r,"sum")}},"...":function(e){if(o(e))throw new TypeError("Scalar values expected in function sum");return f(e)}});return l.toTex=void 0,l;function f(n){var i;if(r(n,function(e){try{i=void 0===i?e:u(i,e)}catch(t){throw c(t,"sum",e)}}),void 0===i)switch(t.number){case"number":return 0;case"BigNumber":return new e.BigNumber(0);case"Fraction":return new e.Fraction(0);default:return 0}return i}}},function(e,t,n){"use strict";var r=n(83),i=n(50),o=n(9).isNumber;t.name="distribution",t.factory=function(e,t,a,s,u){var c=a(n(3)),l=n(6),f=a(n(389));function p(t){if(!m.hasOwnProperty(t))throw new Error("Unknown distribution "+t);var n=Array.prototype.slice.call(arguments,1);return function(t){function n(t,n,r){var i="undefined"===typeof n;if(i&&(n=1),e.isMatrix(t))t=t.valueOf();else if(!Array.isArray(t))throw new TypeError("Unsupported type of value in function pickRandom");if(l.size(t).length>1)throw new Error("Only one dimensional vectors supported");var a=0;if("undefined"!==typeof r){if(r.length!==t.length)throw new Error("Weights must have the same length as possibles");for(var s=0,u=r.length;s=c)return n>1?t:t[0];for(var p,m=[];m.length1)for(var o=0,a=e.shift();o3)throw new r("random",arguments.length,0,3);if(1===arguments.length?i(t)?u=t:f=t:2===arguments.length?i(t)?(u=t,f=n):(l=t,f=n):(u=t,l=n,f=s),void 0!==l&&!o(l)||void 0!==f&&!o(f))throw new TypeError("Invalid argument in function random");if(void 0===f&&(f=1),void 0===l&&(l=0),void 0!==u){var m=p(u.valueOf(),l,f,a);return e.isMatrix(u)?c(m):m}return a(l,f)},randomInt:s({"number | Array":function(t){if(i(t)){var n=t,r=p(n.valueOf(),0,1,u);return e.isMatrix(n)?c(r):r}return u(0,t)},"number | Array, number":function(t,n){if(i(t)){var r=t,o=n,a=p(r.valueOf(),0,o,u);return e.isMatrix(r)?c(a):a}return u(t,n)},"Array, number, number":function(e,t,n){var r=p(e.valueOf(),t,n,u);return e&&!0===e.isMatrix?c(r):r}}),pickRandom:s({Array:function(e){return n(e)},"Array, number | Array":function(e,t){var r,i;if(Array.isArray(t))i=t;else{if(!o(t))throw new TypeError("Invalid argument in function pickRandom");r=t}return n(e,r,i)},"Array, number | Array, Array | number":function(e,t,r){var i,a;if(Array.isArray(t)?(a=t,i=r):(a=r,i=t),!Array.isArray(a)||!o(i))throw new TypeError("Invalid argument in function pickRandom");return n(e,i,a)}})}}(m[t].apply(this,n))}var m={uniform:function(){return f},normal:function(){return function(){for(var e,t,n=-1;n<0||n>1;)e=f(),t=f(),n=1/6*Math.pow(-2*Math.log(e),.5)*Math.cos(2*Math.PI*t)+.5;return n}}};return p.toTex=void 0,p}},function(e,t,n){"use strict";var r="unbiased",i=n(69);t.name="var",t.factory=function(e,t,o,a){var s=o(n(127)),u=o(n(28)),c=o(n(26)),l=o(n(32)),f=o(n(23)),p=o(n(106)),m=o(n(56)),d=a("variance",{"Array | Matrix":function(e){return h(e,r)},"Array | Matrix, string":h,"Array | Matrix, number | BigNumber":function(e,t){return y(e,t,r)},"Array | Matrix, number | BigNumber, string":y,"...":function(e){return h(e,r)}});return d.toTex="\\mathrm{Var}\\left(${args}\\right)",d;function h(t,n){var r=0,o=0;if(0===t.length)throw new SyntaxError("Function var requires one or more parameters (0 provided)");if(i(t,function(e){try{r=u(r,e),o++}catch(t){throw m(t,"var",e)}}),0===o)throw new Error("Cannot calculate var of an empty array");var a=f(r,o);if(r=0,i(t,function(e){var t=c(e,a);r=u(r,l(t,t))}),p(r))return r;switch(n){case"uncorrected":return f(r,o);case"biased":return f(r,o+1);case"unbiased":var s=e.isBigNumber(r)?new e.BigNumber(0):0;return 1===o?s:f(r,o-1);default:throw new Error('Unknown normalization "'+n+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function y(e,t,n){try{if(0===e.length)throw new SyntaxError("Function var requires one or more parameters (0 provided)");return s(e,t,function(e){return h(e,n)})}catch(r){throw m(r,"var")}}}},function(e,t,n){"use strict";t.factory=function(e,t,n,r){return function(t,n,r){var i=t.filter(function(t){return e.isSymbolNode(t)&&!(t.name in n)&&!(t.name in r)})[0];if(!i)throw new Error('No undefined variable found in inline expression "'+t+'"');var o=i.name,a=Object.create(r),s=t.compile();return function(e){return a[o]=e,s.eval(a)}}}},function(e,t,n){"use strict";var r=n(226);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,i.default)(e,t)||("string"===typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var i=r(n(227));e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"===typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";e.exports=n(230)},function(e,t,n){"use strict";var r=n(136),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,d=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(d){var i=m(n);i&&i!==d&&e(t,i,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(t),h=u(n),y=0;y=0){i=1;break}var a=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},i))}};function s(e){return e&&"[object Function]"==={}.toString.call(e)}function u(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function c(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=u(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:l(c(e))}var f=n&&!(!window.MSInputMethodContext||!document.documentMode),p=n&&/MSIE 10/.test(navigator.userAgent);function m(e){return 11===e?f:10===e?p:f||p}function d(e){if(!e)return document.documentElement;for(var t=m(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===u(n,"position")?d(n):n:e?e.ownerDocument.documentElement:document.documentElement}function h(e){return null!==e.parentNode?h(e.parentNode):e}function y(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(e!==a&&t!==a||r.contains(i))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||d(e.firstElementChild)===e)}(a)?a:d(a);var s=h(e);return s.host?y(s.host,t):y(e,h(t).host)}function v(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var r=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||r)[t]}return e[t]}function g(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+r+"Width"],10)}function x(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],m(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function b(e){var t=e.body,n=e.documentElement,r=m(10)&&getComputedStyle(n);return{height:x("Height",t,n,r),width:x("Width",t,n,r)}}var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},N=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=m(10),i="HTML"===t.nodeName,o=S(e),a=S(t),s=l(e),c=u(t),f=parseFloat(c.borderTopWidth,10),p=parseFloat(c.borderLeftWidth,10);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=O({top:o.top-a.top-f,left:o.left-a.left-p,width:o.width,height:o.height});if(d.marginTop=0,d.marginLeft=0,!r&&i){var h=parseFloat(c.marginTop,10),y=parseFloat(c.marginLeft,10);d.top-=f-h,d.bottom-=f-h,d.left-=p-y,d.right-=p-y,d.marginTop=h,d.marginLeft=y}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=v(t,"top"),i=v(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}(d,t)),d}function C(e){if(!e||!e.parentElement||m())return document.documentElement;for(var t=e.parentElement;t&&"none"===u(t,"transform");)t=t.parentElement;return t||document.documentElement}function A(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?C(e):y(e,t);if("viewport"===r)o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=T(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:v(n),s=t?0:v(n,"left");return O({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o})}(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=l(c(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var f=T(s,a,i);if("HTML"!==s.nodeName||function e(t){var n=t.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===u(t,"position"))return!0;var r=c(t);return!!r&&e(r)}(a))o=f;else{var p=b(e.ownerDocument),m=p.height,d=p.width;o.top+=f.top-f.marginTop,o.bottom=m+f.top,o.left+=f.left-f.marginLeft,o.right=d+f.left}}var h="number"===typeof(n=n||0);return o.left+=h?n:n.left||0,o.top+=h?n:n.top||0,o.right-=h?n:n.right||0,o.bottom-=h?n:n.bottom||0,o}function _(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=A(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},u=Object.keys(s).map(function(e){return M({key:e},s[e],{area:(t=s[e],t.width*t.height)});var t}).sort(function(e,t){return t.area-e.area}),c=u.filter(function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight}),l=c.length>0?c[0].key:u[0].key,f=e.split("-")[1];return l+(f?"-"+f:"")}function k(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return T(n,r?C(t):y(t,n),r)}function P(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function j(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function R(e,t,n){n=n.split("-")[0];var r=P(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",u=o?"height":"width",c=o?"width":"height";return i[a]=t[a]+t[u]/2-r[u]/2,i[s]=n===s?t[s]-r[c]:t[j(s)],i}function I(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function z(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var r=I(e,function(e){return e[t]===n});return e.indexOf(r)}(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&s(n)&&(t.offsets.popper=O(t.offsets.popper),t.offsets.reference=O(t.offsets.reference),t=n(t,e))}),t}function D(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function B(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=G.indexOf(e),r=G.slice(n+1).concat(G.slice(0,n));return t?r.reverse():r}var Z={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function J(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=a.indexOf(I(a,function(e){return-1!==e.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(u)[0]]),[a[s].split(u)[1]].concat(a.slice(s+1))]:[a];return(c=c.map(function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return O(s)[t]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(e,i,t,n)})})).forEach(function(e,t){e.forEach(function(n,r){q(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))})}),i}var X={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),u=s?"left":"top",c=s?"width":"height",l={start:E({},u,o[u]),end:E({},u,o[u]+o[c]-a[c])};e.offsets.popper=M({},a,l[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],u=void 0;return u=q(+n)?[+n,0]:J(n,o,a,s),"left"===s?(o.top+=u[0],o.left-=u[1]):"right"===s?(o.top+=u[0],o.left+=u[1]):"top"===s?(o.left+=u[0],o.top-=u[1]):"bottom"===s&&(o.left+=u[0],o.top+=u[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||d(e.instance.popper);e.instance.reference===n&&(n=d(n));var r=B("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var u=A(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=u;var c=t.priority,l=e.offsets.popper,f={primary:function(e){var n=l[e];return l[e]u[e]&&!t.escapeWithReference&&(r=Math.min(l[n],u[e]-("right"===e?l.width:l.height))),E({},n,r)}};return c.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";l=M({},l,f[t](e))}),e.offsets.popper=l,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",u=a?"left":"top",c=a?"width":"height";return n[s]o(r[s])&&(e.offsets.popper[u]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!$(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"===typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,c=-1!==["left","right"].indexOf(i),l=c?"height":"width",f=c?"Top":"Left",p=f.toLowerCase(),m=c?"left":"top",d=c?"bottom":"right",h=P(r)[l];s[d]-ha[d]&&(e.offsets.popper[p]+=s[p]+h-a[d]),e.offsets.popper=O(e.offsets.popper);var y=s[p]+s[l]/2-h/2,v=u(e.instance.popper),g=parseFloat(v["margin"+f],10),x=parseFloat(v["border"+f+"Width"],10),b=y-e.offsets.popper[p]-g-x;return b=Math.max(Math.min(a[l]-h,b),0),e.arrowElement=r,e.offsets.arrow=(E(n={},p,Math.round(b)),E(n,m,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(D(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=A(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=j(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case Z.FLIP:a=[r,i];break;case Z.CLOCKWISE:a=Y(r);break;case Z.COUNTERCLOCKWISE:a=Y(r,!0);break;default:a=t.behavior}return a.forEach(function(s,u){if(r!==s||a.length===u+1)return e;r=e.placement.split("-")[0],i=j(r);var c=e.offsets.popper,l=e.offsets.reference,f=Math.floor,p="left"===r&&f(c.right)>f(l.left)||"right"===r&&f(c.left)f(l.top)||"bottom"===r&&f(c.top)f(n.right),h=f(c.top)f(n.bottom),v="left"===r&&m||"right"===r&&d||"top"===r&&h||"bottom"===r&&y,g=-1!==["top","bottom"].indexOf(r),x=!!t.flipVariations&&(g&&"start"===o&&m||g&&"end"===o&&d||!g&&"start"===o&&h||!g&&"end"===o&&y),b=!!t.flipVariationsByContent&&(g&&"start"===o&&d||g&&"end"===o&&m||!g&&"start"===o&&y||!g&&"end"===o&&h),w=x||b;(p||v||w)&&(e.flipped=!0,(p||v)&&(r=a[u+1]),w&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=M({},e.offsets.popper,R(e.instance.popper,e.offsets.reference,e.placement)),e=z(e.instance.modifiers,e,"flip"))}),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=j(t),e.offsets.popper=O(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!$(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=I(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};w(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=a(this.update.bind(this)),this.options=M({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(M({},e.Defaults.modifiers,i.modifiers)).forEach(function(t){r.options.modifiers[t]=M({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return M({name:e},r.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&s(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return N(e,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=k(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=_(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=R(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=z(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,D(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[B("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=F(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return L.call(this)}}]),e}();Q.Utils=("undefined"!==typeof window?window:e).PopperUtils,Q.placements=V,Q.Defaults=X,t.a=Q}).call(this,n(71))},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u=0||(i[n]=e[n]);return i}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"===typeof n)return n(e,r);var o=i.default.Children.only(n);return i.default.cloneElement(o,r)},r}(i.default.Component);function m(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:m,onEntering:m,onEntered:m,onExit:m,onExiting:m,onExited:m},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var d=(0,a.polyfill)(p);t.default=d},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function o(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?s="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var u=e.displayName||e.name,c="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var r;(r=n(0))&&r.__esModule;t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(0)),i=s(n(1)),o=n(142),a=n(229);function s(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,["component","childFactory"]),o=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o:i.default.createElement(t,r,o)},r}(i.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,o.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+t+"). Use function bignumber(x) to convert to BigNumber.");return new e.BigNumber(t)}},{from:"number",to:"Complex",convert:function(t){return new e.Complex(t,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(t){return new e.Complex(t.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(t){return new e.Complex(t.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(t){if(new e.Fraction(t).valueOf()!==t)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+t+"). Use function fraction(x) to convert to Fraction.");return new e.Fraction(t)}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw new Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(t){try{return new e.BigNumber(t)}catch(n){throw new Error('Cannot convert "'+t+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(t){try{return new e.Fraction(t)}catch(n){throw new Error('Cannot convert "'+t+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(t){try{return new e.Complex(t)}catch(n){throw new Error('Cannot convert "'+t+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(t){return new e.BigNumber(+t)}},{from:"boolean",to:"Fraction",convert:function(t){return new e.Fraction(+t)}},{from:"boolean",to:"string",convert:function(e){return+e}},{from:"Array",to:"Matrix",convert:function(t){return new e.DenseMatrix(t)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],t}},function(e,t,n){"use strict";var r=n(255);t.mixin=function(e){var t=new r;return e.on=t.on.bind(t),e.off=t.off.bind(t),e.once=t.once.bind(t),e.emit=t.emit.bind(t),e}},function(e,t,n){"use strict";var r=n(4);t.name="bignumber",t.factory=function(e,t,n,i){var o=i("bignumber",{"":function(){return new e.BigNumber(0)},number:function(t){return new e.BigNumber(t+"")},string:function(t){return new e.BigNumber(t)},BigNumber:function(e){return e},Fraction:function(t){return new e.BigNumber(t.n).div(t.d).times(t.s)},null:function(t){return new e.BigNumber(0)},"Array | Matrix":function(e){return r(e,o)}});return o.toTex={0:"0",1:"\\left(${args[0]}\\right)"},o}},function(e,t,n){"use strict";var r=n(9);t.name="Range",t.path="type",t.factory=function(e,t,n,i){function o(t,n,r){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");var i=null!==t&&void 0!==t,a=null!==n&&void 0!==n,s=null!==r&&void 0!==r;if(i)if(e.isBigNumber(t))t=t.toNumber();else if("number"!==typeof t)throw new TypeError("Parameter start must be a number");if(a)if(e.isBigNumber(n))n=n.toNumber();else if("number"!==typeof n)throw new TypeError("Parameter end must be a number");if(s)if(e.isBigNumber(r))r=r.toNumber();else if("number"!==typeof r)throw new TypeError("Parameter step must be a number");this.start=i?parseFloat(t):0,this.end=a?parseFloat(n):0,this.step=s?parseFloat(r):1}return o.prototype.type="Range",o.prototype.isRange=!0,o.parse=function(e){if("string"!==typeof e)return null;var t=e.split(":").map(function(e){return parseFloat(e)});if(t.some(function(e){return isNaN(e)}))return null;switch(t.length){case 2:return new o(t[0],t[1]);case 3:return new o(t[0],t[2],t[1]);default:return null}},o.prototype.clone=function(){return new o(this.start,this.end,this.step)},o.prototype.size=function(){var e=0,t=this.start,n=this.step,i=this.end-t;return r.sign(n)===r.sign(i)?e=Math.ceil(i/n):0===i&&(e=0),isNaN(e)&&(e=0),[e]},o.prototype.min=function(){var e=this.size()[0];return e>0?this.step>0?this.start:this.start+(e-1)*this.step:void 0},o.prototype.max=function(){var e=this.size()[0];return e>0?this.step>0?this.start+(e-1)*this.step:this.start:void 0},o.prototype.forEach=function(e){var t=this.start,n=this.step,r=this.end,i=0;if(n>0)for(;tr;)e(t,[i],this),t+=n,i++},o.prototype.map=function(e){var t=[];return this.forEach(function(n,r,i){t[r[0]]=e(n,r,i)}),t},o.prototype.toArray=function(){var e=[];return this.forEach(function(t,n){e[n[0]]=t}),e},o.prototype.valueOf=function(){return this.toArray()},o.prototype.format=function(e){var t=r.format(this.start,e);return 1!==this.step&&(t+=":"+r.format(this.step,e)),t+=":"+r.format(this.end,e)},o.prototype.toString=function(){return this.format()},o.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},o.fromJSON=function(e){return new o(e.start,e.end,e.step)},o}},function(e,t,n){"use strict";t.name="ResultSet",t.path="type",t.factory=function(e,t,n,r){function i(e){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this.entries=e||[]}return i.prototype.type="ResultSet",i.prototype.isResultSet=!0,i.prototype.valueOf=function(){return this.entries},i.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},i.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},i.fromJSON=function(e){return new i(e.entries)},i}},function(e,t,n){"use strict";var r=n(52).memoize;function i(e){return e[0].precision}t.e=r(function(e){return new e(1).exp()},i),t.phi=r(function(e){return new e(1).plus(new e(5).sqrt()).div(2)},i),t.pi=r(function(e){return e.acos(-1)},i),t.tau=r(function(e){return t.pi(e).times(2)},i)},function(e,t,n){"use strict";var r=n(4);t.name="fix",t.factory=function(e,t,i,o){var a=i(n(157)),s=i(n(158)),u=o("fix",{number:function(e){return e>0?s(e):a(e)},Complex:function(t){return new e.Complex(t.re>0?Math.floor(t.re):Math.ceil(t.re),t.im>0?Math.floor(t.im):Math.ceil(t.im))},BigNumber:function(e){return e.isNegative()?a(e):s(e)},Fraction:function(e){return e.s<0?e.ceil():e.floor()},"Array | Matrix":function(e){return r(e,u,!0)}});return u.toTex={1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},u}},function(e,t,n){"use strict";var r=n(4),i=n(9).nearlyEqual,o=n(47);t.name="ceil",t.factory=function(e,t,a,s){var u=a(n(94)),c=s("ceil",{number:function(e){return i(e,u(e),t.epsilon)?u(e):Math.ceil(e)},Complex:function(e){return e.ceil()},BigNumber:function(e){return o(e,u(e),t.epsilon)?u(e):e.ceil()},Fraction:function(e){return e.ceil()},"Array | Matrix":function(e){return r(e,c,!0)}});return c.toTex={1:"\\left\\lceil${args[0]}\\right\\rceil"},c}},function(e,t,n){"use strict";var r=n(4),i=n(9).nearlyEqual,o=n(47);t.name="floor",t.factory=function(e,t,a,s){var u=a(n(94)),c=s("floor",{number:function(e){return i(e,u(e),t.epsilon)?u(e):Math.floor(e)},Complex:function(e){return e.floor()},BigNumber:function(e){return o(e,u(e),t.epsilon)?u(e):e.floor()},Fraction:function(e){return e.floor()},"Array | Matrix":function(e){return r(e,c,!0)}});return c.toTex={1:"\\left\\lfloor${args[0]}\\right\\rfloor"},c}},function(e,t,n){"use strict";var r=n(17);t.name="format",t.factory=function(e,t,n,i){var o=i("format",{any:r.format,"any, Object | function | number":r.format});return o.toTex=void 0,o}},function(e,t,n){"use strict";var r=n(24).getSafeProperty;t.name="AccessorNode",t.path="expression.node",t.factory=function(e,t,i,o){var a=i(n(27)),s=i(n(162));function u(t,n){if(!(this instanceof u))throw new SyntaxError("Constructor must be called with the new operator");if(!e.isNode(t))throw new TypeError('Node expected for parameter "object"');if(!e.isIndexNode(n))throw new TypeError('IndexNode expected for parameter "index"');this.object=t||null,this.index=n,Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function c(t){return!(e.isAccessorNode(t)||e.isArrayNode(t)||e.isConstantNode(t)||e.isFunctionNode(t)||e.isObjectNode(t)||e.isParenthesisNode(t)||e.isSymbolNode(t))}return u.prototype=new a,u.prototype.type="AccessorNode",u.prototype.isAccessorNode=!0,u.prototype._compile=function(e,t){var n=this.object._compile(e,t),i=this.index._compile(e,t);if(this.index.isObjectProperty()){var o=this.index.getObjectProperty();return function(e,t,i){return r(n(e,t,i),o)}}return function(e,t,r){var o=n(e,t,r),a=i(e,t,o);return s(o,a)}},u.prototype.forEach=function(e){e(this.object,"object",this),e(this.index,"index",this)},u.prototype.map=function(e){return new u(this._ifNode(e(this.object,"object",this)),this._ifNode(e(this.index,"index",this)))},u.prototype.clone=function(){return new u(this.object,this.index)},u.prototype._toString=function(e){var t=this.object.toString(e);return c(this.object)&&(t="("+t+")"),t+this.index.toString(e)},u.prototype.toHTML=function(e){var t=this.object.toHTML(e);return c(this.object)&&(t='('+t+')'),t+this.index.toHTML(e)},u.prototype._toTex=function(e){var t=this.object.toTex(e);return c(this.object)&&(t="\\left(' + object + '\\right)"),t+this.index.toTex(e)},u.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},u.fromJSON=function(e){return new u(e.object,e.index)},u}},function(e,t,n){"use strict";e.exports={end:!0}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=n(33).transform,o=n(24).getSafeProperty;t.factory=function(e,t,a,s){var u=a(n(34));return function(e,t){try{if(Array.isArray(e))return u(e,t);if(e&&"function"===typeof e.subset)return e.subset(t);if("string"===typeof e)return u(e,t);if("object"===r(e)){if(!t.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return o(e,t.getObjectProperty())}throw new TypeError("Cannot apply index: unsupported type of object")}catch(n){throw i(n)}}}},function(e,t,n){"use strict";var r=n(6).map;t.name="ArrayNode",t.path="expression.node",t.factory=function(e,t,i,o){var a=i(n(27));function s(t){if(!(this instanceof s))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=t||[],!Array.isArray(this.items)||!this.items.every(e.isNode))throw new TypeError("Array containing Nodes expected");var n=function(){throw new Error("Property `ArrayNode.nodes` is deprecated, use `ArrayNode.items` instead")};Object.defineProperty(this,"nodes",{get:n,set:n})}return s.prototype=new a,s.prototype.type="ArrayNode",s.prototype.isArrayNode=!0,s.prototype._compile=function(e,t){var n=r(this.items,function(n){return n._compile(e,t)});if("Array"!==e.config().matrix){var i=e.matrix;return function(e,t,o){return i(r(n,function(n){return n(e,t,o)}))}}return function(e,t,i){return r(n,function(n){return n(e,t,i)})}},s.prototype.forEach=function(e){for(var t=0;t['+this.items.map(function(t){return t.toHTML(e)}).join(',')+']'},s.prototype._toTex=function(e){var t="\\begin{bmatrix}";return this.items.forEach(function(n){n.items?t+=n.items.map(function(t){return t.toTex(e)}).join("&"):t+=n.toTex(e),t+="\\\\"}),t+="\\end{bmatrix}"},s}},function(e,t,n){"use strict";var r=n(24).getSafeProperty,i=n(24).setSafeProperty;t.name="AssignmentNode",t.path="expression.node",t.factory=function(e,t,o,a){var s=o(n(27)),u=o(n(296)),c=o(n(162)),l=n(77);function f(t,n,r){if(!(this instanceof f))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=t,this.index=r?n:null,this.value=r||n,!e.isSymbolNode(t)&&!e.isAccessorNode(t))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(e.isSymbolNode(t)&&"end"===t.name)throw new Error('Cannot assign to symbol "end"');if(this.index&&!e.isIndexNode(this.index))throw new TypeError('IndexNode expected as "index"');if(!e.isNode(this.value))throw new TypeError('Node expected as "value"');Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function p(e,t){t||(t="keep");var n=l.getPrecedence(e,t),r=l.getPrecedence(e.value,t);return"all"===t||null!==r&&r<=n}return f.prototype=new s,f.prototype.type="AssignmentNode",f.prototype.isAssignmentNode=!0,f.prototype._compile=function(t,n){var o=this.object._compile(t,n),a=this.index?this.index._compile(t,n):null,s=this.value._compile(t,n),l=this.object.name;if(this.index){if(this.index.isObjectProperty()){var f=this.index.getObjectProperty();return function(e,t,n){var r=o(e,t,n),a=s(e,t,n);return i(r,f,a)}}if(e.isSymbolNode(this.object))return function(e,t,n){var r=o(e,t,n),c=s(e,t,n),f=a(e,t,r);return i(e,l,u(r,f,c)),c};var p=this.object.object._compile(t,n);if(this.object.index.isObjectProperty()){var m=this.object.index.getObjectProperty();return function(e,t,n){var o=p(e,t,n),c=r(o,m),l=a(e,t,c),f=s(e,t,n);return i(o,m,u(c,l,f)),f}}var d=this.object.index._compile(t,n);return function(e,t,n){var r=p(e,t,n),i=d(e,t,r),o=c(r,i),l=a(e,t,o),f=s(e,t,n);return u(r,i,u(o,l,f)),f}}if(!e.isSymbolNode(this.object))throw new TypeError("SymbolNode expected as object");return function(e,t,n){return i(e,l,s(e,t,n))}},f.prototype.forEach=function(e){e(this.object,"object",this),this.index&&e(this.index,"index",this),e(this.value,"value",this)},f.prototype.map=function(e){return new f(this._ifNode(e(this.object,"object",this)),this.index?this._ifNode(e(this.index,"index",this)):null,this._ifNode(e(this.value,"value",this)))},f.prototype.clone=function(){return new f(this.object,this.index,this.value)},f.prototype._toString=function(e){var t=this.object.toString(e),n=this.index?this.index.toString(e):"",r=this.value.toString(e);return p(this,e&&e.parenthesis)&&(r="("+r+")"),t+n+" = "+r},f.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},f.fromJSON=function(e){return new f(e.object,e.index,e.value)},f.prototype.toHTML=function(e){var t=this.object.toHTML(e),n=this.index?this.index.toHTML(e):"",r=this.value.toHTML(e);return p(this,e&&e.parenthesis)&&(r='('+r+')'),t+n+'='+r},f.prototype._toTex=function(e){var t=this.object.toTex(e),n=this.index?this.index.toTex(e):"",r=this.value.toTex(e);return p(this,e&&e.parenthesis)&&(r="\\left(".concat(r,"\\right)")),t+n+":="+r},f}},function(e,t,n){"use strict";var r=n(6).forEach,i=n(6).map;t.name="BlockNode",t.path="expression.node",t.factory=function(e,t,o,a){var s=o(n(27)),u=o(n(154));function c(t){if(!(this instanceof c))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(t))throw new Error("Array expected");this.blocks=t.map(function(t){var n=t&&t.node,r=!t||void 0===t.visible||t.visible;if(!e.isNode(n))throw new TypeError('Property "node" must be a Node');if("boolean"!==typeof r)throw new TypeError('Property "visible" must be a boolean');return{node:n,visible:r}})}return c.prototype=new s,c.prototype.type="BlockNode",c.prototype.isBlockNode=!0,c.prototype._compile=function(e,t){var n=i(this.blocks,function(n){return{eval:n.node._compile(e,t),visible:n.visible}});return function(e,t,i){var o=[];return r(n,function(n){var r=n.eval(e,t,i);n.visible&&o.push(r)}),new u(o)}},c.prototype.forEach=function(e){for(var t=0;t;')}).join('
')},c.prototype._toTex=function(e){return this.blocks.map(function(t){return t.node.toTex(e)+(t.visible?"":";")}).join("\\;\\;\n")},c}},function(e,t,n){"use strict";var r=n(77);t.name="ConditionalNode",t.path="expression.node",t.factory=function(e,t,i,o){var a=i(n(27)),s=i(n(40));function u(t,n,r){if(!(this instanceof u))throw new SyntaxError("Constructor must be called with the new operator");if(!e.isNode(t))throw new TypeError("Parameter condition must be a Node");if(!e.isNode(n))throw new TypeError("Parameter trueExpr must be a Node");if(!e.isNode(r))throw new TypeError("Parameter falseExpr must be a Node");this.condition=t,this.trueExpr=n,this.falseExpr=r}return u.prototype=new a,u.prototype.type="ConditionalNode",u.prototype.isConditionalNode=!0,u.prototype._compile=function(t,n){var r=this.condition._compile(t,n),i=this.trueExpr._compile(t,n),o=this.falseExpr._compile(t,n);return function(t,n,a){return function(t){if("number"===typeof t||"boolean"===typeof t||"string"===typeof t)return!!t;if(t){if(e.isBigNumber(t))return!t.isZero();if(e.isComplex(t))return!(!t.re&&!t.im);if(e.isUnit(t))return!!t.value}if(null===t||void 0===t)return!1;throw new TypeError('Unsupported type of condition "'+s(t)+'"')}(r(t,n,a))?i(t,n,a):o(t,n,a)}},u.prototype.forEach=function(e){e(this.condition,"condition",this),e(this.trueExpr,"trueExpr",this),e(this.falseExpr,"falseExpr",this)},u.prototype.map=function(e){return new u(this._ifNode(e(this.condition,"condition",this)),this._ifNode(e(this.trueExpr,"trueExpr",this)),this._ifNode(e(this.falseExpr,"falseExpr",this)))},u.prototype.clone=function(){return new u(this.condition,this.trueExpr,this.falseExpr)},u.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=r.getPrecedence(this,t),i=this.condition.toString(e),o=r.getPrecedence(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==o&&o<=n)&&(i="("+i+")");var a=this.trueExpr.toString(e),s=r.getPrecedence(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==s&&s<=n)&&(a="("+a+")");var u=this.falseExpr.toString(e),c=r.getPrecedence(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==c&&c<=n)&&(u="("+u+")"),i+" ? "+a+" : "+u},u.prototype.toJSON=function(){return{mathjs:"ConditionalNode",condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}},u.fromJSON=function(e){return new u(e.condition,e.trueExpr,e.falseExpr)},u.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=r.getPrecedence(this,t),i=this.condition.toHTML(e),o=r.getPrecedence(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==o&&o<=n)&&(i='('+i+')');var a=this.trueExpr.toHTML(e),s=r.getPrecedence(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==s&&s<=n)&&(a='('+a+')');var u=this.falseExpr.toHTML(e),c=r.getPrecedence(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==c&&c<=n)&&(u='('+u+')'),i+'?'+a+':'+u},u.prototype._toTex=function(e){return"\\begin{cases} {"+this.trueExpr.toTex(e)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(e)+"}\\\\{"+this.falseExpr.toTex(e)+"}, &\\quad{\\text{otherwise}}\\end{cases}"},u}},function(e,t,n){"use strict";var r=n(161),i=n(17).escape,o=n(6).forEach,a=n(6).join,s=n(11),u=n(77),c=n(24).setSafeProperty;t.name="FunctionAssignmentNode",t.path="expression.node",t.factory=function(e,t,l,f){var p=l(n(27));function m(t,n,i){if(!(this instanceof m))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof t)throw new TypeError('String expected for parameter "name"');if(!Array.isArray(n))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!e.isNode(i))throw new TypeError('Node expected for parameter "expr"');if(t in r)throw new Error('Illegal function name, "'+t+'" is a reserved keyword');this.name=t,this.params=n.map(function(e){return e&&e.name||e}),this.types=n.map(function(e){return e&&e.type||"any"}),this.expr=i}function d(e,t){var n=u.getPrecedence(e,t),r=u.getPrecedence(e.expr,t);return"all"===t||null!==r&&r<=n}return m.prototype=new p,m.prototype.type="FunctionAssignmentNode",m.prototype.isFunctionAssignmentNode=!0,m.prototype._compile=function(e,t){var n=Object.create(t);o(this.params,function(e){n[e]=!0});var r=this.expr._compile(e,n),i=this.name,s=this.params,u=a(this.types,","),l=i+"("+a(this.params,", ")+")";return function(e,t,n){var o={};o[u]=function(){for(var i=Object.create(t),o=0;o'+i(this.params[r])+"");var o=this.expr.toHTML(e);return d(this,t)&&(o='('+o+')'),''+i(this.name)+'('+n.join(',')+')='+o},m.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=this.expr.toTex(e);return d(this,t)&&(n="\\left(".concat(n,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(s.toSymbol).join(",")+"\\right):="+n},m}},function(e,t,n){"use strict";var r=n(6).map,i=n(17).escape;t.name="IndexNode",t.path="expression.node",t.factory=function(e,t,o,a){var s=o(n(27)),u=o(n(153)),c=Array.isArray;function l(t,n){if(!(this instanceof l))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=t,this.dotNotation=n||!1,!c(t)||!t.every(e.isNode))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties");var r=function(){throw new Error("Property `IndexNode.object` is deprecated, use `IndexNode.fn` instead")};Object.defineProperty(this,"object",{get:r,set:r})}function f(t,n,r){return new u(e.isBigNumber(t)?t.toNumber():t,e.isBigNumber(n)?n.toNumber():n,e.isBigNumber(r)?r.toNumber():r)}return l.prototype=new s,l.prototype.type="IndexNode",l.prototype.isIndexNode=!0,l.prototype._compile=function(t,n){var i=r(this.dimensions,function(r,i){if(e.isRangeNode(r)){if(r.needsEnd()){var o=Object.create(n);o.end=!0;var a=r.start._compile(t,o),s=r.end._compile(t,o),u=r.step?r.step._compile(t,o):function(){return 1};return function(e,n,r){var o=t.size(r).valueOf(),c=Object.create(n);return c.end=o[i],f(a(e,c,r),s(e,c,r),u(e,c,r))}}var c=r.start._compile(t,n),l=r.end._compile(t,n),p=r.step?r.step._compile(t,n):function(){return 1};return function(e,t,n){return f(c(e,t,n),l(e,t,n),p(e,t,n))}}if(e.isSymbolNode(r)&&"end"===r.name){var m=Object.create(n);m.end=!0;var d=r._compile(t,m);return function(e,n,r){var o=t.size(r).valueOf(),a=Object.create(n);return a.end=o[i],d(e,a,r)}}var h=r._compile(t,n);return function(e,t,n){return h(e,t,n)}});return function(e,n,o){var a=r(i,function(t){return t(e,n,o)});return t.index.apply(t,a)}},l.prototype.forEach=function(e){for(var t=0;t.'+i(this.getObjectProperty())+"":'['+t.join(',')+']'},l.prototype._toTex=function(e){var t=this.dimensions.map(function(t){return t.toTex(e)});return this.dotNotation?"."+this.getObjectProperty():"_{"+t.join(",")+"}"},l}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=n(17).stringify,o=n(17).escape,a=n(24).isSafeProperty,s=n(13).hasOwnProperty;t.name="ObjectNode",t.path="expression.node",t.factory=function(e,t,u,c){var l=u(n(27));function f(t){if(!(this instanceof f))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=t||{},t&&("object"!==r(t)||!Object.keys(t).every(function(n){return e.isNode(t[n])})))throw new TypeError("Object containing Nodes expected")}return f.prototype=new l,f.prototype.type="ObjectNode",f.prototype.isObjectNode=!0,f.prototype._compile=function(e,t){var n={};for(var r in this.properties)if(s(this.properties,r)){var o=i(r),u=JSON.parse(o);if(!a(this.properties,u))throw new Error('No access to property "'+u+'"');n[u]=this.properties[r]._compile(e,t)}return function(e,t,r){var i={};for(var o in n)s(n,o)&&(i[o]=n[o](e,t,r));return i}},f.prototype.forEach=function(e){for(var t in this.properties)this.properties.hasOwnProperty(t)&&e(this.properties[t],"properties["+i(t)+"]",this)},f.prototype.map=function(e){var t={};for(var n in this.properties)this.properties.hasOwnProperty(n)&&(t[n]=this._ifNode(e(this.properties[n],"properties["+i(n)+"]",this)));return new f(t)},f.prototype.clone=function(){var e={};for(var t in this.properties)this.properties.hasOwnProperty(t)&&(e[t]=this.properties[t]);return new f(e)},f.prototype._toString=function(e){var t=[];for(var n in this.properties)this.properties.hasOwnProperty(n)&&t.push(i(n)+": "+this.properties[n].toString(e));return"{"+t.join(", ")+"}"},f.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},f.fromJSON=function(e){return new f(e.properties)},f.prototype.toHTML=function(e){var t=[];for(var n in this.properties)this.properties.hasOwnProperty(n)&&t.push(''+o(n)+':'+this.properties[n].toHTML(e));return'{'+t.join(',')+'}'},f.prototype._toTex=function(e){var t=[];for(var n in this.properties)this.properties.hasOwnProperty(n)&&t.push("\\mathbf{"+n+":} & "+this.properties[n].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}".concat(t.join("\n"),"\\end{array}\\right\\}")},f}},function(e,t,n){"use strict";var r=n(77);t.name="RangeNode",t.path="expression.node",t.factory=function(e,t,i,o){var a=i(n(27));function s(t,n,r){if(!(this instanceof s))throw new SyntaxError("Constructor must be called with the new operator");if(!e.isNode(t))throw new TypeError("Node expected");if(!e.isNode(n))throw new TypeError("Node expected");if(r&&!e.isNode(r))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=t,this.end=n,this.step=r||null}function u(e,t){var n=r.getPrecedence(e,t),i={},o=r.getPrecedence(e.start,t);if(i.start=null!==o&&o<=n||"all"===t,e.step){var a=r.getPrecedence(e.step,t);i.step=null!==a&&a<=n||"all"===t}var s=r.getPrecedence(e.end,t);return i.end=null!==s&&s<=n||"all"===t,i}return s.prototype=new a,s.prototype.type="RangeNode",s.prototype.isRangeNode=!0,s.prototype.needsEnd=function(){return this.filter(function(t){return e.isSymbolNode(t)&&"end"===t.name}).length>0},s.prototype._compile=function(e,t){var n=e.range,r=this.start._compile(e,t),i=this.end._compile(e,t);if(this.step){var o=this.step._compile(e,t);return function(e,t,a){return n(r(e,t,a),i(e,t,a),o(e,t,a))}}return function(e,t,o){return n(r(e,t,o),i(e,t,o))}},s.prototype.forEach=function(e){e(this.start,"start",this),e(this.end,"end",this),this.step&&e(this.step,"step",this)},s.prototype.map=function(e){return new s(this._ifNode(e(this.start,"start",this)),this._ifNode(e(this.end,"end",this)),this.step&&this._ifNode(e(this.step,"step",this)))},s.prototype.clone=function(){return new s(this.start,this.end,this.step&&this.step)},s.prototype._toString=function(e){var t,n=u(this,e&&e.parenthesis?e.parenthesis:"keep"),r=this.start.toString(e);if(n.start&&(r="("+r+")"),t=r,this.step){var i=this.step.toString(e);n.step&&(i="("+i+")"),t+=":"+i}var o=this.end.toString(e);return n.end&&(o="("+o+")"),t+=":"+o},s.prototype.toJSON=function(){return{mathjs:"RangeNode",start:this.start,end:this.end,step:this.step}},s.fromJSON=function(e){return new s(e.start,e.end,e.step)},s.prototype.toHTML=function(e){var t,n=u(this,e&&e.parenthesis?e.parenthesis:"keep"),r=this.start.toHTML(e);if(n.start&&(r='('+r+')'),t=r,this.step){var i=this.step.toHTML(e);n.step&&(i='('+i+')'),t+=':'+i}var o=this.end.toHTML(e);return n.end&&(o='('+o+')'),t+=':'+o},s.prototype._toTex=function(e){var t=u(this,e&&e.parenthesis?e.parenthesis:"keep"),n=this.start.toTex(e);if(t.start&&(n="\\left(".concat(n,"\\right)")),this.step){var r=this.step.toTex(e);t.step&&(r="\\left(".concat(r,"\\right)")),n+=":"+r}var i=this.end.toTex(e);return t.end&&(i="\\left(".concat(i,"\\right)")),n+=":"+i},s}},function(e,t,n){"use strict";var r=n(77),i=n(11),o=n(17).escape;t.name="RelationalNode",t.path="expression.node",t.factory=function(e,t,a,s){var u=a(n(27)),c=n(24).getSafeProperty;function l(e,t){if(!(this instanceof l))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(t))throw new TypeError("Parameter params must be an array");if(e.length!==t.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=e,this.params=t}return l.prototype=new u,l.prototype.type="RelationalNode",l.prototype.isRelationalNode=!0,l.prototype._compile=function(e,t){var n=this,r=this.params.map(function(n){return n._compile(e,t)});return function(t,i,o){for(var a,s=r[0](t,i,o),u=0;u",smallerEq:"<=",largerEq:">="},a=i[0],s=0;s('+i.toHTML(e)+')':i.toHTML(e)}),a={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},s=i[0],u=0;u'+o(a[this.conditionals[u]])+""+i[u+1];return s},l.prototype._toTex=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=r.getPrecedence(this,t),o=this.params.map(function(i,o){var a=r.getPrecedence(i,t);return"all"===t||null!==a&&a<=n?"\\left("+i.toTex(e)+"\right)":i.toTex(e)}),a=o[0],s=0;s1?(f=x(p,g,y,r),b.unshift(f),f=x(p,b,y,r)):f=x(p,a,y,r)}else f=x(p,a,y,r);else a=n.args.map(function(e){return t(e,r)}),f=x(p,a,y,r);return f;case"ParenthesisNode":return t(n.content,r);case"AccessorNode":case"ArrayNode":case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"IndexNode":case"ObjectNode":case"RangeNode":case"UpdateNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(n.type))}}(t,n);return e.isNode(r)?r:h(r)}}},function(e,t,n){"use strict";t.factory=function(e,t,n,r,i){var o=i.expression.node.FunctionNode,a=i.expression.node.OperatorNode,s=i.expression.node.SymbolNode,u={add:!0,multiply:!0},c={add:!0,multiply:!0};function l(t,n){if(!e.isOperatorNode(t))return!1;var r=t.fn.toString();return n&&n.hasOwnProperty(r)&&n[r].hasOwnProperty("associative")?n[r].associative:c[r]||!1}function f(t){var n,r=[];return l(t)?(n=t.op,function t(i){for(var o=0;o2&&l(t)){for(var o=t.args.pop();t.args.length>0;)o=n([t.args.pop(),o]);t.args=o.args}}},unflattenl:function e(t){if(t.args&&0!==t.args.length){for(var n=p(t),r=t.args.length,i=0;i2&&l(t)){for(var o=t.args.shift();t.args.length>0;)o=n([o,t.args.shift()]);t.args=o.args}}}}},t.math=!0},function(e,t,n){"use strict";t.math=!0,t.name="simplifyCore",t.path="algebra.simplify",t.factory=function(e,t,r,i,o){var a=r(n(75)),s=r(n(86)),u=r(n(25)),c=r(n(26)),l=r(n(18)),f=r(n(67)),p=r(n(64)),m=o.expression.node.ConstantNode,d=o.expression.node.OperatorNode,h=o.expression.node.FunctionNode,y=o.expression.node.ParenthesisNode,v=new m(0),g=new m(1);return function t(n){if(e.isOperatorNode(n)&&n.isUnary()){var r=t(n.args[0]);if("+"===n.op)return r;if("-"===n.op){if(e.isOperatorNode(r)){if(r.isUnary()&&"-"===r.op)return r.args[0];if(r.isBinary()&&"subtract"===r.fn)return new d("-","subtract",[r.args[1],r.args[0]])}return new d(n.op,n.fn,[r])}}else if(e.isOperatorNode(n)&&n.isBinary()){var i=t(n.args[0]),o=t(n.args[1]);if("+"===n.op){if(e.isConstantNode(i)){if(s(i.value))return o;if(e.isConstantNode(o))return new m(u(i.value,o.value))}return e.isConstantNode(o)&&s(o.value)?i:e.isOperatorNode(o)&&o.isUnary()&&"-"===o.op?new d("-","subtract",[i,o.args[0]]):new d(n.op,n.fn,o?[i,o]:[i])}if("-"===n.op){if(e.isConstantNode(i)&&o){if(e.isConstantNode(o))return new m(c(i.value,o.value));if(s(i.value))return new d("-","unaryMinus",[o])}if("subtract"===n.fn)return e.isConstantNode(o)&&s(o.value)?i:e.isOperatorNode(o)&&o.isUnary()&&"-"===o.op?t(new d("+","add",[i,o.args[0]])):new d(n.op,n.fn,[i,o])}else{if("*"===n.op){if(e.isConstantNode(i)){if(s(i.value))return v;if(a(i.value,1))return o;if(e.isConstantNode(o))return new m(l(i.value,o.value))}if(e.isConstantNode(o)){if(s(o.value))return v;if(a(o.value,1))return i;if(e.isOperatorNode(i)&&i.isBinary()&&i.op===n.op){var x=i.args[0];if(e.isConstantNode(x)){var b=new m(l(x.value,o.value));return new d(n.op,n.fn,[b,i.args[1]],n.implicit)}}return new d(n.op,n.fn,[o,i],n.implicit)}return new d(n.op,n.fn,[i,o],n.implicit)}if("/"===n.op){if(e.isConstantNode(i)){if(s(i.value))return v;if(e.isConstantNode(o)&&(a(o.value,1)||a(o.value,2)||a(o.value,4)))return new m(f(i.value,o.value))}return new d(n.op,n.fn,[i,o])}if("^"===n.op){if(e.isConstantNode(o)){if(s(o.value))return g;if(a(o.value,1))return i;if(e.isConstantNode(i))return new m(p(i.value,o.value));if(e.isOperatorNode(i)&&i.isBinary()&&"^"===i.op){var w=i.args[1];if(e.isConstantNode(w))return new d(n.op,n.fn,[i.args[0],new m(l(w.value,o.value))])}}return new d(n.op,n.fn,[i,o])}}}else{if(e.isParenthesisNode(n)){var N=t(n.content);return e.isParenthesisNode(N)||e.isSymbolNode(N)||e.isConstantNode(N)?N:new y(N)}if(e.isFunctionNode(n)){var E=n.args.map(t).map(function(t){return e.isParenthesisNode(t)?t.content:t});return new h(t(n.fn),E)}}return n}}},function(e,t,n){"use strict";var r=n(46),i=r.object,o=r.string;t.name="det",t.factory=function(e,t,r,a){var s=r(n(3)),u=r(n(26)),c=r(n(18)),l=r(n(55)),f=r(n(118)),p=a("det",{any:function(e){return i.clone(e)},"Array | Matrix":function(t){var n;switch((n=e.isMatrix(t)?t.size():Array.isArray(t)?(t=s(t)).size():[]).length){case 0:return i.clone(t);case 1:if(1===n[0])return i.clone(t.valueOf()[0]);throw new RangeError("Matrix must be square (size: "+o.format(n)+")");case 2:var r=n[0],a=n[1];if(r===a)return function(e,t,n){if(1===t)return i.clone(e[0][0]);if(2===t)return u(c(e[0][0],e[1][1]),c(e[1][0],e[0][1]));for(var r=f(e),o=r.U[0][0],a=1;a=t)break;for(var d=p,h=0;!m[r.p[d]];)m[r.p[d]]=!0,d=r.p[d],h++;h%2===0&&s++}return s%2===0?o:l(o)}(t.clone().valueOf(),r);throw new RangeError("Matrix must be square (size: "+o.format(n)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+o.format(n)+")")}}});return p.toTex={1:"\\det\\left(${args[0]}\\right)"},p}},function(e,t,n){"use strict";t.name="parse",t.factory=function(e,t,r,i){var o=r(n(66));return i("parse",{"string | Array | Matrix":o,"string | Array | Matrix, Object":o})}},function(e,t,n){"use strict";var r=n(9).nearlyEqual,i=n(47);t.name="unequal",t.factory=function(e,t,o,a){var s=o(n(3)),u=o(n(29)),c=o(n(44)),l=o(n(30)),f=o(n(15)),p=o(n(14)),m=n(11),d=a("unequal",{"any, any":function(e,t){return null===e?null!==t:null===t?null!==e:void 0===e?void 0!==t:void 0===t?void 0!==e:h(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,h)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,h,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,h,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,h)},"Array, Array":function(e,t){return d(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return d(s(e),t)},"Matrix, Array":function(e,t){return d(e,s(t))},"SparseMatrix, any":function(e,t){return l(e,t,h,!1)},"DenseMatrix, any":function(e,t){return p(e,t,h,!1)},"any, SparseMatrix":function(e,t){return l(t,e,h,!0)},"any, DenseMatrix":function(e,t){return p(t,e,h,!0)},"Array, any":function(e,t){return p(s(e),t,h,!1).valueOf()},"any, Array":function(e,t){return p(s(t),e,h,!0).valueOf()}}),h=a("_unequal",{"boolean, boolean":function(e,t){return e!==t},"number, number":function(e,n){return!r(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return!i(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return!e.equals(t)},"Complex, Complex":function(e,t){return!e.equals(t)},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return d(e.value,t.value)}});return d.toTex={2:"\\left(${args[0]}".concat(m.operators.unequal,"${args[1]}\\right)")},d}},function(e,t,n){"use strict";var r=n(9),i=n(4);t.name="sign",t.factory=function(e,t,n,o){var a=o("sign",{number:r.sign,Complex:function(e){return e.sign()},BigNumber:function(t){return new e.BigNumber(t.cmp(0))},Fraction:function(t){return new e.Fraction(t.s,1)},"Array | Matrix":function(e){return i(e,a,!0)},Unit:function(e){return a(e.value)}});return a.toTex={1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},a}},function(e,t,n){"use strict";var r=n(46).number.isInteger;t.name="slu",t.factory=function(e,t,i,o){var a=i(n(300)),s=i(n(308));return o("slu",{"SparseMatrix, number, number":function(e,t,n){if(!r(t)||t<0||t>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(n<0||n>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var i=a(t,e,!1),o=s(e,i,n);return{L:o.L,U:o.U,p:o.pinv,q:i.q,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\np: "+this.p.toString()+(this.q?"\nq: "+this.q.toString():"")+"\n"}}}})}},function(e,t,n){"use strict";t.name="csTdfs",t.path="algebra.sparse",t.factory=function(){return function(e,t,n,r,i,o,a){var s=0;for(n[a]=e;s>=0;){var u=n[a+s],c=n[r+u];-1===c?(s--,o[t++]=u):(n[r+u]=n[i+c],n[a+ ++s]=c)}return t}}},function(e,t,n){"use strict";t.name="csMarked",t.path="algebra.sparse",t.factory=function(){return function(e,t){return e[t]<0}}},function(e,t,n){"use strict";t.name="csMark",t.path="algebra.sparse",t.factory=function(e,t,r){var i=r(n(119));return function(e,t){e[t]=i(e[t])}}},function(e,t,n){"use strict";t.name="lsolve",t.factory=function(e,t,r,i){var o=r(n(3)),a=r(n(23)),s=r(n(32)),u=r(n(26)),c=r(n(20)),l=r(n(121)),f=e.DenseMatrix;function p(e,t){for(var n=(t=l(e,t,!0))._data,r=e._size[0],i=e._size[1],o=[],p=e._data,m=0;mv&&(b.push(m[r]),w.push(n));if(c(x,0))throw new Error("Linear system cannot be solved since matrix is singular");var E=a(g,x);for(r=0,N=w.length;r=0;m--){var d=n[m][0]||0,h=void 0;if(c(d,0))h=0;else{var y=p[m][m];if(c(y,0))throw new Error("Linear system cannot be solved since matrix is singular");h=a(d,y);for(var v=m-1;v>=0;v--)n[v]=[u(n[v][0]||0,s(h,p[v][m]))]}o[m]=[h]}return new f({data:o,size:[r,1]})}return i("usolve",{"SparseMatrix, Array | Matrix":function(e,t){return function(e,t){for(var n,r,i=(t=l(e,t,!0))._data,o=e._size[0],p=e._size[1],m=e._values,d=e._index,h=e._ptr,y=[],v=p-1;v>=0;v--){var g=i[v][0]||0;if(c(g,0))y[v]=[0];else{var x=0,b=[],w=[],N=h[v],E=h[v+1];for(r=E-1;r>=N;r--)(n=d[r])===v?x=m[r]:n171?1/0:f(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*p(1-e));if(e>=171.35)return 1/0;if(e>85){var r=e*e,s=r*e,u=s*e,c=u*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*r)-139/(51840*s)-571/(2488320*u)+163879/(209018880*c)+5246819/(75246796800*c*e))}--e,n=a[0];for(var l=1;l1;)i=i.times(o),o--;return new e.BigNumber(i.toPrecision(e.BigNumber.precision))}(n.minus(1));if(!n.isFinite())return new e.BigNumber(n.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")},"Array | Matrix":function(e){return r(e,p)}});return p.toTex={1:"\\Gamma\\left(${args[0]}\\right)"},p}},function(e,t,n){"use strict";var r=n(4);t.name="not",t.factory=function(e,t,i,o){var a=n(11),s=o("not",{number:function(e){return!e},Complex:function(e){return 0===e.re&&0===e.im},BigNumber:function(e){return e.isZero()||e.isNaN()},Unit:function(e){return null===e.value||s(e.value)},"Array | Matrix":function(e){return r(e,s)}});return s.toTex={1:a.operators.not+"\\left(${args[0]}\\right)"},s}},function(e,t,n){"use strict";var r=n(13).clone,i=n(6).validateIndex;t.name="column",t.factory=function(e,t,o,a){var s=o(n(36)),u=o(n(3)),c=o(n(104)),l=a("column",{"Matrix, number":f,"Array, number":function(e,t){return f(u(r(e)),t).valueOf()}});return l.toTex=void 0,l;function f(e,t){if(2!==e.size().length)throw new Error("Only two dimensional matrix is supported");i(t,e.size()[1]);var n=c(0,e.size()[0]),r=new s(n,t);return e.subset(r)}}},function(e,t,n){"use strict";var r=n(9).nearlyEqual,i=n(47);t.name="smallerEq",t.factory=function(e,t,o,a){var s=o(n(3)),u=o(n(29)),c=o(n(44)),l=o(n(30)),f=o(n(15)),p=o(n(14)),m=n(11),d=a("smallerEq",{"boolean, boolean":function(e,t){return e<=t},"number, number":function(e,n){return e<=n||r(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.lte(n)||i(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return 1!==e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return d(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,d)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,d)},"Array, Array":function(e,t){return d(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return d(s(e),t)},"Matrix, Array":function(e,t){return d(e,s(t))},"SparseMatrix, any":function(e,t){return l(e,t,d,!1)},"DenseMatrix, any":function(e,t){return p(e,t,d,!1)},"any, SparseMatrix":function(e,t){return l(t,e,d,!0)},"any, DenseMatrix":function(e,t){return p(t,e,d,!0)},"Array, any":function(e,t){return p(s(e),t,d,!1).valueOf()},"any, Array":function(e,t){return p(s(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}".concat(m.operators.smallerEq,"${args[1]}\\right)")},d}},function(e,t,n){"use strict";var r=n(52).maxArgumentCount;function i(e,t){var n=r(t);return function r(i,o){return Array.isArray(i)?i.map(function(e,t){return r(e,o.concat(t))}):1===n?t(i):2===n?t(i,o):t(i,o,e)}(e,[])}t.name="map",t.factory=function(e,t,n,r){var o=r("map",{"Array, function":i,"Matrix, function":function(e,t){return e.map(t)}});return o.toTex=void 0,o}},function(e,t,n){"use strict";var r=n(13).clone,i=n(6).validateIndex;t.name="row",t.factory=function(e,t,o,a){var s=o(n(36)),u=o(n(3)),c=o(n(104)),l=a("row",{"Matrix, number":f,"Array, number":function(e,t){return f(u(r(e)),t).valueOf()}});return l.toTex=void 0,l;function f(e,t){if(2!==e.size().length)throw new Error("Only two dimensional matrix is supported");i(t,e.size()[0]);var n=c(0,e.size()[1]),r=new s(t,n);return e.subset(r)}}},function(e,t,n){"use strict";t.name="compareText",t.factory=function(e,t,r,i){var o=r(n(3)),a=r(n(40)),s=r(n(15)),u=r(n(14)),c=i("compareText",{"any, any":l,"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,l)},"Array, Array":function(e,t){return c(o(e),o(t)).valueOf()},"Array, Matrix":function(e,t){return c(o(e),t)},"Matrix, Array":function(e,t){return c(e,o(t))},"DenseMatrix, any":function(e,t){return u(e,t,l,!1)},"any, DenseMatrix":function(e,t){return u(t,e,l,!0)},"Array, any":function(e,t){return u(o(e),t,l,!1).valueOf()},"any, Array":function(e,t){return u(o(t),e,l,!0).valueOf()}});function l(t,n){if(!e.isString(t))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+a(t)+", index: 0)");if(!e.isString(n))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+a(n)+", index: 1)");return t===n?0:t>n?1:-1}return c.toTex=void 0,c}},function(e,t,n){"use strict";var r=n(6).flatten,i=n(6).identify,o=n(6).generalize;t.name="setDifference",t.factory=function(e,t,a,s){var u=a(n(36)),c=a(n(73)),l=a(n(42)),f=a(n(34)),p=a(n(45));return s("setDifference",{"Array | Matrix, Array | Matrix":function(e,t){var n;if(0===f(l(e),new u(0)))n=[];else{if(0===f(l(t),new u(0)))return r(e.toArray());var a,s=i(r(Array.isArray(e)?e:e.toArray()).sort(p)),m=i(r(Array.isArray(t)?t:t.toArray()).sort(p));n=[];for(var d=0;d0&&(o=e[a]);return h(o,i)}var s=l(e,(t-1)/2);return d(s)}catch(u){throw f(u,"median")}}var d=a({"number | BigNumber | Complex | Unit":function(e){return e}}),h=a({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(e,t){return u(s(e,t),2)}});return p.toTex=void 0,p}},function(e,t,n){"use strict";var r=n(6).size,i=n(69),o=n(107),a=n(88);t.name="mean",t.factory=function(e,t,s,u){var c=s(n(25)),l=s(n(67)),f=s(n(56)),p=u("mean",{"Array | Matrix":m,"Array | Matrix, number | BigNumber":function(e,t){try{var n=o(e,t,c),i=Array.isArray(e)?r(e):e.size();return l(n,i[t])}catch(a){throw f(a,"mean")}},"...":function(e){if(a(e))throw new TypeError("Scalar values expected in function mean");return m(e)}});return p.toTex=void 0,p;function m(e){var t=0,n=0;if(i(e,function(e){try{t=c(t,e),n++}catch(r){throw f(r,"mean",e)}}),0===n)throw new Error("Cannot calculate mean of an empty array");return l(t,n)}}},function(e,t,n){"use strict";var r=n(69),i=n(107),o=n(88);t.name="min",t.factory=function(e,t,a,s){var u=a(n(54)),c=a(n(56)),l=s("min",{"Array | Matrix":p,"Array | Matrix, number | BigNumber":function(e,t){return i(e,t.valueOf(),f)},"...":function(e){if(o(e))throw new TypeError("Scalar values expected in function min");return p(e)}});return l.toTex="\\min\\left(${args}\\right)",l;function f(e,t){try{return u(e,t)?e:t}catch(n){throw c(n,"min",t)}}function p(e){var t;if(r(e,function(e){try{isNaN(e)&&"number"===typeof e?t=NaN:(void 0===t||u(e,t))&&(t=e)}catch(n){throw c(n,"min",e)}}),void 0===t)throw new Error("Cannot calculate min of an empty array");return t}}},function(e,t,n){"use strict";t.name="std",t.factory=function(e,t,r,i){var o=r(n(68)),a=r(n(132)),s=i("std",{"Array | Matrix":u,"Array | Matrix, string":u,"Array | Matrix, number | BigNumber":u,"Array | Matrix, number | BigNumber, string":u,"...":function(e){return u(e)}});return s.toTex=void 0,s;function u(e,t){if(0===e.length)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{return o(a.apply(null,arguments))}catch(n){throw n instanceof TypeError&&-1!==n.message.indexOf(" var")?new TypeError(n.message.replace(" var"," std")):n}}}},function(e,t,n){"use strict";t.name="docs",t.path="expression",t.factory=function(e,t,r,i){var o={};return o.bignumber=n(446),o.boolean=n(447),o.complex=n(448),o.createUnit=n(449),o.fraction=n(450),o.index=n(451),o.matrix=n(452),o.number=n(453),o.sparse=n(454),o.splitUnit=n(455),o.string=n(456),o.unit=n(457),o.e=n(203),o.E=n(203),o.false=n(458),o.i=n(459),o[1/0]=n(460),o.LN2=n(461),o.LN10=n(462),o.LOG2E=n(463),o.LOG10E=n(464),o.NaN=n(465),o.null=n(466),o.pi=n(204),o.PI=n(204),o.phi=n(467),o.SQRT1_2=n(468),o.SQRT2=n(469),o.tau=n(470),o.true=n(471),o.version=n(472),o.speedOfLight={description:"Speed of light in vacuum",examples:["speedOfLight"]},o.gravitationConstant={description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},o.planckConstant={description:"Planck constant",examples:["planckConstant"]},o.reducedPlanckConstant={description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},o.magneticConstant={description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},o.electricConstant={description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},o.vacuumImpedance={description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},o.coulomb={description:"Coulomb's constant",examples:["coulomb"]},o.elementaryCharge={description:"Elementary charge",examples:["elementaryCharge"]},o.bohrMagneton={description:"Borh magneton",examples:["bohrMagneton"]},o.conductanceQuantum={description:"Conductance quantum",examples:["conductanceQuantum"]},o.inverseConductanceQuantum={description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},o.magneticFluxQuantum={description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},o.nuclearMagneton={description:"Nuclear magneton",examples:["nuclearMagneton"]},o.klitzing={description:"Von Klitzing constant",examples:["klitzing"]},o.bohrRadius={description:"Borh radius",examples:["bohrRadius"]},o.classicalElectronRadius={description:"Classical electron radius",examples:["classicalElectronRadius"]},o.electronMass={description:"Electron mass",examples:["electronMass"]},o.fermiCoupling={description:"Fermi coupling constant",examples:["fermiCoupling"]},o.fineStructure={description:"Fine-structure constant",examples:["fineStructure"]},o.hartreeEnergy={description:"Hartree energy",examples:["hartreeEnergy"]},o.protonMass={description:"Proton mass",examples:["protonMass"]},o.deuteronMass={description:"Deuteron Mass",examples:["deuteronMass"]},o.neutronMass={description:"Neutron mass",examples:["neutronMass"]},o.quantumOfCirculation={description:"Quantum of circulation",examples:["quantumOfCirculation"]},o.rydberg={description:"Rydberg constant",examples:["rydberg"]},o.thomsonCrossSection={description:"Thomson cross section",examples:["thomsonCrossSection"]},o.weakMixingAngle={description:"Weak mixing angle",examples:["weakMixingAngle"]},o.efimovFactor={description:"Efimov factor",examples:["efimovFactor"]},o.atomicMass={description:"Atomic mass constant",examples:["atomicMass"]},o.avogadro={description:"Avogadro's number",examples:["avogadro"]},o.boltzmann={description:"Boltzmann constant",examples:["boltzmann"]},o.faraday={description:"Faraday constant",examples:["faraday"]},o.firstRadiation={description:"First radiation constant",examples:["firstRadiation"]},o.loschmidt={description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},o.gasConstant={description:"Gas constant",examples:["gasConstant"]},o.molarPlanckConstant={description:"Molar Planck constant",examples:["molarPlanckConstant"]},o.molarVolume={description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},o.sackurTetrode={description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},o.secondRadiation={description:"Second radiation constant",examples:["secondRadiation"]},o.stefanBoltzmann={description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},o.wienDisplacement={description:"Wien displacement law constant",examples:["wienDisplacement"]},o.molarMass={description:"Molar mass constant",examples:["molarMass"]},o.molarMassC12={description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},o.gravity={description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},o.planckLength={description:"Planck length",examples:["planckLength"]},o.planckMass={description:"Planck mass",examples:["planckMass"]},o.planckTime={description:"Planck time",examples:["planckTime"]},o.planckCharge={description:"Planck charge",examples:["planckCharge"]},o.planckTemperature={description:"Planck temperature",examples:["planckTemperature"]},o.derivative=n(473),o.lsolve=n(474),o.lup=n(475),o.lusolve=n(476),o.simplify=n(477),o.rationalize=n(478),o.slu=n(479),o.usolve=n(480),o.qr=n(481),o.abs=n(482),o.add=n(483),o.cbrt=n(484),o.ceil=n(485),o.cube=n(486),o.divide=n(487),o.dotDivide=n(488),o.dotMultiply=n(489),o.dotPow=n(490),o.exp=n(491),o.expm=n(492),o.expm1=n(493),o.fix=n(494),o.floor=n(495),o.gcd=n(496),o.hypot=n(497),o.lcm=n(498),o.log=n(499),o.log2=n(500),o.log1p=n(501),o.log10=n(502),o.mod=n(503),o.multiply=n(504),o.norm=n(505),o.nthRoot=n(506),o.nthRoots=n(507),o.pow=n(508),o.round=n(509),o.sign=n(510),o.sqrt=n(511),o.sqrtm=n(512),o.square=n(513),o.subtract=n(514),o.unaryMinus=n(515),o.unaryPlus=n(516),o.xgcd=n(517),o.bitAnd=n(518),o.bitNot=n(519),o.bitOr=n(520),o.bitXor=n(521),o.leftShift=n(522),o.rightArithShift=n(523),o.rightLogShift=n(524),o.bellNumbers=n(525),o.catalan=n(526),o.composition=n(527),o.stirlingS2=n(528),o.config=n(529),o.import=n(530),o.typed=n(531),o.arg=n(532),o.conj=n(533),o.re=n(534),o.im=n(535),o.eval=n(536),o.help=n(537),o.distance=n(538),o.intersect=n(539),o.and=n(540),o.not=n(541),o.or=n(542),o.xor=n(543),o.column=n(544),o.concat=n(545),o.cross=n(546),o.ctranspose=n(547),o.det=n(548),o.diag=n(549),o.dot=n(550),o.getMatrixDataType=n(551),o.identity=n(552),o.filter=n(553),o.flatten=n(554),o.forEach=n(555),o.inv=n(556),o.kron=n(557),o.map=n(558),o.ones=n(559),o.partitionSelect=n(560),o.range=n(561),o.resize=n(562),o.reshape=n(563),o.row=n(564),o.size=n(565),o.sort=n(566),o.squeeze=n(567),o.subset=n(568),o.trace=n(569),o.transpose=n(570),o.zeros=n(571),o.combinations=n(572),o.factorial=n(573),o.gamma=n(574),o.kldivergence=n(575),o.multinomial=n(576),o.permutations=n(577),o.pickRandom=n(578),o.random=n(579),o.randomInt=n(580),o.compare=n(581),o.compareNatural=n(582),o.compareText=n(583),o.deepEqual=n(584),o.equal=n(585),o.equalText=n(586),o.larger=n(587),o.largerEq=n(588),o.smaller=n(589),o.smallerEq=n(590),o.unequal=n(591),o.setCartesian=n(592),o.setDifference=n(593),o.setDistinct=n(594),o.setIntersect=n(595),o.setIsSubset=n(596),o.setMultiplicity=n(597),o.setPowerset=n(598),o.setSize=n(599),o.setSymDifference=n(600),o.setUnion=n(601),o.erf=n(602),o.mad=n(603),o.max=n(604),o.mean=n(605),o.median=n(606),o.min=n(607),o.mode=n(608),o.prod=n(609),o.quantileSeq=n(610),o.std=n(611),o.sum=n(612),o.var=n(613),o.acos=n(614),o.acosh=n(615),o.acot=n(616),o.acoth=n(617),o.acsc=n(618),o.acsch=n(619),o.asec=n(620),o.asech=n(621),o.asin=n(622),o.asinh=n(623),o.atan=n(624),o.atanh=n(625),o.atan2=n(626),o.cos=n(627),o.cosh=n(628),o.cot=n(629),o.coth=n(630),o.csc=n(631),o.csch=n(632),o.sec=n(633),o.sech=n(634),o.sin=n(635),o.sinh=n(636),o.tan=n(637),o.tanh=n(638),o.to=n(639),o.clone=n(640),o.format=n(641),o.isNaN=n(642),o.isInteger=n(643),o.isNegative=n(644),o.isNumeric=n(645),o.hasNumericValue=n(646),o.isPositive=n(647),o.isPrime=n(648),o.isZero=n(649),o.typeof=n(650),o}},function(e,t,n){"use strict";e.exports={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]}},function(e,t,n){"use strict";e.exports={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]}},function(e,t,n){"use strict";t.name="parser",t.factory=function(e,t,r,i,o){var a=r(n(206));return i("parser",{"":function(){return new a(o)}})},t.math=!0},function(e,t,n){"use strict";var r=n(13).extend,i=n(24);t.name="Parser",t.path="expression",t.factory=function(e,t,o,a,s){var u=o(n(66));function c(){if(!(this instanceof c))throw new SyntaxError("Constructor must be called with the new operator");this.scope={}}return c.prototype.type="Parser",c.prototype.isParser=!0,c.prototype.parse=function(e){throw new Error("Parser.parse is deprecated. Use math.parse instead.")},c.prototype.compile=function(e){throw new Error("Parser.compile is deprecated. Use math.compile instead.")},c.prototype.eval=function(e){return u(e).compile().eval(this.scope)},c.prototype.get=function(e){return e in this.scope?i.getSafeProperty(this.scope,e):void 0},c.prototype.getAll=function(){return r({},this.scope)},c.prototype.set=function(e,t){return i.setSafeProperty(this.scope,e,t)},c.prototype.remove=function(e){delete this.scope[e]},c.prototype.clear=function(){for(var e in this.scope)this.scope.hasOwnProperty(e)&&delete this.scope[e]},c},t.math=!0},function(e,t,n){(function(t){var n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",o="[object Null]",a="[object Proxy]",s="[object Undefined]",u="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,l=u||c||Function("return this")(),f=Object.prototype,p=f.hasOwnProperty,m=f.toString,d=l.Symbol,h=d?d.toStringTag:void 0;function y(e){return null==e?void 0===e?s:o:h&&h in Object(e)?function(e){var t=p.call(e,h),n=e[h];try{e[h]=void 0;var r=!0}catch(o){}var i=m.call(e);r&&(t?e[h]=n:delete e[h]);return i}(e):function(e){return m.call(e)}(e)}e.exports=function(e){if(!function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}(e))return!1;var t=y(e);return t==r||t==i||t==n||t==a}}).call(this,n(71))},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"===typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",function(){return r})},function(e,t,n){e.exports=n(251)},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(1)),i=o(n(678));function o(e){return e&&e.__esModule?e:{default:e}}t.default=r.default.createContext||i.default,e.exports=t.default},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t){e.exports=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";function r(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"===typeof i?i(n,r,e):t(i)}}}}var i=r();i.withExtraArgument=r,t.a=i},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);tP.length&&P.push(e)}function I(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case a:u=!0}}if(u)return r(i,t,""===n?"."+z(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;cthis.eventPool.length&&this.eventPool.push(e)}function fe(e){e.eventPool=[],e.getPooled=ce,e.release=le}i(ue.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ae)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ae)},persist:function(){this.isPersistent=ae},isPersistent:se,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=se,this._dispatchInstances=this._dispatchListeners=null}}),ue.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ue.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var o=new t;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,e),n.extend=r.extend,fe(n),n},fe(ue);var pe=ue.extend({data:null}),me=ue.extend({data:null}),de=[9,13,27,32],he=$&&"CompositionEvent"in window,ye=null;$&&"documentMode"in document&&(ye=document.documentMode);var ve=$&&"TextEvent"in window&&!ye,ge=$&&(!he||ye&&8=ye),xe=String.fromCharCode(32),be={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},we=!1;function Ne(e,t){switch(e){case"keyup":return-1!==de.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Ee(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Me=!1;var Oe={eventTypes:be,extractEvents:function(e,t,n,r){var i=void 0,o=void 0;if(he)e:{switch(e){case"compositionstart":i=be.compositionStart;break e;case"compositionend":i=be.compositionEnd;break e;case"compositionupdate":i=be.compositionUpdate;break e}i=void 0}else Me?Ne(e,n)&&(i=be.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=be.compositionStart);return i?(ge&&"ko"!==n.locale&&(Me||i!==be.compositionStart?i===be.compositionEnd&&Me&&(o=oe()):(re="value"in(ne=r)?ne.value:ne.textContent,Me=!0)),i=pe.getPooled(i,t,n,r),o?i.data=o:null!==(o=Ee(n))&&(i.data=o),W(i),o=i):o=null,(e=ve?function(e,t){switch(e){case"compositionend":return Ee(t);case"keypress":return 32!==t.which?null:(we=!0,xe);case"textInput":return(e=t.data)===xe&&we?null:e;default:return null}}(e,n):function(e,t){if(Me)return"compositionend"===e||!he&&Ne(e,t)?(e=oe(),ie=re=ne=null,Me=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1