(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors_2.10.0"],{"0062":function(e,t,n){"use strict";var r=n("b13c").map,i=n("3d75").escape;function o(e,t,o,a){var s=o(n("2ba9")),u=o(n("5776")),c=Array.isArray;function f(t,n){if(!(this instanceof f))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 l(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 f.prototype=new s,f.prototype.type="IndexNode",f.prototype.isIndexNode=!0,f.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],l(a(e,c,r),s(e,c,r),u(e,c,r))}}var c=r.start._compile(t,n),f=r.end._compile(t,n),p=r.step?r.step._compile(t,n):function(){return 1};return function(e,t,n){return l(c(e,t,n),f(e,t,n),p(e,t,n))}}if(e.isSymbolNode(r)&&"end"===r.name){var h=Object.create(n);h["end"]=!0;var d=r._compile(t,h);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 m=r._compile(t,n);return function(e,t,n){return m(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)}},f.prototype.forEach=function(e){for(var t=0;t.'+i(this.getObjectProperty())+"":'['+t.join(',')+']'},f.prototype._toTex=function(e){var t=this.dimensions.map(function(t){return t.toTex(e)});return this.dotNotation?"."+this.getObjectProperty():"_{"+t.join(",")+"}"},f}t.name="IndexNode",t.path="expression.node",t.factory=o},"012b":function(e,t,n){"use strict";e.exports={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]}},"013f":function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return r})},"014b":function(e,t,n){"use strict";var r=n("e53d"),i=n("07e3"),o=n("8e60"),a=n("63b6"),s=n("9138"),u=n("ebfd").KEY,c=n("294c"),f=n("dbdb"),l=n("45f2"),p=n("62a0"),h=n("5168"),d=n("ccb9"),m=n("6718"),v=n("47ee"),y=n("9003"),g=n("e4ae"),b=n("f772"),x=n("36c3"),w=n("1bc3"),N=n("aebd"),E=n("a159"),M=n("0395"),S=n("bf0b"),_=n("d9f6"),A=n("c3a1"),O=S.f,T=_.f,C=M.f,k=r.Symbol,P=r.JSON,I=P&&P.stringify,z="prototype",B=h("_hidden"),R=h("toPrimitive"),D={}.propertyIsEnumerable,j=f("symbol-registry"),L=f("symbols"),F=f("op-symbols"),q=Object[z],U="function"==typeof k,$=r.QObject,H=!$||!$[z]||!$[z].findChild,V=o&&c(function(){return 7!=E(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=O(q,t);r&&delete q[t],T(e,t,n),r&&e!==q&&T(q,t,r)}:T,G=function(e){var t=L[e]=E(k[z]);return t._k=e,t},W=U&&"symbol"==typeof k.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof k},Y=function(e,t,n){return e===q&&Y(F,t,n),g(e),t=w(t,!0),g(n),i(L,t)?(n.enumerable?(i(e,B)&&e[B][t]&&(e[B][t]=!1),n=E(n,{enumerable:N(0,!1)})):(i(e,B)||T(e,B,N(1,{})),e[B][t]=!0),V(e,t,n)):T(e,t,n)},X=function(e,t){g(e);var n,r=v(t=x(t)),i=0,o=r.length;while(o>i)Y(e,n=r[i++],t[n]);return e},Z=function(e,t){return void 0===t?E(e):X(E(e),t)},J=function(e){var t=D.call(this,e=w(e,!0));return!(this===q&&i(L,e)&&!i(F,e))&&(!(t||!i(this,e)||!i(L,e)||i(this,B)&&this[B][e])||t)},Q=function(e,t){if(e=x(e),t=w(t,!0),e!==q||!i(L,t)||i(F,t)){var n=O(e,t);return!n||!i(L,t)||i(e,B)&&e[B][t]||(n.enumerable=!0),n}},K=function(e){var t,n=C(x(e)),r=[],o=0;while(n.length>o)i(L,t=n[o++])||t==B||t==u||r.push(t);return r},ee=function(e){var t,n=e===q,r=C(n?F:x(e)),o=[],a=0;while(r.length>a)!i(L,t=r[a++])||n&&!i(q,t)||o.push(L[t]);return o};U||(k=function(){if(this instanceof k)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===q&&t.call(F,n),i(this,B)&&i(this[B],e)&&(this[B][e]=!1),V(this,e,N(1,n))};return o&&H&&V(q,e,{configurable:!0,set:t}),G(e)},s(k[z],"toString",function(){return this._k}),S.f=Q,_.f=Y,n("6abf").f=M.f=K,n("355d").f=J,n("9aa9").f=ee,o&&!n("b8e3")&&s(q,"propertyIsEnumerable",J,!0),d.f=function(e){return G(h(e))}),a(a.G+a.W+a.F*!U,{Symbol:k});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)h(te[ne++]);for(var re=A(h.store),ie=0;re.length>ie;)m(re[ie++]);a(a.S+a.F*!U,"Symbol",{for:function(e){return i(j,e+="")?j[e]:j[e]=k(e)},keyFor:function(e){if(!W(e))throw TypeError(e+" is not a symbol!");for(var t in j)if(j[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!U,"Object",{create:Z,defineProperty:Y,defineProperties:X,getOwnPropertyDescriptor:Q,getOwnPropertyNames:K,getOwnPropertySymbols:ee}),P&&a(a.S+a.F*(!U||c(function(){var e=k();return"[null]"!=I([e])||"{}"!=I({a:e})||"{}"!=I(Object(e))})),"JSON",{stringify:function(e){var t,n,r=[e],i=1;while(arguments.length>i)r.push(arguments[i++]);if(n=t=r[1],(b(t)||void 0!==e)&&!W(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!W(t))return t}),r[1]=t,I.apply(P,r)}}),k[z][R]||n("35e8")(k[z],R,k[z].valueOf),l(k,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},"01a5":function(e,t,n){"use strict";var r=n("5c31").transform,i=n("1c94");function o(e,t,o,a){var s=o(n("67e7"));return a("sum",{"...any":function(t){if(2===t.length&&i(t[0])){var n=t[1];e.isNumber(n)?t[1]=n-1:e.isBigNumber(n)&&(t[1]=n.minus(1))}try{return s.apply(null,t)}catch(o){throw r(o)}}})}t.name="sum",t.path="expression.transform",t.factory=o},"01f9":function(e,t,n){"use strict";var r=n("2d00"),i=n("5ca1"),o=n("2aba"),a=n("32e9"),s=n("84f2"),u=n("41a0"),c=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),h="@@iterator",d="keys",m="values",v=function(){return this};e.exports=function(e,t,n,y,g,b,x){u(n,t,y);var w,N,E,M=function(e){if(!p&&e in O)return O[e];switch(e){case d:return function(){return new n(this,e)};case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",_=g==m,A=!1,O=e.prototype,T=O[l]||O[h]||g&&O[g],C=T||M(g),k=g?_?M("entries"):C:void 0,P="Array"==t&&O.entries||T;if(P&&(E=f(P.call(new e)),E!==Object.prototype&&E.next&&(c(E,S,!0),r||"function"==typeof E[l]||a(E,l,v))),_&&T&&T.name!==m&&(A=!0,C=function(){return T.call(this)}),r&&!x||!p&&!A&&O[l]||a(O,l,C),s[t]=C,s[S]=v,g)if(w={values:_?C:M(m),keys:b?C:M(d),entries:k},x)for(N in w)N in O||o(O,N,w[N]);else i(i.P+i.F*(p||A),t,w);return w}},"0281":function(e,t,n){"use strict";var r=n("d7df").isInteger,i=n("dc2c");function o(e,t,o,a){var s=n("6c54"),u=o(n("4781")),c=o(n("e1fc")),f=o(n("d5de")),l=o(n("9ebd")),p=o(n("cdb0")),h=o(n("04b6")),d=a("bitAnd",{"number, number":function(e,t){if(!r(e)||!r(t))throw new Error("Integers expected in function bitAnd");return e&t},"BigNumber, BigNumber":i,"SparseMatrix, SparseMatrix":function(e,t){return f(e,t,d,!1)},"SparseMatrix, DenseMatrix":function(e,t){return c(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return c(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return p(e,t,d)},"Array, Array":function(e,t){return d(u(e),u(t)).valueOf()},"Array, Matrix":function(e,t){return d(u(e),t)},"Matrix, Array":function(e,t){return d(e,u(t))},"SparseMatrix, any":function(e,t){return l(e,t,d,!1)},"DenseMatrix, any":function(e,t){return h(e,t,d,!1)},"any, SparseMatrix":function(e,t){return l(t,e,d,!0)},"any, DenseMatrix":function(e,t){return h(t,e,d,!0)},"Array, any":function(e,t){return h(u(e),t,d,!1).valueOf()},"any, Array":function(e,t){return h(u(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}".concat(s.operators["bitAnd"],"${args[1]}\\right)")},d}t.name="bitAnd",t.factory=o},"0293":function(e,t,n){var r=n("241e"),i=n("53e2");n("ce7e")("getPrototypeOf",function(){return function(e){return i(r(e))}})},"02cf":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var a=i("tanh",{number:o,Complex:function(e){return e.tanh()},BigNumber:function(e){return e.tanh()},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tanh is no angle");return a(t.value)},"Array | Matrix":function(e){return r(e,a,!0)}});return a.toTex={1:"\\tanh\\left(${args[0]}\\right)"},a}var o=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)};t.name="tanh",t.factory=i},"02f4":function(e,t,n){var r=n("4588"),i=n("be13");e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u),o<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536)}}},"0306":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,i,o){var a=n("6c54"),s=o("unaryPlus",{number:function(e){return e},Complex:function(e){return e},BigNumber:function(e){return e},Fraction:function(e){return e},Unit:function(e){return e.clone()},"Array | Matrix":function(e){return r(e,s,!0)},"boolean | string":function(n){return"BigNumber"===t.number?new e.BigNumber(+n):+n}});return s.toTex={1:"".concat(a.operators["unaryPlus"],"\\left(${args[0]}\\right)")},s}t.name="unaryPlus",t.factory=i},"0390":function(e,t,n){"use strict";var r=n("02f4")(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},"03909":function(e,t,n){"use strict";e.exports={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]}},"0393":function(e,t,n){"use strict";e.exports={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]}},"0394":function(e,t,n){"use strict";e.exports={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]}},"0395":function(e,t,n){var r=n("36c3"),i=n("6abf").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return i(e)}catch(t){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?s(e):i(r(e))}},"03be":function(e,t,n){"use strict";e.exports={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]}},"0427":function(e,t,n){"use strict";e.exports=[n("5d3b")]},"042d":function(e,t,n){"use strict";e.exports={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Solves the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["lup","lusolve","lsolve","matrix","sparse"]}},"0443":function(e,t,n){"use strict";function r(){var e=function(e){return-e-2};return e}t.name="csFlip",t.path="algebra.sparse",t.factory=r},"0461":function(e,t,n){"use strict";e.exports={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]}},"04a1":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("sec",{number:function(e){return 1/Math.cos(e)},Complex:function(e){return e.sec()},BigNumber:function(t){return new e.BigNumber(1).div(t.cos())},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sec is no angle");return o(t.value)},"Array | Matrix":function(e){return r(e,o)}});return o.toTex={1:"\\sec\\left(${args[0]}\\right)"},o}t.name="sec",t.factory=i},"04b6":function(e,t,n){"use strict";var r=n("6762").clone;function i(e,t,n,i){var o=e.DenseMatrix,a=function(e,t,n,a){var u,c=e._data,f=e._size,l=e._datatype,p=n;"string"===typeof l&&(u=l,t=i.convert(t,u),p=i.find(n,[u,u]));var h=f.length>0?s(p,0,f,f[0],c,t,a):[];return new o({data:h,size:r(f),datatype:u})};function s(e,t,n,r,i,o,a){var u=[];if(t===n.length-1)for(var c=0;c=0;n--)-1!==e[n]&&(a[u+n]=a[s+e[n]],a[s+e[n]]=n);for(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":m,"Array, BigNumber":function(e,t){return m(e,t.toNumber())},"Matrix, number":v,"Matrix, BigNumber":function(e,t){return v(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=l(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 m(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]+")");var o=u(n[0]).valueOf(),a=e;while(t>=1)1===(1&t)&&(o=c(a,o)),t>>=1,a=c(a,a);return o}function v(e,t){return f(m(e.valueOf(),t))}return h.toTex={2:"\\left(${args[0]}\\right)".concat(s.operators["pow"],"{${args[1]}}")},h}t.name="pow",t.factory=o},"09ee":function(e,t,n){"use strict";e.exports={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]}},"0a15":function(e,t,n){"use strict";e.exports={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]}},"0a49":function(e,t,n){var r=n("9b43"),i=n("626a"),o=n("4bf8"),a=n("9def"),s=n("cd1c");e.exports=function(e,t){var n=1==e,u=2==e,c=3==e,f=4==e,l=6==e,p=5==e||l,h=t||s;return function(t,s,d){for(var m,v,y=o(t),g=i(y),b=r(s,d,3),x=a(g.length),w=0,N=n?h(t,x):u?h(t,0):void 0;x>w;w++)if((p||w in g)&&(m=g[w],v=b(m,w,y),e))if(n)N[w]=v;else if(v)switch(e){case 3:return!0;case 5:return m;case 6:return w;case 2:N.push(m)}else if(f)return!1;return l?-1:c||f?f:N}}},"0a68":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("re",{number:function(e){return e},BigNumber:function(e){return e},Complex:function(e){return e.re},"Array | Matrix":function(e){return r(e,o)}});return o.toTex={1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},o}t.name="re",t.factory=i},"0af4":function(e,t,n){"use strict";e.exports={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]}},"0b34":function(e,t,n){"use strict";e.exports={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]}},"0b5d":function(e,t,n){"use strict";e.exports={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]}},"0b73":function(e,t,n){"use strict";e.exports={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]}},"0b87":function(e,t,n){"use strict";e.exports={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","var"]}},"0bcc":function(e,t,n){"use strict";e.exports={end:!0}},"0be6":function(e,t,n){"use strict";e.exports={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]}},"0bfb":function(e,t,n){"use strict";var r=n("cb7c");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0ca7":function(e,t,n){"use strict";e.exports=[n("b1b5"),n("308f")]},"0d0e":function(e,t,n){"use strict";e.exports={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]}},"0d58":function(e,t,n){var r=n("ce10"),i=n("e11e");e.exports=Object.keys||function(e){return r(e,i)}},"0e7b":function(e,t,n){"use strict";var r=n("4dbd"),i=n("6c54"),o=n("3d75").escape;function a(e,t,a,s){var u=a(n("2ba9")),c=n("e1b6").getSafeProperty;function f(e,t){if(!(this instanceof f))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 f.prototype=new u,f.prototype.type="RelationalNode",f.prototype.isRelationalNode=!0,f.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},f.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;s=u&&f=0?"+":"")+r.toString()},t.toExponential=function(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()},t.toFixed=function(e,t){return e.toFixed(t)}},"0efd":function(e,t,n){"use strict";e.exports={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]}},"0f62":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("b940"));return function(e,t,n){var r;return-1!==String(e).indexOf("Unexpected type")?(r=arguments.length>2?" (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}}t.factory=r},"0fc9":function(e,t,n){var r=n("3a38"),i=Math.max,o=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):o(e,t)}},1000:function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("c459")),a=i("getMatrixDataType",{Array:function(e){return o(e)},Matrix:function(e){return e.getDataType()}});return a}t.name="getMatrixDataType",t.factory=r},1064:function(e,t,n){"use strict";function r(e,t,r){var i=r(n("afcf")),o=r(n("e2fa")),a=r(n("537e")),s=function(e,t,n,r,s){var u,c,f,l=e._ptr,p=e._size,h=t._index,d=t._ptr,m=p[1],v=m;for(c=d[n],f=d[n+1],u=c;uu)r.f(e,n=a[u++],t[n]);return e}},"14a0":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("4781")),a=r(n("58f1")),s=r(n("a226")),u=r(n("3b53")),c=r(n("863e")),f=r(n("a09b")),l=e.DenseMatrix,p=i("usolve",{"SparseMatrix, Array | Matrix":function(e,t){return d(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return h(e,t)},"Array, Array | Matrix":function(e,t){var n=o(e),r=h(n,t);return r.valueOf()}});function h(e,t){t=f(e,t,!0);for(var n=t._data,r=e._size[0],i=e._size[1],o=[],p=e._data,h=i-1;h>=0;h--){var d=n[h][0]||0,m=void 0;if(c(d,0))m=0;else{var v=p[h][h];if(c(v,0))throw new Error("Linear system cannot be solved since matrix is singular");m=a(d,v);for(var y=h-1;y>=0;y--)n[y]=[u(n[y][0]||0,s(m,p[y][h]))]}o[h]=[m]}return new l({data:o,size:[r,1]})}function d(e,t){t=f(e,t,!0);for(var n,r,i=t._data,o=e._size[0],p=e._size[1],h=e._values,d=e._index,m=e._ptr,v=[],y=p-1;y>=0;y--){var g=i[y][0]||0;if(c(g,0))v[y]=[0];else{var b=0,x=[],w=[],N=m[y],E=m[y+1];for(r=E-1;r>=N;r--)n=d[r],n===y?b=h[r]:n'+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]&&l(this.name)&&(t=!0);var n=r.toSymbol(this.name,t);return"\\"===n[0]?n:" "+n},p}t.name="SymbolNode",t.path="expression.node",t.math=!0,t.factory=s},"157d8":function(e,t,n){"use strict";e.exports={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]}},"15af":function(e,t,n){"use strict";e.exports=[n("6caf"),n("2b3e"),n("d70a"),n("ca86"),n("2424"),n("dde7"),n("a3ea"),n("245e"),n("6736"),n("1cf3"),n("8a3b"),n("53b4"),n("8ddd"),n("30a9"),n("41fb"),n("3f39"),n("4790"),n("fe32"),n("88dc"),n("b0bc"),n("9ccd"),n("35de"),n("8675"),n("bfb7"),n("2a72"),n("d6cc"),n("4390"),n("59a8"),n("6201"),n("2636"),n("f5ae"),n("1000")]},1627:function(e,t,n){"use strict";var r=n("b13c").flatten,i=n("b13c").identify,o=n("b13c").generalize;function a(e,t,a,s){var u=a(n("2f39")),c=a(n("652d")),f=a(n("bfb7")),l=a(n("59a8")),p=a(n("2f6a")),h=s("setIntersect",{"Array | Matrix, Array | Matrix":function(e,t){var n;if(0===l(f(e),new u(0))||0===l(f(t),new u(0)))n=[];else{var a=i(r(Array.isArray(e)?e:e.toArray()).sort(p)),s=i(r(Array.isArray(t)?t:t.toArray()).sort(p));n=[];for(var h=0;h=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},"166a":function(e,t,n){"use strict";var r=n("d61e");function i(e,t,n,i){return r}r.prototype.type="Fraction",r.prototype.isFraction=!0,r.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},r.fromJSON=function(e){return new r(e)},t.name="Fraction",t.path="type",t.factory=i},1691:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"174d":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var a=i("atanh",{number:function(n){return n<=1&&n>=-1||t.predictable?o(n):new e.Complex(n,0).atanh()},Complex:function(e){return e.atanh()},BigNumber:function(e){return e.atanh()},"Array | Matrix":function(e){return r(e,a,!0)}});return a.toTex={1:"\\tanh^{-1}\\left(${args[0]}\\right)"},a}var o=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2};t.name="atanh",t.factory=i},1763:function(e,t,n){"use strict";e.exports={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]}},"17cd":function(e,t,n){"use strict";e.exports={name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]}},"180a":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("c430")),a=r(n("5d7b")),s=r(n("a9ca")),u=r(n("3db8")),c=r(n("1fe4")),f=i("composition",{"number | BigNumber, number | BigNumber":function(e,t){if(!(u(e)&&s(e)&&u(t)&&s(t)))throw new TypeError("Positive integer value expected in function composition");if(c(t,e))throw new TypeError("k must be less than or equal to n in function composition");return o(a(e,-1),a(t,-1))}});return f.toTex=void 0,f}t.name="composition",t.factory=r},1881:function(e,t,n){!function(t,n){e.exports=n()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=11)}([function(e,t,n){var r=n(6);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals),(0,n(4).default)("27d83796",r,!1,{})},function(e,t,n){var r=n(8);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals),(0,n(4).default)("0e783494",r,!1,{})},function(e,t,n){var r=n(10);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals),(0,n(4).default)("17757f60",r,!1,{})},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n,r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var o=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[r].concat(a).concat([o]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;in.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i component must be present on the page.")};e.prototype.$modal={show:function(e){for(var n=arguments.length,r=new Array(1n)t.push(arguments[n++]);return y[++v]=function(){s("function"==typeof e?e:Function(e),t)},r(v),v},h=function(e){delete y[e]},"process"==n("2d95")(l)?r=function(e){l.nextTick(a(b,e,1))}:m&&m.now?r=function(e){m.now(a(b,e,1))}:d?(i=new d,o=i.port2,i.port1.onmessage=x,r=a(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(e){f.postMessage(e+"","*")},f.addEventListener("message",x,!1)):r=g in c("script")?function(e){u.appendChild(c("script"))[g]=function(){u.removeChild(this),b.call(e)}}:function(e){setTimeout(a(b,e,1),0)}),e.exports={set:p,clear:h}},"1af6":function(e,t,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"1b17":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("b0bc"));return i("range",{"...any":function(e){var t=e.length-1,n=e[t];return"boolean"!==typeof n&&e.push(!0),o.apply(null,e)}})}t.name="range",t.path="expression.transform",t.factory=r},"1b6d":function(e,t,n){"use strict";var r=n("1c94");e.exports=function(e){for(var t=0;t>1,r(e,n)*r(n+1,t))}e.exports=r},"1beb":function(e,t,n){"use strict";var r=n("6f9b");function i(e){var t=r.create(e);return t.create=i,t["import"](n("c981")),t}e.exports=i()},"1c4c":function(e,t,n){"use strict";var r=n("9b43"),i=n("5ca1"),o=n("4bf8"),a=n("1fa8"),s=n("33a4"),u=n("9def"),c=n("f1ae"),f=n("27ee");i(i.S+i.F*!n("5cc5")(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,l,p=o(e),h="function"==typeof this?this:Array,d=arguments.length,m=d>1?arguments[1]:void 0,v=void 0!==m,y=0,g=f(p);if(v&&(m=r(m,d>2?arguments[2]:void 0,2)),void 0==g||h==Array&&s(g))for(t=u(p.length),n=new h(t);t>y;y++)c(n,y,v?m(p[y],y):p[y]);else for(l=g.call(p),n=new h;!(i=l.next()).done;y++)c(n,y,v?a(l,m,[i.value,y],!0):i.value);return n.length=y,n}})},"1c94":function(e,t,n){"use strict";var r=n("e9c3");e.exports=function(e){return Array.isArray(e)||r(e)}},"1cf3":function(e,t,n){"use strict";var r=n("3d75").format;function i(e,t,i,o){var a=i(n("7d3c")),s=i(n("3447")),u=i(n("30a9")),c=i(n("41fb")),f=i(n("354f")),l=e.SparseMatrix,p=o("expm",{Matrix:function(t){var n=t.size();if(2!==n.length||n[0]!==n[1])throw new RangeError("Matrix must be square (size: "+r(n)+")");for(var i=n[0],o=1e-15,a=h(t),p=d(a,o),m=p.q,v=p.j,y=f(t,Math.pow(2,-v)),g=u(i),b=u(i),x=1,w=y,N=-1,E=1;E<=m;E++)E>1&&(w=f(w,y),N=-N),x=x*(m-E+1)/((2*m-E+1)*E),g=s(g,f(x,w)),b=s(b,f(x*N,w));for(var M=f(c(b),g),S=0;St},"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 l(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 f(e,t,d,!1)},"DenseMatrix, any":function(e,t){return p(e,t,d,!1)},"any, SparseMatrix":function(e,t){return f(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(h.operators["larger"],"${args[1]}\\right)")},d}t.name="larger",t.factory=o},"20ba":function(e,t,n){"use strict";e.exports={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]}},"20d6":function(e,t,n){"use strict";var r=n("5ca1"),i=n("0a49")(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")(o)},"20de":function(e,t,n){"use strict";e.exports={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]}},"20fd":function(e,t,n){"use strict";var r=n("d9f6"),i=n("aebd");e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},"214f":function(e,t,n){"use strict";n("b0c5");var r=n("2aba"),i=n("32e9"),o=n("79e5"),a=n("be13"),s=n("2b4c"),u=n("520a"),c=s("species"),f=!o(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}),l=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var p=s(e),h=!o(function(){var t={};return t[p]=function(){return 7},7!=""[e](t)}),d=h?!o(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[p](""),!t}):void 0;if(!h||!d||"replace"===e&&!f||"split"===e&&!l){var m=/./[p],v=n(a,p,""[e],function(e,t,n,r,i){return t.exec===u?h&&!i?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),y=v[0],g=v[1];r(String.prototype,e,y),i(RegExp.prototype,p,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.call(e,this)})}}},2216:function(e,t,n){"use strict";e.exports={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]}},"222e":function(e,t,n){"use strict";var r=n("e1b6").getSafeProperty;function i(e,t,i,o){var a=i(n("2ba9")),s=i(n("da0f"));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}t.name="AccessorNode",t.path="expression.node",t.factory=i},"22bc":function(e,t,n){"use strict";var r=n("5c31").transform;function i(e,t,i,o){var a=i(n("2b3e"));return o("column",{"...any":function(t){var n=t.length-1,i=t[n];e.isNumber(i)&&(t[n]=i-1);try{return a.apply(null,t)}catch(o){throw r(o)}}})}t.name="column",t.path="expression.transform",t.factory=i},"230e":function(e,t,n){var r=n("d3f4"),i=n("7726").document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},2313:function(e,t,n){"use strict";e.exports={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]}},2393:function(e,t,n){"use strict";var r=n("dcb2"),i=n("aeae"),o=n("1b6d");function a(e,t,a,s){var u=a(n("9b87")),c=a(n("0f62")),f=s("min",{"Array | Matrix":p,"Array | Matrix, number | BigNumber":function(e,t){return i(e,t.valueOf(),l)},"...":function(e){if(o(e))throw new TypeError("Scalar values expected in function min");return p(e)}});return f.toTex="\\min\\left(${args}\\right)",f;function l(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}}t.name="min",t.factory=a},"23c6":function(e,t,n){var r=n("2d95"),i=n("2b4c")("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(n){}};e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=a(t=Object(e),i))?n:o?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},2413:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,i,o){var a=i(n("58f1")),s=i(n("ec42")),u=o("log1p",{number:c,Complex:f,BigNumber:function(n){var r=n.plus(1);return!r.isNegative()||t.predictable?r.ln():f(new e.Complex(n.toNumber(),0))},"Array | Matrix":function(e){return r(e,u)},"any, any":function(e,t){return a(u(e),s(t))}});function c(n){return n>=-1||t.predictable?Math.log1p?Math.log1p(n):Math.log(n+1):f(new e.Complex(n,0))}function f(t){var n=t.re+1;return new e.Complex(Math.log(Math.sqrt(n*n+t.im*t.im)),Math.atan2(t.im,n))}return u.toTex={1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},u}t.name="log1p",t.factory=i},"241e":function(e,t,n){var r=n("25eb");e.exports=function(e){return Object(r(e))}},2424:function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("2636")),a=r(n("13ce")),s=n("6c54"),u=i("ctranspose",{any:function(e){return a(o(e))}});return u.toTex={1:"\\left(${args[0]}\\right)".concat(s.operators["ctranspose"])},u}t.name="ctranspose",t.factory=r},"245e":function(e,t,n){"use strict";var r=n("b13c").size;function i(e,t,i,o){var a=i(n("3447")),s=i(n("354f")),u=o("dot",{"Matrix, Matrix":function(e,t){return c(e.toArray(),t.toArray())},"Matrix, Array":function(e,t){return c(e.toArray(),t)},"Array, Matrix":function(e,t){return c(e,t.toArray())},"Array, Array":c});return u.toTex={2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},u;function c(e,t){var n=r(e),i=r(t),o=n[0];if(1!==n.length||1!==i.length)throw new RangeError("Vector expected");if(n[0]!==i[0])throw new RangeError("Vectors must have equal length ("+n[0]+" != "+i[0]+")");if(0===o)throw new RangeError("Cannot calculate the dot product of empty vectors");for(var u=0,c=0;c=0;u--)for(f=n[u],l=n[u+1],c=f;c=0;s--)h[s]=-1,u=d[s],-1!==u&&(0===m[b+u]++&&(m[g+u]=s),m[v+s]=m[y+u],m[y+u]=s);for(t.lnz=0,t.m2=o,u=0;u";t.style.display="none",n("fab2").appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(i+"script"+a+"document.F=Object"+i+"/script"+a),e.close(),c=e.F;while(r--)delete c[u][o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[u]=r(e),n=new s,s[u]=null,n[a]=e):n=c(),void 0===t?n:i(n,t)}},"2b01":function(e,t,n){"use strict";e.exports={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(var(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","sum","var"]}},"2b06":function(e,t,n){"use strict";e.exports=[n("f68c")]},"2b0e":function(e,t,n){"use strict";n.r(t),function(e){ /*! * Vue.js v2.6.10 * (c) 2014-2019 Evan You * Released under the MIT License. */ var n=Object.freeze({});function r(e){return void 0===e||null===e}function i(e){return void 0!==e&&null!==e}function o(e){return!0===e}function a(e){return!1===e}function s(e){return"string"===typeof e||"number"===typeof e||"symbol"===typeof e||"boolean"===typeof e}function u(e){return null!==e&&"object"===typeof e}var c=Object.prototype.toString;function f(e){return"[object Object]"===c.call(e)}function l(e){return"[object RegExp]"===c.call(e)}function p(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function h(e){return i(e)&&"function"===typeof e.then&&"function"===typeof e.catch}function d(e){return null==e?"":Array.isArray(e)||f(e)&&e.toString===c?JSON.stringify(e,null,2):String(e)}function m(e){var t=parseFloat(e);return isNaN(t)?e:t}function v(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}var b=Object.prototype.hasOwnProperty;function x(e,t){return b.call(e,t)}function w(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}var N=/-(\w)/g,E=w(function(e){return e.replace(N,function(e,t){return t?t.toUpperCase():""})}),M=w(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),S=/\B([A-Z])/g,_=w(function(e){return e.replace(S,"-$1").toLowerCase()});function A(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function O(e,t){return e.bind(t)}var T=Function.prototype.bind?O:A;function C(e,t){t=t||0;var n=e.length-t,r=new Array(n);while(n--)r[n]=e[n+t];return r}function k(e,t){for(var n in t)e[n]=t[n];return e}function P(e){for(var t={},n=0;n0,ne=K&&K.indexOf("edge/")>0,re=(K&&K.indexOf("android"),K&&/iphone|ipad|ipod|ios/.test(K)||"ios"===Q),ie=(K&&/chrome\/\d+/.test(K),K&&/phantomjs/.test(K),K&&K.match(/firefox\/(\d+)/)),oe={}.watch,ae=!1;if(Z)try{var se={};Object.defineProperty(se,"passive",{get:function(){ae=!0}}),window.addEventListener("test-passive",null,se)}catch(Ea){}var ue=function(){return void 0===Y&&(Y=!Z&&!J&&"undefined"!==typeof e&&(e["process"]&&"server"===e["process"].env.VUE_ENV)),Y},ce=Z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function fe(e){return"function"===typeof e&&/native code/.test(e.toString())}var le,pe="undefined"!==typeof Symbol&&fe(Symbol)&&"undefined"!==typeof Reflect&&fe(Reflect.ownKeys);le="undefined"!==typeof Set&&fe(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var he=I,de=0,me=function(){this.id=de++,this.subs=[]};me.prototype.addSub=function(e){this.subs.push(e)},me.prototype.removeSub=function(e){g(this.subs,e)},me.prototype.depend=function(){me.target&&me.target.addDep(this)},me.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t-1)if(o&&!x(i,"default"))a=!1;else if(""===a||a===_(e)){var u=et(String,i.type);(u<0||s0&&(a=At(a,(t||"")+"_"+n),_t(a[0])&&_t(c)&&(f[u]=Ne(c.text+a[0].text),a.shift()),f.push.apply(f,a)):s(a)?_t(c)?f[u]=Ne(c.text+a):""!==a&&f.push(Ne(a)):_t(a)&&_t(c)?f[u]=Ne(c.text+a.text):(o(e._isVList)&&i(a.tag)&&r(a.key)&&i(t)&&(a.key="__vlist"+t+"_"+n+"__"),f.push(a)));return f}function Ot(e){var t=e.$options.provide;t&&(e._provided="function"===typeof t?t.call(e):t)}function Tt(e){var t=Ct(e.$options.inject,e);t&&(Te(!1),Object.keys(t).forEach(function(n){ze(e,n,t[n])}),Te(!0))}function Ct(e,t){if(e){for(var n=Object.create(null),r=pe?Reflect.ownKeys(e):Object.keys(e),i=0;i0,a=e?!!e.$stable:!o,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&r&&r!==n&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var u in i={},e)e[u]&&"$"!==u[0]&&(i[u]=zt(t,u,e[u]))}else i={};for(var c in t)c in i||(i[c]=Bt(t,c));return e&&Object.isExtensible(e)&&(e._normalized=i),V(i,"$stable",a),V(i,"$key",s),V(i,"$hasNormal",o),i}function zt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return e=e&&"object"===typeof e&&!Array.isArray(e)?[e]:St(e),e&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function Bt(e,t){return function(){return e[t]}}function Rt(e,t){var n,r,o,a,s;if(Array.isArray(e)||"string"===typeof e)for(n=new Array(e.length),r=0,o=e.length;r1?C(n):n;for(var r=C(arguments,1),i='event handler for "'+e+'"',o=0,a=n.length;odocument.createEvent("Event").timeStamp&&(Yn=function(){return Xn.now()})}function Zn(){var e,t;for(Wn=Yn(),Hn=!0,Fn.sort(function(e,t){return e.id-t.id}),Vn=0;VnVn&&Fn[n].id>e.id)n--;Fn.splice(n+1,0,e)}else Fn.push(e);$n||($n=!0,dt(Zn))}}var tr=0,nr=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++tr,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new le,this.newDepIds=new le,this.expression="","function"===typeof t?this.getter=t:(this.getter=W(t),this.getter||(this.getter=I)),this.value=this.lazy?void 0:this.get()};nr.prototype.get=function(){var e;ye(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(Ea){if(!this.user)throw Ea;tt(Ea,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&vt(e),ge(),this.cleanupDeps()}return e},nr.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},nr.prototype.cleanupDeps=function(){var e=this.deps.length;while(e--){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},nr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():er(this)},nr.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||u(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(Ea){tt(Ea,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},nr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},nr.prototype.depend=function(){var e=this.deps.length;while(e--)this.deps[e].depend()},nr.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||g(this.vm._watchers,this);var e=this.deps.length;while(e--)this.deps[e].removeSub(this);this.active=!1}};var rr={enumerable:!0,configurable:!0,get:I,set:I};function ir(e,t,n){rr.get=function(){return this[t][n]},rr.set=function(e){this[t][n]=e},Object.defineProperty(e,n,rr)}function or(e){e._watchers=[];var t=e.$options;t.props&&ar(e,t.props),t.methods&&dr(e,t.methods),t.data?sr(e):Ie(e._data={},!0),t.computed&&fr(e,t.computed),t.watch&&t.watch!==oe&&mr(e,t.watch)}function ar(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],o=!e.$parent;o||Te(!1);var a=function(o){i.push(o);var a=Ze(o,t,n,e);ze(r,o,a),o in e||ir(e,"_props",o)};for(var s in t)a(s);Te(!0)}function sr(e){var t=e.$options.data;t=e._data="function"===typeof t?ur(t,e):t||{},f(t)||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);while(i--){var o=n[i];0,r&&x(r,o)||H(o)||ir(e,"_data",o)}Ie(t,!0)}function ur(e,t){ye();try{return e.call(t,t)}catch(Ea){return tt(Ea,t,"data()"),{}}finally{ge()}}var cr={lazy:!0};function fr(e,t){var n=e._computedWatchers=Object.create(null),r=ue();for(var i in t){var o=t[i],a="function"===typeof o?o:o.get;0,r||(n[i]=new nr(e,a||I,I,cr)),i in e||lr(e,i,o)}}function lr(e,t,n){var r=!ue();"function"===typeof n?(rr.get=r?pr(t):hr(n),rr.set=I):(rr.get=n.get?r&&!1!==n.cache?pr(t):hr(n.get):I,rr.set=n.set||I),Object.defineProperty(e,t,rr)}function pr(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),me.target&&t.depend(),t.value}}function hr(e){return function(){return e.call(this,this)}}function dr(e,t){e.$options.props;for(var n in t)e[n]="function"!==typeof t[n]?I:T(t[n],e)}function mr(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i-1)return this;var n=C(arguments,1);return n.unshift(this),"function"===typeof e.install?e.install.apply(e,n):"function"===typeof e&&e.apply(null,n),t.push(e),this}}function Sr(e){e.mixin=function(e){return this.options=Ye(this.options,e),this}}function _r(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name;var a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=Ye(n.options,e),a["super"]=n,a.options.props&&Ar(a),a.options.computed&&Or(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,F.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=k({},a.options),i[r]=a,a}}function Ar(e){var t=e.options.props;for(var n in t)ir(e.prototype,"_props",n)}function Or(e){var t=e.options.computed;for(var n in t)lr(e.prototype,n,t[n])}function Tr(e){F.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&f(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"===typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function Cr(e){return e&&(e.Ctor.options.name||e.tag)}function kr(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"===typeof e?e.split(",").indexOf(t)>-1:!!l(e)&&e.test(t)}function Pr(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=Cr(a.componentOptions);s&&!t(s)&&Ir(n,o,r,i)}}}function Ir(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,g(n,t)}br(Er),yr(Er),Tn(Er),In(Er),gn(Er);var zr=[String,RegExp,Array],Br={name:"keep-alive",abstract:!0,props:{include:zr,exclude:zr,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Ir(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",function(t){Pr(e,function(e){return kr(t,e)})}),this.$watch("exclude",function(t){Pr(e,function(e){return!kr(t,e)})})},render:function(){var e=this.$slots.default,t=En(e),n=t&&t.componentOptions;if(n){var r=Cr(n),i=this,o=i.include,a=i.exclude;if(o&&(!r||!kr(o,r))||a&&r&&kr(a,r))return t;var s=this,u=s.cache,c=s.keys,f=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;u[f]?(t.componentInstance=u[f].componentInstance,g(c,f),c.push(f)):(u[f]=t,c.push(f),this.max&&c.length>parseInt(this.max)&&Ir(u,c[0],c,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}},Rr={KeepAlive:Br};function Dr(e){var t={get:function(){return U}};Object.defineProperty(e,"config",t),e.util={warn:he,extend:k,mergeOptions:Ye,defineReactive:ze},e.set=Be,e.delete=Re,e.nextTick=dt,e.observable=function(e){return Ie(e),e},e.options=Object.create(null),F.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,k(e.options.components,Rr),Mr(e),Sr(e),_r(e),Tr(e)}Dr(Er),Object.defineProperty(Er.prototype,"$isServer",{get:ue}),Object.defineProperty(Er.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Er,"FunctionalRenderContext",{value:Jt}),Er.version="2.6.10";var jr=v("style,class"),Lr=v("input,textarea,option,select,progress"),Fr=function(e,t,n){return"value"===n&&Lr(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},qr=v("contenteditable,draggable,spellcheck"),Ur=v("events,caret,typing,plaintext-only"),$r=function(e,t){return Yr(t)||"false"===t?"false":"contenteditable"===e&&Ur(t)?t:"true"},Hr=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Vr="http://www.w3.org/1999/xlink",Gr=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Wr=function(e){return Gr(e)?e.slice(6,e.length):""},Yr=function(e){return null==e||!1===e};function Xr(e){var t=e.data,n=e,r=e;while(i(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(t=Zr(r.data,t));while(i(n=n.parent))n&&n.data&&(t=Zr(t,n.data));return Jr(t.staticClass,t.class)}function Zr(e,t){return{staticClass:Qr(e.staticClass,t.staticClass),class:i(e.class)?[e.class,t.class]:t.class}}function Jr(e,t){return i(e)||i(t)?Qr(e,Kr(t)):""}function Qr(e,t){return e?t?e+" "+t:e:t||""}function Kr(e){return Array.isArray(e)?ei(e):u(e)?ti(e):"string"===typeof e?e:""}function ei(e){for(var t,n="",r=0,o=e.length;r-1?si[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:si[e]=/HTMLUnknownElement/.test(t.toString())}var ci=v("text,number,password,search,email,tel,url");function fi(e){if("string"===typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function li(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function pi(e,t){return document.createElementNS(ni[e],t)}function hi(e){return document.createTextNode(e)}function di(e){return document.createComment(e)}function mi(e,t,n){e.insertBefore(t,n)}function vi(e,t){e.removeChild(t)}function yi(e,t){e.appendChild(t)}function gi(e){return e.parentNode}function bi(e){return e.nextSibling}function xi(e){return e.tagName}function wi(e,t){e.textContent=t}function Ni(e,t){e.setAttribute(t,"")}var Ei=Object.freeze({createElement:li,createElementNS:pi,createTextNode:hi,createComment:di,insertBefore:mi,removeChild:vi,appendChild:yi,parentNode:gi,nextSibling:bi,tagName:xi,setTextContent:wi,setStyleScope:Ni}),Mi={create:function(e,t){Si(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Si(e,!0),Si(t))},destroy:function(e){Si(e,!0)}};function Si(e,t){var n=e.data.ref;if(i(n)){var r=e.context,o=e.componentInstance||e.elm,a=r.$refs;t?Array.isArray(a[n])?g(a[n],o):a[n]===o&&(a[n]=void 0):e.data.refInFor?Array.isArray(a[n])?a[n].indexOf(o)<0&&a[n].push(o):a[n]=[o]:a[n]=o}}var _i=new be("",{},[]),Ai=["create","activate","update","remove","destroy"];function Oi(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&i(e.data)===i(t.data)&&Ti(e,t)||o(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&r(t.asyncFactory.error))}function Ti(e,t){if("input"!==e.tag)return!0;var n,r=i(n=e.data)&&i(n=n.attrs)&&n.type,o=i(n=t.data)&&i(n=n.attrs)&&n.type;return r===o||ci(r)&&ci(o)}function Ci(e,t,n){var r,o,a={};for(r=t;r<=n;++r)o=e[r].key,i(o)&&(a[o]=r);return a}function ki(e){var t,n,a={},u=e.modules,c=e.nodeOps;for(t=0;tm?(l=r(n[g+1])?null:n[g+1].elm,E(e,l,n,d,g,o)):d>g&&S(e,t,p,m)}function O(e,t,n,r){for(var o=n;o-1?Ui(e,t,n):Hr(t)?Yr(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):qr(t)?e.setAttribute(t,$r(t,n)):Gr(t)?Yr(n)?e.removeAttributeNS(Vr,Wr(t)):e.setAttributeNS(Vr,t,n):Ui(e,t,n)}function Ui(e,t,n){if(Yr(n))e.removeAttribute(t);else{if(ee&&!te&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var $i={create:Fi,update:Fi};function Hi(e,t){var n=t.elm,o=t.data,a=e.data;if(!(r(o.staticClass)&&r(o.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Xr(t),u=n._transitionClasses;i(u)&&(s=Qr(s,Kr(u))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Vi,Gi={create:Hi,update:Hi},Wi="__r",Yi="__c";function Xi(e){if(i(e[Wi])){var t=ee?"change":"input";e[t]=[].concat(e[Wi],e[t]||[]),delete e[Wi]}i(e[Yi])&&(e.change=[].concat(e[Yi],e.change||[]),delete e[Yi])}function Zi(e,t,n){var r=Vi;return function i(){var o=t.apply(null,arguments);null!==o&&Ki(e,i,n,r)}}var Ji=at&&!(ie&&Number(ie[1])<=53);function Qi(e,t,n,r){if(Ji){var i=Wn,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}Vi.addEventListener(e,t,ae?{capture:n,passive:r}:n)}function Ki(e,t,n,r){(r||Vi).removeEventListener(e,t._wrapper||t,n)}function eo(e,t){if(!r(e.data.on)||!r(t.data.on)){var n=t.data.on||{},i=e.data.on||{};Vi=t.elm,Xi(n),xt(n,i,Qi,Ki,Zi,t.context),Vi=void 0}}var to,no={create:eo,update:eo};function ro(e,t){if(!r(e.data.domProps)||!r(t.data.domProps)){var n,o,a=t.elm,s=e.data.domProps||{},u=t.data.domProps||{};for(n in i(u.__ob__)&&(u=t.data.domProps=k({},u)),s)n in u||(a[n]="");for(n in u){if(o=u[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),o===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=o;var c=r(o)?"":String(o);io(a,c)&&(a.value=c)}else if("innerHTML"===n&&ii(a.tagName)&&r(a.innerHTML)){to=to||document.createElement("div"),to.innerHTML=""+o+"";var f=to.firstChild;while(a.firstChild)a.removeChild(a.firstChild);while(f.firstChild)a.appendChild(f.firstChild)}else if(o!==s[n])try{a[n]=o}catch(Ea){}}}}function io(e,t){return!e.composing&&("OPTION"===e.tagName||oo(e,t)||ao(e,t))}function oo(e,t){var n=!0;try{n=document.activeElement!==e}catch(Ea){}return n&&e.value!==t}function ao(e,t){var n=e.value,r=e._vModifiers;if(i(r)){if(r.number)return m(n)!==m(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}var so={create:ro,update:ro},uo=w(function(e){var t={},n=/;(?![^(]*\))/g,r=/:(.+)/;return e.split(n).forEach(function(e){if(e){var n=e.split(r);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t});function co(e){var t=fo(e.style);return e.staticStyle?k(e.staticStyle,t):t}function fo(e){return Array.isArray(e)?P(e):"string"===typeof e?uo(e):e}function lo(e,t){var n,r={};if(t){var i=e;while(i.componentInstance)i=i.componentInstance._vnode,i&&i.data&&(n=co(i.data))&&k(r,n)}(n=co(e.data))&&k(r,n);var o=e;while(o=o.parent)o.data&&(n=co(o.data))&&k(r,n);return r}var po,ho=/^--/,mo=/\s*!important$/,vo=function(e,t,n){if(ho.test(t))e.style.setProperty(t,n);else if(mo.test(n))e.style.setProperty(_(t),n.replace(mo,""),"important");else{var r=go(t);if(Array.isArray(n))for(var i=0,o=n.length;i-1?t.split(wo).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Eo(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(wo).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?e.setAttribute("class",n):e.removeAttribute("class")}}function Mo(e){if(e){if("object"===typeof e){var t={};return!1!==e.css&&k(t,So(e.name||"v")),k(t,e),t}return"string"===typeof e?So(e):void 0}}var So=w(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),_o=Z&&!te,Ao="transition",Oo="animation",To="transition",Co="transitionend",ko="animation",Po="animationend";_o&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(To="WebkitTransition",Co="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ko="WebkitAnimation",Po="webkitAnimationEnd"));var Io=Z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function zo(e){Io(function(){Io(e)})}function Bo(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),No(e,t))}function Ro(e,t){e._transitionClasses&&g(e._transitionClasses,t),Eo(e,t)}function Do(e,t,n){var r=Lo(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Ao?Co:Po,u=0,c=function(){e.removeEventListener(s,f),n()},f=function(t){t.target===e&&++u>=a&&c()};setTimeout(function(){u0&&(n=Ao,f=a,l=o.length):t===Oo?c>0&&(n=Oo,f=c,l=u.length):(f=Math.max(a,c),n=f>0?a>c?Ao:Oo:null,l=n?n===Ao?o.length:u.length:0);var p=n===Ao&&jo.test(r[To+"Property"]);return{type:n,timeout:f,propCount:l,hasTransform:p}}function Fo(e,t){while(e.length1}function Go(e,t){!0!==t.data.show&&Uo(t)}var Wo=Z?{create:Go,activate:Go,remove:function(e,t){!0!==e.data.show?$o(e,t):t()}}:{},Yo=[$i,Gi,no,so,xo,Wo],Xo=Yo.concat(Li),Zo=ki({nodeOps:Ei,modules:Xo});te&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&ia(e,"input")});var Jo={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?wt(n,"postpatch",function(){Jo.componentUpdated(e,t,n)}):Qo(e,t,n.context),e._vOptions=[].map.call(e.options,ta)):("textarea"===n.tag||ci(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",na),e.addEventListener("compositionend",ra),e.addEventListener("change",ra),te&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Qo(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,ta);if(i.some(function(e,t){return!R(e,r[t])})){var o=e.multiple?t.value.some(function(e){return ea(e,i)}):t.value!==t.oldValue&&ea(t.value,i);o&&ia(e,"change")}}}};function Qo(e,t,n){Ko(e,t,n),(ee||ne)&&setTimeout(function(){Ko(e,t,n)},0)}function Ko(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,u=e.options.length;s-1,a.selected!==o&&(a.selected=o);else if(R(ta(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function ea(e,t){return t.every(function(t){return!R(t,e)})}function ta(e){return"_value"in e?e._value:e.value}function na(e){e.target.composing=!0}function ra(e){e.target.composing&&(e.target.composing=!1,ia(e.target,"input"))}function ia(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function oa(e){return!e.componentInstance||e.data&&e.data.transition?e:oa(e.componentInstance._vnode)}var aa={bind:function(e,t,n){var r=t.value;n=oa(n);var i=n.data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Uo(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value,i=t.oldValue;if(!r!==!i){n=oa(n);var o=n.data&&n.data.transition;o?(n.data.show=!0,r?Uo(n,function(){e.style.display=e.__vOriginalDisplay}):$o(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none"}},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}},sa={model:Jo,show:aa},ua={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ca(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?ca(En(t.children)):e}function fa(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[E(o)]=i[o];return t}function la(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function pa(e){while(e=e.parent)if(e.data.transition)return!0}function ha(e,t){return t.key===e.key&&t.tag===e.tag}var da=function(e){return e.tag||Nn(e)},ma=function(e){return"show"===e.name},va={name:"transition",props:ua,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(da),n.length)){0;var r=this.mode;0;var i=n[0];if(pa(this.$vnode))return i;var o=ca(i);if(!o)return i;if(this._leaving)return la(e,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var u=(o.data||(o.data={})).transition=fa(this),c=this._vnode,f=ca(c);if(o.data.directives&&o.data.directives.some(ma)&&(o.data.show=!0),f&&f.data&&!ha(o,f)&&!Nn(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=k({},u);if("out-in"===r)return this._leaving=!0,wt(l,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),la(e,i);if("in-out"===r){if(Nn(o))return c;var p,h=function(){p()};wt(u,"afterEnter",h),wt(u,"enterCancelled",h),wt(l,"delayLeave",function(e){p=e})}}return i}}},ya=k({tag:String,moveClass:String},ua);delete ya.mode;var ga={props:ya,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=kn(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=fa(this),s=0;s=0||t.predictable?Math.log2?Math.log2(n):Math.log(n)/Math.LN2:a(new e.Complex(n,0))},Complex:a,BigNumber:function(n){return!n.isNegative()||t.predictable?n.log(2):a(new e.Complex(n.toNumber(),0))},"Array | Matrix":function(e){return r(e,o)}});function a(t){var n=Math.sqrt(t.re*t.re+t.im*t.im);return new e.Complex(Math.log2?Math.log2(n):Math.log(n)/Math.LN2,Math.atan2(t.im,t.re)/Math.LN2)}return o.toTex="\\log_{2}\\left(${args[0]}\\right)",o}t.name="log2",t.factory=i},"2f39":function(e,t,n){"use strict";var r=n("6762").clone,i=n("d7df").isInteger;function o(e){function t(r){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._isScalar=!0;for(var i=0,o=arguments.length;i0?1:-1:r(i,a);if("Array"===i||"Matrix"===i||"Array"===a||"Matrix"===a)return n=l(e,t),0!==n?n:r(i,a);if(i!==a)return r(i,a);if("Complex"===i)return o(e,t);if("Unit"===i)return e.equalBase(t)?f(e.value,t.value):p(e.formatUnits(),t.formatUnits());if("boolean"===i)return c(e,t);if("string"===i)return r(e,t);if("Object"===i)return h(e,t);if("null"===i)return 0;if("undefined"===i)return 0;throw new TypeError('Unsupported type of value "'+i+'"')}});function l(t,n){return e.isSparseMatrix(t)&&e.isSparseMatrix(n)?p(t.toJSON().values,n.toJSON().values):e.isSparseMatrix(t)?l(t.toArray(),n):e.isSparseMatrix(n)?l(t,n.toArray()):e.isDenseMatrix(t)?l(t.toJSON().data,n):e.isDenseMatrix(n)?l(t,n.toJSON().data):Array.isArray(t)?Array.isArray(n)?p(t,n):l(t,[n]):l([t],n)}function p(e,t){for(var n=0,r=Math.min(e.length,t.length);nt.length?1:e.lengtht.re?1:e.ret.im?1:e.im1?arguments[1]:void 0)}})},"2ff4":function(e,t,n){"use strict";var r=n("d6cb");function i(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}t.name="sqrt",t.factory=i},"2fff":function(e,t,n){"use strict";function r(){var e=function(e,t,n,r,i,o,a){var s=0;n[a]=e;while(s>=0){var u=n[a+s],c=n[r+u];-1===c?(s--,o[t++]=u):(n[r+u]=n[i+c],++s,n[a+s]=c)}return t};return e}t.name="csTdfs",t.path="algebra.sparse",t.factory=r},3064:function(e,t,n){"use strict";e.exports=[n("333f"),n("5a7e"),n("fbab"),n("1627"),n("a80b"),n("8f12"),n("52c3"),n("6b10"),n("61dc"),n("415c")]},"308d":function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("7618"),i=n("013f");function o(e,t){return!t||"object"!==Object(r["a"])(t)&&"function"!==typeof t?Object(i["a"])(e):t}},"308f":function(e,t,n){"use strict";var r=n("d6cb");function i(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}t.name="bignumber",t.factory=i},3094:function(e,t,n){"use strict";e.exports={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dim)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","var"]}},"30a9":function(e,t,n){"use strict";var r=n("b13c"),i=n("d7df").isInteger;function o(e,t,o,a){var s=o(n("4781")),u=a("identity",{"":function(){return"Matrix"===t.matrix?s([]):[]},string:function(e){return s(e)},"number | BigNumber":function(e){return f(e,e,"Matrix"===t.matrix?"default":void 0)},"number | BigNumber, string":function(e,t){return f(e,e,t)},"number | BigNumber, number | BigNumber":function(e,n){return f(e,n,"Matrix"===t.matrix?"default":void 0)},"number | BigNumber, number | BigNumber, string":function(e,t,n){return f(e,t,n)},Array:function(e){return c(e)},"Array, string":function(e,t){return c(e,t)},Matrix:function(e){return c(e.valueOf(),e.storage())},"Matrix, string":function(e,t){return c(e.valueOf(),t)}});return u.toTex=void 0,u;function c(e,t){switch(e.length){case 0:return t?s(t):[];case 1:return f(e[0],e[0],t);case 2:return f(e[0],e[1],t);default:throw new Error("Vector containing two values expected")}}function f(t,n,o){var a=e.isBigNumber(t)||e.isBigNumber(n)?e.BigNumber:null;if(e.isBigNumber(t)&&(t=t.toNumber()),e.isBigNumber(n)&&(n=n.toNumber()),!i(t)||t<1)throw new Error("Parameters in function identity must be positive integers");if(!i(n)||n<1)throw new Error("Parameters in function identity must be positive integers");var s=a?new e.BigNumber(1):1,u=a?new a(0):0,c=[t,n];if(o){var f=e.Matrix.storage(o);return f.diagonal(c,s,0,u)}for(var l=r.resize([],c,u),p=t":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},A={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},O={true:!0,false:!1,null:null,undefined:void 0},T=["NaN","Infinity"];function C(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:S.NULL,nestingLevel:0,conditionalLevel:null}}function k(e,t){return e.expression.substr(e.index,t)}function P(e){return k(e,1)}function I(e){e.index++}function z(e){return e.expression.charAt(e.index-1)}function B(e){return e.expression.charAt(e.index+1)}function R(e){e.tokenType=S.NULL,e.token="",e.comment="";while(M.isWhitespace(P(e),e.nestingLevel))I(e);if("#"===P(e))while("\n"!==P(e)&&""!==P(e))e.comment+=P(e),I(e);if(""!==P(e)){if("\n"===P(e)&&!e.nestingLevel)return e.tokenType=S.DELIMITER,e.token=P(e),void I(e);var t=P(e),n=k(e,2),r=k(e,3);if(3===r.length&&_[r])return e.tokenType=S.DELIMITER,e.token=r,I(e),I(e),void I(e);if(2===n.length&&_[n])return e.tokenType=S.DELIMITER,e.token=n,I(e),void I(e);if(_[t])return e.tokenType=S.DELIMITER,e.token=t,void I(e);if(M.isDigitDot(t)){if(e.tokenType=S.NUMBER,"."===P(e))e.token+=P(e),I(e),M.isDigit(P(e))||(e.tokenType=S.DELIMITER);else{while(M.isDigit(P(e)))e.token+=P(e),I(e);M.isDecimalMark(P(e),B(e))&&(e.token+=P(e),I(e))}while(M.isDigit(P(e)))e.token+=P(e),I(e);if("E"===P(e)||"e"===P(e))if(M.isDigit(B(e))||"-"===B(e)||"+"===B(e)){if(e.token+=P(e),I(e),"+"!==P(e)&&"-"!==P(e)||(e.token+=P(e),I(e)),!M.isDigit(P(e)))throw we(e,'Digit expected, got "'+P(e)+'"');while(M.isDigit(P(e)))e.token+=P(e),I(e);if(M.isDecimalMark(P(e),B(e)))throw we(e,'Digit expected, got "'+P(e)+'"')}else if("."===B(e))throw I(e),we(e,'Digit expected, got "'+P(e)+'"')}else{if(!M.isAlpha(P(e),z(e),B(e))){e.tokenType=S.UNKNOWN;while(""!==P(e))e.token+=P(e),I(e);throw we(e,'Syntax error in part "'+e.token+'"')}while(M.isAlpha(P(e),z(e),B(e))||M.isDigit(P(e)))e.token+=P(e),I(e);A.hasOwnProperty(e.token)?e.tokenType=S.DELIMITER:e.tokenType=S.SYMBOL}}else e.tokenType=S.DELIMITER}function D(e){do{R(e)}while("\n"===e.token)}function j(e){e.nestingLevel++}function L(e){e.nestingLevel--}function F(e,t){var n=C();r(n,{expression:e,extraNodes:t}),R(n);var i=q(n);if(""!==n.token)throw n.tokenType===S.DELIMITER?Ne(n,"Unexpected operator "+n.token):we(n,'Unexpected part "'+n.token+'"');return i}function q(e){var t,n,r=[];""!==e.token&&"\n"!==e.token&&";"!==e.token&&(t=U(e),t.comment=e.comment);while("\n"===e.token||";"===e.token)0===r.length&&t&&(n=";"!==e.token,r.push({node:t,visible:n})),R(e),"\n"!==e.token&&";"!==e.token&&""!==e.token&&(t=U(e),t.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),t.comment=e.comment),t)}function U(t){var n,r,i,o,a=$(t);if("="===t.token){if(e.isSymbolNode(a))return n=a.name,D(t),i=U(t),new l(new E(n),i);if(e.isAccessorNode(a))return D(t),i=U(t),new l(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 D(t),i=U(t),new m(n,r,i);throw we(t,"Invalid left hand side of assignment operator =")}return a}function $(e){var t=H(e);while("?"===e.token){var n=e.conditionalLevel;e.conditionalLevel=e.nestingLevel,D(e);var r=t,i=U(e);if(":"!==e.token)throw we(e,"False part of conditional expression expected");e.conditionalLevel=null,D(e);var o=U(e);t=new h(r,i,o),e.conditionalLevel=n}return t}function H(e){var t=V(e);while("or"===e.token)D(e),t=new g("or","or",[t,V(e)]);return t}function V(e){var t=G(e);while("xor"===e.token)D(e),t=new g("xor","xor",[t,G(e)]);return t}function G(e){var t=W(e);while("and"===e.token)D(e),t=new g("and","and",[t,W(e)]);return t}function W(e){var t=Y(e);while("|"===e.token)D(e),t=new g("|","bitOr",[t,Y(e)]);return t}function Y(e){var t=X(e);while("^|"===e.token)D(e),t=new g("^|","bitXor",[t,X(e)]);return t}function X(e){var t=Z(e);while("&"===e.token)D(e),t=new g("&","bitAnd",[t,Z(e)]);return t}function Z(e){var t=[J(e)],n=[],r={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};while(r.hasOwnProperty(e.token)){var i={name:e.token,fn:r[e.token]};n.push(i),D(e),t.push(J(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 J(e){var t,n,r,i,o;t=Q(e),n={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};while(n.hasOwnProperty(e.token))r=e.token,i=n[r],D(e),o=[t,Q(e)],t=new g(r,i,o);return t}function Q(e){var t,n,r,i,o;t=K(e),n={to:"to",in:"to"};while(n.hasOwnProperty(e.token))r=e.token,i=n[r],D(e),"in"===r&&""===e.token?t=new g("*","multiply",[t,new E("in")],!0):(o=[t,K(e)],t=new g(r,i,o));return t}function K(e){var t,n=[];if(t=":"===e.token?new d(1):ee(e),":"===e.token&&e.conditionalLevel!==e.nestingLevel){n.push(t);while(":"===e.token&&n.length<3)D(e),")"===e.token||"]"===e.token||","===e.token||""===e.token?n.push(new E("end")):n.push(ee(e));t=3===n.length?new w(n[0],n[2],n[1]):new w(n[0],n[1])}return t}function ee(e){var t,n,r,i,o;t=te(e),n={"+":"add","-":"subtract"};while(n.hasOwnProperty(e.token))r=e.token,i=n[r],D(e),o=[t,te(e)],t=new g(r,i,o);return t}function te(e){var t,n,r,i,o;t=ne(e),n=t,r={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};while(1){if(!r.hasOwnProperty(e.token))break;i=e.token,o=r[i],D(e),n=ne(e),t=new g(i,o,[t,n])}return t}function ne(t){var n,r;n=re(t),r=n;while(1){if(!(t.tokenType===S.SYMBOL||"in"===t.token&&e.isConstantNode(n))&&(t.tokenType!==S.NUMBER||e.isConstantNode(r)||e.isOperatorNode(r)&&"!"!==r.op)&&"("!==t.token)break;r=re(t),n=new g("*","multiply",[n,r],!0)}return n}function re(t){var n=ie(t),i=n,o=[];while(1){if("/"!==t.token||!e.isConstantNode(i))break;if(o.push(r({},t)),D(t),t.tokenType!==S.NUMBER){r(t,o.pop());break}if(o.push(r({},t)),D(t),t.tokenType!==S.SYMBOL&&"("!==t.token){o.pop(),r(t,o.pop());break}r(t,o.pop()),o.pop(),i=ie(t),n=new g("/","divide",[n,i])}return n}function ie(e){var t,n,r,i={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return i.hasOwnProperty(e.token)?(r=i[e.token],t=e.token,D(e),n=[ie(e)],new g(t,r,n)):oe(e)}function oe(e){var t,n,r,i;return t=ae(e),"^"!==e.token&&".^"!==e.token||(n=e.token,r="^"===n?"pow":"dotPow",D(e),i=[t,ie(e)],t=new g(n,r,i)),t}function ae(e){var t,n,r,i,o;t=se(e),n={"!":"factorial","'":"ctranspose"};while(n.hasOwnProperty(e.token))r=e.token,i=n[r],R(e),o=[t],t=new g(r,i,o),t=ce(e,t);return t}function se(e){var t=[];if(e.tokenType===S.SYMBOL&&e.extraNodes.hasOwnProperty(e.token)){var n=e.extraNodes[e.token];if(R(e),"("===e.token){if(t=[],j(e),R(e),")"!==e.token){t.push(U(e));while(","===e.token)R(e),t.push(U(e))}if(")"!==e.token)throw we(e,"Parenthesis ) expected");L(e),R(e)}return new n(t)}return ue(e)}function ue(e){var t,n;return e.tokenType===S.SYMBOL||e.tokenType===S.DELIMITER&&e.token in A?(n=e.token,R(e),t=O.hasOwnProperty(n)?new d(O[n]):-1!==T.indexOf(n)?new d(u(n,"number")):new E(n),t=ce(e,t),t):fe(e)}function ce(t,n,r){var i;while(("("===t.token||"["===t.token||"."===t.token)&&(!r||-1!==r.indexOf(t.token)))if(i=[],"("===t.token){if(!e.isSymbolNode(n)&&!e.isAccessorNode(n))return n;if(j(t),R(t),")"!==t.token){i.push(U(t));while(","===t.token)R(t),i.push(U(t))}if(")"!==t.token)throw we(t,"Parenthesis ) expected");L(t),R(t),n=new x(n,i)}else if("["===t.token){if(j(t),R(t),"]"!==t.token){i.push(U(t));while(","===t.token)R(t),i.push(U(t))}if("]"!==t.token)throw we(t,"Parenthesis ] expected");L(t),R(t),n=new c(n,new v(i))}else{if(R(t),t.tokenType!==S.SYMBOL)throw we(t,"Property name expected after dot");i.push(new d(t.token)),R(t);var o=!0;n=new c(n,new v(i,o))}return n}function fe(e){var t,n;return'"'===e.token?(n=le(e),t=new d(n),t=ce(e,t),t):pe(e)}function le(e){var t="";while(""!==P(e)&&'"'!==P(e))"\\"===P(e)&&(t+=P(e),I(e)),t+=P(e),I(e);if(R(e),'"'!==e.token)throw we(e,'End of string " expected');return R(e),JSON.parse('"'+t+'"')}function pe(e){var t,n;return"'"===e.token?(n=he(e),t=new d(n),t=ce(e,t),t):de(e)}function he(e){var t="";while(""!==P(e)&&"'"!==P(e))"\\"===P(e)&&(t+=P(e),I(e)),t+=P(e),I(e);if(R(e),"'"!==e.token)throw we(e,"End of string ' expected");return R(e),JSON.parse('"'+t+'"')}function de(e){var t,n,r,i;if("["===e.token){if(j(e),R(e),"]"!==e.token){var o=me(e);if(";"===e.token){r=1,n=[o];while(";"===e.token)R(e),n[r]=me(e),r++;if("]"!==e.token)throw we(e,"End of matrix ] expected");L(e),R(e),i=n[0].items.length;for(var a=1;a0},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}t.name="parse",t.path="expression",t.factory=a},"31f4":function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},"323a":function(e,t,n){"use strict";e.exports={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]}},"32a2":function(e,t,n){"use strict";var r=n("5fc9");function i(e,t,i,o){var a=i(n("863e")),s=e.SparseMatrix,u=function(e,t,n){var i=e._values,u=e._index,c=e._ptr,f=e._size,l=e._datatype,p=t._values,h=t._index,d=t._ptr,m=t._size,v=t._datatype;if(f.length!==m.length)throw new r(f.length,m.length);if(f[0]!==m[0]||f[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+m+")");var y,g=f[0],b=f[1],x=a,w=0,N=n;"string"===typeof l&&l===v&&(y=l,x=o.find(a,[y,y]),w=o.convert(0,y),N=o.find(n,[y,y]));var E,M,S,_,A,O=i&&p?[]:void 0,T=[],C=[],k=new s({values:O,index:T,ptr:C,size:[g,b],datatype:y}),P=i&&p?[]:void 0,I=i&&p?[]:void 0,z=[],B=[];for(M=0;Me)throw new TypeError("second argument k must be less than or equal to first argument n");return u(e-t+1,e)},"BigNumber, BigNumber":function(t,n){var r,i;if(!o(t)||!o(n))throw new TypeError("Positive integer value expected in function permutations");if(n.gt(t))throw new TypeError("second argument k must be less than or equal to first argument n");for(r=new e.BigNumber(1),i=t.minus(n).plus(1);i.lte(t);i=i.plus(1))r=r.times(i);return r}});return c.toTex=void 0,c}function o(e){return e.isInteger()&&e.gte(0)}t.name="permutations",t.factory=i},"33a4":function(e,t,n){var r=n("84f2"),i=n("2b4c")("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},3447:function(e,t,n){"use strict";var r=n("6762").extend;function i(e,t,i,o){var a=i(n("4781")),s=i(n("5d7b")),u=n("6c54"),c=i(n("797d")),f=i(n("32a2")),l=i(n("bfee")),p=i(n("cdb0")),h=i(n("04b6")),d=o("add",r({"DenseMatrix, DenseMatrix":function(e,t){return p(e,t,s)},"DenseMatrix, SparseMatrix":function(e,t){return c(e,t,s,!1)},"SparseMatrix, DenseMatrix":function(e,t){return c(t,e,s,!0)},"SparseMatrix, SparseMatrix":function(e,t){return f(e,t,s)},"Array, Array":function(e,t){return d(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return d(a(e),t)},"Matrix, Array":function(e,t){return d(e,a(t))},"DenseMatrix, any":function(e,t){return h(e,t,s,!1)},"SparseMatrix, any":function(e,t){return l(e,t,s,!1)},"any, DenseMatrix":function(e,t){return h(t,e,s,!0)},"any, SparseMatrix":function(e,t){return l(t,e,s,!0)},"Array, any":function(e,t){return h(a(e),t,s,!1).valueOf()},"any, Array":function(e,t){return h(a(t),e,s,!0).valueOf()},"any, any":s,"any, any, ...any":function(e,t,n){for(var r=d(e,t),i=0;iA)for(var T=0,C=0;Ci)return e.substring(0,i);if(e.length1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);while(c>s)t[s++]=e;return t}},"36c3":function(e,t,n){var r=n("335c"),i=n("25eb");e.exports=function(e){return r(i(e))}},"36c7":function(e,t,n){"use strict";function r(e,t,r,i){var o=n("6c54"),a=r(n("4781")),s=r(n("f5ae")),u=r(n("05d3")),c=r(n("e1fc")),f=r(n("d5de")),l=r(n("9ebd")),p=r(n("cdb0")),h=r(n("04b6")),d=i("and",{"number, number":function(e,t){return!(!e||!t)},"Complex, Complex":function(e,t){return(0!==e.re||0!==e.im)&&(0!==t.re||0!==t.im)},"BigNumber, BigNumber":function(e,t){return!e.isZero()&&!t.isZero()&&!e.isNaN()&&!t.isNaN()},"Unit, Unit":function(e,t){return d(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return f(e,t,d,!1)},"SparseMatrix, DenseMatrix":function(e,t){return c(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return c(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return p(e,t,d)},"Array, Array":function(e,t){return d(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return d(a(e),t)},"Matrix, Array":function(e,t){return d(e,a(t))},"SparseMatrix, any":function(e,t){return u(t)?s(e.size(),e.storage()):l(e,t,d,!1)},"DenseMatrix, any":function(e,t){return u(t)?s(e.size(),e.storage()):h(e,t,d,!1)},"any, SparseMatrix":function(e,t){return u(e)?s(e.size(),e.storage()):l(t,e,d,!0)},"any, DenseMatrix":function(e,t){return u(e)?s(e.size(),e.storage()):h(t,e,d,!0)},"Array, any":function(e,t){return d(a(e),t).valueOf()},"any, Array":function(e,t){return d(e,a(t)).valueOf()}});return d.toTex={2:"\\left(${args[0]}".concat(o.operators["and"],"${args[1]}\\right)")},d}t.name="and",t.factory=r},3702:function(e,t,n){var r=n("481b"),i=n("5168")("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},3798:function(e,t,n){"use strict";var r=n("d7df").isInteger,i=n("d7df").toFixed,o=n("d6cb"),a="Number of decimals in function round must be an integer";function s(e,t,i,s){var c=i(n("4781")),f=i(n("863e")),l=i(n("f5ae")),p=i(n("9ebd")),h=i(n("ff3e")),d=i(n("04b6")),m=s("round",{number:function(e){return u(e,0)},"number, number":function(e,t){if(!r(t))throw new TypeError(a);if(t<0||t>15)throw new Error("Number of decimals in function round must be in te range of 0-15");return u(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,m,!0)},"SparseMatrix, number | BigNumber":function(e,t){return p(e,t,m,!1)},"DenseMatrix, number | BigNumber":function(e,t){return d(e,t,m,!1)},"number | Complex | BigNumber, SparseMatrix":function(e,t){return f(e,0)?l(t.size(),t.storage()):h(t,e,m,!0)},"number | Complex | BigNumber, DenseMatrix":function(e,t){return f(e,0)?l(t.size(),t.storage()):d(t,e,m,!0)},"Array, number | BigNumber":function(e,t){return d(c(e),t,m,!1).valueOf()},"number | Complex | BigNumber, Array":function(e,t){return d(c(t),e,m,!0).valueOf()}});return m.toTex={1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},m}function u(e,t){return parseFloat(i(e,t))}t.name="round",t.factory=s},3837:function(e,t,n){"use strict";e.exports={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]}},3846:function(e,t,n){n("9e1e")&&"g"!=/./g.flags&&n("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:n("0bfb")})},"384a":function(e,t,n){"use strict";e.exports={name:"eval",category:"Expression",syntax:["eval(expression)","eval([expr1, expr2, expr3, ...])"],description:"Evaluate an expression or an array with expressions.",examples:['eval("2 + 3")','eval("sqrt(" + 4 + ")")'],seealso:[]}},"386d":function(e,t,n){"use strict";var r=n("cb7c"),i=n("83a1"),o=n("5f1b");n("214f")("search",1,function(e,t,n,a){return[function(n){var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=a(n,e,this);if(t.done)return t.value;var s=r(e),u=String(this),c=s.lastIndex;i(c,0)||(s.lastIndex=0);var f=o(s,u);return i(s.lastIndex,c)||(s.lastIndex=c),null===f?-1:f.index}]})},"38fd":function(e,t,n){var r=n("69a8"),i=n("4bf8"),o=n("613b")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},"39e7":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("d05c")),a=i("hasNumericValue",{string:function(e){return e.trim().length>0&&!isNaN(Number(e))},any:function(e){return o(e)}});return a}t.name="hasNumericValue",t.factory=r},"3a38":function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},"3a9a":function(e,t,n){"use strict";e.exports={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]}},"3ae7":function(e,t,n){"use strict";e.exports={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]}},"3b53":function(e,t,n){"use strict";var r=n("5fc9");function i(e,t,r,i){var a=n("6c54"),s=r(n("4781")),u=r(n("5d7b")),c=r(n("ec38")),f=r(n("797d")),l=r(n("858b")),p=r(n("6573")),h=r(n("bfee")),d=r(n("cdb0")),m=r(n("04b6")),v=i("subtract",{"number, number":function(e,t){return e-t},"Complex, Complex":function(e,t){return e.sub(t)},"BigNumber, BigNumber":function(e,t){return e.minus(t)},"Fraction, Fraction":function(e,t){return e.sub(t)},"Unit, Unit":function(e,t){if(null===e.value)throw new Error("Parameter x contains a unit with undefined value");if(null===t.value)throw new Error("Parameter y contains a unit with undefined value");if(!e.equalBase(t))throw new Error("Units do not match");var n=e.clone();return n.value=v(n.value,t.value),n.fixPrefix=!1,n},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t),p(e,t,v)},"SparseMatrix, DenseMatrix":function(e,t){return o(e,t),l(t,e,v,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t),f(e,t,v,!1)},"DenseMatrix, DenseMatrix":function(e,t){return o(e,t),d(e,t,v)},"Array, Array":function(e,t){return v(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return v(s(e),t)},"Matrix, Array":function(e,t){return v(e,s(t))},"SparseMatrix, any":function(e,t){return h(e,c(t),u)},"DenseMatrix, any":function(e,t){return m(e,t,v)},"any, SparseMatrix":function(e,t){return h(t,e,v,!0)},"any, DenseMatrix":function(e,t){return m(t,e,v,!0)},"Array, any":function(e,t){return m(s(e),t,v,!1).valueOf()},"any, Array":function(e,t){return m(s(t),e,v,!0).valueOf()}});return v.toTex={2:"\\left(${args[0]}".concat(a.operators["subtract"],"${args[1]}\\right)")},v}function o(e,t){var n=e.size(),i=t.size();if(n.length!==i.length)throw new r(n.length,i.length)}t.name="subtract",t.factory=i},"3c8d":function(e,t,n){"use strict";e.exports={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]}},"3d75":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},r(e)}var i=n("d7df").format,o=n("0eaf").format,a=n("a6f4");function s(e,n){if(Array.isArray(e)){for(var r="[",i=e.length,o=0;o/g,">"),t}},"3d89":function(e,t,n){"use strict";e.exports=[n("c430"),n("1356"),n("bbdf"),n("9c35"),n("cf41"),n("339f"),n("f523"),n("86ef"),n("d4f0")]},"3d89a":function(e,t,n){"use strict";e.exports={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]}},"3d95":function(e,t,n){"use strict";e.exports={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]}},"3db8":function(e,t,n){"use strict";var r=n("d6cb"),i=n("d7df");function o(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}t.name="isInteger",t.factory=o},"3e33":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("7d3c")),a=r(n("3447")),s=r(n("09a6")),u=r(n("13ce")),c=r(n("2ff4")),f=r(n("354f")),l=r(n("863e")),p=r(n("1fe4")),h=r(n("9b87")),d=r(n("4781")),m=i("norm",{number:Math.abs,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},boolean:function(e){return Math.abs(e)},Array:function(e){return v(d(e),2)},Matrix:function(e){return v(e,2)},"number | Complex | BigNumber | boolean, number | BigNumber | string":function(e){return m(e)},"Array, number | BigNumber | string":function(e,t){return v(d(e),t)},"Matrix, number | BigNumber | string":function(e,t){return v(e,t)}});function v(e,t){var n=e.size();if(1===n.length){if(t===Number.POSITIVE_INFINITY||"inf"===t){var r=0;return e.forEach(function(e){var t=o(e);p(t,r)&&(r=t)},!0),r}var i;if(t===Number.NEGATIVE_INFINITY||"-inf"===t)return e.forEach(function(e){var t=o(e);i&&!h(t,i)||(i=t)},!0),i||0;if("fro"===t)return v(e,2);if("number"===typeof t&&!isNaN(t)){if(!l(t,0)){var d=0;return e.forEach(function(e){d=a(s(o(e),t),d)},!0),s(d,1/t)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}if(2===n.length){if(1===t){var m=[],y=0;return e.forEach(function(e,t){var n=t[1],r=a(m[n]||0,o(e));p(r,y)&&(y=r),m[n]=r},!0),y}if(t===Number.POSITIVE_INFINITY||"inf"===t){var g=[],b=0;return e.forEach(function(e,t){var n=t[0],r=a(g[n]||0,o(e));p(r,b)&&(b=r),g[n]=r},!0),b}if("fro"===t){var x=0;return e.forEach(function(e,t){x=a(x,f(e,u(e)))}),o(c(x))}if(2===t)throw new Error("Unsupported parameter value, missing implementation of matrix singular value decomposition");throw new Error("Unsupported parameter value")}}return m.toTex={1:"\\left\\|${args[0]}\\right\\|",2:void 0},m}t.name="norm",t.factory=r},"3e88":function(e,t,n){"use strict";e.exports=[n("5334"),n("ecf7"),n("1f2d"),n("6f54"),n("29ab"),n("3147"),n("fd4c")]},"3f29":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("5d7b")),a=r(n("3b53")),s=r(n("a226")),u=r(n("58f1")),c=r(n("ec38")),f=r(n("2ff4")),l=r(n("7d3c")),p=i("distance",{"Array, Array, Array":function(e,t,n){if(2===e.length&&2===t.length&&2===n.length){if(!d(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!d(t))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!d(n))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");var r=u(a(n[1],n[0]),a(t[1],t[0])),i=s(s(r,r),t[0]),o=c(s(r,t[0])),f=e[1];return b(e[0],e[1],i,o,f)}throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(e,t,n){if(2===Object.keys(e).length&&2===Object.keys(t).length&&2===Object.keys(n).length){if(!d(e))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!d(t))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!d(n))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(e.hasOwnProperty("pointX")&&e.hasOwnProperty("pointY")&&t.hasOwnProperty("lineOnePtX")&&t.hasOwnProperty("lineOnePtY")&&n.hasOwnProperty("lineTwoPtX")&&n.hasOwnProperty("lineTwoPtY")){var r=u(a(n.lineTwoPtY,n.lineTwoPtX),a(t.lineOnePtY,t.lineOnePtX)),i=s(s(r,r),t.lineOnePtX),o=c(s(r,t.lineOnePtX)),f=e.pointX;return b(e.pointX,e.pointY,i,o,f)}throw new TypeError("Key names do not match")}throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(e,t){if(2===e.length&&3===t.length){if(!d(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!m(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return b(e[0],e[1],t[0],t[1],t[2])}if(3===e.length&&6===t.length){if(!m(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!v(t))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return x(e[0],e[1],e[2],t[0],t[1],t[2],t[3],t[4],t[5])}if(2===e.length&&2===t.length){if(!d(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!d(t))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");return w(e[0],e[1],t[0],t[1])}if(3===e.length&&3===t.length){if(!m(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!m(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return N(e[0],e[1],e[2],t[0],t[1],t[2])}throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(e,t){if(2===Object.keys(e).length&&3===Object.keys(t).length){if(!d(e))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!m(t))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if(e.hasOwnProperty("pointX")&&e.hasOwnProperty("pointY")&&t.hasOwnProperty("xCoeffLine")&&t.hasOwnProperty("yCoeffLine")&&t.hasOwnProperty("constant"))return b(e.pointX,e.pointY,t.xCoeffLine,t.yCoeffLine,t.constant);throw new TypeError("Key names do not match")}if(3===Object.keys(e).length&&6===Object.keys(t).length){if(!m(e))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!v(t))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if(e.hasOwnProperty("pointX")&&e.hasOwnProperty("pointY")&&t.hasOwnProperty("x0")&&t.hasOwnProperty("y0")&&t.hasOwnProperty("z0")&&t.hasOwnProperty("a")&&t.hasOwnProperty("b")&&t.hasOwnProperty("c"))return x(e.pointX,e.pointY,e.pointZ,t.x0,t.y0,t.z0,t.a,t.b,t.c);throw new TypeError("Key names do not match")}if(2===Object.keys(e).length&&2===Object.keys(t).length){if(!d(e))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!d(t))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if(e.hasOwnProperty("pointOneX")&&e.hasOwnProperty("pointOneY")&&t.hasOwnProperty("pointTwoX")&&t.hasOwnProperty("pointTwoY"))return w(e.pointOneX,e.pointOneY,t.pointTwoX,t.pointTwoY);throw new TypeError("Key names do not match")}if(3===Object.keys(e).length&&3===Object.keys(t).length){if(!m(e))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!m(t))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if(e.hasOwnProperty("pointOneX")&&e.hasOwnProperty("pointOneY")&&e.hasOwnProperty("pointOneZ")&&t.hasOwnProperty("pointTwoX")&&t.hasOwnProperty("pointTwoY")&&t.hasOwnProperty("pointTwoZ"))return N(e.pointOneX,e.pointOneY,e.pointOneZ,t.pointTwoX,t.pointTwoY,t.pointTwoZ);throw new TypeError("Key names do not match")}throw new TypeError("Invalid Arguments: Try again")},Array:function(e){if(!g(e))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return E(e)}});function h(t){return"number"===typeof t||e.isBigNumber(t)}function d(e){return e.constructor!==Array&&(e=y(e)),h(e[0])&&h(e[1])}function m(e){return e.constructor!==Array&&(e=y(e)),h(e[0])&&h(e[1])&&h(e[2])}function v(e){return e.constructor!==Array&&(e=y(e)),h(e[0])&&h(e[1])&&h(e[2])&&h(e[3])&&h(e[4])&&h(e[5])}function y(e){for(var t=Object.keys(e),n=[],r=0;r2||r(t).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(e.length)+", y = "+JSON.stringify(t.length)+")");var n=[],i=[];return e.map(function(e){return t.map(function(t){return i=[],n.push(i),e.map(function(e){return t.map(function(t){return i.push(s(e,t))})})})})&&n}}t.name="kron",t.factory=i},"3f4e":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("unit",{Unit:function(e){return e.clone()},string:function(t){return e.Unit.isValuelessUnit(t)?new e.Unit(null,t):e.Unit.parse(t,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string":function(t,n){return new e.Unit(t,n)},"Array | Matrix":function(e){return r(e,o)}});return o.toTex={1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},o}t.name="unit",t.factory=i},"3fcc":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("3147")),a=r(n("452b")),s=r(n("baf0")),u=r(n("e85e")),c=r(n("b940")),f=r(n("ee51")),l=r(n("922a")),p=r(n("67e5")),h=r(n("badf")),d=r(n("fbaa")),m=r(n("157d")),v=i("derivative",{"Node, SymbolNode, Object":function(e,t,n){var r={};g(r,e,t.name);var i=b(e,r);return n.simplify?a(i):i},"Node, SymbolNode":function(e,t){return v(e,t,{simplify:!0})},"string, SymbolNode":function(e,t){return v(o(e),t)},"string, SymbolNode, Object":function(e,t,n){return v(o(e),t,n)},"string, string":function(e,t){return v(o(e),o(t))},"string, string, Object":function(e,t,n){return v(o(e),o(t),n)},"Node, string":function(e,t){return v(e,o(t))},"Node, string, Object":function(e,t,n){return v(e,o(t),n)}});v._simplify=!0,v.toTex=function(e){return y.apply(null,e.args)};var y=i("_derivTex",{"Node, SymbolNode":function(t,n){return e.isConstantNode(t)&&"string"===c(t.value)?y(o(t.value).toString(),n.toString(),1):y(t.toString(),n.toString(),1)},"Node, ConstantNode":function(e,t){if("string"===c(t.value))return y(e,o(t.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(e,t,n){return y(e.toString(),t.name,n.value)},"string, string, number":function(e,t,n){var r;return r=1===n?"{d\\over d"+t+"}":"{d^{"+n+"}\\over d"+t+"^{"+n+"}}",r+"\\left[".concat(e,"\\right]")}}),g=i("constTag",{"Object, ConstantNode, string":function(e,t){return e[t]=!0,!0},"Object, SymbolNode, string":function(e,t,n){return t.name!==n&&(e[t]=!0,!0)},"Object, ParenthesisNode, string":function(e,t,n){return g(e,t.content,n)},"Object, FunctionAssignmentNode, string":function(e,t,n){return-1===t.params.indexOf(n)?(e[t]=!0,!0):g(e,t.expr,n)},"Object, FunctionNode | OperatorNode, string":function(e,t,n){if(t.args.length>0){for(var r=g(e,t.args[0],n),i=1;i0){var i=t.args.filter(function(e){return void 0===n[e]}),o=1===i.length?i[0]:new h("*","multiply",i),a=r.concat(b(o,n));return new h("*","multiply",a)}return new h("+","add",t.args.map(function(e){return new h("*","multiply",t.args.map(function(t){return t===e?b(t,n):t.clone()}))}))}if("/"===t.op&&t.isBinary()){var c=t.args[0],f=t.args[1];return void 0!==n[f]?new h("/","divide",[b(c,n),f]):void 0!==n[c]?new h("*","multiply",[new h("-","unaryMinus",[c]),new h("/","divide",[b(f,n),new h("^","pow",[f.clone(),w(2)])])]):new h("/","divide",[new h("-","subtract",[new h("*","multiply",[b(c,n),f.clone()]),new h("*","multiply",[c.clone(),b(f,n)])]),new h("^","pow",[f.clone(),w(2)])])}if("^"===t.op&&t.isBinary()){var l=t.args[0],d=t.args[1];if(void 0!==n[l])return e.isConstantNode(l)&&(u(l.value)||s(l.value,1))?w(0):new h("*","multiply",[t,new h("*","multiply",[new p("log",[l.clone()]),b(d.clone(),n)])]);if(void 0!==n[d]){if(e.isConstantNode(d)){if(u(d.value))return w(0);if(s(d.value,1))return b(l,n)}var m=new h("^","pow",[l.clone(),new h("-","subtract",[d,w(1)])]);return new h("*","multiply",[d.clone(),new h("*","multiply",[b(l,n),m])])}return new h("*","multiply",[new h("^","pow",[l.clone(),d.clone()]),new h("+","add",[new h("*","multiply",[b(l,n),new h("/","divide",[d.clone(),l.clone()])]),new h("*","multiply",[b(d,n),new p("log",[l.clone()])])])])}throw new Error('Operator "'+t.op+'" is not supported by derivative, or a wrong number of arguments is passed')}});function x(e){if("log"!==e.name&&"nthRoot"!==e.name&&"pow"!==e.name||2!==e.args.length){for(var t=0;t0){for(o+=a,t=1;tn)throw Error(v+e)}function I(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=_,i=0):(i=Math.ceil((t+1)/_),t%=_),o=x(10,_-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(e[i+1]/o/100|0)==x(10,t-2)-1||(s==o/2||0==s)&&0==(e[i+1]/o/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==x(10,t-3)-1,a}function z(e,t,n){for(var r,i,o=[0],a=0,s=e.length;an-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function B(e,t){var n,r,i=t.d.length;i<32?(n=Math.ceil(i/3),r=(1/ee(4,n)).toString()):(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=K(e,1,t.times(r),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),D(e)},C.ceil=function(){return D(new this.constructor(this),this.e+1,2)},C.comparedTo=C.cmp=function(e){var t,n,r,i,o=this,a=o.d,s=(e=new o.constructor(e)).d,u=o.s,c=e.s;if(!a||!s)return u&&c?u!==c?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-c:0;if(u!==c)return u;if(o.e!==e.e)return o.e>e.e^u<0?1:-1;for(r=a.length,i=s.length,t=0,n=rs[t]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},C.cosine=C.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+_,r.rounding=1,n=B(r,te(r,n)),r.precision=e,r.rounding=t,D(2==s||3==s?n.neg():n,e,t,!0)):new r(1):new r(NaN)},C.cubeRoot=C.cbrt=function(){var e,t,n,r,i,o,a,s,u,c,f=this,l=f.constructor;if(!f.isFinite()||f.isZero())return new l(f);for(d=!1,o=f.s*x(f.s*f,1/3),o&&Math.abs(o)!=1/0?r=new l(o.toString()):(n=k(f.d),e=f.e,(o=(e-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=x(n,1/3),e=b((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?n="5e"+e:(n=o.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),r=new l(n),r.s=f.s),a=(e=l.precision)+3;;)if(s=r,u=s.times(s).times(s),c=u.plus(f),r=R(c.plus(f).times(s),c.plus(u),a+2,1),k(s.d).slice(0,a)===(n=k(r.d)).slice(0,a)){if(n=n.slice(a-3,a+1),"9999"!=n&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(D(r,e+1,1),t=!r.times(r).times(r).eq(f));break}if(!i&&(D(s,e+1,0),s.times(s).times(s).eq(f))){r=s;break}a+=4,i=1}return d=!0,D(r,e,l.rounding,t)},C.decimalPlaces=C.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-b(this.e/_))*_,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},C.dividedBy=C.div=function(e){return R(this,new this.constructor(e))},C.dividedToIntegerBy=C.divToInt=function(e){var t=this,n=t.constructor;return D(R(t,new n(e),0,1,1),n.precision,n.rounding)},C.equals=C.eq=function(e){return 0===this.cmp(e)},C.floor=function(){return D(new this.constructor(this),this.e+1,3)},C.greaterThan=C.gt=function(e){return this.cmp(e)>0},C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return 1==t||0===t},C.hyperbolicCosine=C.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/ee(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=K(a,1,o.times(t),new a(1),!0);for(var u,c=e,f=new a(8);c--;)u=o.times(o),o=s.minus(u.times(f.minus(u.times(f))));return D(o,a.precision=n,a.rounding=r,!0)},C.hyperbolicSine=C.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,r=i.d.length,r<3)i=K(o,2,i,i,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:0|e,i=i.times(1/ee(5,e)),i=K(o,2,i,i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=t,o.rounding=n,D(i,t,n,!0)},C.hyperbolicTangent=C.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,R(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},C.inverseCosine=C.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?t.isNeg()?q(n,i,o):new n(0):new n(NaN):t.isZero()?q(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=q(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},C.inverseHyperbolicCosine=C.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,d=!1,n=n.times(n).minus(1).sqrt().plus(n),d=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},C.inverseHyperbolicSine=C.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,d=!1,n=n.times(n).plus(1).sqrt().plus(n),d=!0,r.precision=e,r.rounding=t,n.ln())},C.inverseHyperbolicTangent=C.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?D(new o(i),e,t,!0):(o.precision=n=r-i.e,i=R(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},C.inverseSine=C.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?(e=q(o,n+4,r).times(.5),e.s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},C.inverseTangent=C.atan=function(){var e,t,n,r,i,o,a,s,u,c=this,f=c.constructor,l=f.precision,p=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&l+4<=T)return a=q(f,l+4,p).times(.25),a.s=c.s,a}else{if(!c.s)return new f(NaN);if(l+4<=T)return a=q(f,l+4,p).times(.5),a.s=c.s,a}for(f.precision=s=l+10,f.rounding=1,n=Math.min(28,s/_+2|0),e=n;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(d=!1,t=Math.ceil(s/_),r=1,u=c.times(c),a=new f(c),i=c;-1!==e;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),a=o.plus(i.div(r+=2)),void 0!==a.d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<this.d.length-2},C.isNaN=function(){return!this.s},C.isNegative=C.isNeg=function(){return this.s<0},C.isPositive=C.isPos=function(){return this.s>0},C.isZero=function(){return!!this.d&&0===this.d[0]},C.lessThan=C.lt=function(e){return this.cmp(e)<0},C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1},C.logarithm=C.log=function(e){var t,n,r,i,o,a,s,u,c=this,f=c.constructor,l=f.precision,p=f.rounding,h=5;if(null==e)e=new f(10),t=!0;else{if(e=new f(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new f(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new f(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(i=n[0];i%10===0;)i/=10;o=1!==i}if(d=!1,s=l+h,a=Y(c,s),r=t?F(f,s+10):Y(e,s),u=R(a,r,s,1),I(u.d,i=l,p))do{if(s+=10,a=Y(c,s),r=t?F(f,s+10):Y(e,s),u=R(a,r,s,1),!o){+k(u.d).slice(i+1,i+15)+1==1e14&&(u=D(u,l+1,0));break}}while(I(u.d,i+=10,p));return d=!0,D(u,l,p)},C.minus=C.sub=function(e){var t,n,r,i,o,a,s,u,c,f,l,p,h=this,m=h.constructor;if(e=new m(e),!h.d||!e.d)return h.s&&e.s?h.d?e.s=-e.s:e=new m(e.d||h.s!==e.s?h:NaN):e=new m(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.plus(e);if(c=h.d,p=e.d,s=m.precision,u=m.rounding,!c[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!c[0])return new m(3===u?-0:0);e=new m(h)}return d?D(e,s,u):e}if(n=b(e.e/_),f=b(h.e/_),c=c.slice(),o=f-n,o){for(l=o<0,l?(t=c,o=-o,a=p.length):(t=p,n=f,a=c.length),r=Math.max(Math.ceil(s/_),a)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=c.length,a=p.length,l=r0;--r)c[a++]=0;for(r=p.length;r>o;){if(c[--r]a?o+1:a+1,i>a&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(a=c.length,i=f.length,a-i<0&&(i=a,n=f,f=c,c=n),t=0;i;)t=(c[--i]=c[i]+f[i]+t)/S|0,c[i]%=S;for(t&&(c.unshift(t),++r),a=c.length;0==c[--a];)c.pop();return e.d=c,e.e=L(c,r),d?D(e,s,u):e},C.precision=C.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(v+e);return n.d?(t=U(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},C.round=function(){var e=this,t=e.constructor;return D(new t(e),e.e+1,t.rounding)},C.sine=C.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+_,r.rounding=1,n=Q(r,te(r,n)),r.precision=e,r.rounding=t,D(s>2?n.neg():n,e,t,!0)):new r(NaN)},C.squareRoot=C.sqrt=function(){var e,t,n,r,i,o,a=this,s=a.d,u=a.e,c=a.s,f=a.constructor;if(1!==c||!s||!s[0])return new f(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(d=!1,c=Math.sqrt(+a),0==c||c==1/0?(t=k(s),(t.length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=b((u+1)/2)-(u<0||u%2),c==1/0?t="1e"+u:(t=c.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),r=new f(t)):r=new f(c.toString()),n=(u=f.precision)+3;;)if(o=r,r=o.plus(R(a,o,n+2,1)).times(.5),k(o.d).slice(0,n)===(t=k(r.d)).slice(0,n)){if(t=t.slice(n-3,n+1),"9999"!=t&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(D(r,u+1,1),e=!r.times(r).eq(a));break}if(!i&&(D(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return d=!0,D(r,u,f.rounding,e)},C.tangent=C.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,n=n.sin(),n.s=1,n=R(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,D(2==s||4==s?n.neg():n,e,t,!0)):new r(NaN)},C.times=C.mul=function(e){var t,n,r,i,o,a,s,u,c,f=this,l=f.constructor,p=f.d,h=(e=new l(e)).d;if(e.s*=f.s,!p||!p[0]||!h||!h[0])return new l(!e.s||p&&!p[0]&&!h||h&&!h[0]&&!p?NaN:p&&h?0*e.s:e.s/0);for(n=b(f.e/_)+b(e.e/_),u=p.length,c=h.length,u=0;){for(t=0,i=u+r;i>r;)s=o[i]+h[r]*p[i-r-1]+t,o[i--]=s%S|0,t=s/S|0;o[i]=(o[i]+t)%S|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=L(o,n),d?D(e,l.precision,l.rounding):e},C.toBinary=function(e,t){return ne(this,2,e,t)},C.toDecimalPlaces=C.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(P(e,0,c),void 0===t?t=r.rounding:P(t,0,8),D(n,e+n.e+1,t))},C.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=j(r,!0):(P(e,0,c),void 0===t?t=i.rounding:P(t,0,8),r=D(new i(r),e+1,t),n=j(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},C.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=j(i):(P(e,0,c),void 0===t?t=o.rounding:P(t,0,8),r=D(new o(i),e+i.e+1,t),n=j(r,!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},C.toFraction=function(e){var t,n,r,i,o,a,s,u,c,f,l,p,h=this,m=h.d,y=h.constructor;if(!m)return new y(h);if(c=n=new y(1),r=u=new y(0),t=new y(r),o=t.e=U(m)-h.e-1,a=o%_,t.d[0]=x(10,a<0?_+a:a),null==e)e=o>0?t:c;else{if(s=new y(e),!s.isInt()||s.lt(c))throw Error(v+s);e=s.gt(t)?o>0?t:c:s}for(d=!1,s=new y(k(m)),f=y.precision,y.precision=o=m.length*_*2;;){if(l=R(s,t,0,1,1),i=n.plus(l.times(r)),1==i.cmp(e))break;n=r,r=i,i=c,c=u.plus(l.times(i)),u=i,i=t,t=s.minus(l.times(i)),s=i}return i=R(e.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=h.s,p=R(c,r,o,1).minus(h).abs().cmp(R(u,n,o,1).minus(h).abs())<1?[c,r]:[u,n],y.precision=f,d=!0,p},C.toHexadecimal=C.toHex=function(e,t){return ne(this,16,e,t)},C.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:P(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(d=!1,n=R(n,e,0,t,1).times(e),d=!0,D(n)):(e.s=n.s,n=e),n},C.toNumber=function(){return+this},C.toOctal=function(e,t){return ne(this,8,e,t)},C.toPower=C.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,c=+(e=new u(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new u(x(+s,c));if(s=new u(s),s.eq(1))return s;if(r=u.precision,o=u.rounding,e.eq(1))return D(s,r,o);if(t=b(e.e/_),t>=e.d.length-1&&(n=c<0?-c:c)<=A)return i=H(u,s,n,r),e.s<0?new u(1).div(i):D(i,r,o);if(a=s.s,a<0){if(tu.maxE+1||t0?a/0:0):(d=!1,u.rounding=s.s=1,n=Math.min(12,(t+"").length),i=W(e.times(Y(s,r+n)),r),i.d&&(i=D(i,r+5,1),I(i.d,r,o)&&(t=r+10,i=D(W(e.times(Y(s,t+n)),t),t+5,1),+k(i.d).slice(r+1,r+15)+1==1e14&&(i=D(i,r+1,0)))),i.s=a,d=!0,u.rounding=o,D(i,r,o))},C.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=j(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(P(e,1,c),void 0===t?t=i.rounding:P(t,0,8),r=D(new i(r),e,t),n=j(r,e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},C.toSignificantDigits=C.toSD=function(e,t){var n=this,r=n.constructor;return void 0===e?(e=r.precision,t=r.rounding):(P(e,1,c),void 0===t?t=r.rounding:P(t,0,8)),D(new r(n),e,t)},C.toString=function(){var e=this,t=e.constructor,n=j(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},C.truncated=C.trunc=function(){return D(new this.constructor(this),this.e+1,1)},C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,n=j(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var R=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;)e.shift()}return function(r,i,o,s,u,c){var f,l,p,h,d,m,v,y,g,x,w,N,E,M,A,O,T,C,k,P,I=r.constructor,z=r.s==i.s?1:-1,B=r.d,R=i.d;if(!B||!B[0]||!R||!R[0])return new I(r.s&&i.s&&(B?!R||B[0]!=R[0]:R)?B&&0==B[0]||!R?0*z:z/0:NaN);for(c?(d=1,l=r.e-i.e):(c=S,d=_,l=b(r.e/d)-b(i.e/d)),k=R.length,T=B.length,g=new I(z),x=g.d=[],p=0;R[p]==(B[p]||0);p++);if(R[p]>(B[p]||0)&&l--,null==o?(M=o=I.precision,s=I.rounding):M=u?o+(r.e-i.e)+1:o,M<0)x.push(1),m=!0;else{if(M=M/d+2|0,p=0,1==k){for(h=0,R=R[0],M++;(p1&&(R=e(R,h,c),B=e(B,h,c),k=R.length,T=B.length),O=k,w=B.slice(0,k),N=w.length;N=c/2&&++C;do{h=0,f=t(R,w,k,N),f<0?(E=w[0],k!=N&&(E=E*c+(w[1]||0)),h=E/C|0,h>1?(h>=c&&(h=c-1),v=e(R,h,c),y=v.length,N=w.length,f=t(v,w,y,N),1==f&&(h--,n(v,k=10;h/=10)p++;g.e=p+l*d-1,D(g,u?o+g.e+1:o,s,m)}return g}}();function D(e,t,n,r){var i,o,a,s,u,c,f,l,p,h=e.constructor;e:if(null!=t){if(l=e.d,!l)return e;for(i=1,s=l[0];s>=10;s/=10)i++;if(o=t-i,o<0)o+=_,a=t,f=l[p=0],u=f/x(10,i-a-1)%10|0;else if(p=Math.ceil((o+1)/_),s=l.length,p>=s){if(!r)break e;for(;s++<=p;)l.push(0);f=u=0,i=1,o%=_,a=o-_+1}else{for(f=s=l[p],i=1;s>=10;s/=10)i++;o%=_,a=o-_+i,u=a<0?0:f/x(10,i-a-1)%10|0}if(r=r||t<0||void 0!==l[p+1]||(a<0?f:f%x(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(e.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?f/x(10,i-a):0:l[p-1])%10&1||n==(e.s<0?8:7)),t<1||!l[0])return l.length=0,c?(t-=e.e+1,l[0]=x(10,(_-t%_)%_),e.e=-t||0):l[0]=e.e=0,e;if(0==o?(l.length=p,s=1,p--):(l.length=p+1,s=x(10,_-o),l[p]=a>0?(f/x(10,i-a)%x(10,a)|0)*s:0),c)for(;;){if(0==p){for(o=1,a=l[0];a>=10;a/=10)o++;for(a=l[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,l[0]==S&&(l[0]=1));break}if(l[p]+=s,l[p]!=S)break;l[p--]=0,s=1}for(o=l.length;0===l[--o];)l.pop()}return d&&(e.e>h.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+$(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+$(-i-1)+o,n&&(r=n-a)>0&&(o+=$(r))):i>=a?(o+=$(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+$(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=$(r))),o}function L(e,t){var n=e[0];for(t*=_;n>=10;n/=10)t++;return t}function F(e,t,n){if(t>O)throw d=!0,n&&(e.precision=n),Error(y);return D(new e(l),t,1,!0)}function q(e,t,n){if(t>T)throw Error(y);return D(new e(p),t,n,!0)}function U(e){var t=e.length-1,n=t*_+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function $(e){for(var t="";e--;)t+="0";return t}function H(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/_+4);for(d=!1;;){if(n%2&&(o=o.times(t),re(o.d,a)&&(i=!0)),n=b(n/2),0===n){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}t=t.times(t),re(t.d,a)}return d=!0,o}function V(e){return 1&e.d[e.d.length-1]}function G(e,t,n){for(var r,i=new e(t[0]),o=0;++o17)return new p(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);null==t?(d=!1,u=m):u=t,s=new p(.03125);while(e.e>-2)e=e.times(s),l+=5;for(r=Math.log(x(2,l))/Math.LN10*2+5|0,u+=r,n=o=a=new p(1),p.precision=u;;){if(o=D(o.times(e),u,1),n=n.times(++f),s=a.plus(R(o,n,u,1)),k(s.d).slice(0,u)===k(a.d).slice(0,u)){i=l;while(i--)a=D(a.times(a),u,1);if(null!=t)return p.precision=m,a;if(!(c<3&&I(a.d,u-r,h,c)))return D(a,p.precision=m,h,d=!0);p.precision=u+=10,n=o=s=new p(1),f=0,c++}a=s}}function Y(e,t){var n,r,i,o,a,s,u,c,f,l,p,h=1,m=10,v=e,y=v.d,g=v.constructor,b=g.rounding,x=g.precision;if(v.s<0||!y||!y[0]||!v.e&&1==y[0]&&1==y.length)return new g(y&&!y[0]?-1/0:1!=v.s?NaN:y?0:v);if(null==t?(d=!1,f=x):f=t,g.precision=f+=m,n=k(y),r=n.charAt(0),!(Math.abs(o=v.e)<15e14))return c=F(g,f+2,x).times(o+""),v=Y(new g(r+"."+n.slice(1)),f-m).plus(c),g.precision=x,null==t?D(v,x,b,d=!0):v;while(r<7&&1!=r||1==r&&n.charAt(1)>3)v=v.times(e),n=k(v.d),r=n.charAt(0),h++;for(o=v.e,r>1?(v=new g("0."+n),o++):v=new g(r+"."+n.slice(1)),l=v,u=a=v=R(v.minus(1),v.plus(1),f,1),p=D(v.times(v),f,1),i=3;;){if(a=D(a.times(p),f,1),c=u.plus(R(a,new g(i),f,1)),k(c.d).slice(0,f)===k(u.d).slice(0,f)){if(u=u.times(2),0!==o&&(u=u.plus(F(g,f+2,x).times(o+""))),u=R(u,new g(h),f,1),null!=t)return g.precision=x,u;if(!I(u.d,f-m,b,s))return D(u,g.precision=x,b,d=!0);g.precision=f+=m,c=a=v=R(l.minus(1),l.plus(1),f,1),p=D(v.times(v),f,1),i=s=1}u=c,i+=2}}function X(e){return String(e.s*e.s/0)}function Z(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i),t){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%_,n<0&&(r+=_),re.constructor.maxE?(e.d=null,e.e=NaN):e.e0?(c=+t.slice(a+1),t=t.substring(2,a)):t=t.slice(2),a=t.indexOf("."),s=a>=0,r=e.constructor,s&&(t=t.replace(".",""),u=t.length,a=u-a,i=H(r,new r(n),a,2*a)),f=z(t,n,S),l=f.length-1,a=l;0===f[a];--a)f.pop();return a<0?new r(0*e.s):(e.e=L(f,l),e.d=f,d=!1,s&&(e=R(e,i,4*u)),c&&(e=e.times(Math.abs(c)<54?x(2,c):o.pow(2,c))),d=!0,e)}function Q(e,t){var n,r=t.d.length;if(r<3)return K(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:0|n,t=t.times(1/ee(5,n)),t=K(e,2,t,t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}function K(e,t,n,r,i){var o,a,s,u,c=e.precision,f=Math.ceil(c/_);for(d=!1,u=n.times(n),s=new e(r);;){if(a=R(s.times(u),new e(t++*t++),c,1),s=i?r.plus(a):r.minus(a),r=R(a.times(u),new e(t++*t++),c,1),a=s.plus(r),void 0!==a.d[f]){for(o=f;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o,0}return d=!0,a.d.length=f+1,a}function ee(e,t){var n=e;while(--t)n*=e;return n}function te(e,t){var n,r=t.s<0,i=q(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return s=r?4:1,t;if(n=t.divToInt(i),n.isZero())s=r?3:2;else{if(t=t.minus(n.times(i)),t.lte(o))return s=V(n)?r?2:3:r?4:1,t;s=V(n)?r?1:4:r?3:2}return t.minus(i).abs()}function ne(e,t,n,r){var i,o,s,u,l,p,h,d,m,v=e.constructor,y=void 0!==n;if(y?(P(n,1,c),void 0===r?r=v.rounding:P(r,0,8)):(n=v.precision,r=v.rounding),e.isFinite()){for(h=j(e),s=h.indexOf("."),y?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,s>=0&&(h=h.replace(".",""),m=new v(1),m.e=h.length-s,m.d=z(j(m),10,i),m.e=m.d.length),d=z(h,10,i),o=l=d.length;0==d[--l];)d.pop();if(d[0]){if(s<0?o--:(e=new v(e),e.d=d,e.e=o,e=R(e,m,n,r,0,i),d=e.d,o=e.e,p=a),s=d[n],u=i/2,p=p||void 0!==d[n+1],p=r<4?(void 0!==s||p)&&(0===r||r===(e.s<0?3:2)):s>u||s===u&&(4===r||p||6===r&&1&d[n-1]||r===(e.s<0?8:7)),d.length=n,p)for(;++d[--n]>i-1;)d[n]=0,n||(++o,d.unshift(1));for(l=d.length;!d[l-1];--l);for(s=0,h="";s1)if(16==t||8==t){for(s=16==t?4:3,--l;l%s;l++)h+="0";for(d=z(h,i,t),l=d.length;!d[l-1];--l);for(s=1,h="1.";sl)for(o-=l;o--;)h+="0";else ot)return e.length=t,!0}function ie(e){return new this(e).abs()}function oe(e){return new this(e).acos()}function ae(e){return new this(e).acosh()}function se(e,t){return new this(e).plus(t)}function ue(e){return new this(e).asin()}function ce(e){return new this(e).asinh()}function fe(e){return new this(e).atan()}function le(e){return new this(e).atanh()}function pe(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?q(this,r,i):new this(0),n.s=e.s):!e.d||t.isZero()?(n=q(this,o,1).times(.5),n.s=e.s):t.s<0?(this.precision=o,this.rounding=1,n=this.atan(R(e,t,o,1)),t=q(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(R(e,t,o,1)):(n=q(this,o,1).times(t.s>0?.25:.75),n.s=e.s):n=new this(NaN),n}function he(e){return new this(e).cbrt()}function de(e){return D(e=new this(e),e.e+1,2)}function me(e){if(!e||"object"!==typeof e)throw Error(m+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,c,"rounding",0,8,"toExpNeg",-u,0,"toExpPos",0,u,"maxE",0,u,"minE",-u,0,"modulo",0,9];for(t=0;t=o[t+1]&&r<=o[t+2]))throw Error(v+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=h[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(v+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(g);this[n]=!0}else this[n]=!1}return this}function ve(e){return new this(e).cos()}function ye(e){return new this(e).cosh()}function ge(e){var t,n,r;function i(e){var t,n,r,o=this;if(!(o instanceof i))return new i(e);if(o.constructor=i,e instanceof i)return o.s=e.s,void(d?!e.d||e.e>i.maxE?(o.e=NaN,o.d=null):e.e=10;n/=10)t++;return void(d?t>i.maxE?(o.e=NaN,o.d=null):t=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(g);for(t=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o=10;i/=10)r++;r<_&&(n-=_-r)}return a.e=n,a.d=s,a}function ze(e){return D(e=new this(e),e.e+1,this.rounding)}function Be(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function Re(e){return new this(e).sin()}function De(e){return new this(e).sinh()}function je(e){return new this(e).sqrt()}function Le(e,t){return new this(e).sub(t)}function Fe(e){return new this(e).tan()}function qe(e){return new this(e).tanh()}function Ue(e){return D(e=new this(e),e.e+1,1)}o=ge(h),o["default"]=o.Decimal=o,l=new o(l),p=new o(p),r=function(){return o}.call(t,n,t,e),void 0===r||(e.exports=r)})()},"415c":function(e,t,n){"use strict";var r=n("b13c").flatten;function i(e,t,i,o){var a=i(n("2f39")),s=i(n("d70a")),u=i(n("bfb7")),c=i(n("59a8")),f=i(n("1627")),l=i(n("61dc")),p=o("setUnion",{"Array | Matrix, Array | Matrix":function(e,t){if(0===c(u(e),new a(0)))return r(t);if(0===c(u(t),new a(0)))return r(e);var n=r(e),i=r(t);return s(l(n,i),f(n,i))}});return p}t.name="setUnion",t.factory=i},"41a0":function(e,t,n){"use strict";var r=n("2aeb"),i=n("4630"),o=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},"41fb":function(e,t,n){"use strict";var r=n("2c72");function i(e,t,i,o){var a=i(n("4781")),s=i(n("58f1")),u=i(n("5d7b")),c=i(n("354f")),f=i(n("ec38")),l=i(n("dde7")),p=i(n("30a9")),h=i(n("7d3c")),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(m(t.valueOf(),i,o),t.storage()):m(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 m(e,t,n){var r,i,o,a,d;if(1===t){if(a=e[0][0],0===a)throw Error("Cannot calculate inverse, determinant is zero");return[[s(1,a)]]}if(2===t){var m=l(e);if(0===m)throw Error("Cannot calculate inverse, determinant is zero");return[[s(e[1][1],m),s(f(e[0][1]),m)],[s(f(e[1][0]),m),s(e[0][0],m)]]}var v=e.concat();for(r=0;rb&&(b=h(v[r][g]),x=r),r++;if(0===b)throw Error("Cannot calculate inverse, determinant is zero");r=x,r!==g&&(d=v[g],v[g]=v[r],v[r]=d,d=y[g],y[g]=y[r],y[r]=d);var w=v[g],N=y[g];for(r=0;r= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]}},"430b":function(e,t,n){"use strict";e.exports={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]}},4385:function(e,t,n){"use strict";e.exports={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]}},4390:function(e,t,n){"use strict";var r=n("6762"),i=n("b13c");function o(e,t,o,a){var s=o(n("4781")),u=a("squeeze",{Array:function(e){return i.squeeze(r.clone(e))},Matrix:function(e){var t=i.squeeze(e.toArray());return Array.isArray(t)?s(t):t},any:function(e){return r.clone(e)}});return u.toTex=void 0,u}t.name="squeeze",t.factory=o},4446:function(e,t,n){"use strict";e.exports={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]}},"452b":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},r(e)}function i(e,t,i,o,a){var s=i(n("3147")),u=i(n("baf0")),c=i(n("922a")),f=i(n("67e5")),l=i(n("badf")),p=i(n("fbaa")),h=i(n("157d")),d=i(n("d1f6")),m=i(n("d153")),v=i(n("14a1")),y=i(n("52ed")),g=y.isCommutative,b=y.isAssociative,x=y.flatten,w=y.unflattenr,N=y.unflattenl,E=y.createMakeNodeFunction,M=o("simplify",{string:function(e){return M(s(e),M.rules,{},{})},"string, Object":function(e,t){return M(s(e),M.rules,t,{})},"string, Object, Object":function(e,t,n){return M(s(e),M.rules,t,n)},"string, Array":function(e,t){return M(s(e),t,{},{})},"string, Array, Object":function(e,t,n){return M(s(e),t,n,{})},"string, Array, Object, Object":function(e,t,n,r){return M(s(e),t,n,r)},"Node, Object":function(e,t){return M(e,M.rules,t,{})},"Node, Object, Object":function(e,t,n){return M(e,M.rules,t,n)},Node:function(e){return M(e,M.rules,{},{})},"Node, Array":function(e,t){return M(e,t,{},{})},"Node, Array, Object":function(e,t,n){return M(e,t,n,{})},"Node, Array, Object, Object":function(e,t,n,r){t=A(t);var i=v(e,n);i=S(i);var o={},a=i.toString({parenthesis:"all"});while(!o[a]){o[a]=!0,O=0;for(var s=0;s");if(2!==u.length)throw SyntaxError("Could not parse rule: "+i);i={l:u[0],r:u[1]};case"object":if(o={l:S(s(i.l)),r:S(s(i.r))},i.context&&(o.evaluate=i.context),i.evaluate&&(o.evaluate=s(i.evaluate)),b(o.l)){var c=E(o.l),f=T();o.expanded={},o.expanded.l=c([o.l.clone(),f]),x(o.expanded.l),w(o.expanded.l),o.expanded.r=c([o.r,f])}break;case"function":o=i;break;default:throw TypeError("Unsupported type of rule: "+a)}t.push(o)}return t}M.rules=[m,{l:"log(e)",r:"1"},{l:"n-n1",r:"n+-n1"},{l:"-(c*v)",r:"(-c) * v"},{l:"-v",r:"(-1) * v"},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{l:"(n ^ n1) ^ n2",r:"n ^ (n1 * n2)"},{l:"n*n",r:"n^2"},{l:"n * n^n1",r:"n^(n1+1)"},{l:"n^n1 * n^n2",r:"n^(n1+n2)"},{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},{l:"n1*n2 + n2",r:"(n1+1)*n2"},{l:"n1*n3 + n2*n3",r:"(n1+n2)*n3"},{l:"n1 + -1 * (n2 + n3)",r:"n1 + -1 * n2 + -1 * n3"},d,{l:"(-n)*n1",r:"-(n*n1)"},{l:"c+v",r:"v+c",context:{add:{commutative:!1}}},{l:"v*c",r:"c*v",context:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"n-(n1+n2)",r:"n-n1-n2"},{l:"1*n",r:"n"}];var O=0;function T(){return new h("_p"+O++)}var C=o("applyRule",{"Node, Object":function(e,t){var n=e;if(n instanceof l||n instanceof f){if(n.args)for(var r=0;r=2&&2===t.args.length){for(var o=k(n,t.context),s=[],p=0;p2)throw Error("Unexpected non-binary associative function: "+t.toString());return[]}for(var m=[],v=0;v0?r:n)(e)}},"4588c":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},r(e)}var i=n("3d75").stringify,o=n("3d75").escape,a=n("e1b6").isSafeProperty,s=n("6762").hasOwnProperty;function u(e,t,u,c){var f=u(n("2ba9"));function l(t){if(!(this instanceof l))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 l.prototype=new f,l.prototype.type="ObjectNode",l.prototype.isObjectNode=!0,l.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}},l.prototype.forEach=function(e){for(var t in this.properties)this.properties.hasOwnProperty(t)&&e(this.properties[t],"properties["+i(t)+"]",this)},l.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 l(t)},l.prototype.clone=function(){var e={};for(var t in this.properties)this.properties.hasOwnProperty(t)&&(e[t]=this.properties[t]);return new l(e)},l.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(", ")+"}"},l.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},l.fromJSON=function(e){return new l(e.properties)},l.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(',')+'}'},l.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\\}")},l}t.name="ObjectNode",t.path="expression.node",t.factory=u},"45d6":function(e,t,n){"use strict";e.exports={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row"]}},"45f2":function(e,t,n){var r=n("d9f6").f,i=n("07e3"),o=n("5168")("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},4621:function(e,t,n){"use strict";e.exports={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"46a7":function(e,t,n){var r=n("63b6");r(r.S+r.F*!n("8e60"),"Object",{defineProperty:n("d9f6").f})},4756:function(e,t,n){"use strict";e.exports={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]}},4763:function(e,t,n){"use strict";function r(e,t,r){var i=r(n("0443")),o=function(e){return e<0?i(e):e};return o}t.name="csUnflip",t.path="algebra.sparse",t.factory=r},4781:function(e,t,n){"use strict";function r(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){var i=e.Matrix.storage(n||"default");return new i(t,r)}}t.name="matrix",t.factory=r},4788:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t.preserveFormatting,s=void 0!==n&&n,u=t.escapeMapFn,c=void 0===u?a:u,f=String(e),l="",p=c(r({},i),s?r({},o):{}),h=Object.keys(p),d=function(){var e=!1;h.forEach(function(t,n){e||f.length>=t.length&&f.slice(0,t.length)===t&&(l+=p[h[n]],f=f.slice(t.length,f.length),e=!0)}),e||(l+=f.slice(0,1),f=f.slice(1,f.length))};while(f)d();return l}},4790:function(e,t,n){"use strict";var r=n("d1d1").maxArgumentCount;function i(e,t,n,r){var i=r("map",{"Array, function":o,"Matrix, function":function(e,t){return e.map(t)}});return i.toTex=void 0,i}function o(e,t){var n=r(t),i=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)};return i(e,[])}t.name="map",t.factory=i},"47ee":function(e,t,n){var r=n("c3a1"),i=n("9aa9"),o=n("355d");e.exports=function(e){var t=r(e),n=i.f;if(n){var a,s=n(e),u=o.f,c=0;while(s.length>c)u.call(e,a=s[c++])&&t.push(a)}return t}},"47ef":function(e,t,n){"use strict";e.exports={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]}},"481b":function(e,t){e.exports={}},4917:function(e,t,n){"use strict";var r=n("cb7c"),i=n("9def"),o=n("0390"),a=n("5f1b");n("214f")("match",1,function(e,t,n,s){return[function(n){var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var u=r(e),c=String(this);if(!u.global)return a(u,c);var f=u.unicode;u.lastIndex=0;var l,p=[],h=0;while(null!==(l=a(u,c))){var d=String(l[0]);p[h]=d,""===d&&(u.lastIndex=o(c,i(u.lastIndex),f)),h++}return 0===h?null:p}]})},4935:function(e,t,n){"use strict";e.exports={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]}},"4a00":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},r(e)}var i=n("6762").lazy,o=n("6762").isFactory,a=n("6762").traverse,s=n("1123");function u(e,t,n,u,c){function f(e,t){var n=arguments.length;if(1!==n&&2!==n)throw new s("import",n,1,2);if(t||(t={}),o(e))m(e,t);else if(Array.isArray(e))e.forEach(function(e){f(e,t)});else if("object"===r(e)){for(var i in e)if(e.hasOwnProperty(i)){var a=e[i];v(a)?l(i,a,t):o(e)?m(e,t):f(a,t)}}else if(!t.silent)throw new TypeError("Factory, Object, or Array expected")}function l(e,t,n){if(n.wrap&&"function"===typeof t&&(t=d(t)),y(c[e])&&y(t))return t=n.override?u(e,t.signatures):u(c[e],t),c[e]=t,p(e,t),void c.emit("import",e,function(){return t});if(void 0===c[e]||n.override)return c[e]=t,p(e,t),void c.emit("import",e,function(){return t});if(!n.silent)throw new Error('Cannot import "'+e+'": already exists')}function p(e,t){t&&"function"===typeof t.transform?(c.expression.transform[e]=t.transform,g(e)&&(c.expression.mathWithTransform[e]=t.transform)):(delete c.expression.transform[e],g(e)&&(c.expression.mathWithTransform[e]=t))}function h(e){delete c.expression.transform[e],g(e)?c.expression.mathWithTransform[e]=c[e]:delete c.expression.mathWithTransform[e]}function d(e){var t=function(){for(var t=[],n=0,r=arguments.length;nb;b++)if(v=t?g(a(d=e[b])[0],d[1]):g(e[b]),v===c||v===f)return v}else for(m=y.call(e);!(d=m.next()).done;)if(v=i(m,g,d.value,t),v===c||v===f)return v};t.BREAK=c,t.RETURN=f},"4a9c":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("4781")),a=r(n("a226")),s=n("6c54"),u=r(n("e1fc")),c=r(n("cae5")),f=r(n("9ebd")),l=r(n("cdb0")),p=r(n("04b6")),h=i("dotMultiply",{"any, any":a,"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,a,!1)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,a,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,a,!1)},"DenseMatrix, DenseMatrix":function(e,t){return l(e,t,a)},"Array, Array":function(e,t){return h(o(e),o(t)).valueOf()},"Array, Matrix":function(e,t){return h(o(e),t)},"Matrix, Array":function(e,t){return h(e,o(t))},"SparseMatrix, any":function(e,t){return f(e,t,a,!1)},"DenseMatrix, any":function(e,t){return p(e,t,a,!1)},"any, SparseMatrix":function(e,t){return f(t,e,a,!0)},"any, DenseMatrix":function(e,t){return p(t,e,a,!0)},"Array, any":function(e,t){return p(o(e),t,a,!1).valueOf()},"any, Array":function(e,t){return p(o(t),e,a,!0).valueOf()}});return h.toTex={2:"\\left(${args[0]}".concat(s.operators["dotMultiply"],"${args[1]}\\right)")},h}t.name="dotMultiply",t.factory=r},"4aa6":function(e,t,n){e.exports=n("dc62")},"4aac":function(e,t,n){"use strict";var r=n("f2de"),i=n("9087"),o=r.factory("Complex",{},"",i,{on:function(e,t){}});function a(e,t,n,r){var i=r("nthRoots",{Complex:function(e){return u(e,2)},"Complex, number":u});return i.toTex={2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},i}var s=[function(e){return o(e)},function(e){return o(0,e)},function(e){return o(-e)},function(e){return o(0,-e)}];function u(e,t){if(t<0)throw new Error("Root must be greater than zero");if(0===t)throw new Error("Root must be non-zero");if(t%1!==0)throw new Error("Root must be an integer");if(0===e||0===e.abs())return[o(0)];var n,r="number"===typeof e;(r||0===e.re||0===e.im)&&(n=r?2*+(e<0):0===e.im?2*+(e.re<0):2*+(e.im<0)+1);for(var i=e.arg(),a=e.abs(),u=[],c=Math.pow(a,1/t),f=0;f=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},"4bf8":function(e,t,n){var r=n("be13");e.exports=function(e){return Object(r(e))}},"4c17":function(e,t,n){"use strict";e.exports={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]}},"4c82":function(e,t,n){"use strict";e.exports={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]}},"4ccb":function(e,t,n){"use strict";e.exports={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dim)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","var"]}},"4d08":function(e,t,n){"use strict";var r=n("b13c").flatten;function i(e,t,i,o){var a=i(n("6f5b")),s=i(n("d05c")),u=o("mode",{"Array | Matrix":c,"...":function(e){return c(e)}});return u;function c(e){e=r(e.valueOf());var t=e.length;if(0===t)throw new Error("Cannot calculate mode of an empty array");for(var n={},i=[],o=0,u=0;uo&&(o=n[c],i=[c])}return i}}t.name="mode",t.factory=i},"4d16":function(e,t,n){e.exports=n("25b0")},"4d9b":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},r(e)}function i(){return i=Object.assign||function(e){for(var t=1;t="0"&&e<="9"||"."===e}function k(e){return e>="0"&&e<="9"}function P(){p++,h=l.charAt(p)}function I(e){p=e,h=l.charAt(p)}function z(){var e,t="";if(e=p,"+"===h?P():"-"===h&&(t+=h,P()),!C(h))return I(e),null;if("."===h){if(t+=h,P(),!k(h))return I(e),null}else{while(k(h))t+=h,P();"."===h&&(t+=h,P())}while(k(h))t+=h,P();if("E"===h||"e"===h){var n="",r=p;if(n+=h,P(),"+"!==h&&"-"!==h||(n+=h,P()),!k(h))return I(r),t;t+=n;while(k(h))t+=h,P()}return t}function B(){var e="",t=l.charCodeAt(p);while(t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)e+=h,P(),t=l.charCodeAt(p);return t=e.charCodeAt(0),(t>=65&&t<=90||t>=97&&t<=122)&&e||null}function R(e){return h===e?(P(),e):null}function D(e){if(V.hasOwnProperty(e)){var t=V[e],n=t.prefixes[""];return{unit:t,prefix:n}}for(var r in V)if(V.hasOwnProperty(r)&&o(e,r)){var i=V[r],a=e.length-r.length,s=e.substring(0,a),u=i.prefixes.hasOwnProperty(s)?i.prefixes[s]:void 0;if(void 0!==u)return{unit:i,prefix:u}}return null}function j(e){return e.equalBase(q.NONE)&&null!==e.value&&!t.predictable?e.value:e}O.prototype.type="Unit",O.prototype.isUnit=!0,O.parse=function(n,r){if(r=r||{},l=n,p=-1,h="","string"!==typeof l)throw new TypeError("Invalid argument in Unit.parse, string expected");var i=new O;i.units=[];var o=1,a=!1;P(),T();var s=z(),u=null;s&&(u="BigNumber"===t.number?new e.BigNumber(s):"Fraction"===t.number?new e.Fraction(s):parseFloat(s),T(),R("*")?(o=1,a=!0):R("/")&&(o=-1,a=!0));var c=[],f=1;while(1){T();while("("===h)c.push(o),f*=o,o=1,P(),T();var d=void 0;if(!h)break;var m=h;if(d=B(),null===d)throw new SyntaxError('Unexpected "'+m+'" in "'+l+'" at index '+p.toString());var v=D(d);if(null===v)throw new SyntaxError('Unit "'+d+'" not found.');var y=o*f;if(T(),R("^")){T();var g=z();if(null===g)throw new SyntaxError('In "'+n+'", "^" must be followed by a floating-point number');y*=g}i.units.push({unit:v.unit,prefix:v.prefix,power:y});for(var b=0;b1||Math.abs(this.units[0].power-1)>1e-15)},O.prototype._normalize=function(e){var t,n,r,i,o;if(null===e||void 0===e||0===this.units.length)return e;if(this._isDerived()){var a=e;o=O._getNumberConverter(S(e));for(var s=0;s1e-12)return!1;return!0},O.prototype.equalBase=function(e){for(var t=0;t1e-12)return!1;return!0},O.prototype.equals=function(e){return this.equalBase(e)&&N(this.value,e.value)},O.prototype.multiply=function(e){for(var t=this.clone(),n=0;n1e-12&&(X.hasOwnProperty(s)?r.push({unit:X[s].unit,prefix:X[s].prefix,power:n.dimensions[a]||0}):o=!0)}r.length1e-12){if(!Y["si"].hasOwnProperty(r))throw new Error("Cannot express custom unit "+r+" in SI units");t.push({unit:Y["si"][r].unit,prefix:Y["si"][r].prefix,power:e.dimensions[n]||0})}}return e.units=t,e.fixPrefix=!0,e.skipAutomaticSimplification=!0,e},O.prototype.formatUnits=function(){for(var e="",t="",n=0,r=0,i=0;i0?(n++,e+=" "+this.units[i].prefix.name+this.units[i].unit.name,Math.abs(this.units[i].power-1)>1e-15&&(e+="^"+this.units[i].power)):this.units[i].power<0&&r++;if(r>0)for(var o=0;o0?(t+=" "+this.units[o].prefix.name+this.units[o].unit.name,Math.abs(this.units[o].power+1)>1e-15&&(t+="^"+-this.units[o].power)):(t+=" "+this.units[o].prefix.name+this.units[o].unit.name,t+="^"+this.units[o].power));e=e.substr(1),t=t.substr(1),n>1&&r>0&&(e="("+e+")"),r>1&&n>0&&(t="("+t+")");var a=e;return n>0&&r>0&&(a+=" / "),a+=t,a},O.prototype.format=function(t){var n=this.skipAutomaticSimplification||null===this.value?this.clone():this.simplify(),r=!1;for(var i in"undefined"!==typeof n.value&&null!==n.value&&e.isComplex(n.value)&&(r=Math.abs(n.value.re)<1e-14),n.units)n.units[i].unit&&("VA"===n.units[i].unit.name&&r?n.units[i].unit=V["VAR"]:"VAR"!==n.units[i].unit.name||r||(n.units[i].unit=V["VA"]));1!==n.units.length||n.fixPrefix||Math.abs(n.units[0].power-Math.round(n.units[0].power))<1e-14&&(n.units[0].prefix=n._bestPrefix());var o=n._denormalize(n.value),a=null!==n.value?M(o,t||{}):"",s=n.formatUnits();return n.value&&e.isComplex(n.value)&&(a="("+a+")"),s.length>0&&a.length>0&&(a+=" "),a+=s,a},O.prototype._bestPrefix=function(){if(1!==this.units.length)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var e=null!==this.value?b(this.value):0,t=b(this.units[0].unit.value),n=this.units[0].prefix;if(0===e)return n;var r=this.units[0].power,i=Math.log(e/Math.pow(n.value*t,r))/Math.LN10-1.2;if(i>-2.200001&&i<1.800001)return n;i=Math.abs(i);var o=this.units[0].unit.prefixes;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];if(s.scientific){var u=Math.abs(Math.log(e/Math.pow(s.value*t,r))/Math.LN10-1.2);(u="0"&&e<="9"};if(0===t&&!r(n))throw new Error('Invalid unit name (must begin with alpha character): "'+e+'"');if(t>0&&!r(n)&&!i(n))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+e+'"')}}return O.createUnit=function(e,t){if("object"!==r(e))throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(t&&t.override)for(var n in e)if(e.hasOwnProperty(n)&&O.deleteUnit(n),e[n].aliases)for(var i=0;i1e-12){h=!1;break}if(h){l=!0,f.base=q[p];break}}if(!l){var m=e+"_STUFF",v={dimensions:a.dimensions.slice(0)};v.key=m,q[m]=v,X[m]={unit:f,prefix:L.NONE[""]},f.base=q[m]}}else{var y=e+"_STUFF";if(F.indexOf(y)>=0)throw new Error('Cannot create new base unit "'+e+'": a base unit with that name already exists (and cannot be overridden)');for(var g in F.push(y),q)q.hasOwnProperty(g)&&(q[g].dimensions[F.length-1]=0);for(var b={dimensions:[]},x=0;xc)o.call(a,n=s[c++])&&f.push(e?[n,a[n]]:a[n]);return f}}},5064:function(e,t,n){"use strict";e.exports={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","var","quantileSeq"]}},"50db":function(e,t,n){"use strict";e.exports={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]}},"50ed":function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},5147:function(e,t,n){var r=n("2b4c")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(i){}}return!0}},5168:function(e,t,n){var r=n("dbdb")("wks"),i=n("62a0"),o=n("e53d").Symbol,a="function"==typeof o,s=e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))};s.store=r},"51d3":function(e,t,n){"use strict";var r=n("3d75");function i(e,t,n,i){var o=i("format",{any:r.format,"any, Object | function | number":r.format});return o.toTex=void 0,o}t.name="format",t.factory=i},"520a":function(e,t,n){"use strict";var r=n("0bfb"),i=RegExp.prototype.exec,o=String.prototype.replace,a=i,s="lastIndex",u=function(){var e=/a/,t=/b*/g;return i.call(e,"a"),i.call(t,"a"),0!==e[s]||0!==t[s]}(),c=void 0!==/()??/.exec("")[1],f=u||c;f&&(a=function(e){var t,n,a,f,l=this;return c&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),u&&(t=l[s]),a=i.call(l,e),u&&a&&(l[s]=l.global?a.index+a[0].length:t),c&&a&&a.length>1&&o.call(a[0],n,function(){for(f=1;f0;n--)for(var r=0;re[r+1].length&&(t=e[r],e[r]=e[r+1],e[r+1]=t);return e}}t.name="setPowerset",t.factory=i},"52ed":function(e,t,n){"use strict";function r(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 f(t,n){if(!e.isOperatorNode(t))return!0;var r=t.fn.toString();return n&&n.hasOwnProperty(r)&&n[r].hasOwnProperty("commutative")?n[r].commutative:u[r]||!1}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 p(e){if(!e.args||0===e.args.length)return e;e.args=h(e);for(var t=0;t2&&l(e)){var i=e.args.pop();while(e.args.length>0)i=t([e.args.pop(),i]);e.args=i.args}}}function m(e){if(e.args&&0!==e.args.length){for(var t=v(e),n=e.args.length,r=0;r2&&l(e)){var i=e.args.shift();while(e.args.length>0)i=t([i,e.args.shift()]);e.args=i.args}}}function v(t){return e.isOperatorNode(t)?function(e){try{return new a(t.op,t.fn,e,t.implicit)}catch(n){return console.error(n),[]}}:function(e){return new o(new s(t.name),e)}}return{createMakeNodeFunction:v,isCommutative:f,isAssociative:l,flatten:p,allChildren:h,unflattenr:d,unflattenl:m}}t.factory=r,t.math=!0},"532f":function(e,t,n){"use strict";e.exports=[n("ac96"),n("de7b"),n("9e94"),n("d27d"),n("f068"),n("beef"),n("90ec"),n("7be7"),n("95c7"),n("3555"),n("8156"),n("8842"),n("174d"),n("e607"),n("c6fa"),n("9eca"),n("81ad"),n("6a91"),n("70f5"),n("04a1"),n("5b65"),n("87a5"),n("d2f0"),n("be97"),n("02cf")]},5334:function(e,t,n){"use strict";function r(e,t,r,i){var o={};return o.bignumber=n("d73c"),o["boolean"]=n("6947"),o.complex=n("4385"),o.createUnit=n("b7d6"),o.fraction=n("c7d6"),o.index=n("08dd"),o.matrix=n("b176"),o.number=n("e1a9"),o.sparse=n("cea0"),o.splitUnit=n("f799"),o.string=n("e459"),o.unit=n("9fd2"),o.e=n("9df3"),o.E=n("9df3"),o["false"]=n("8ab7"),o.i=n("29a8"),o["Infinity"]=n("13c0"),o.LN2=n("764e"),o.LN10=n("ae13"),o.LOG2E=n("1093"),o.LOG10E=n("130a"),o.NaN=n("47ef"),o["null"]=n("a2fc"),o.pi=n("98bb"),o.PI=n("98bb"),o.phi=n("3532"),o.SQRT1_2=n("c04c"),o.SQRT2=n("9858"),o.tau=n("20de"),o["true"]=n("20ba"),o.version=n("e504"),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("aed9"),o.lsolve=n("d5ee"),o.lup=n("03909"),o.lusolve=n("feeb"),o.simplify=n("dc95"),o.rationalize=n("fcb2"),o.slu=n("4621"),o.usolve=n("042d"),o.qr=n("bb75"),o.abs=n("32ee"),o.add=n("6efc"),o.cbrt=n("a267"),o.ceil=n("17cd"),o.cube=n("0b34"),o.divide=n("331c"),o.dotDivide=n("3a9a"),o.dotMultiply=n("6573b"),o.dotPow=n("92b0"),o.exp=n("e05c"),o.expm=n("b82e"),o.expm1=n("3ae7"),o.fix=n("f73b"),o.floor=n("fe77"),o.gcd=n("6d11"),o.hypot=n("3d89a"),o.lcm=n("8814"),o.log=n("0af4"),o.log2=n("f9e8"),o.log1p=n("7f61"),o.log10=n("542b"),o.mod=n("157d8"),o.multiply=n("1e1e"),o.norm=n("da76"),o.nthRoot=n("a7c7"),o.nthRoots=n("d3ab"),o.pow=n("0461"),o.round=n("e5e9"),o.sign=n("0efd"),o.sqrt=n("aaa2"),o.sqrtm=n("f6b1"),o.square=n("e920"),o.subtract=n("075b"),o.unaryMinus=n("b18d"),o.unaryPlus=n("1763"),o.xgcd=n("06b0"),o.bitAnd=n("293f"),o.bitNot=n("03be"),o.bitOr=n("323a"),o.bitXor=n("e5b7"),o.leftShift=n("c29e"),o.rightArithShift=n("9956"),o.rightLogShift=n("50db"),o.bellNumbers=n("42c8"),o.catalan=n("0394"),o.composition=n("2cc0"),o.stirlingS2=n("3837"),o["config"]=n("2313"),o["import"]=n("90d1"),o["typed"]=n("6484"),o.arg=n("73c1"),o.conj=n("012b"),o.re=n("277e"),o.im=n("b865"),o["eval"]=n("384a"),o.help=n("4446"),o.distance=n("cf0c"),o.intersect=n("da9a"),o["and"]=n("8fb3"),o["not"]=n("d6b0"),o["or"]=n("7d27"),o["xor"]=n("4c82"),o.column=n("45d6"),o["concat"]=n("e0df"),o.cross=n("d769"),o.ctranspose=n("d2f3"),o.det=n("acf0"),o.diag=n("e132"),o.dot=n("06fd"),o.getMatrixDataType=n("7729"),o.identity=n("fa94"),o.filter=n("4c17"),o.flatten=n("cfcb"),o.forEach=n("c878"),o.inv=n("ba88"),o.kron=n("3109"),o.map=n("2a36"),o.ones=n("0a15"),o.partitionSelect=n("eb38"),o.range=n("7f77"),o.resize=n("5e24"),o.reshape=n("c1ed"),o.row=n("b5bb"),o.size=n("0b73"),o.sort=n("5a73"),o.squeeze=n("c843"),o.subset=n("f5e7"),o.trace=n("f51f"),o.transpose=n("2216"),o.zeros=n("5b95"),o.combinations=n("1440"),o.factorial=n("77ef"),o.gamma=n("a19a"),o.kldivergence=n("12c4"),o.multinomial=n("a4b8"),o.permutations=n("fdd5"),o.pickRandom=n("b253"),o.random=n("0b5d"),o.randomInt=n("ddb0"),o.compare=n("e195"),o.compareNatural=n("ae75"),o.compareText=n("88b6"),o.deepEqual=n("5ed6"),o["equal"]=n("9a84"),o.equalText=n("5f62"),o.larger=n("a136"),o.largerEq=n("7ce7"),o.smaller=n("7fc2"),o.smallerEq=n("d139"),o.unequal=n("292b"),o.setCartesian=n("c73a"),o.setDifference=n("768c"),o.setDistinct=n("1399"),o.setIntersect=n("d7e3"),o.setIsSubset=n("85dc"),o.setMultiplicity=n("c172"),o.setPowerset=n("cbb8"),o.setSize=n("606f"),o.setSymDifference=n("7c2e"),o.setUnion=n("71da"),o.erf=n("9a59"),o.mad=n("62de"),o.max=n("4ccb"),o.mean=n("3094"),o.median=n("5064"),o.min=n("e3b0"),o.mode=n("e08d"),o.prod=n("0b87"),o.quantileSeq=n("f47a"),o.std=n("2b01"),o.sum=n("587e"),o["var"]=n("2c36"),o.acos=n("3d95"),o.acosh=n("4756"),o.acot=n("6908"),o.acoth=n("0393"),o.acsc=n("db75"),o.acsch=n("ac85"),o.asec=n("5c3f"),o.asech=n("3695"),o.asin=n("77c0"),o.asinh=n("dbf8"),o.atan=n("74ba"),o.atanh=n("6af4"),o.atan2=n("3c8d"),o.cos=n("8a01"),o.cosh=n("f51c"),o.cot=n("430b"),o.coth=n("caa6"),o.csc=n("6856"),o.csch=n("7ed7"),o.sec=n("d790"),o.sech=n("c01d"),o.sin=n("0be6"),o.sinh=n("62cb"),o.tan=n("59ea"),o.tanh=n("e9ac"),o.to=n("c6e9"),o.clone=n("4935"),o.format=n("bed4"),o.isNaN=n("05f3"),o.isInteger=n("57cb"),o.isNegative=n("09ee"),o.isNumeric=n("0d0e"),o.hasNumericValue=n("d7d7"),o.isPositive=n("7ad5"),o.isPrime=n("e2b6"),o.isZero=n("905d"),o["typeof"]=n("d7cc"),o}t.name="docs",t.path="expression",t.factory=r},5350:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"vuesingleselect"},[e.selectedOption?e._e():n("div",{class:e.classes.wrapper},[n("div",{staticClass:"relative inline-block w-full"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.searchText,expression:"searchText"}],ref:"search",class:[e.classes.input,e.isRequired],attrs:{id:e.inputId,placeholder:e.placeholder,autocomplete:"off",required:e.required},domProps:{value:e.searchText},on:{click:e.seedSearchText,focus:e.seedSearchText,keyup:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.setOption(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:e.movePointerDown(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"tab",9,t.key,"Tab")?null:(t.stopPropagation(),e.closeOut(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:(t.stopPropagation(),e.closeOut(t))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:e.movePointerUp(t)}],input:function(t){t.target.composing||(e.searchText=t.target.value)}}}),n("div",{staticClass:"cursor-pointer absolute flex items-center",class:[e.classes.icons],on:{click:e.toggleDropdown}},[e.dropdownOpen?n("svg",{attrs:{"aria-hidden":"true",viewBox:"0 0 448 512"}},[n("path",{attrs:{d:"M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"}})]):n("svg",{attrs:{"aria-hidden":"true",viewBox:"0 0 448 512"}},[n("path",{attrs:{d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"}})])]),e.matchingOptions?n("ul",{ref:"options",staticClass:"absolute w-full overflow-auto appearance-none mt-px list-reset",class:[e.classes.dropdown],staticStyle:{"z-index":"100"},style:{"max-height":e.maxHeight},attrs:{tabindex:"-1"}},e._l(e.matchingOptions,function(t,r){return n("li",{key:r,staticClass:"cursor-pointer outline-none",class:r===e.pointer?e.classes.activeClass:"",attrs:{tabindex:"-1"},on:{blur:function(t){return e.handleClickOutside(t)},mouseover:function(t){return e.setPointerIdx(r)},keyup:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.setOption()},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"up",38,t.key,["Up","ArrowUp"])?null:e.movePointerUp()},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"down",40,t.key,["Down","ArrowDown"])?null:e.movePointerDown()}],click:function(t){return t.preventDefault(),e.setOption()}}},[e._t("option",[e._v("\n "+e._s(e.getOptionDescription(t))+"\n ")],null,{option:t,idx:r})],2)}),0):e._e()])]),e.selectedOption?n("div",{class:e.classes.wrapper},[n("input",{ref:"match",class:[e.classes.input],attrs:{id:e.inputId,required:e.required},domProps:{value:e.getOptionDescription(e.selectedOption)},on:{input:function(t){return e.switchToSearch(t)},click:function(t){return e.switchToSearch(t)}}}),n("input",{ref:"selectedValue",attrs:{type:"hidden",name:e.name},domProps:{value:e.getOptionValue(e.selectedOption)}}),n("div",{staticClass:"flex absolute items-center",class:e.classes.icons},[n("svg",{staticClass:"cursor-pointer",attrs:{"aria-hidden":"true",viewBox:"0 0 512 512"},on:{click:e.closeOut}},[n("path",{attrs:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"}})])])]):e._e()])},i=[],o=(n("4917"),n("a745")),a=n.n(o);function s(e){if(a()(e)){for(var t=0,n=new Array(e.length);t=this.viewport().bottom?this.scrollTo(this.viewport().top+this.pointerHeight()):void 0},pixelsToPointerTop(){let e=0;if(!this.$refs.options)return 0;for(let t=0;t=this.matchingOptions.length-1||this.pointer++)},movePointerUp:function(){this.pointer>0&&this.pointer--},setOption:function(){var e=this;this.matchingOptions&&this.matchingOptions.length&&(-1===this.pointer&&this.pointer++,this.selectedOption=this.matchingOptions[this.pointer],this.searchText=null,this.dropdownOpen=!1,this.pointer=-1,this.$nextTick().then(function(){e.$refs.match.focus()}))},handleClickOutside:function(e){this.$el.contains(e.target)||(this.dropdownOpen=!1,this.searchText=null)}}},y=v,g=(n("7689"),n("2877")),b=Object(g["a"])(y,r,i,!1,null,"cff60de6",null),x=b.exports;t["a"]=x},"537e":function(e,t,n){"use strict";function r(e,t,r){var i=r(n("0443")),o=function(e,t){e[t]=i(e[t])};return o}t.name="csMark",t.path="algebra.sparse",t.factory=r},"53b4":function(e,t,n){"use strict";var r=n("6762").clone,i=n("b13c").flatten;function o(e,t,o,a){var s=o(n("4781")),u=a("flatten",{Array:function(e){return i(r(e))},Matrix:function(e){var t=i(r(e.toArray()));return s(t)}});return u.toTex=void 0,u}t.name="flatten",t.factory=o},"53e2":function(e,t,n){var r=n("07e3"),i=n("241e"),o=n("5559")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},"53fe":function(e,t,n){var r,i; /**! * Sortable * @author RubaXa * @author owenm * @license MIT */ /**! * Sortable * @author RubaXa * @author owenm * @license MIT */ (function(o){"use strict";r=o,i="function"===typeof r?r.call(t,n,t,e):r,void 0===i||(e.exports=i)})(function(){"use strict";if("undefined"===typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var e,t,n,r,i,o,a,s,u,c,f,l,p,h,d,m,v,y,g,b,x,w,N,E,M,S,_,A,O=[],T=!1,C=!1,k=!1,P=[],I=!1,z=!1,B=[],R=/\s+/g,D="Sortable"+(new Date).getTime(),j=window,L=j.document,F=j.parseInt,q=j.setTimeout,U=j.jQuery||j.Zepto,$=j.Polymer,H={capture:!1,passive:!1},V=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),G=!!navigator.userAgent.match(/Edge/i),W=!!navigator.userAgent.match(/firefox/i),Y=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),X=!!navigator.userAgent.match(/iP(ad|od|hone)/i),Z=X,J=G||V?"cssFloat":"float",Q="draggable"in L.createElement("div"),K=function(){if(V)return!1;var e=L.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}(),ee=!1,te=!1,ne=Math.abs,re=Math.min,ie=Math.max,oe=[],ae=function(e,t){var n=Oe(e),r=F(n.width)-F(n.paddingLeft)-F(n.paddingRight)-F(n.borderLeftWidth)-F(n.borderRightWidth),i=Be(e,0,t),o=Be(e,1,t),a=i&&Oe(i),s=o&&Oe(o),u=a&&F(a.marginLeft)+F(a.marginRight)+Ze(i).width,c=s&&F(s.marginLeft)+F(s.marginRight)+Ze(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&"none"!==a.float){var f="left"===a.float?"left":"right";return!o||"both"!==s.clear&&s.clear!==f?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||u>=r&&"none"===n[J]||o&&"none"===n[J]&&u+c>r)?"vertical":"horizontal"},se=function(e,t){for(var n=0;n=r.left-i&&e<=r.right+i,a=t>=r.top-i&&t<=r.bottom+i;if(i&&o&&a)return P[n]}},ue=function(e,t,n,r,i){var o=Ze(n),a="vertical"===r?o.left:o.top,s="vertical"===r?o.right:o.bottom,u="vertical"===r?e:t;return a-1}}var n={},r=e.group;r&&"object"==typeof r||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},ve=function(t){e&&e.parentNode&&e.parentNode[D]&&e.parentNode[D]._computeIsAligned(t)},ye=function(){!K&&n&&Oe(n,"display","none")},ge=function(){!K&&n&&Oe(n,"display","")};L.addEventListener("click",function(e){if(k)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),k=!1,!1},!0);var be,xe=function(t){if(e){t=t.touches?t.touches[0]:t;var n=se(t.clientX,t.clientY);if(n){var r={};for(var i in t)r[i]=t[i];r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[D]._onDragOver(r)}}};function we(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(e);this.el=e,this.options=t=Ve({},t),e[D]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ae(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:F(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==we.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in n)!(r in t)&&(t[r]=n[r]);for(var i in me(t),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&Q,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Se(e,"pointerdown",this._onTapStart):(Se(e,"mousedown",this._onTapStart),Se(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Se(e,"dragover",this),Se(e,"dragenter",this)),P.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[])}function Ne(e,t,n,r){if(e){n=n||L;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&Ue(e,t):Ue(e,t))||r&&e===n)return e;if(e===n)break}while(e=Ee(e))}return null}function Ee(e){return e.host&&e!==L&&e.host.nodeType?e.host:e.parentNode}function Me(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Se(e,t,n){e.addEventListener(t,n,!V&&H)}function _e(e,t,n){e.removeEventListener(t,n,!V&&H)}function Ae(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(R," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(R," ")}}function Oe(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return L.defaultView&&L.defaultView.getComputedStyle?n=L.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"===typeof n?"":"px")}}function Te(e){var t="";do{var n=Oe(e,"transform");n&&"none"!==n&&(t=n+" "+t)}while(e=e.parentNode);return window.DOMMatrix?new DOMMatrix(t):window.WebKitCSSMatrix?new WebKitCSSMatrix(t):window.CSSMatrix?new CSSMatrix(t):void 0}function Ce(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;iu+c||o<=u&&i>a&&o>=s:i>a&&o>s||i<=a&&o>u+c}function je(t,n,r,i,o,a,s){var u=Ze(n),c="vertical"===r?t.clientY:t.clientX,f="vertical"===r?u.height:u.width,l="vertical"===r?u.top:u.left,p="vertical"===r?u.bottom:u.right,h=Ze(e),d=!1;if(!a)if(s&&Sl+f*o/2:cp-S)return-1*E}else if(c>l+f*(1-i)/2&&cp-f*o/2)?c>l+f/2?1:-1:0}function Le(t){var n=qe(e),r=qe(t);return n"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function $e(e,t){return function(){if(!be){var n=arguments,r=this;be=q(function(){1===n.length?e.call(r,n[0]):e.apply(r,n),be=void 0},t)}}}function He(){clearTimeout(be),be=void 0}function Ve(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Ge(e){return $&&$.dom?$.dom(e).cloneNode(!0):U?U(e).clone(!0)[0]:e.cloneNode(!0)}function We(e){oe.length=0;var t=e.getElementsByTagName("input"),n=t.length;while(n--){var r=t[n];r.checked&&oe.push(r)}}function Ye(e){return q(e,0)}function Xe(e){return clearTimeout(e)}function Ze(e,t,n,r){if(e.getBoundingClientRect||e===j){var i,o,a,s,u,c,f;if(e!==j&&e!==le()?(i=e.getBoundingClientRect(),o=i.top,a=i.left,s=i.bottom,u=i.right,c=i.height,f=i.width):(o=0,a=0,s=window.innerHeight,u=window.innerWidth,c=window.innerHeight,f=window.innerWidth),r&&e!==j&&(n=n||e.parentNode,!V))do{if(n&&n.getBoundingClientRect&&"none"!==Oe(n,"transform")){var l=n.getBoundingClientRect();o-=l.top+F(Oe(n,"border-top-width")),a-=l.left+F(Oe(n,"border-left-width")),s=o+i.height,u=a+i.width;break}}while(n=n.parentNode);if(t&&e!==j){var p=Te(n||e),h=p&&p.a,d=p&&p.d;p&&(o/=d,a/=h,f/=h,c/=d,s=o+c,u=a+f)}return{top:o,left:a,bottom:s,right:u,width:f,height:c}}}function Je(e,t){var n=fe(e,!0),r=Ze(e)[t];while(n){var i,o=Ze(n)[t];if(i="top"===t||"left"===t?r>=o:r<=o,!i)return n;if(n===le())break;n=fe(n,!1)}return!1}function Qe(e){var t=0,n=0,r=le();if(e)do{var i=Te(e),o=i.a,a=i.d;t+=e.scrollLeft*o,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}return we.prototype={constructor:we,_computeIsAligned:function(t){var r;if(n&&!K?(ye(),r=L.elementFromPoint(t.clientX,t.clientY),ge()):r=t.target,r=Ne(r,this.options.draggable,this.el,!1),!te&&e&&e.parentNode===this.el){for(var i=this.el.children,o=0;o=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){e&&Ie(e),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;_e(e,"mouseup",this._disableDelayedDrag),_e(e,"touchend",this._disableDelayedDrag),_e(e,"touchcancel",this._disableDelayedDrag),_e(e,"mousemove",this._delayedDragTouchMoveHandler),_e(e,"touchmove",this._delayedDragTouchMoveHandler),_e(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||("touch"==t.pointerType?t:null),!this.nativeDraggable||n?this.options.supportPointer?Se(L,"pointermove",this._onTouchMove):Se(L,n?"touchmove":"mousemove",this._onTouchMove):(Se(e,"dragend",this),Se(i,"dragstart",this._onDragStart));try{L.selection?Ye(function(){L.selection.empty()}):window.getSelection().removeAllRanges()}catch(r){}},_dragStarted:function(t,n){if(C=!1,i&&e){this.nativeDraggable&&(Se(L,"dragover",this._handleAutoScroll),Se(L,"dragover",ve));var r=this.options;!t&&Ae(e,r.dragClass,!1),Ae(e,r.ghostClass,!0),Oe(e,"transform",""),we.active=this,t&&this._appendGhost(),ke(this,i,"start",e,i,i,f,void 0,p,void 0,n)}else this._nulling()},_emulateDragOver:function(t){if(x){if(this._lastX===x.clientX&&this._lastY===x.clientY&&!t)return;this._lastX=x.clientX,this._lastY=x.clientY,ye();var n=L.elementFromPoint(x.clientX,x.clientY),r=n;while(n&&n.shadowRoot){if(n=n.shadowRoot.elementFromPoint(x.clientX,x.clientY),n===r)break;r=n}if(r)do{var i;if(r[D])if(i=r[D]._onDragOver({clientX:x.clientX,clientY:x.clientY,target:n,rootEl:r}),i&&!this.options.dragoverBubble)break;n=r}while(r=r.parentNode);e.parentNode[D]._computeIsAligned(x),ge()}},_onTouchMove:function(e,t){if(b){var r=this.options,i=r.fallbackTolerance,o=r.fallbackOffset,a=e.touches?e.touches[0]:e,s=n&&Te(n),u=n&&s&&s.a,c=n&&s&&s.d,f=Z&&_&&Qe(_),l=(a.clientX-b.clientX+o.x)/(u||1)+(f?f[0]-B[0]:0)/(u||1),p=(a.clientY-b.clientY+o.y)/(c||1)+(f?f[1]-B[1]:0)/(c||1),h=e.touches?"translate3d("+l+"px,"+p+"px,0)":"translate("+l+"px,"+p+"px)";if(!we.active&&!C){if(i&&re(ne(a.clientX-this._lastX),ne(a.clientY-this._lastY))=0&&(ke(null,t,"add",e,t,i,f,l,p,h,a),ke(this,i,"remove",e,t,i,f,l,p,h,a),ke(null,t,"sort",e,t,i,f,l,p,h,a),ke(this,i,"sort",e,t,i,f,l,p,h,a)),m&&m.save()):e.nextSibling!==o&&(l=qe(e),h=qe(e,u.draggable),l>=0&&(ke(this,i,"update",e,t,i,f,l,p,h,a),ke(this,i,"sort",e,t,i,f,l,p,h,a))),we.active&&(null!=l&&-1!==l||(l=f,h=p),ke(this,i,"end",e,t,i,f,l,p,h,a),this.save()))),this._nulling()},_nulling:function(){i=e=t=n=o=r=a=s=u=O.length=v=y=g=b=x=w=l=f=N=E=A=m=d=we.active=null,oe.forEach(function(e){e.checked=!0}),oe.length=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":e&&(this._onDragOver(t),Me(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,o=this.options;r1?arguments[1]:void 0,v=void 0!==m,y=0,g=f(p);if(v&&(m=r(m,d>2?arguments[2]:void 0,2)),void 0==g||h==Array&&s(g))for(t=u(p.length),n=new h(t);t>y;y++)c(n,y,v?m(p[y],y):p[y]);else for(l=g.call(p),n=new h;!(i=l.next()).done;y++)c(n,y,v?a(l,m,[i.value,y],!0):i.value);return n.length=y,n}})},"54a1":function(e,t,n){n("6c1c"),n("1654"),e.exports=n("95d5")},"551c":function(e,t,n){"use strict";var r,i,o,a,s=n("2d00"),u=n("7726"),c=n("9b43"),f=n("23c6"),l=n("5ca1"),p=n("d3f4"),h=n("d8e8"),d=n("f605"),m=n("4a59"),v=n("ebd6"),y=n("1991").set,g=n("8079")(),b=n("a5b8"),x=n("9c80"),w=n("a25f"),N=n("bcaa"),E="Promise",M=u.TypeError,S=u.process,_=S&&S.versions,A=_&&_.v8||"",O=u[E],T="process"==f(S),C=function(){},k=i=b.f,P=!!function(){try{var e=O.resolve(1),t=(e.constructor={})[n("2b4c")("species")]=function(e){e(C,C)};return(T||"function"==typeof PromiseRejectionEvent)&&e.then(C)instanceof t&&0!==A.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(r){}}(),I=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},z=function(e,t){if(!e._n){e._n=!0;var n=e._c;g(function(){var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,s=i?t.ok:t.fail,u=t.resolve,c=t.reject,f=t.domain;try{s?(i||(2==e._h&&D(e),e._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===t.promise?c(M("Promise-chain cycle")):(o=I(n))?o.call(n,u,c):u(n)):c(r)}catch(l){f&&!a&&f.exit(),c(l)}};while(n.length>o)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&B(e)})}},B=function(e){y.call(u,function(){var t,n,r,i=e._v,o=R(e);if(o&&(t=x(function(){T?S.emit("unhandledRejection",i,e):(n=u.onunhandledrejection)?n({promise:e,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=T||R(e)?2:1),e._a=void 0,o&&t.e)throw t.v})},R=function(e){return 1!==e._h&&0===(e._a||e._c).length},D=function(e){y.call(u,function(){var t;T?S.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})})},j=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),z(t,!0))},L=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw M("Promise can't be resolved itself");(t=I(e))?g(function(){var r={_w:n,_d:!1};try{t.call(e,c(L,r,1),c(j,r,1))}catch(i){j.call(r,i)}}):(n._v=e,n._s=1,z(n,!1))}catch(r){j.call({_w:n,_d:!1},r)}}};P||(O=function(e){d(this,O,E,"_h"),h(e),r.call(this);try{e(c(L,this,1),c(j,this,1))}catch(t){j.call(this,t)}},r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("dcbc")(O.prototype,{then:function(e,t){var n=k(v(this,O));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=T?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&z(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=c(L,e,1),this.reject=c(j,e,1)},b.f=k=function(e){return e===O||e===a?new o(e):i(e)}),l(l.G+l.W+l.F*!P,{Promise:O}),n("7f20")(O,E),n("7a56")(E),a=n("8378")[E],l(l.S+l.F*!P,E,{reject:function(e){var t=k(this),n=t.reject;return n(e),t.promise}}),l(l.S+l.F*(s||!P),E,{resolve:function(e){return N(s&&this===a?O:this,e)}}),l(l.S+l.F*!(P&&n("5cc5")(function(e){O.all(e)["catch"](C)})),E,{all:function(e){var t=this,n=k(t),r=n.resolve,i=n.reject,o=x(function(){var n=[],o=0,a=1;m(e,!1,function(e){var s=o++,u=!1;n.push(void 0),a++,t.resolve(e).then(function(e){u||(u=!0,n[s]=e,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=k(t),r=n.reject,i=x(function(){m(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},5537:function(e,t,n){var r=n("8378"),i=n("7726"),o="__core-js_shared__",a=i[o]||(i[o]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(e,t,n){var r=n("dbdb")("keys"),i=n("62a0");e.exports=function(e){return r[e]||(r[e]=i(e))}},"560c":function(e,t,n){"use strict";var r=n("d7df").isInteger,i=n("5b2d");function o(e,t,o,a){var s=n("6c54"),u=o(n("4781")),c=o(n("863e")),f=o(n("f5ae")),l=o(n("797d")),p=o(n("e1fc")),h=o(n("d1c4")),d=o(n("bfee")),m=o(n("9ebd")),v=o(n("cdb0")),y=o(n("04b6")),g=a("leftShift",{"number, number":function(e,t){if(!r(e)||!r(t))throw new Error("Integers expected in function leftShift");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)while(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),t},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}t.name="Range",t.path="type",t.factory=i},"57bf":function(e,t,n){"use strict";var r=n("2c72"),i=r.number,o=i.isInteger;function a(e,t,r,i){var a=r(n("27ae")),s=r(n("1371")),u=i("slu",{"SparseMatrix, number, number":function(e,t,n){if(!o(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 r=a(t,e,!1),i=s(e,r,n);return{L:i.L,U:i.U,p:i.pinv,q:r.q,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\np: "+this.p.toString()+(this.q?"\nq: "+this.q.toString():"")+"\n"}}}});return u}t.name="slu",t.factory=a},"57cb":function(e,t,n){"use strict";e.exports={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]}},"584a":function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"587e":function(e,t,n){"use strict";e.exports={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","var"]}},"589d":function(e,t,n){var r,i;/*! VelocityJS.org (1.5.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ /*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */ /*! VelocityJS.org (1.5.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ /*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */ (function(e){"use strict";if(!e.jQuery){var t=function(e,n){return new t.fn.init(e,n)};t.isWindow=function(e){return e&&e===e.window},t.type=function(e){return e?"object"===typeof e||"function"===typeof e?r[o.call(e)]||"object":typeof e:e+""},t.isArray=Array.isArray||function(e){return"array"===t.type(e)},t.isPlainObject=function(e){var n;if(!e||"object"!==t.type(e)||e.nodeType||t.isWindow(e))return!1;try{if(e.constructor&&!i.call(e,"constructor")&&!i.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}for(n in e);return void 0===n||i.call(e,n)},t.each=function(e,t,n){var r,i=0,o=e.length,a=u(e);if(n){if(a){for(;i0&&n-1 in e))}})(window),function(o){"use strict";"object"===typeof e.exports?e.exports=o():(r=o,i="function"===typeof r?r.call(t,n,t,e):r,void 0===i||(e.exports=i))}(function(){"use strict";return function(e,t,n,r){var i=function(){if(n.documentMode)return n.documentMode;for(var e=7;e>4;e--){var t=n.createElement("div");if(t.innerHTML="\x3c!--[if IE "+e+"]>=0?t:Math.max(0,r+t),s=n<0?r+n:Math.min(n,r),u=s-a;if(u>0)if(o=new Array(u),this.charAt)for(i=0;i=0}:function(e,t){for(var n=0;nl&&Math.abs(s.v)>l))break;return o?function(e){return c[e*(c.length-1)|0]}:f}}();v.Easings={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},spring:function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)}},l.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(e,t){v.Easings[t[0]]=_.apply(null,t[1])});var g=v.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"],units:["%","em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","Q","in","pc","pt","px","deg","grad","rad","turn","s","ms"],colorNames:{aliceblue:"240,248,255",antiquewhite:"250,235,215",aquamarine:"127,255,212",aqua:"0,255,255",azure:"240,255,255",beige:"245,245,220",bisque:"255,228,196",black:"0,0,0",blanchedalmond:"255,235,205",blueviolet:"138,43,226",blue:"0,0,255",brown:"165,42,42",burlywood:"222,184,135",cadetblue:"95,158,160",chartreuse:"127,255,0",chocolate:"210,105,30",coral:"255,127,80",cornflowerblue:"100,149,237",cornsilk:"255,248,220",crimson:"220,20,60",cyan:"0,255,255",darkblue:"0,0,139",darkcyan:"0,139,139",darkgoldenrod:"184,134,11",darkgray:"169,169,169",darkgrey:"169,169,169",darkgreen:"0,100,0",darkkhaki:"189,183,107",darkmagenta:"139,0,139",darkolivegreen:"85,107,47",darkorange:"255,140,0",darkorchid:"153,50,204",darkred:"139,0,0",darksalmon:"233,150,122",darkseagreen:"143,188,143",darkslateblue:"72,61,139",darkslategray:"47,79,79",darkturquoise:"0,206,209",darkviolet:"148,0,211",deeppink:"255,20,147",deepskyblue:"0,191,255",dimgray:"105,105,105",dimgrey:"105,105,105",dodgerblue:"30,144,255",firebrick:"178,34,34",floralwhite:"255,250,240",forestgreen:"34,139,34",fuchsia:"255,0,255",gainsboro:"220,220,220",ghostwhite:"248,248,255",gold:"255,215,0",goldenrod:"218,165,32",gray:"128,128,128",grey:"128,128,128",greenyellow:"173,255,47",green:"0,128,0",honeydew:"240,255,240",hotpink:"255,105,180",indianred:"205,92,92",indigo:"75,0,130",ivory:"255,255,240",khaki:"240,230,140",lavenderblush:"255,240,245",lavender:"230,230,250",lawngreen:"124,252,0",lemonchiffon:"255,250,205",lightblue:"173,216,230",lightcoral:"240,128,128",lightcyan:"224,255,255",lightgoldenrodyellow:"250,250,210",lightgray:"211,211,211",lightgrey:"211,211,211",lightgreen:"144,238,144",lightpink:"255,182,193",lightsalmon:"255,160,122",lightseagreen:"32,178,170",lightskyblue:"135,206,250",lightslategray:"119,136,153",lightsteelblue:"176,196,222",lightyellow:"255,255,224",limegreen:"50,205,50",lime:"0,255,0",linen:"250,240,230",magenta:"255,0,255",maroon:"128,0,0",mediumaquamarine:"102,205,170",mediumblue:"0,0,205",mediumorchid:"186,85,211",mediumpurple:"147,112,219",mediumseagreen:"60,179,113",mediumslateblue:"123,104,238",mediumspringgreen:"0,250,154",mediumturquoise:"72,209,204",mediumvioletred:"199,21,133",midnightblue:"25,25,112",mintcream:"245,255,250",mistyrose:"255,228,225",moccasin:"255,228,181",navajowhite:"255,222,173",navy:"0,0,128",oldlace:"253,245,230",olivedrab:"107,142,35",olive:"128,128,0",orangered:"255,69,0",orange:"255,165,0",orchid:"218,112,214",palegoldenrod:"238,232,170",palegreen:"152,251,152",paleturquoise:"175,238,238",palevioletred:"219,112,147",papayawhip:"255,239,213",peachpuff:"255,218,185",peru:"205,133,63",pink:"255,192,203",plum:"221,160,221",powderblue:"176,224,230",purple:"128,0,128",red:"255,0,0",rosybrown:"188,143,143",royalblue:"65,105,225",saddlebrown:"139,69,19",salmon:"250,128,114",sandybrown:"244,164,96",seagreen:"46,139,87",seashell:"255,245,238",sienna:"160,82,45",silver:"192,192,192",skyblue:"135,206,235",slateblue:"106,90,205",slategray:"112,128,144",snow:"255,250,250",springgreen:"0,255,127",steelblue:"70,130,180",tan:"210,180,140",teal:"0,128,128",thistle:"216,191,216",tomato:"255,99,71",turquoise:"64,224,208",violet:"238,130,238",wheat:"245,222,179",whitesmoke:"245,245,245",white:"255,255,255",yellowgreen:"154,205,50",yellow:"255,255,0"}},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e=0;e=1?"":"alpha(opacity="+parseInt(100*parseFloat(n),10)+")"}else switch(e){case"name":return"opacity";case"extract":return n;case"inject":return n}}},register:function(){i&&!(i>9)||v.State.isGingerbread||(g.Lists.transformsBase=g.Lists.transformsBase.concat(g.Lists.transforms3D));for(var e=0;e8)&&3===a.split(" ").length&&(a+=" 1"),a;case"inject":return/^rgb/.test(o)?o:(i<=8?4===o.split(" ").length&&(o=o.split(/\s+/).slice(0,3).join(" ")):3===o.split(" ").length&&(o+=" 1"),(i<=8?"rgb":"rgba")+"("+o.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")")}}})();function n(e,t,n){var r="border-box"===g.getPropertyValue(t,"boxSizing").toString().toLowerCase();if(r===(n||!1)){var i,o,a=0,s="width"===e?["Left","Right"]:["Top","Bottom"],u=["padding"+s[0],"padding"+s[1],"border"+s[0]+"Width","border"+s[1]+"Width"];for(i=0;i=2&&console.log("Get "+n+": "+u),u},setPropertyValue:function(e,n,r,o,a){var s=n;if("scroll"===n)a.container?a.container["scroll"+a.direction]=r:"Left"===a.direction?t.scrollTo(r,a.alternateValue):t.scrollTo(a.alternateValue,r);else if(g.Normalizations.registered[n]&&"transform"===g.Normalizations.registered[n]("name",e))g.Normalizations.registered[n]("inject",e,r),s="transform",r=N(e).transformCache[n];else{if(g.Hooks.registered[n]){var u=n,c=g.Hooks.getRoot(n);o=o||g.getPropertyValue(e,c),r=g.Hooks.injectValue(u,r,o),n=c}if(g.Normalizations.registered[n]&&(r=g.Normalizations.registered[n]("inject",e,r),n=g.Normalizations.registered[n]("name",e)),s=g.Names.prefixCheck(n)[0],i<=8)try{e.style[s]=r}catch(l){v.debug&&console.log("Browser does not support ["+r+"] for ["+s+"]")}else{var f=N(e);f&&f.isSVG&&g.Names.SVGAttribute(n)?e.setAttribute(n,r):e.style[s]=r}v.debug>=2&&console.log("Set "+n+" ("+s+"): "+r)}return[s,r]},flushTransformCache:function(e){var t="",n=N(e);if((i||v.State.isAndroid&&!v.State.isChrome)&&n&&n.isSVG){var r=function(t){return parseFloat(g.getPropertyValue(e,t))},o={translate:[r("translateX"),r("translateY")],skewX:[r("skewX")],skewY:[r("skewY")],scale:1!==r("scale")?[r("scale"),r("scale")]:[r("scaleX"),r("scaleY")],rotate:[r("rotateZ"),0,0]};l.each(N(e).transformCache,function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate"),o[e]&&(t+=e+"("+o[e].join(" ")+") ",delete o[e])})}else{var a,s;l.each(N(e).transformCache,function(n){if(a=N(e).transformCache[n],"transformPerspective"===n)return s=a,!0;9===i&&"rotateZ"===n&&(n="rotate"),t+=n+a+" "}),s&&(t="perspective"+s+" "+t)}g.setPropertyValue(e,"transform",t)}};g.Hooks.register(),g.Normalizations.register(),v.hook=function(e,t,n){var i;return e=f(e),l.each(e,function(e,o){if(N(o)===r&&v.init(o),n===r)i===r&&(i=g.getPropertyValue(o,t));else{var a=g.setPropertyValue(o,t,n);"transform"===a[0]&&v.CSS.flushTransformCache(o),i=a}}),i};var b=function(){var e;function i(){return o?x.promise||null:a}var o,a,s,u,h,m,y=arguments[0]&&(arguments[0].p||l.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||p.isString(arguments[0].properties));p.isWrapped(this)?(o=!1,s=0,u=this,a=this):(o=!0,s=1,u=y?arguments[0].elements||arguments[0].e:arguments[0]);var x={promise:null,resolver:null,rejecter:null};if(o&&v.Promise&&(x.promise=new v.Promise(function(e,t){x.resolver=e,x.rejecter=t})),y?(h=arguments[0].properties||arguments[0].p,m=arguments[0].options||arguments[0].o):(h=arguments[s],m=arguments[s+1]),u=f(u),u){var w,S=u.length,_=0;if(!/^(stop|finish|finishAll|pause|resume)$/i.test(h)&&!l.isPlainObject(m)){var C=s+1;m={};for(var k=C;k=4&&"("===I?C++:(C&&C<5||C>=4&&")"===I&&--C<5)&&(C=0),0===k&&"r"===I||1===k&&"g"===I||2===k&&"b"===I||3===k&&"a"===I||k>=3&&"("===I?(3===k&&"a"===I&&(P=1),k++):P&&","===I?++P>3&&(k=P=0):(P&&k<(P?5:4)||k>=(P?4:3)&&")"===I&&--k<(P?5:4))&&(k=P=0)}}_===x.length&&A===m.length||(v.debug&&console.error('Trying to pattern match mis-matched strings ["'+m+'", "'+x+'"]'),c=r),c&&(O.length?(v.debug&&console.log('Pattern found "'+c+'" -> ',O,T,"["+x+","+m+"]"),x=O,m=T,N=E=""):c=r)}c||(w=S(i,x),x=w[0],E=w[1],w=S(i,m),m=w[0].replace(/^([+-\/*])=/,function(e,t){return M=t,""}),N=w[1],x=parseFloat(x)||0,m=parseFloat(m)||0,"%"===N&&(/^(fontSize|lineHeight)$/.test(i)?(m/=100,N="em"):/^scale/.test(i)?(m/=100,N=""):/(Red|Green|Blue)$/i.test(i)&&(m=m/100*255,N="")));var H=function(){var r={myParent:e.parentNode||n.body,position:g.getPropertyValue(e,"position"),fontSize:g.getPropertyValue(e,"fontSize")},i=r.position===D.lastPosition&&r.myParent===D.lastParent,o=r.fontSize===D.lastFontSize;D.lastParent=r.myParent,D.lastPosition=r.position,D.lastFontSize=r.fontSize;var a=100,s={};if(o&&i)s.emToPx=D.lastEmToPx,s.percentToPxWidth=D.lastPercentToPxWidth,s.percentToPxHeight=D.lastPercentToPxHeight;else{var u=d&&d.isSVG?n.createElementNS("http://www.w3.org/2000/svg","rect"):n.createElement("div");v.init(u),r.myParent.appendChild(u),l.each(["overflow","overflowX","overflowY"],function(e,t){v.CSS.setPropertyValue(u,t,"hidden")}),v.CSS.setPropertyValue(u,"position",r.position),v.CSS.setPropertyValue(u,"fontSize",r.fontSize),v.CSS.setPropertyValue(u,"boxSizing","content-box"),l.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(e,t){v.CSS.setPropertyValue(u,t,a+"%")}),v.CSS.setPropertyValue(u,"paddingLeft",a+"em"),s.percentToPxWidth=D.lastPercentToPxWidth=(parseFloat(g.getPropertyValue(u,"width",null,!0))||1)/a,s.percentToPxHeight=D.lastPercentToPxHeight=(parseFloat(g.getPropertyValue(u,"height",null,!0))||1)/a,s.emToPx=D.lastEmToPx=(parseFloat(g.getPropertyValue(u,"paddingLeft"))||1)/a,r.myParent.removeChild(u)}return null===D.remToPx&&(D.remToPx=parseFloat(g.getPropertyValue(n.body,"fontSize"))||16),null===D.vwToPx&&(D.vwToPx=parseFloat(t.innerWidth)/100,D.vhToPx=parseFloat(t.innerHeight)/100),s.remToPx=D.remToPx,s.vwToPx=D.vwToPx,s.vhToPx=D.vhToPx,v.debug>=1&&console.log("Unit ratios: "+JSON.stringify(s),e),s};if(/[\/*]/.test(M))N=E;else if(E!==N&&0!==x)if(0===m)N=E;else{o=o||H();var V=/margin|padding|left|right|width|text|word|letter/i.test(i)||/X$/.test(i)||"x"===i?"x":"y";switch(E){case"%":x*="x"===V?o.percentToPxWidth:o.percentToPxHeight;break;case"px":break;default:x*=o[E+"ToPx"]}switch(N){case"%":x*=1/("x"===V?o.percentToPxWidth:o.percentToPxHeight);break;case"px":break;default:x*=1/o[N+"ToPx"]}}switch(M){case"+":m=x+m;break;case"-":m=x-m;break;case"*":m*=x;break;case"/":m=x/m;break}s[i]={rootPropertyValue:h,startValue:x,currentValue:x,endValue:m,unitType:N,easing:b},c&&(s[i].pattern=c),v.debug&&console.log("tweensContainer ("+i+"): "+JSON.stringify(s[i]),e)}else v.debug&&console.log("Skipping ["+f+"] due to a lack of browser support.")};for(var B in h)if(h.hasOwnProperty(B)){var R=g.Names.camelCase(B),L=I(h[B]);if(c(g.Lists.colors,R)){var F=L[0],q=L[1],U=L[2];if(g.RegEx.isHex.test(F)){for(var $=["Red","Green","Blue"],H=g.Values.hexToRgb(F),V=U?g.Values.hexToRgb(U):r,G=0;G<$.length;G++){var W=[H[G]];q&&W.push(q),V!==r&&W.push(V[G]),z(R+$[G],W)}continue}}z(R,L)}s.element=e}s.element&&(g.Values.addClass(e,"velocity-animating"),j.push(s),d=N(e),d&&(""===a.queue&&(d.tweensContainer=s,d.opts=a),d.isAnimating=!0),_===S-1?(v.State.calls.push([j,u,a,null,x.resolver,null,0]),!1===v.State.isTicking&&(v.State.isTicking=!0,O())):_++)}if(!1!==v.mock&&(!0===v.mock?a.duration=a.delay=1:(a.duration*=parseFloat(v.mock)||1,a.delay*=parseFloat(v.mock)||1)),a.easing=A(a.easing,a.duration),a.begin&&!p.isFunction(a.begin)&&(a.begin=null),a.progress&&!p.isFunction(a.progress)&&(a.progress=null),a.complete&&!p.isFunction(a.complete)&&(a.complete=null),a.display!==r&&null!==a.display&&(a.display=a.display.toString().toLowerCase(),"auto"===a.display&&(a.display=v.CSS.Values.getDisplayType(e))),a.visibility!==r&&null!==a.visibility&&(a.visibility=a.visibility.toString().toLowerCase()),a.mobileHA=a.mobileHA&&v.State.isMobile&&!v.State.isGingerbread,!1===a.queue)if(a.delay){var y=v.State.delayedElements.count++;v.State.delayedElements[y]=e;var b=function(e){return function(){v.State.delayedElements[e]=!1,f()}}(y);N(e).delayBegin=(new Date).getTime(),N(e).delay=parseFloat(a.delay),N(e).delayTimer={setTimeout:setTimeout(f,parseFloat(a.delay)),next:b}}else f();else l.queue(e,a.queue,function(e,t){if(!0===t)return x.promise&&x.resolver(u),!0;v.velocityQueueEntryFlag=!0,f(e)});""!==a.queue&&"fx"!==a.queue||"inprogress"===l.queue(e)[0]||l.dequeue(e)}x.promise&&(h&&m&&!1===m.promiseRejectEmpty?x.resolver():x.rejecter())};v=l.extend(b,v),v.animate=b;var x=t.requestAnimationFrame||o;if(!v.State.isMobile&&n.hidden!==r){var w=function(){n.hidden?(x=function(e){return setTimeout(function(){e(!0)},16)},O()):x=t.requestAnimationFrame||o};w(),n.addEventListener("visibilitychange",w)}return e.Velocity=v,e!==t&&(e.fn.velocity=b,e.fn.velocity.defaults=v.defaults),l.each(["Down","Up"],function(e,t){v.Redirects["slide"+t]=function(e,n,i,o,a,s){var u=l.extend({},n),c=u.begin,f=u.complete,p={},h={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""};u.display===r&&(u.display="Down"===t?"inline"===v.CSS.Values.getDisplayType(e)?"inline-block":"block":"none"),u.begin=function(){for(var n in 0===i&&c&&c.call(a,a),h)if(h.hasOwnProperty(n)){p[n]=e.style[n];var r=g.getPropertyValue(e,n);h[n]="Down"===t?[r,0]:[0,r]}p.overflow=e.style.overflow,e.style.overflow="hidden"},u.complete=function(){for(var t in p)p.hasOwnProperty(t)&&(e.style[t]=p[t]);i===o-1&&(f&&f.call(a,a),s&&s.resolver(a))},v(e,h,u)}}),l.each(["In","Out"],function(e,t){v.Redirects["fade"+t]=function(e,n,i,o,a,s){var u=l.extend({},n),c=u.complete,f={opacity:"In"===t?1:0};0!==i&&(u.begin=null),u.complete=i!==o-1?null:function(){c&&c.call(a,a),s&&s.resolver(a)},u.display===r&&(u.display="In"===t?"auto":"none"),v(this,f,u)}}),v}function N(e){var t=l.data(e,"velocity");return null===t?r:t}function E(e,t){var n=N(e);n&&n.delayTimer&&!n.delayPaused&&(n.delayRemaining=n.delay-t+n.delayBegin,n.delayPaused=!0,clearTimeout(n.delayTimer.setTimeout))}function M(e,t){var n=N(e);n&&n.delayTimer&&n.delayPaused&&(n.delayPaused=!1,n.delayTimer.setTimeout=setTimeout(n.delayTimer.next,n.delayRemaining))}function S(e){return function(t){return Math.round(t*e)*(1/e)}}function _(e,n,r,i){var o=4,a=.001,s=1e-7,u=10,c=11,f=1/(c-1),l="Float32Array"in t;if(4!==arguments.length)return!1;for(var p=0;p<4;++p)if("number"!==typeof arguments[p]||isNaN(arguments[p])||!isFinite(arguments[p]))return!1;e=Math.min(e,1),r=Math.min(r,1),e=Math.max(e,0),r=Math.max(r,0);var h=l?new Float32Array(c):new Array(c);function d(e,t){return 1-3*t+3*e}function m(e,t){return 3*t-6*e}function v(e){return 3*e}function y(e,t,n){return((d(t,n)*e+m(t,n))*e+v(t))*e}function g(e,t,n){return 3*d(t,n)*e*e+2*m(t,n)*e+v(t)}function b(t,n){for(var i=0;i0?i=a:n=a}while(Math.abs(o)>s&&++c=a?b(t,u):0===l?u:w(t,n,n+f)}var E=!1;function M(){E=!0,e===n&&r===i||x()}var S=function(t){return E||M(),e===n&&r===i?t:0===t?0:1===t?1:y(N(t),n,i)};S.getControlPoints=function(){return[{x:e,y:n},{x:r,y:i}]};var _="generateBezier("+[e,n,r,i]+")";return S.toString=function(){return _},S}function A(e,t){var n=e;return p.isString(e)?v.Easings[e]||(n=!1):n=p.isArray(e)&&1===e.length?S.apply(null,e):p.isArray(e)&&2===e.length?y.apply(null,e.concat([t])):!(!p.isArray(e)||4!==e.length)&&_.apply(null,e),!1===n&&(n=v.Easings[v.defaults.easing]?v.defaults.easing:m),n}function O(e){if(e){var t=v.timestamp&&!0!==e?e:a.now(),n=v.State.calls.length;n>1e4&&(v.State.calls=s(v.State.calls),n=v.State.calls.length);for(var o=0;ou)for(var l=u-1,p=c.length;lf)if(s=u[f++],s!=s)return!0}else for(;c>f;f++)if((e||f in u)&&u[f]===n)return e||f||0;return!e&&-1}}},"5b65":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var a=i("sech",{number:o,Complex:function(e){return e.sech()},BigNumber:function(t){return new e.BigNumber(1).div(t.cosh())},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sech is no angle");return a(t.value)},"Array | Matrix":function(e){return r(e,a)}});return a.toTex={1:"\\mathrm{sech}\\left(${args[0]}\\right)"},a}function o(e){return 2/(Math.exp(e)+Math.exp(-e))}t.name="sech",t.factory=i},"5b95":function(e,t,n){"use strict";e.exports={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]}},"5c31":function(e,t,n){"use strict";var r=n("4b6a");t.transform=function(e){return e&&e.isIndexError?new r(e.index+1,e.min+1,void 0!==e.max?e.max+1:void 0):e}},"5c3f":function(e,t,n){"use strict";e.exports={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]}},"5ca1":function(e,t,n){var r=n("7726"),i=n("8378"),o=n("32e9"),a=n("2aba"),s=n("9b43"),u="prototype",c=function(e,t,n){var f,l,p,h,d=e&c.F,m=e&c.G,v=e&c.S,y=e&c.P,g=e&c.B,b=m?r:v?r[t]||(r[t]={}):(r[t]||{})[u],x=m?i:i[t]||(i[t]={}),w=x[u]||(x[u]={});for(f in m&&(n=t),n)l=!d&&b&&void 0!==b[f],p=(l?b:n)[f],h=g&&l?s(p,r):y&&"function"==typeof p?s(Function.call,p):p,b&&a(b,f,p,e&c.U),x[f]!=p&&o(x,f,h),y&&w[f]!=p&&(w[f]=p)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},"5cc5":function(e,t,n){var r=n("2b4c")("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(a){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},e(o)}catch(a){}return n}},"5d3b":function(e,t,n){"use strict";function r(e,t,n,r,i){return function(t,n){var r=e[n&&n.mathjs]||i.expression&&i.expression.node[n&&n.mathjs];return r&&"function"===typeof r.fromJSON?r.fromJSON(n):n}}t.name="reviver",t.path="json",t.factory=r,t.math=!0},"5d58":function(e,t,n){e.exports=n("d8d6")},"5d5c":function(e,t,n){"use strict";var r=n("d7df").isInteger,i=n("9707");function o(e,t,o,a){var s=n("6c54"),u=o(n("4781")),c=o(n("858b")),f=o(n("5d77")),l=o(n("ff3e")),p=o(n("cdb0")),h=o(n("04b6")),d=a("bitXor",{"number, number":function(e,t){if(!r(e)||!r(t))throw new Error("Integers expected in function bitXor");return e^t},"BigNumber, BigNumber":i,"SparseMatrix, SparseMatrix":function(e,t){return f(e,t,d)},"SparseMatrix, DenseMatrix":function(e,t){return c(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return c(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return p(e,t,d)},"Array, Array":function(e,t){return d(u(e),u(t)).valueOf()},"Array, Matrix":function(e,t){return d(u(e),t)},"Matrix, Array":function(e,t){return d(e,u(t))},"SparseMatrix, any":function(e,t){return l(e,t,d,!1)},"DenseMatrix, any":function(e,t){return h(e,t,d,!1)},"any, SparseMatrix":function(e,t){return l(t,e,d,!0)},"any, DenseMatrix":function(e,t){return h(t,e,d,!0)},"Array, any":function(e,t){return h(u(e),t,d,!1).valueOf()},"any, Array":function(e,t){return h(u(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}".concat(s.operators["bitXor"],"${args[1]}\\right)")},d}t.name="bitXor",t.factory=o},"5d77":function(e,t,n){"use strict";var r=n("5fc9");function i(e,t,n,i){var o=e.DenseMatrix,a=function(e,t,n){var a=e._size,u=e._datatype,c=t._size,f=t._datatype;if(a.length!==c.length)throw new r(a.length,c.length);if(a[0]!==c[0]||a[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+c+")");var l,p,h,d=a[0],m=a[1],v=0,y=n;"string"===typeof u&&u===f&&(l=u,v=i.convert(0,l),y=i.find(n,[l,l]));var g=[];for(p=0;p=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},"5e24":function(e,t,n){"use strict";e.exports={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]}},"5ed6":function(e,t,n){"use strict";e.exports={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]}},"5eda":function(e,t,n){var r=n("5ca1"),i=n("8378"),o=n("79e5");e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},"5f1b":function(e,t,n){"use strict";var r=n("23c6"),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"===typeof n){var o=n.call(e,t);if("object"!==typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},"5f62":function(e,t,n){"use strict";e.exports={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]}},"5f7a":function(e,t,n){"use strict";function r(e,t,n){return function(){for(var t=[],n=0,r=arguments.length;n0?0:2;else if(i&&!0===i.isSet)i=i.map(function(e){return e-1});else if(e.isArray(i)||e.isMatrix(i))i=i.map(function(e){return e-1});else if(e.isNumber(i))i--;else if(e.isBigNumber(i))i=i.toNumber()-1;else if("string"!==typeof i)throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");t[n]=i}var o=new e.Index;return e.Index.apply(o,t),o}}t.name="index",t.path="expression.transform",t.factory=r},"5fc9":function(e,t,n){"use strict";function r(e,t,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=(new Error).stack}r.prototype=new RangeError,r.prototype.constructor=RangeError,r.prototype.name="DimensionError",r.prototype.isDimensionError=!0,e.exports=r},"606f":function(e,t,n){"use strict";e.exports={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]}},"60a6":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,i,o){var a=n("6c54"),s=o("expm1",{number:Math.expm1||u,Complex:function(t){var n=Math.exp(t.re);return new e.Complex(n*Math.cos(t.im)-1,n*Math.sin(t.im))},BigNumber:function(e){return e.exp().minus(1)},"Array | Matrix":function(e){return r(e,s)}});function u(e){return e>=2e-4||e<=-2e-4?Math.exp(e)-1:e+e*e/2+e*e*e/6}return s.toTex="\\left(e".concat(a.operators["pow"],"{${args[0]}}-1\\right)"),s}t.name="expm1",t.factory=i},"613b":function(e,t,n){var r=n("5537")("keys"),i=n("ca5a");e.exports=function(e){return r[e]||(r[e]=i(e))}},6194:function(e,t,n){"use strict";var r=n("5c31").transform;function i(e,t,i,o){var a=i(n("d70a"));return o("concat",{"...any":function(t){var n=t.length-1,i=t[n];e.isNumber(i)?t[n]=i-1:e.isBigNumber(i)&&(t[n]=i.minus(1));try{return a.apply(null,t)}catch(o){throw r(o)}}})}t.name="concat",t.path="expression.transform",t.factory=i},"61dc":function(e,t,n){"use strict";var r=n("b13c").flatten;function i(e,t,i,o){var a=i(n("2f39")),s=i(n("d70a")),u=i(n("bfb7")),c=i(n("59a8")),f=i(n("5a7e")),l=o("setSymDifference",{"Array | Matrix, Array | Matrix":function(e,t){if(0===c(u(e),new a(0)))return r(t);if(0===c(u(t),new a(0)))return r(e);var n=r(e),i=r(t);return s(f(n,i),f(i,n))}});return l}t.name="setSymDifference",t.factory=i},6201:function(e,t,n){"use strict";var r=n("6762").clone,i=n("3d75").format;function o(e,t,o,a){var s=o(n("4781")),u=o(n("3447")),c=a("trace",{Array:function(e){return f(s(e))},SparseMatrix:l,DenseMatrix:f,any:r});function f(e){var t=e._size,n=e._data;switch(t.length){case 1:if(1===t[0])return r(n[0]);throw new RangeError("Matrix must be square (size: "+i(t)+")");case 2:var o=t[0],a=t[1];if(o===a){for(var s=0,c=0;c0)for(var f=0;ff)break}return c}throw new RangeError("Matrix must be square (size: "+i(o)+")")}return c.toTex={1:"\\mathrm{tr}\\left(${args[0]}\\right)"},c}t.name="trace",t.factory=o},"625b":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,i,o){var a=n("6c54"),s=o("complex",{"":function(){return e.Complex.ZERO},number:function(t){return new e.Complex(t,0)},"number, number":function(t,n){return new e.Complex(t,n)},"BigNumber, BigNumber":function(t,n){return new e.Complex(t.toNumber(),n.toNumber())},Complex:function(e){return e.clone()},string:function(t){return e.Complex(t)},null:function(t){return e.Complex(0)},Object:function(t){if("re"in t&&"im"in t)return new e.Complex(t.re,t.im);if("r"in t&&"phi"in t||"abs"in t&&"arg"in t)return new e.Complex(t);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":function(e){return r(e,s)}});return s.toTex={0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(a.symbols["i"],"\\cdot\\left(${args[1]}\\right)\\right)")},s}t.name="complex",t.factory=i},"626a":function(e,t,n){var r=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},"62a0":function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},"62cb":function(e,t,n){"use strict";e.exports={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]}},"62de":function(e,t,n){"use strict";e.exports={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]}},"63b6":function(e,t,n){var r=n("e53d"),i=n("584a"),o=n("d864"),a=n("35e8"),s=n("07e3"),u="prototype",c=function(e,t,n){var f,l,p,h=e&c.F,d=e&c.G,m=e&c.S,v=e&c.P,y=e&c.B,g=e&c.W,b=d?i:i[t]||(i[t]={}),x=b[u],w=d?r:m?r[t]:(r[t]||{})[u];for(f in d&&(n=t),n)l=!h&&w&&void 0!==w[f],l&&s(b,f)||(p=l?w[f]:n[f],b[f]=d&&"function"!=typeof w[f]?n[f]:y&&l?o(p,r):g&&w[f]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[u]=e[u],t}(p):v&&"function"==typeof p?o(Function.call,p):p,v&&((b.virtual||(b.virtual={}))[f]=p,e&c.R&&x&&!x[f]&&a(x,f,p)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},"63ca":function(e,t,n){"use strict";e.exports=[n("0281"),n("68e3"),n("2dc7"),n("5d5c"),n("560c"),n("f64e"),n("f84b")]},6484:function(e,t,n){"use strict";e.exports={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number, number": f(x)=x+x })',"double(2)",'double("hello")'],seealso:[]}},"652d":function(e,t,n){"use strict";var r=n("2c72"),i=n("5fc9"),o=r.string,a=r.array,s=r.object,u=r.number,c=Array.isArray,f=u.isNumber,l=u.isInteger,p=o.isString,h=a.validateIndex;function d(e,t,u,d){var m=u(n("c459")),v=u(n("a216"));function y(t,n){if(!(this instanceof y))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=M(t),this._size=a.size(this._data),a.validate(this._data,this._size),this._datatype=n;else{if(t)throw new TypeError("Unsupported type of data ("+r.types.type(t)+")");this._data=[],this._size=[0],this._datatype=n}}function g(t,n){if(!e.isIndex(n))throw new TypeError("Invalid index");var r=n.isScalar();if(r)return t.get(n.min());var o=n.size();if(o.length!==t._size.length)throw new i(o.length,t._size.length);for(var a=n.min(),s=n.max(),u=0,c=t._size.length;u");var h=n.max().map(function(e){return e+1});E(t,h,o);var d=c.length,m=0;w(t._data,n,r,d,m)}return t}function w(e,t,n,r,i){var o=i===r-1,a=t.dimension(i);o?a.forEach(function(t,r){h(t),e[t]=n[r[0]]}):a.forEach(function(o,a){h(o),w(e[o],t,n[a[0]],r,i+1)})}function N(e,t,n){if(0===t.length){var r=e._data;while(c(r))r=r[0];return r}return e._size=t.slice(0),e._data=a.resize(e._data,e._size,n),e}function E(e,t,n){var r=e._size.slice(0),i=!1;while(r.lengthr[o]&&(r[o]=t[o],i=!0);i&&N(e,r,n)}function M(e){for(var t=0,n=e.length;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,h=r<0?-r:0,m=t[0],v=t[1],g=Math.min(m-h,v-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 b=n.size();if(1!==b.length||b[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 x=[];if(t.length>0){x=a.resize(x,t,i);for(var w=0;wn?1:-1}return c.toTex=void 0,c}t.name="compareText",t.factory=r},"66d1":function(e,t,n){"use strict";var r=n("1123"),i=n("1c94"),o=n("d7df").isNumber;function a(e,t,a,s,u){var c=a(n("4781")),f=n("b13c"),l=a(n("2f3d"));function p(t){if(!h.hasOwnProperty(t))throw new Error("Unknown distribution "+t);var n=Array.prototype.slice.call(arguments,1),a=h[t].apply(this,n);return function(t){var n={random:function(t,n,a){var s,f,l;if(arguments.length>3)throw new r("random",arguments.length,0,3);if(1===arguments.length?i(t)?s=t:l=t:2===arguments.length?i(t)?(s=t,l=n):(f=t,l=n):(s=t,f=n,l=a),void 0!==f&&!o(f)||void 0!==l&&!o(l))throw new TypeError("Invalid argument in function random");if(void 0===l&&(l=1),void 0===f&&(f=0),void 0!==s){var p=h(s.valueOf(),f,l,u);return e.isMatrix(s)?c(p):p}return u(f,l)},randomInt:s({"number | Array":function(t){var n=0;if(i(t)){var r=t,o=1,a=h(r.valueOf(),n,o,p);return e.isMatrix(r)?c(a):a}var s=t;return p(n,s)},"number | Array, number":function(t,n){if(i(t)){var r=t,o=n,a=0,s=h(r.valueOf(),a,o,p);return e.isMatrix(r)?c(s):s}var u=t,f=n;return p(u,f)},"Array, number, number":function(e,t,n){var r=h(e.valueOf(),t,n,p);return e&&!0===e.isMatrix?c(r):r}}),pickRandom:s({Array:function(e){return a(e)},"Array, number | Array":function(e,t){var n,r;if(Array.isArray(t))r=t;else{if(!o(t))throw new TypeError("Invalid argument in function pickRandom");n=t}return a(e,n,r)},"Array, number | Array, Array | number":function(e,t,n){var r,i;if(Array.isArray(t)?(i=t,r=n):(i=n,r=t),!Array.isArray(i)||!o(r))throw new TypeError("Invalid argument in function pickRandom");return a(e,r,i)}})};function a(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(f.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];var p,h=[];while(h.length1)for(var o=0,a=e.shift();o1)e=l(),t=l(),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}t.name="distribution",t.factory=a},6718:function(e,t,n){var r=n("e53d"),i=n("584a"),o=n("b8e3"),a=n("ccb9"),s=n("d9f6").f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},6736:function(e,t,n){"use strict";function r(e,t,n,r){return function(){throw new Error('Function "eye" is renamed to "identity" since mathjs version 5.0.0. To keep eye working, create an alias for it using "math.import({eye: math.identity}, {override: true})"')}}t.name="eye",t.factory=r},6762: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},r(e)}var i=n("a6f4");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;i1?arguments[1]:void 0)}}),n("9c6c")("includes")},"67bb":function(e,t,n){e.exports=n("f921")},"67e5":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},r(e)}function i(){return i=Object.assign||function(e){for(var t=1;t'+a(this.fn)+'('+t.join(',')+')'};var b=v.prototype.toTex;return v.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:b.call(this,e)},v.prototype._toTex=function(e){var t,n,i=this.args.map(function(t){return t.toTex(e)});switch(!h[this.name]||"function"!==typeof h[this.name].toTex&&"object"!==r(h[this.name].toTex)&&"string"!==typeof h[this.name].toTex||(t=h[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);break}}return"undefined"!==typeof n?n:g(o.defaultTemplate,this,e)},v.prototype.getIdentifier=function(){return this.type+":"+this.name},v}t.name="FunctionNode",t.path="expression.node",t.math=!0,t.factory=l},"67e7":function(e,t,n){"use strict";var r=n("dcb2"),i=n("aeae"),o=n("1b6d");function a(e,t,a,s){var u=a(n("5d7b")),c=a(n("0f62")),f=s("sum",{"Array | Matrix":l,"Array | Matrix, number | BigNumber":p,"...":function(e){if(o(e))throw new TypeError("Scalar values expected in function sum");return l(e)}});return f.toTex=void 0,f;function l(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 p(e,t){try{var n=i(e,t,u);return n}catch(r){throw c(r,"sum")}}}t.name="sum",t.factory=a},6821:function(e,t,n){var r=n("626a"),i=n("be13");e.exports=function(e){return r(i(e))}},6856:function(e,t,n){"use strict";e.exports={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]}},"686d":function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,a,s,u,c,f){var l,p,h,d,m=e._values,v=e._index,y=e._ptr,g=a._index;if(r)for(p=y[t],h=y[t+1],l=p;l>",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,n?i.hasOwnProperty(e)?i[e]:"\\mathrm{"+t.escape(e)+"}":t.symbols.hasOwnProperty(e)?t.symbols[e]:t.escape(e)}},"6c70":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("4781")),a=r(n("58f1")),s=r(n("a226")),u=r(n("3b53")),c=r(n("863e")),f=r(n("a09b")),l=e.DenseMatrix,p=i("lsolve",{"SparseMatrix, Array | Matrix":function(e,t){return d(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return h(e,t)},"Array, Array | Matrix":function(e,t){var n=o(e),r=h(n,t);return r.valueOf()}});function h(e,t){t=f(e,t,!0);for(var n=t._data,r=e._size[0],i=e._size[1],o=[],p=e._data,h=0;hy&&(x.push(h[r]),w.push(n));if(c(b,0))throw new Error("Linear system cannot be solved since matrix is singular");var E=a(g,b);for(r=0,N=w.length;r=a.length)throw new o(t,a.length);return i(e)?e.create(s(e.valueOf(),t,n)):s(e,t,n)}});return f.toTex=void 0,f}function s(e,t,n){var r,i,o;if(t<=0){if(Array.isArray(e[0])){for(o=u(e),i=[],r=0;r=c?e?"":void 0:(o=s.charCodeAt(u),o<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536)}}},"71da":function(e,t,n){"use strict";e.exports={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]}},"72ab":function(e,t,n){"use strict";e.exports=[n("0ca7"),n("2cfb"),n("2939"),n("1444"),n("5a7b"),n("a0d1"),n("efc3"),n("ee51"),n("5da8"),n("f531"),n("0830")]},7333:function(e,t,n){"use strict";var r=n("0d58"),i=n("2621"),o=n("52a7"),a=n("4bf8"),s=n("626a"),u=Object.assign;e.exports=!u||n("79e5")(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){var n=a(e),u=arguments.length,c=1,f=i.f,l=o.f;while(u>c){var p,h=s(arguments[c++]),d=f?r(h).concat(f(h)):r(h),m=d.length,v=0;while(m>v)l.call(h,p=d[v++])&&(n[p]=h[p])}return n}:u},7346:function(e,t,n){"use strict";function r(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}t.name="ResultSet",t.path="type",t.factory=r},"73c1":function(e,t,n){"use strict";e.exports={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]}},"74ba":function(e,t,n){"use strict";e.exports={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]}},7514:function(e,t,n){"use strict";var r=n("5ca1"),i=n("0a49")(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")(o)},7617:function(e,t,n){"use strict";function r(e,t,n,r){function i(){throw new Error("UpdateNode is deprecated. Use AssignmentNode instead.")}return i}t.name="UpdateNode",t.path="expression.node",t.factory=r},7618:function(e,t,n){"use strict";n.d(t,"a",function(){return u});var r=n("5d58"),i=n.n(r),o=n("67bb"),a=n.n(o);function s(e){return s="function"===typeof a.a&&"symbol"===typeof i.a?function(e){return typeof e}:function(e){return e&&"function"===typeof a.a&&e.constructor===a.a&&e!==a.a.prototype?"symbol":typeof e},s(e)}function u(e){return u="function"===typeof a.a&&"symbol"===s(i.a)?function(e){return s(e)}:function(e){return e&&"function"===typeof a.a&&e.constructor===a.a&&e!==a.a.prototype?"symbol":s(e)},u(e)}},7634:function(e,t,n){"use strict";var r,i,o;(function(n,a){i=[],r=a,o="function"===typeof r?r.apply(t,i):r,void 0===o||(e.exports=o)})(0,function(){function e(){return!0}function t(){return!1}function n(){}function r(){var i=[{name:"number",test:function(e){return"number"===typeof e}},{name:"string",test:function(e){return"string"===typeof e}},{name:"boolean",test:function(e){return"boolean"===typeof e}},{name:"Function",test:function(e){return"function"===typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"===typeof e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],o={name:"any",test:e},a=[],s=[],u={types:i,conversions:s,ignore:a};function c(e){var t=Y(u.types,function(t){return t.name===e});if(t)return t;if("any"===e)return o;var n=Y(u.types,function(t){return t.name.toLowerCase()===e.toLowerCase()});throw new TypeError('Unknown type "'+e+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function f(e){return e===o?999:u.types.indexOf(e)}function l(e){var t=Y(u.types,function(t){return t.test(e)});if(t)return t.name;throw new TypeError("Value has unknown type. Value: "+e)}function p(e,t){if(!e.signatures)throw new TypeError("Function is no typed-function");var n;if("string"===typeof t){n=t.split(",");for(var r=0;r3?e.slice(3):"any":e,i=r.split("|").map(L).filter(F).filter(j),o=k(t,i),a=i.map(function(e){var t=c(e);return{name:e,typeIndex:f(t),test:t.test,conversion:null,conversionIndex:-1}}),s=o.map(function(e){var n=c(e.from);return{name:e.from,typeIndex:f(n),test:n.test,conversion:e,conversionIndex:t.indexOf(e)}});return{types:a.concat(s),restParam:n}}function v(e,t,n){var r=[];return""!==e.trim()&&(r=e.split(",").map(L).map(function(e,t,r){var i=m(e,n);if(i.restParam&&t!==r.length-1)throw new SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return i})),r.some(U)?null:{params:r,fn:t}}function y(e){var t=H(e);return!!t&&t.restParam}function g(e){return e.types.some(function(e){return null!=e.conversion})}function b(t){if(t&&0!==t.types.length){if(1===t.types.length)return c(t.types[0].name).test;if(2===t.types.length){var n=c(t.types[0].name).test,r=c(t.types[1].name).test;return function(e){return n(e)||r(e)}}var i=t.types.map(function(e){return c(e.name).test});return function(e){for(var t=0;t=i+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=b(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=b(e[0]),r=b(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(b),function(e){for(var n=0;n0){var c=l(t[o]);return r=new TypeError("Unexpected type of argument in function "+a+" (expected: "+i.join(" or ")+", actual: "+c+", index: "+o+")"),r.data={category:"wrongType",fn:a,index:o,actual:c,expected:i},r}}else s=u}var f=s.map(function(e){return y(e.params)?1/0:e.params.length});if(t.lengthp?(r=new TypeError("Too many arguments in function "+a+" (expected: "+p+", actual: "+t.length+")"),r.data={category:"tooManyArgs",fn:a,index:t.length,expectedLength:p},r):(r=new TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+a+"."),r.data={category:"mismatch",actual:t.map(l)},r)}function A(e){for(var t=999,n=0;n=a:c?a>=s:a===s}function D(e,r){if(0===Object.keys(r).length)throw new SyntaxError("No signatures provided");var i=[];Object.keys(r).map(function(e){return v(e,r[e],u.conversions)}).filter(q).forEach(function(e){var t=Y(i,function(t){return R(t,e)});if(t)throw new TypeError('Conflicting signatures "'+d(t.params)+'" and "'+d(e.params)+'".');i.push(e)});var o=Z(i,function(e){var t=e?B(e.params,!1):[];return t.map(function(t){return{params:t,fn:e.fn}})}).filter(q);o.sort(C);var a=o[0]&&o[0].params.length<=2&&!y(o[0].params),s=o[1]&&o[1].params.length<=2&&!y(o[1].params),c=o[2]&&o[2].params.length<=2&&!y(o[2].params),f=o[3]&&o[3].params.length<=2&&!y(o[3].params),l=o[4]&&o[4].params.length<=2&&!y(o[4].params),p=o[5]&&o[5].params.length<=2&&!y(o[5].params),h=a&&s&&c&&f&&l&&p,m=o.map(function(e){return x(e.params)}),g=a?b(o[0].params[0]):t,w=s?b(o[1].params[0]):t,N=c?b(o[2].params[0]):t,E=f?b(o[3].params[0]):t,M=l?b(o[4].params[0]):t,S=p?b(o[5].params[0]):t,A=a?b(o[0].params[1]):t,O=s?b(o[1].params[1]):t,T=c?b(o[2].params[1]):t,k=f?b(o[3].params[1]):t,I=l?b(o[4].params[1]):t,D=p?b(o[5].params[1]):t,j=o.map(function(e){return P(e.params,e.fn)}),L=a?j[0]:n,F=s?j[1]:n,U=c?j[2]:n,$=f?j[3]:n,H=l?j[4]:n,V=p?j[5]:n,G=a?o[0].params.length:-1,W=s?o[1].params.length:-1,X=c?o[2].params.length:-1,J=f?o[3].params.length:-1,Q=l?o[4].params.length:-1,K=p?o[5].params.length:-1,ee=h?6:0,te=o.length,ne=function(){for(var t=ee;t=-1||t.predictable){n=1/n;var r=Math.sqrt(n*n-1);return n>0||t.predictable?Math.log(r+n):new e.Complex(Math.log(r-n),Math.PI)}return new e.Complex(n,0).asech()},Complex:function(e){return e.asech()},BigNumber:function(t){return new e.BigNumber(1).div(t).acosh()},"Array | Matrix":function(e){return r(e,o)}});return o.toTex={1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},o}t.name="asech",t.factory=i},"7c2e":function(e,t,n){"use strict";e.exports={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]}},"7c7b":function(e,t,n){"use strict";var r=n("5c31").transform;function i(e,t,i,o){var a=i(n("8675"));return o("row",{"...any":function(t){var n=t.length-1,i=t[n];e.isNumber(i)&&(t[n]=i-1);try{return a.apply(null,t)}catch(o){throw r(o)}}})}t.name="row",t.path="expression.transform",t.factory=i},"7cd6":function(e,t,n){var r=n("40c3"),i=n("5168")("iterator"),o=n("481b");e.exports=n("584a").getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},"7ce7":function(e,t,n){"use strict";e.exports={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]}},"7d27":function(e,t,n){"use strict";e.exports={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]}},"7d3c":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("abs",{number:Math.abs,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},Fraction:function(e){return e.abs()},"Array | Matrix":function(e){return r(e,o,!0)},Unit:function(e){return e.abs()}});return o.toTex={1:"\\left|${args[0]}\\right|"},o}t.name="abs",t.factory=i},"7dbd":function(e,t,n){"use strict";e.exports=[n("51d3"),n("d581")]},"7e90":function(e,t,n){var r=n("d9f6"),i=n("e4ae"),o=n("c3a1");e.exports=n("8e60")?Object.defineProperties:function(e,t){i(e);var n,a=o(t),s=a.length,u=0;while(s>u)r.f(e,n=a[u++],t[n]);return e}},"7ed7":function(e,t,n){"use strict";e.exports={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]}},"7f20":function(e,t,n){var r=n("86cc").f,i=n("69a8"),o=n("2b4c")("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},"7f61":function(e,t,n){"use strict";e.exports={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]}},"7f77":function(e,t,n){"use strict";e.exports={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]}},"7f7f":function(e,t,n){var r=n("86cc").f,i=Function.prototype,o=/^\s*function ([^ (]*)/,a="name";a in i||n("9e1e")&&r(i,a,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},"7fc2":function(e,t,n){"use strict";e.exports={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]}},"7fd1":function(e,t,n){"use strict";var r=n("5c31").transform,i=n("1c94");function o(e,t,o,a){var s=o(n("8ad0"));return a("max",{"...any":function(t){if(2===t.length&&i(t[0])){var n=t[1];e.isNumber(n)?t[1]=n-1:e.isBigNumber(n)&&(t[1]=n.minus(1))}try{return s.apply(null,t)}catch(o){throw r(o)}}})}t.name="max",t.path="expression.transform",t.factory=o},8079:function(e,t,n){var r=n("7726"),i=n("1991").set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n("2d95")(a);e.exports=function(){var e,t,n,c=function(){var r,i;u&&(r=a.domain)&&r.exit();while(e){i=e.fn,e=e.next;try{i()}catch(o){throw e?n():t=void 0,o}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(c)}}else n=function(){i.call(r,c)};else{var l=!0,p=document.createTextNode("");new o(c).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},8156:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("atan",{number:function(e){return Math.atan(e)},Complex:function(e){return e.atan()},BigNumber:function(e){return e.atan()},"Array | Matrix":function(e){return r(e,o,!0)}});return o.toTex={1:"\\tan^{-1}\\left(${args[0]}\\right)"},o}t.name="atan",t.factory=i},"815f":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("4781")),a=n("6c54"),s=r(n("e1fc")),u=r(n("858b")),c=r(n("6573")),f=r(n("9ebd")),l=r(n("ff3e")),p=r(n("cdb0")),h=r(n("04b6")),d=i("mod",{"number, number":m,"BigNumber, BigNumber":function(e,t){return t.isZero()?e:e.mod(t)},"Fraction, Fraction":function(e,t){return e.mod(t)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,d,!1)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,d,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,d,!1)},"DenseMatrix, DenseMatrix":function(e,t){return p(e,t,d)},"Array, Array":function(e,t){return d(o(e),o(t)).valueOf()},"Array, Matrix":function(e,t){return d(o(e),t)},"Matrix, Array":function(e,t){return d(e,o(t))},"SparseMatrix, any":function(e,t){return f(e,t,d,!1)},"DenseMatrix, any":function(e,t){return h(e,t,d,!1)},"any, SparseMatrix":function(e,t){return l(t,e,d,!0)},"any, DenseMatrix":function(e,t){return h(t,e,d,!0)},"Array, any":function(e,t){return h(o(e),t,d,!1).valueOf()},"any, Array":function(e,t){return h(o(t),e,d,!0).valueOf()}});return d.toTex={2:"\\left(${args[0]}".concat(a.operators["mod"],"${args[1]}\\right)")},d;function m(e,t){if(t>0)return e-t*Math.floor(e/t);if(0===t)return e;throw new Error("Cannot calculate mod for a negative divisor")}}t.name="mod",t.factory=r},"81ad":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var a=i("coth",{number:o,Complex:function(e){return e.coth()},BigNumber:function(t){return new e.BigNumber(1).div(t.tanh())},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function coth is no angle");return a(t.value)},"Array | Matrix":function(e){return r(e,a)}});return a.toTex={1:"\\coth\\left(${args[0]}\\right)"},a}function o(e){var t=Math.exp(2*e);return(t+1)/(t-1)}t.name="coth",t.factory=i},8292:function(e,t,n){"use strict";var r=n("2c72"),i=r.object;function o(e,t,r,o){var a=r(n("4781")),s=r(n("7d3c")),u=r(n("5d7b")),c=r(n("58f1")),f=r(n("a226")),l=r(n("3b53")),p=r(n("1fe4")),h=r(n("863e")),d=r(n("ec38")),m=e.SparseMatrix,v=e.DenseMatrix,y=e.Spa,g=o("lup",{DenseMatrix:function(e){return b(e)},SparseMatrix:function(e){return x(e)},Array:function(e){var t=a(e),n=b(t);return{L:n.L.valueOf(),U:n.U.valueOf(),p:n.p}}});function b(e){var t,n,r,o=e._size[0],a=e._size[1],d=Math.min(o,a),m=i.clone(e._data),y=[],g=[o,d],b=[],x=[d,a],w=[];for(t=0;t0)for(t=0;t0&&e.forEach(0,n-1,function(t,n){m._forEachRow(t,g,b,x,function(r,i){r>t&&e.accumulate(r,d(f(i,n)))})});var A=n,T=e.get(n),C=s(T);e.forEach(n+1,i-1,function(e,t){var n=s(t);p(n,C)&&(A=e,C=n,T=t)}),n!==A&&(m._swapRows(n,A,w[1],g,b,x),m._swapRows(n,A,S[1],N,E,M),e.swap(n,A),O(n,A)),e.forEach(0,i-1,function(e,t){e<=n?(N.push(t),E.push(e)):(t=c(t,T),h(t,0)||(g.push(t),b.push(e)))})};for(n=0;n0&&(o=e[a]);return m(o,i)}var s=f(e,(t-1)/2);return d(s)}catch(u){throw l(u,"median")}}var d=a({"number | BigNumber | Complex | Unit":function(e){return e}}),m=a({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(e,t){return u(s(e,t),2)}});return p.toTex=void 0,p}t.name="median",t.factory=o},"835d":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("452b")),a=r(n("d153")),s=r(n("d1f6")),u=r(n("9454")),c=n("d7df"),f=r(n("922a")),l=r(n("badf")),p=r(n("157d")),h=i("rationalize",{string:function(e){return h(u(e),{},!1)},"string, boolean":function(e,t){return h(u(e),{},t)},"string, Object":function(e,t){return h(u(e),t,!1)},"string, Object, boolean":function(e,t,n){return h(u(e),t,n)},Node:function(e){return h(e,{},!1)},"Node, boolean":function(e,t){return h(e,{},t)},"Node, Object":function(e,t){return h(e,t,!1)},"Node, Object, boolean":function(e,t,n){var r=m(),i=d(e,t,!0,r.firstRules),a=i.variables.length;if(e=i.expression,a>=1){var s,u;e=v(e);var c,f=!0,l=!1;e=o(e,r.firstRules,{},{exactFractions:!1});while(1){if(u=f?r.distrDivRules:r.sucDivRules,e=o(e,u),f=!f,c=e.toString(),c===s)break;l=!0,s=c}l&&(e=o(e,r.firstRulesAgain,{},{exactFractions:!1})),e=o(e,r.finalRules,{},{exactFractions:!1})}var p=[],h={};return"OperatorNode"===e.type&&e.isBinary()&&"/"===e.op?(1===a&&(e.args[0]=y(e.args[0],p),e.args[1]=y(e.args[1])),n&&(h.numerator=e.args[0],h.denominator=e.args[1])):(1===a&&(e=y(e,p)),n&&(h.numerator=e,h.denominator=null)),n?(h.coefficients=p,h.variables=i.variables,h.expression=e,h):e}});function d(e,t,n,r){var i=[],a=o(e,r,t,{exactFractions:!1});n=!!n;var s="+-*"+(n?"/":"");f(a);var u={};return u.expression=a,u.variables=i,u;function f(e){var t=e.type;if("FunctionNode"===t)throw new Error("There is an unsolved function call");if("OperatorNode"===t)if("^"===e.op){if("unaryMinus"===e.args[1].fn&&(e=e.args[0]),"ConstantNode"!==e.args[1].type||!c.isInteger(parseFloat(e.args[1].value)))throw new Error("There is a non-integer exponent");f(e.args[0])}else{if(-1===s.indexOf(e.op))throw new Error("Operator "+e.op+" invalid in polynomial expression");for(var n=0;n1;if("OperatorNode"===r&&e.isBinary()){var o,a=!1;if("^"===e.op&&("ParenthesisNode"!==e.args[0].type&&"OperatorNode"!==e.args[0].type||"ConstantNode"!==e.args[1].type||(o=parseFloat(e.args[1].value),a=o>=2&&c.isInteger(o))),a){if(o>2){var s=e.args[0],u=new l("^","pow",[e.args[0].cloneDeep(),new f(o-1)]);e=new l("*","multiply",[s,u])}else e=new l("*","multiply",[e.args[0],e.args[0].cloneDeep()]);i&&("content"===n?t.content=e:t.args[n]=e)}}if("ParenthesisNode"===r)v(e.content,e,"content");else if("ConstantNode"!==r&&"SymbolNode"!==r)for(var p=0;p=0;s--)if(0!==t[s]){var u=new f(a?t[s]:Math.abs(t[s])),h=t[s]<0?"-":"+";if(s>0){var d=new p(i);if(s>1){var m=new f(s);d=new l("^","pow",[d,m])}u=-1===t[s]&&a?new l("-","unaryMinus",[d]):1===Math.abs(t[s])?d:new l("*","multiply",[u,d])}o=a?u:"+"===h?new l("+","add",[o,u]):new l("-","subtract",[o,u]),a=!1}return a?new f(0):o;function v(e,n,o){var a=e.type;if("FunctionNode"===a)throw new Error("There is an unsolved function call");if("OperatorNode"===a){if(-1==="+-*^".indexOf(e.op))throw new Error("Operator "+e.op+" invalid");if(null!==n){if(("unaryMinus"===e.fn||"pow"===e.fn)&&"add"!==n.fn&&"subtract"!==n.fn&&"multiply"!==n.fn)throw new Error("Invalid "+e.op+" placing");if(("subtract"===e.fn||"add"===e.fn||"multiply"===e.fn)&&"add"!==n.fn&&"subtract"!==n.fn)throw new Error("Invalid "+e.op+" placing");if(("subtract"===e.fn||"add"===e.fn||"unaryMinus"===e.fn)&&0!==o.noFil)throw new Error("Invalid "+e.op+" placing")}"^"!==e.op&&"*"!==e.op||(o.fire=e.op);for(var s=0;sr&&(t[u]=0),t[u]+=o.cte*("+"===o.oper?1:-1),void(r=Math.max(u,r))}o.cte=u,""===o.fire&&(t[0]+=o.cte*("+"===o.oper?1:-1))}}}return h}t.name="rationalize",t.factory=r},8378:function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"83a1":function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},8436:function(e,t){e.exports=function(){}},"84dc":function(e,t,n){"use strict";var r=n("5c31").transform;function i(e,t,i,o){var a=i(n("6caf"));return o("apply",{"...any":function(t){var n=t[1];e.isNumber(n)?t[1]=n-1:e.isBigNumber(n)&&(t[1]=n.minus(1));try{return a.apply(null,t)}catch(i){throw r(i)}}})}t.name="apply",t.path="expression.transform",t.factory=i},"84f2":function(e,t){e.exports={}},"857e":function(e,t,n){"use strict";e.exports="5.10.0"},"858b":function(e,t,n){"use strict";var r=n("5fc9");function i(e,t,n,i){var o=e.DenseMatrix,a=function(e,t,n,a){var s=e._data,u=e._size,c=e._datatype,f=t._values,l=t._index,p=t._ptr,h=t._size,d=t._datatype;if(u.length!==h.length)throw new r(u.length,h.length);if(u[0]!==h[0]||u[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+h+")");if(!f)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var m,v=u[0],y=u[1],g=0,b=n;"string"===typeof c&&c===d&&(m=c,g=i.convert(0,m),b=i.find(n,[m,m]));for(var x=[],w=0;w y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]}},"88dc":function(e,t,n){"use strict";var r=n("d7df").isInteger;function i(e,t,i,o){var a=i(n("d05c")),s=i(n("6f5b")),u=i(n("c663"));function c(e,t){return-u(e,t)}return o("partitionSelect",{"Array | Matrix, number":function(e,t){return f(e,t,u)},"Array | Matrix, number, string":function(e,t,n){if("asc"===n)return f(e,t,u);if("desc"===n)return f(e,t,c);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":f});function f(t,n,i){if(!r(n)||n<0)throw new Error("k must be a non-negative integer");if(e.isMatrix(t)){var o=t.size();if(o.length>1)throw new Error("Only one dimensional matrices supported");return l(t.valueOf(),n,i)}if(Array.isArray(t))return l(t,n,i)}function l(e,t,n){if(t>=e.length)throw new Error("k out of bounds");for(var r=0;r=0){var l=e[c];e[c]=e[u],e[u]=l,--c}else++u;n(e[u],f)>0&&--u,t<=u?o=u:i=u+1}return e[t]}}t.name="partitionSelect",t.factory=i},"8a01":function(e,t,n){"use strict";e.exports={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]}},"8a3b":function(e,t,n){"use strict";var r=n("b13c").filter,i=n("b13c").filterRegExp,o=n("d1d1").maxArgumentCount;function a(e,t,r,o){var a=r(n("4781")),u=o("filter",{"Array, function":s,"Matrix, function":function(e,t){return a(s(e.toArray(),t))},"Array, RegExp":i,"Matrix, RegExp":function(e,t){return a(i(e.toArray(),t))}});return u.toTex=void 0,u}function s(e,t){var n=o(t);return r(e,function(e,r,i){return 1===n?t(e):2===n?t(e,[r]):t(e,[r],i)})}t.name="filter",t.factory=a},"8ab5":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("4781")),a=r(n("58f1")),s=n("6c54"),u=r(n("e1fc")),c=r(n("858b")),f=r(n("5d77")),l=r(n("9ebd")),p=r(n("ff3e")),h=r(n("cdb0")),d=r(n("04b6")),m=i("dotDivide",{"any, any":a,"SparseMatrix, SparseMatrix":function(e,t){return f(e,t,a,!1)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,a,!0)},"DenseMatrix, SparseMatrix":function(e,t){return c(e,t,a,!1)},"DenseMatrix, DenseMatrix":function(e,t){return h(e,t,a)},"Array, Array":function(e,t){return m(o(e),o(t)).valueOf()},"Array, Matrix":function(e,t){return m(o(e),t)},"Matrix, Array":function(e,t){return m(e,o(t))},"SparseMatrix, any":function(e,t){return l(e,t,a,!1)},"DenseMatrix, any":function(e,t){return d(e,t,a,!1)},"any, SparseMatrix":function(e,t){return p(t,e,a,!0)},"any, DenseMatrix":function(e,t){return d(t,e,a,!0)},"Array, any":function(e,t){return d(o(e),t,a,!1).valueOf()},"any, Array":function(e,t){return d(o(t),e,a,!0).valueOf()}});return m.toTex={2:"\\left(${args[0]}".concat(s.operators["dotDivide"],"${args[1]}\\right)")},m}t.name="dotDivide",t.factory=r},"8ab7":function(e,t,n){"use strict";e.exports={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]}},"8ad0":function(e,t,n){"use strict";var r=n("dcb2"),i=n("aeae"),o=n("1b6d");function a(e,t,a,s){var u=a(n("1fe4")),c=a(n("0f62")),f=s("max",{"Array | Matrix":p,"Array | Matrix, number | BigNumber":function(e,t){return i(e,t.valueOf(),l)},"...":function(e){if(o(e))throw new TypeError("Scalar values expected in function max");return p(e)}});return f.toTex="\\max\\left(${args}\\right)",f;function l(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}}t.name="max",t.factory=a},"8b06":function(e,t,n){"use strict";function r(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)}}}t.factory=r},"8b4e":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("65f4")),a=r(n("e85e")),s=i("equalText",{"any, any":function(e,t){return a(o(e,t))}});return s.toTex=void 0,s}t.name="equalText",t.factory=r},"8b97":function(e,t,n){var r=n("d3f4"),i=n("cb7c"),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},"8c76":function(e,t,n){"use strict";function r(){var e=function(e,t,n){for(var r=e._values,i=e._index,o=e._ptr,a=e._size,s=a[1],u=0,c=0;c3)throw new SyntaxError("Function quantileSeq requires two or three parameters");if(a(t)){if(o=o||!1,"boolean"===typeof o){if(u=t.valueOf(),i(n)){if(n<0)throw new Error("N/prob must be non-negative");if(n<=1)return d(u,n,o);if(n>1){if(!r(n))throw new Error("N must be a positive integer");var f=n+1;s=new Array(n);for(var l=0;l4294967295)throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var h=new e.BigNumber(p+1);s=new Array(p);for(var m=0;m1)throw new Error("Probability must be between 0 and 1, inclusive")}else{if(!e.isBigNumber(y))throw new TypeError("Unexpected type of argument in function quantileSeq");if(c=new y.constructor(1),y.isNegative()||y.gt(c))throw new Error("Probability must be between 0 and 1, inclusive")}s[v]=d(u,y,o)}return s}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}function d(e,t,n){var r=o(e),a=r.length;if(0===a)throw new Error("Cannot calculate quantile of an empty sequence");if(i(t)){var s=t*(a-1),u=s%1;if(0===u){var h=n?r[s]:l(r,s);return m(h),h}var d,v,y=Math.floor(s);if(n)d=r[y],v=r[y+1];else{v=l(r,y+1),d=r[y];for(var g=0;g0&&(d=r[g])}return m(d),m(v),c(f(d,1-u),f(v,u))}var b=t.times(a-1);if(b.isInteger()){b=b.toNumber();var x=n?r[b]:l(r,b);return m(x),x}var w,N,E=b.floor(),M=b.minus(E),S=E.toNumber();if(n)w=r[S],N=r[S+1];else{N=l(r,S+1),w=r[S];for(var _=0;_0&&(w=r[_])}m(w),m(N);var A=new M.constructor(1);return c(f(w,A.minus(M)),f(N,M))}var m=u({"number | BigNumber | Unit":function(e){return e}});return h}t.name="quantileSeq",t.factory=s},9003:function(e,t,n){var r=n("6b4c");e.exports=Array.isArray||function(e){return"Array"==r(e)}},"905d":function(e,t,n){"use strict";e.exports={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]}},9087: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},r(e)}var i=n("7634"),o=n("d7df").digits,a=n("a6f4"),s=n("e9c3"),u=function(){return u=i.create,i};t.create=function(e){e.isNumber=function(e){return"number"===typeof e},e.isComplex=function(t){return e.Complex&&t instanceof e.Complex||!1},e.isBigNumber=a,e.isFraction=function(t){return e.Fraction&&t instanceof e.Fraction||!1},e.isUnit=function(e){return e&&e.constructor.prototype.isUnit||!1},e.isString=function(e){return"string"===typeof e},e.isArray=Array.isArray,e.isMatrix=s,e.isDenseMatrix=function(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix||!1},e.isSparseMatrix=function(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix||!1},e.isRange=function(e){return e&&e.constructor.prototype.isRange||!1},e.isIndex=function(e){return e&&e.constructor.prototype.isIndex||!1},e.isBoolean=function(e){return"boolean"===typeof e},e.isResultSet=function(e){return e&&e.constructor.prototype.isResultSet||!1},e.isHelp=function(e){return e&&e.constructor.prototype.isHelp||!1},e.isFunction=function(e){return"function"===typeof e},e.isDate=function(e){return e instanceof Date},e.isRegExp=function(e){return e instanceof RegExp},e.isObject=function(t){return"object"===r(t)&&t.constructor===Object&&!e.isComplex(t)&&!e.isFraction(t)},e.isNull=function(e){return null===e},e.isUndefined=function(e){return void 0===e},e.isAccessorNode=function(e){return e&&e.isAccessorNode&&e.constructor.prototype.isNode||!1},e.isArrayNode=function(e){return e&&e.isArrayNode&&e.constructor.prototype.isNode||!1},e.isAssignmentNode=function(e){return e&&e.isAssignmentNode&&e.constructor.prototype.isNode||!1},e.isBlockNode=function(e){return e&&e.isBlockNode&&e.constructor.prototype.isNode||!1},e.isConditionalNode=function(e){return e&&e.isConditionalNode&&e.constructor.prototype.isNode||!1},e.isConstantNode=function(e){return e&&e.isConstantNode&&e.constructor.prototype.isNode||!1},e.isFunctionAssignmentNode=function(e){return e&&e.isFunctionAssignmentNode&&e.constructor.prototype.isNode||!1},e.isFunctionNode=function(e){return e&&e.isFunctionNode&&e.constructor.prototype.isNode||!1},e.isIndexNode=function(e){return e&&e.isIndexNode&&e.constructor.prototype.isNode||!1},e.isNode=function(e){return e&&e.isNode&&e.constructor.prototype.isNode||!1},e.isObjectNode=function(e){return e&&e.isObjectNode&&e.constructor.prototype.isNode||!1},e.isOperatorNode=function(e){return e&&e.isOperatorNode&&e.constructor.prototype.isNode||!1},e.isParenthesisNode=function(e){return e&&e.isParenthesisNode&&e.constructor.prototype.isNode||!1},e.isRangeNode=function(e){return e&&e.isRangeNode&&e.constructor.prototype.isNode||!1},e.isSymbolNode=function(e){return e&&e.isSymbolNode&&e.constructor.prototype.isNode||!1},e.isChain=function(e){return e&&e.constructor.prototype.isChain||!1};var t=u();return t.types=[{name:"number",test:e.isNumber},{name:"Complex",test:e.isComplex},{name:"BigNumber",test:e.isBigNumber},{name:"Fraction",test:e.isFraction},{name:"Unit",test:e.isUnit},{name:"string",test:e.isString},{name:"Array",test:e.isArray},{name:"Matrix",test:e.isMatrix},{name:"DenseMatrix",test:e.isDenseMatrix},{name:"SparseMatrix",test:e.isSparseMatrix},{name:"Range",test:e.isRange},{name:"Index",test:e.isIndex},{name:"boolean",test:e.isBoolean},{name:"ResultSet",test:e.isResultSet},{name:"Help",test:e.isHelp},{name:"function",test:e.isFunction},{name:"Date",test:e.isDate},{name:"RegExp",test:e.isRegExp},{name:"null",test:e.isNull},{name:"undefined",test:e.isUndefined},{name:"OperatorNode",test:e.isOperatorNode},{name:"ConstantNode",test:e.isConstantNode},{name:"SymbolNode",test:e.isSymbolNode},{name:"ParenthesisNode",test:e.isParenthesisNode},{name:"FunctionNode",test:e.isFunctionNode},{name:"FunctionAssignmentNode",test:e.isFunctionAssignmentNode},{name:"ArrayNode",test:e.isArrayNode},{name:"AssignmentNode",test:e.isAssignmentNode},{name:"BlockNode",test:e.isBlockNode},{name:"ConditionalNode",test:e.isConditionalNode},{name:"IndexNode",test:e.isIndexNode},{name:"RangeNode",test:e.isRangeNode},{name:"Node",test:e.isNode},{name:"Object",test:e.isObject}],t.conversions=[{from:"number",to:"BigNumber",convert:function(t){if(o(t)>15)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){var n=new e.Fraction(t);if(n.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}},9093:function(e,t,n){var r=n("ce10"),i=n("e11e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},"90d1":function(e,t,n){"use strict";e.exports={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]}},"90ec":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("asec",{number:function(n){return n<=-1||n>=1||t.predictable?Math.acos(1/n):new e.Complex(n,0).asec()},Complex:function(e){return e.asec()},BigNumber:function(t){return new e.BigNumber(1).div(t).acos()},"Array | Matrix":function(e){return r(e,o)}});return o.toTex={1:"\\sec^{-1}\\left(${args[0]}\\right)"},o}t.name="asec",t.factory=i},9138:function(e,t,n){e.exports=n("35e8")},"922a":function(e,t,n){"use strict";var r=n("3d75").format,i=n("6c54").escape;function o(e,t,o,a){var s=o(n("2ba9")),u=o(n("b940"));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}t.name="ConstantNode",t.path="expression.node",t.factory=o},"929f":function(e,t,n){"use strict";var r=n("5c31").transform,i=n("1c94");function o(e,t,o,a){var s=o(n("cefe"));return a("std",{"...any":function(t){if(t.length>=2&&i(t[0])){var n=t[1];e.isNumber(n)?t[1]=n-1:e.isBigNumber(n)&&(t[1]=n.minus(1))}try{return s.apply(null,t)}catch(o){throw r(o)}}})}t.name="std",t.path="expression.transform",t.factory=o},"92b0":function(e,t,n){"use strict";e.exports={name:"dotpow",category:"Operators",syntax:["x .^ y","dotpow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]}},9427:function(e,t,n){var r=n("63b6");r(r.S,"Object",{create:n("a159")})},9432:function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("3447")),a=r(n("ec49")),s=r(n("9adc")),u=r(n("3db8")),c=i("bellNumbers",{"number | BigNumber":function(e){if(!u(e)||s(e))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var t=0,n=0;n<=e;n++)t=o(t,a(e,n));return t}});return c.toTex={1:"\\mathrm{B}_{${args[0]}}"},c}t.name="bellNumbers",t.factory=r},9454:function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("3147"));return i("parse",{"string | Array | Matrix":o,"string | Array | Matrix, Object":o})}t.name="parse",t.factory=r},"95c7":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("asin",{number:function(n){return n>=-1&&n<=1||t.predictable?Math.asin(n):new e.Complex(n,0).asin()},Complex:function(e){return e.asin()},BigNumber:function(e){return e.asin()},"Array | Matrix":function(e){return r(e,o,!0)}});return o.toTex={1:"\\sin^{-1}\\left(${args[0]}\\right)"},o}t.name="asin",t.factory=i},"95d5":function(e,t,n){var r=n("40c3"),i=n("5168")("iterator"),o=n("481b");e.exports=n("584a").isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},"967a":function(e,t,n){"use strict";function r(e,t,r){var i=r(n("3447")),o=r(n("863e"));function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new e.FibonacciHeap}return a.prototype.type="Spa",a.prototype.isSpa=!0,a.prototype.set=function(e,t){if(this._values[e])this._values[e].value=t;else{var n=this._heap.insert(e,t);this._values[e]=n}},a.prototype.get=function(e){var t=this._values[e];return t?t.value:0},a.prototype.accumulate=function(e,t){var n=this._values[e];n?n.value=i(n.value,t):(n=this._heap.insert(e,t),this._values[e]=n)},a.prototype.forEach=function(e,t,n){var r=this._heap,i=this._values,a=[],s=r.extractMinimum();s&&a.push(s);while(s&&s.key<=t)s.key>=e&&(o(s.value,0)||n(s.key,s.value,this)),s=r.extractMinimum(),s&&a.push(s);for(var u=0;u;')}).join('
')},c.prototype._toTex=function(e){return this.blocks.map(function(t){return t.node.toTex(e)+(t.visible?"":";")}).join("\\;\\;\n")},c}t.name="BlockNode",t.path="expression.node",t.factory=o},9858:function(e,t,n){"use strict";e.exports={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]}},"98bb":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"]}},9956:function(e,t,n){"use strict";e.exports={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]}},"9a59":function(e,t,n){"use strict";e.exports={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]}},"9a69":function(e,t,n){"use strict";e.exports=[n("e0a0"),n("13ce"),n("7059"),n("0a68")]},"9a84":function(e,t,n){"use strict";e.exports={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]}},"9aa9":function(e,t){t.f=Object.getOwnPropertySymbols},"9adc":function(e,t,n){"use strict";var r=n("d6cb");function i(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}t.name="isNegative",t.factory=i},"9b43":function(e,t,n){var r=n("d8e8");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},"9b5c":function(e,t,n){"use strict";var r=n("d7df").nearlyEqual,i=n("acc2");function o(e,t,o,a){var s=o(n("4781")),u=o(n("858b")),c=o(n("5d77")),f=o(n("ff3e")),l=o(n("cdb0")),p=o(n("04b6")),h=n("6c54"),d=a("largerEq",{"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.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 l(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 f(e,t,d,!1)},"DenseMatrix, any":function(e,t){return p(e,t,d,!1)},"any, SparseMatrix":function(e,t){return f(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(h.operators["largerEq"],"${args[1]}\\right)")},d}t.name="largerEq",t.factory=o},"9b87":function(e,t,n){"use strict";var r=n("d7df").nearlyEqual,i=n("acc2");function o(e,t,o,a){var s=o(n("4781")),u=o(n("858b")),c=o(n("5d77")),f=o(n("ff3e")),l=o(n("cdb0")),p=o(n("04b6")),h=n("6c54"),d=a("smaller",{"boolean, boolean":function(e,t){return e1)throw new Error("first object must be one dimensional");if(r>1)throw new Error("second object must be one dimensional");if(n!==r)throw new Error("Length of two vectors must be equal");var i=s(e);if(0===i)throw new Error("Sum of elements in first object must be non zero");var o=s(t);if(0===o)throw new Error("Sum of elements in second object must be non zero");var p=a(e,s(e)),h=a(t,s(t)),d=s(u(p,f(c(p,h))));return l(d)?d:Number.NaN}return p}t.name="kldivergence",t.factory=r},"9c6c":function(e,t,n){var r=n("2b4c")("unscopables"),i=Array.prototype;void 0==i[r]&&n("32e9")(i,r,{}),e.exports=function(e){i[r][e]=!0}},"9c80":function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(t){return{e:!0,v:t}}}},"9ccd":function(e,t,n){"use strict";var r=n("b13c");function i(e,t,i,o){var a=i(n("4781")),s=i(n("3db8")),u=o("reshape",{"Matrix, Array":function(e,t){return e.reshape?e.reshape(t):a(r.reshape(e.valueOf(),t))},"Array, Array":function(e,t){return t.forEach(function(e){if(!s(e))throw new TypeError("Invalid size for dimension: "+e)}),r.reshape(e,t)}});return u.toTex=void 0,u}t.name="reshape",t.factory=i},"9def":function(e,t,n){var r=n("4588"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},"9df3":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"]}},"9e1e":function(e,t,n){e.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"9e94":function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("acot",{number:function(e){return Math.atan(1/e)},Complex:function(e){return e.acot()},BigNumber:function(t){return new e.BigNumber(1).div(t).atan()},"Array | Matrix":function(e){return r(e,o)}});return o.toTex={1:"\\cot^{-1}\\left(${args[0]}\\right)"},o}t.name="acot",t.factory=i},"9ebd":function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("863e")),a=e.SparseMatrix,s=function(e,t,n,r){var s=e._values,u=e._index,c=e._ptr,f=e._size,l=e._datatype;if(!s)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var p,h=f[0],d=f[1],m=o,v=0,y=n;"string"===typeof l&&(p=l,m=i.find(o,[p,p]),v=i.convert(0,p),t=i.convert(t,p),y=i.find(n,[p,p]));for(var g=[],b=[],x=[],w=new a({values:g,index:b,ptr:x,size:[h,d],datatype:p}),N=0;N y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]}},a159:function(e,t,n){var r=n("e4ae"),i=n("7e90"),o=n("1691"),a=n("5559")("IE_PROTO"),s=function(){},u="prototype",c=function(){var e,t=n("1ec9")("iframe"),r=o.length,i="<",a=">";t.style.display="none",n("32fc").appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(i+"script"+a+"document.F=Object"+i+"/script"+a),e.close(),c=e.F;while(r--)delete c[u][o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[u]=r(e),n=new s,s[u]=null,n[a]=e):n=c(),void 0===t?n:i(n,t)}},a19a:function(e,t,n){"use strict";e.exports={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]}},a216:function(e,t,n){"use strict";var r=n("2c72"),i=r.string,o=i.isString;function a(e,t,n,r){function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator")}return i.prototype.type="Matrix",i.prototype.isMatrix=!0,i.storage=function(e){if(!o(e))throw new TypeError("format must be a string value");var t=i._storage[e];if(!t)throw new SyntaxError("Unsupported matrix storage format: "+e);return t},i._storage={},i.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},i.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},i.prototype.create=function(e,t){throw new Error("Cannot invoke create on a Matrix interface")},i.prototype.subset=function(e,t,n){throw new Error("Cannot invoke subset on a Matrix interface")},i.prototype.get=function(e){throw new Error("Cannot invoke get on a Matrix interface")},i.prototype.set=function(e,t,n){throw new Error("Cannot invoke set on a Matrix interface")},i.prototype.resize=function(e,t){throw new Error("Cannot invoke resize on a Matrix interface")},i.prototype.reshape=function(e,t){throw new Error("Cannot invoke reshape on a Matrix interface")},i.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},i.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},i.prototype.map=function(e,t){throw new Error("Cannot invoke map on a Matrix interface")},i.prototype.forEach=function(e){throw new Error("Cannot invoke forEach on a Matrix interface")},i.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},i.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},i.prototype.format=function(e){throw new Error("Cannot invoke format on a Matrix interface")},i.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},i}t.name="Matrix",t.path="type",t.factory=a},a226:function(e,t,n){"use strict";function r(e,t,n,r){var i=r("multiplyScalar",{"number, number":function(e,t){return e*t},"Complex, Complex":function(e,t){return e.mul(t)},"BigNumber, BigNumber":function(e,t){return e.times(t)},"Fraction, Fraction":function(e,t){return e.mul(t)},"number | Fraction | BigNumber | Complex, Unit":function(e,t){var n=t.clone();return n.value=null===n.value?n._normalize(e):i(n.value,e),n},"Unit, number | Fraction | BigNumber | Complex":function(e,t){var n=e.clone();return n.value=null===n.value?n._normalize(t):i(n.value,t),n},"Unit, Unit":function(e,t){return e.multiply(t)}});return i}t.factory=r},a25f:function(e,t,n){var r=n("7726"),i=r.navigator;e.exports=i&&i.userAgent||""},a267:function(e,t,n){"use strict";e.exports={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]}},a2fc:function(e,t,n){"use strict";e.exports={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]}},a349:function(e,t,n){"use strict";function r(e,t,r,i){var o=n("6c54"),a=r(n("4781")),s=r(n("858b")),u=r(n("6573")),c=r(n("ff3e")),f=r(n("cdb0")),l=r(n("04b6")),p=i("or",{"number, number":function(e,t){return!(!e&&!t)},"Complex, Complex":function(e,t){return 0!==e.re||0!==e.im||0!==t.re||0!==t.im},"BigNumber, BigNumber":function(e,t){return!e.isZero()&&!e.isNaN()||!t.isZero()&&!t.isNaN()},"Unit, Unit":function(e,t){return p(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,p)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,p,!0)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,p,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,p)},"Array, Array":function(e,t){return p(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return p(a(e),t)},"Matrix, Array":function(e,t){return p(e,a(t))},"SparseMatrix, any":function(e,t){return c(e,t,p,!1)},"DenseMatrix, any":function(e,t){return l(e,t,p,!1)},"any, SparseMatrix":function(e,t){return c(t,e,p,!0)},"any, DenseMatrix":function(e,t){return l(t,e,p,!0)},"Array, any":function(e,t){return l(a(e),t,p,!1).valueOf()},"any, Array":function(e,t){return l(a(t),e,p,!0).valueOf()}});return p.toTex={2:"\\left(${args[0]}".concat(o.operators["or"],"${args[1]}\\right)")},p}t.name="or",t.factory=r},a3ea:function(e,t,n){"use strict";var r=n("b13c"),i=n("d7df").isInteger;function o(e,t,o,a){var s=o(n("4781")),u=a("diag",{Array:function(e){return c(e,0,r.size(e),null)},"Array, number":function(e,t){return c(e,t,r.size(e),null)},"Array, BigNumber":function(e,t){return c(e,t.toNumber(),r.size(e),null)},"Array, string":function(e,t){return c(e,0,r.size(e),t)},"Array, number, string":function(e,t,n){return c(e,t,r.size(e),n)},"Array, BigNumber, string":function(e,t,n){return c(e,t.toNumber(),r.size(e),n)},Matrix:function(e){return c(e,0,e.size(),e.storage())},"Matrix, number":function(e,t){return c(e,t,e.size(),e.storage())},"Matrix, BigNumber":function(e,t){return c(e,t.toNumber(),e.size(),e.storage())},"Matrix, string":function(e,t){return c(e,0,e.size(),t)},"Matrix, number, string":function(e,t,n){return c(e,t,e.size(),n)},"Matrix, BigNumber, string":function(e,t,n){return c(e,t.toNumber(),e.size(),n)}});return u.toTex=void 0,u;function c(e,t,n,r){if(!i(t))throw new TypeError("Second parameter in function diag must be an integer");var o=t>0?t:0,a=t<0?-t:0;switch(n.length){case 1:return f(e,t,r,n[0],a,o);case 2:return l(e,t,r,n,a,o)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function f(t,n,r,i,o,a){var s=[i+o,i+a],u=e.Matrix.storage(r||"dense"),c=u.diagonal(s,t,n);return null!==r?c:c.valueOf()}function l(t,n,r,i,o,a){if(e.isMatrix(t)){var u=t.diagonal(n);return null!==r?r!==u.storage()?s(u,r):u:u.valueOf()}for(var c=Math.min(i[0]-o,i[1]-a),f=[],l=0;l]*>)/g,h=/\$([$&`']|\d\d?)/g,d=function(e){return void 0===e?e:String(e)};n("214f")("replace",2,function(e,t,n,m){return[function(r,i){var o=e(this),a=void 0==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(e,t){var i=m(n,e,this,t);if(i.done)return i.value;var l=r(e),p=String(this),h="function"===typeof t;h||(t=String(t));var y=l.global;if(y){var g=l.unicode;l.lastIndex=0}var b=[];while(1){var x=u(l,p);if(null===x)break;if(b.push(x),!y)break;var w=String(x[0]);""===w&&(l.lastIndex=s(p,o(l.lastIndex),g))}for(var N="",E=0,M=0;M=E&&(N+=p.slice(E,_)+k,E=_+S.length)}return N+p.slice(E)}];function v(e,t,r,o,a,s){var u=r+e.length,c=o.length,f=h;return void 0!==a&&(a=i(a),f=p),n.call(s,f,function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":s=a[i.slice(1,-1)];break;default:var f=+i;if(0===f)return n;if(f>c){var p=l(f/10);return 0===p?n:p<=c?void 0===o[p-1]?i.charAt(1):o[p-1]+i.charAt(1):n}s=o[f-1]}return void 0===s?"":s})}})},a4b8:function(e,t,n){"use strict";e.exports={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]}},a4d3:function(e,t,n){"use strict";var r=n("d1d1").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)},a5b8:function(e,t,n){"use strict";var r=n("d8e8");function i(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},a6f4:function(e,t,n){"use strict";e.exports=function(e){return e&&e.constructor.prototype.isBigNumber||!1}},a745:function(e,t,n){e.exports=n("f410")},a76c:function(e,t,n){"use strict";var r=n("0bcc"),i=n("3d75").escape,o=n("b13c").forEach,a=n("b13c").join,s=n("6c54"),u=n("4dbd"),c=n("e1b6").setSafeProperty;function f(e,t,f,l){var p=f(n("2ba9"));function h(t,n,i){if(!(this instanceof h))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 h.prototype=new p,h.prototype.type="FunctionAssignmentNode",h.prototype.isFunctionAssignmentNode=!0,h.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,","),f=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},h.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},h}t.name="FunctionAssignmentNode",t.path="expression.node",t.factory=f},a793:function(e,t,n){"use strict";var r=n("ce78");e.exports=function(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitOr");var n=e.constructor;if(e.isNaN()||t.isNaN())return new n(NaN);var i=new n(-1);return e.isZero()||t.eq(i)||e.eq(t)?t:t.isZero()||e.eq(i)?e:e.isFinite()&&t.isFinite()?r(e,t,function(e,t){return e|t}):!e.isFinite()&&!e.isNegative()&&t.isNegative()||e.isNegative()&&!t.isNegative()&&!t.isFinite()?i:e.isNegative()&&t.isNegative()?e.isFinite()?e:t:e.isFinite()?t:e}},a7c7:function(e,t,n){"use strict";e.exports={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]}},a80b:function(e,t,n){"use strict";var r=n("b13c").flatten,i=n("b13c").identify;function o(e,t,o,a){var s=o(n("2f39")),u=o(n("bfb7")),c=o(n("59a8")),f=o(n("2f6a")),l=a("setIsSubset",{"Array | Matrix, Array | Matrix":function(e,t){if(0===c(u(e),new s(0)))return!0;if(0===c(u(t),new s(0)))return!1;for(var n,o=i(r(Array.isArray(e)?e:e.toArray()).sort(f)),a=i(r(Array.isArray(t)?t:t.toArray()).sort(f)),l=0;l0){var i=r.right;r.left.right=r.right,r.right.left=r.left,r.left=t,r.right=t.right,t.right=r,r.right.left=r,r.parent=null,r=i,n--}return e.left.right=e.right,e.right.left=e.left,e===e.right?t=null:(t=e.right,t=h(t,this._size)),this._size--,this._minimum=t,e},u.prototype.remove=function(e){this._minimum=c(this._minimum,e,-1),this.extractMinimum()};var p=function(e,t){e.left.right=e.right,e.right.left=e.left,e.parent=t,t.child?(e.left=t.child,e.right=t.child.right,t.child.right=e,e.right.left=e):(t.child=e,e.right=e,e.left=e),t.degree++,e.mark=!1};function h(e,t){var n,r=Math.floor(Math.log(t)*s)+1,i=new Array(r),u=0,c=e;if(c){u++,c=c.right;while(c!==e)u++,c=c.right}while(u>0){var f=c.degree,l=c.right;while(1){if(n=i[f],!n)break;if(a(c.key,n.key)){var h=n;n=c,c=h}p(n,c),i[f]=null,f++}i[f]=c,c=l,u--}e=null;for(var d=0;d0},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}t.name="isPositive",t.factory=i},aa77:function(e,t,n){var r=n("5ca1"),i=n("be13"),o=n("79e5"),a=n("fdef"),s="["+a+"]",u="​…",c=RegExp("^"+s+s+"*"),f=RegExp(s+s+"*$"),l=function(e,t,n){var i={},s=o(function(){return!!a[e]()||u[e]()!=u}),c=i[e]=s?t(p):a[e];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},p=l.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(f,"")),e};e.exports=l},aaa2:function(e,t,n){"use strict";e.exports={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]}},aabe:function(e,t,n){e.exports=n("1beb")},aae3:function(e,t,n){var r=n("d3f4"),i=n("2d95"),o=n("2b4c")("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},ac6a:function(e,t,n){for(var r=n("cadf"),i=n("0d58"),o=n("2aba"),a=n("7726"),s=n("32e9"),u=n("84f2"),c=n("2b4c"),f=c("iterator"),l=c("toStringTag"),p=u.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=i(h),m=0;m=-1&&n<=1||t.predictable?Math.acos(n):new e.Complex(n,0).acos()},Complex:function(e){return e.acos()},BigNumber:function(e){return e.acos()},"Array | Matrix":function(e){return r(e,o)}});return o.toTex={1:"\\cos^{-1}\\left(${args[0]}\\right)"},o}t.name="acos",t.factory=i},acb3:function(e,t,n){"use strict";function r(e,t,n,r){var i=r("createUnit",{"Object, Object":function(t,n){return e.Unit.createUnit(t,n)},Object:function(t){return e.Unit.createUnit(t,{})},"string, Unit | string | Object, Object":function(t,n,r){var i={};return i[t]=n,e.Unit.createUnit(i,r)},"string, Unit | string | Object":function(t,n){var r={};return r[t]=n,e.Unit.createUnit(r,{})},string:function(t){var n={};return n[t]={},e.Unit.createUnit(n,{})}});return i}t.name="createUnit",t.factory=r},acc2:function(e,t,n){"use strict";e.exports=function(e,t,n){if(null===n||void 0===n)return e.eq(t);if(e.eq(t))return!0;if(e.isNaN()||t.isNaN())return!1;if(e.isFinite()&&t.isFinite()){var r=e.minus(t).abs();if(r.isZero())return!0;var i=e.constructor.max(e.abs(),t.abs());return r.lte(i.times(n))}return!1}},acf0:function(e,t,n){"use strict";e.exports={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]}},ad15:function(e,t,n){"use strict";e.exports=[n("9432"),n("180a"),n("ec49"),n("1fc2")]},ad52:function(e,t,n){"use strict";var r=n("6762").extend;function i(e,t,i,o){var a=i(n("58f1")),s=i(n("354f")),u=i(n("41fb")),c=i(n("4781")),f=i(n("9ebd")),l=i(n("04b6")),p=o("divide",r({"Array | Matrix, Array | Matrix":function(e,t){return s(e,u(t))},"DenseMatrix, any":function(e,t){return l(e,t,a,!1)},"SparseMatrix, any":function(e,t){return f(e,t,a,!1)},"Array, any":function(e,t){return l(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}t.name="divide",t.factory=i},ad6b:function(e,t,n){"use strict";e.exports=[n("4b51"),n("8ad0"),n("142e"),n("8358"),n("2393"),n("4d08"),n("262d"),n("8fe3"),n("cefe"),n("67e7"),n("b4e9")]},ae13:function(e,t,n){"use strict";e.exports={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]}},ae75:function(e,t,n){"use strict";e.exports={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]}},ae97:function(e,t,n){"use strict";(function(t){var n=256,r=6,i=52,o=[],a="undefined"===typeof t?window:t,s=Math.pow(n,r),u=Math.pow(2,i),c=2*u,f=n-1,l=Math.random;function p(e){var t,r=e.length,i=this,o=0,a=i.i=i.j=0,s=i.S=[];r||(e=[r++]);while(o=c)e/=2,t/=2,i>>>=1;return(e+i)/t}},e.exports.resetGlobal=function(){Math.random=l},d(Math.random(),o)}).call(this,n("c8ba"))},aeae:function(e,t,n){"use strict";var r=n("b13c").size,i=n("e9c3"),o=n("4b6a");function a(e,t,n){var r,i,o,u;if(t<=0){if(Array.isArray(e[0])){for(u=s(e),i=[],r=0;r=s.length)throw new o(t,s.length);return i(e)?e.create(a(e.valueOf(),t,n)):a(e,t,n)}},aebd:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},aed9:function(e,t,n){"use strict";e.exports={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.eval({x: 3})"],seealso:["simplify","parse","eval"]}},afa8:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("square",{number:function(e){return e*e},Complex:function(e){return e.mul(e)},BigNumber:function(e){return e.times(e)},Fraction:function(e){return e.mul(e)},"Array | Matrix":function(e){return r(e,o,!0)},Unit:function(e){return e.pow(2)}});return o.toTex={1:"\\left(${args[0]}\\right)^2"},o}t.name="square",t.factory=i},afcf:function(e,t,n){"use strict";function r(e,t,r){var i=r(n("e2fa")),o=r(n("537e")),a=r(n("4763")),s=function(e,t,n,r,s){var u,c,f,l=t._index,p=t._ptr,h=t._size,d=h[1],m=0;r[0]=e;while(m>=0){e=r[m];var v=s?s[e]:e;i(p,e)||(o(p,e),r[d+m]=v<0?0:a(p[v]));var y=1;for(c=r[d+m],f=v<0?0:a(p[v+1]);c0)while(a(i,t))r.push(i),i+=n;else if(n<0)while(s(i,t))r.push(i),i+=n;return r}function v(e,t,n){var r=[],i=e;if(n>0)while(u(i,t))r.push(i),i+=n;else if(n<0)while(c(i,t))r.push(i),i+=n;return r}function y(e,t,n){var r=[],i=e;if(n.gt(f))while(a(i,t))r.push(i),i=i.plus(n);else if(n.lt(f))while(s(i,t))r.push(i),i=i.plus(n);return r}function g(e,t,n){var r=[],i=e;if(n.gt(f))while(u(i,t))r.push(i),i=i.plus(n);else if(n.lt(f))while(c(i,t))r.push(i),i=i.plus(n);return r}function b(e){var t=e.split(":"),n=t.map(function(e){return Number(e)}),r=n.some(function(e){return isNaN(e)});if(r)return null;switch(n.length){case 2:return{start:n[0],end:n[1],step:1};case 3:return{start:n[0],end:n[2],step:n[1]};default:return null}}}t.name="range",t.factory=r},b0c5:function(e,t,n){"use strict";var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},b0dc:function(e,t,n){var r=n("e4ae");e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(a){var o=e["return"];throw void 0!==o&&r(o.call(e)),a}}},b13c:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.size=u,t.validate=f,t.validateIndex=l,t.resize=p,t.reshape=d,t.squeeze=v,t.unsqueeze=g,t.flatten=x,t.map=w,t.forEach=N,t.filter=E,t.filterRegExp=M,t.join=S,t.identify=_,t.generalize=A;var r=s(n("d7df")),i=s(n("3d75")),o=s(n("5fc9")),a=s(n("4b6a"));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=[];while(Array.isArray(e))t.push(e.length),e=e[0];return t}function c(e,t,n){var r,i=e.length;if(i!==t[n])throw new o["default"](i,t[n]);if(n")}function f(e,t){var n=0===t.length;if(n){if(Array.isArray(e))throw new o["default"](e.length,0)}else c(e,t,0)}function l(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)}function p(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 h(e,t,0,o),e}function h(e,t,n,r){var i,o,a=e.length,s=t[n],u=Math.min(a,s);if(e.length=s,n=0||t.predictable?o(n):new e.Complex(n,0).log().div(Math.LN10)},Complex:function(t){return new e.Complex(t).log().div(Math.LN10)},BigNumber:function(n){return!n.isNegative()||t.predictable?n.log():new e.Complex(n.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":function(e){return r(e,a)}});return a.toTex={1:"\\log_{10}\\left(${args[0]}\\right)"},a}var o=Math.log10||function(e){return Math.log(e)/Math.LN10};t.name="log10",t.factory=i},b447:function(e,t,n){var r=n("3a38"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},b46a:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,i,o){var a=i(n("3147"));return o("compile",{string:function(e){return a(e).compile()},"Array | Matrix":function(e){return r(e,function(e){return a(e).compile()})}})}t.name="compile",t.factory=i},b4b4:function(e,t,n){"use strict";var r=n("b13c").filter,i=n("b13c").filterRegExp,o=n("d1d1").maxArgumentCount;function a(e,t,r,o){var a=r(n("8b06")),u=r(n("4781"));function c(t,n,r){var i,o;return t[0]&&(i=t[0].compile().eval(r)),t[1]&&(o=e.isSymbolNode(t[1])||e.isFunctionAssignmentNode(t[1])?t[1].compile().eval(r):a(t[1],n,r)),f(i,o)}c.rawArgs=!0;var f=o("filter",{"Array, function":s,"Matrix, function":function(e,t){return u(s(e.toArray(),t))},"Array, RegExp":i,"Matrix, RegExp":function(e,t){return u(i(e.toArray(),t))}});return f.toTex=void 0,c}function s(e,t){var n=o(t);return r(e,function(e,r,i){return 1===n?t(e):2===n?t(e,[r+1]):t(e,[r+1],i)})}t.name="filter",t.path="expression.transform",t.factory=a},b4e9:function(e,t,n){"use strict";var r="unbiased",i=n("dcb2");function o(e,t,o,a){var s=o(n("6caf")),u=o(n("5d7b")),c=o(n("3b53")),f=o(n("a226")),l=o(n("58f1")),p=o(n("6f5b")),h=o(n("0f62")),d=a("variance",{"Array | Matrix":function(e){return m(e,r)},"Array | Matrix, string":m,"Array | Matrix, number | BigNumber":function(e,t){return v(e,t,r)},"Array | Matrix, number | BigNumber, string":v,"...":function(e){return m(e,r)}});return d.toTex="\\mathrm{Var}\\left(${args}\\right)",d;function m(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 h(t,"var",e)}}),0===o)throw new Error("Cannot calculate var of an empty array");var a=l(r,o);if(r=0,i(t,function(e){var t=c(e,a);r=u(r,f(t,t))}),p(r))return r;switch(n){case"uncorrected":return l(r,o);case"biased":return l(r,o+1);case"unbiased":var s=e.isBigNumber(r)?new e.BigNumber(0):0;return 1===o?s:l(r,o-1);default:throw new Error('Unknown normalization "'+n+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function v(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 m(e,n)})}catch(r){throw h(r,"var")}}}t.name="var",t.factory=o},b5bb:function(e,t,n){"use strict";e.exports={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column"]}},b7d6:function(e,t,n){"use strict";e.exports={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]}},b82e:function(e,t,n){"use strict";e.exports={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]}},b83d:function(e,t,n){"use strict";var r=n("d7df").isInteger;function i(e,t,r,i){var a=r(n("4781")),s=r(n("797d")),u=r(n("32a2")),c=r(n("bfee")),f=r(n("cdb0")),l=r(n("04b6")),p=i("gcd",{"number, number":o,"BigNumber, BigNumber":h,"Fraction, Fraction":function(e,t){return e.gcd(t)},"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,p)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,p,!0)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,p,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,p)},"Array, Array":function(e,t){return p(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return p(a(e),t)},"Matrix, Array":function(e,t){return p(e,a(t))},"SparseMatrix, number | BigNumber":function(e,t){return c(e,t,p,!1)},"DenseMatrix, number | BigNumber":function(e,t){return l(e,t,p,!1)},"number | BigNumber, SparseMatrix":function(e,t){return c(t,e,p,!0)},"number | BigNumber, DenseMatrix":function(e,t){return l(t,e,p,!0)},"Array, number | BigNumber":function(e,t){return l(a(e),t,p,!1).valueOf()},"number | BigNumber, Array":function(e,t){return l(a(t),e,p,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,n){for(var r=p(e,t),i=0;i3)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(){var t=this.filter(function(t){return e.isSymbolNode(t)&&"end"===t.name});return t.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=e&&e.parenthesis?e.parenthesis:"keep",r=u(this,n),i=this.start.toString(e);if(r.start&&(i="("+i+")"),t=i,this.step){var o=this.step.toString(e);r.step&&(o="("+o+")"),t+=":"+o}var a=this.end.toString(e);return r.end&&(a="("+a+")"),t+=":"+a,t},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=e&&e.parenthesis?e.parenthesis:"keep",r=u(this,n),i=this.start.toHTML(e);if(r.start&&(i='('+i+')'),t=i,this.step){var o=this.step.toHTML(e);r.step&&(o='('+o+')'),t+=':'+o}var a=this.end.toHTML(e);return r.end&&(a='('+a+')'),t+=':'+a,t},s.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=u(this,t),r=this.start.toTex(e);if(n.start&&(r="\\left(".concat(r,"\\right)")),this.step){var i=this.step.toTex(e);n.step&&(i="\\left(".concat(i,"\\right)")),r+=":"+i}var o=this.end.toTex(e);return n.end&&(o="\\left(".concat(o,"\\right)")),r+=":"+o,r},s}t.name="RangeNode",t.path="expression.node",t.factory=i},b940: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},r(e)}function i(e,t,n,i){var o=i("_typeof",{any:function(t){var n=r(t);return"object"===n?null===t?"null":Array.isArray(t)?"Array":t instanceof Date?"Date":t instanceof RegExp?"RegExp":e.isBigNumber(t)?"BigNumber":e.isComplex(t)?"Complex":e.isFraction(t)?"Fraction":e.isMatrix(t)?"Matrix":e.isUnit(t)?"Unit":e.isIndex(t)?"Index":e.isRange(t)?"Range":e.isResultSet(t)?"ResultSet":e.isNode(t)?t.type:e.isChain(t)?"Chain":e.isHelp(t)?"Help":"Object":"function"===n?"Function":n}});return o.toTex=void 0,o}t.name="typeof",t.factory=i},b9e5:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,i,o){var a=i(n("123c")),s=i(n("4259")),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}t.name="fix",t.factory=i},ba88:function(e,t,n){"use strict";e.exports={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]}},badf:function(e,t,n){"use strict";var r=n("6c54"),i=n("b13c").map,o=n("3d75").escape,a=n("e1b6").isSafeMethod,s=n("e1b6").getSafeProperty,u=n("4dbd");function c(e,t,c,f){var l=c(n("2ba9"));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 h(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()){var c=r.map(function(e){switch(e.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});return c}switch(r.length){case 0:o=[];break;case 1:var f=u.getPrecedence(r[0],t);if(i&&null!==f){var l,p;if("keep"===t?(l=r[0].getIdentifier(),p=e.getIdentifier()):(l=r[0].getContent().getIdentifier(),p=e.getContent().getIdentifier()),!1===u.properties[a][p].latexLeftParens){o=[!1];break}if(!1===u.properties[f][l].latexParens){o=[!1];break}}if(null===f){o=[!1];break}if(f<=a){o=[!0];break}o=[!1];break;case 2:var h,d,m=u.getPrecedence(r[0],t),v=u.isAssociativeWith(e,r[0],t);h=null!==m&&(m===a&&"right"===s&&!v||m=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 l,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 l=r.map(function(t,n){return t=t.toString(e),i[n]&&(t="("+t+")"),t});return this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?l.join(" "):l.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=h(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),f=r[1].toHTML(e);return i[0]&&(c='('+c+')'),i[1]&&(f='('+f+')'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?c+''+f:c+''+o(this.op)+""+f}var l=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?l.join(''):l.join(''+o(this.op)+""):''+o(this.fn)+'('+l.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=h(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 f=i[0],l=f.toTex(e);o[0]&&(l="\\left(".concat(l,"\\right)"));var p,d=i[1],m=d.toTex(e);switch(o[1]&&(m="\\left(".concat(m,"\\right)")),p="keep"===t?f.getIdentifier():f.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return a+"{"+l+"}{"+m+"}";case"OperatorNode:pow":switch(l="{"+l+"}",m="{"+m+"}",p){case"ConditionalNode":case"OperatorNode:divide":l="\\left(".concat(l,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&"hide"===n)return l+"~"+m}return l+a+m}if(i.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var v=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?v.join("~"):v.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}t.name="OperatorNode",t.path="expression.node",t.factory=c},baf0:function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("4781")),a=r(n("863e")),s=r(n("858b")),u=r(n("5d77")),c=r(n("ff3e")),f=r(n("cdb0")),l=r(n("04b6")),p=n("6c54"),h=i("equal",{"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:a(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,a)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,a,!0)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,a,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,a)},"Array, Array":function(e,t){return h(o(e),o(t)).valueOf()},"Array, Matrix":function(e,t){return h(o(e),t)},"Matrix, Array":function(e,t){return h(e,o(t))},"SparseMatrix, any":function(e,t){return c(e,t,a,!1)},"DenseMatrix, any":function(e,t){return l(e,t,a,!1)},"any, SparseMatrix":function(e,t){return c(t,e,a,!0)},"any, DenseMatrix":function(e,t){return l(t,e,a,!0)},"Array, any":function(e,t){return l(o(e),t,a,!1).valueOf()},"any, Array":function(e,t){return l(o(t),e,a,!0).valueOf()}});return h.toTex={2:"\\left(${args[0]}".concat(p.operators["equal"],"${args[1]}\\right)")},h}t.name="equal",t.factory=r},bb1b:function(e,t,n){"use strict";var r=n("e1b6").getSafeProperty,i=n("e1b6").setSafeProperty;function o(e,t,o,a){var s=o(n("2ba9")),u=o(n("5d9f")),c=o(n("da0f")),f=n("4dbd");function l(t,n,r){if(!(this instanceof l))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=f.getPrecedence(e,t),r=f.getPrecedence(e.value,t);return"all"===t||null!==r&&r<=n}return l.prototype=new s,l.prototype.type="AssignmentNode",l.prototype.isAssignmentNode=!0,l.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),f=this.object.name;if(this.index){if(this.index.isObjectProperty()){var l=this.index.getObjectProperty();return function(e,t,n){var r=o(e,t,n),a=s(e,t,n);return i(r,l,a)}}if(e.isSymbolNode(this.object))return function(e,t,n){var r=o(e,t,n),c=s(e,t,n),l=a(e,t,r);return i(e,f,u(r,l,c)),c};var p=this.object.object._compile(t,n);if(this.object.index.isObjectProperty()){var h=this.object.index.getObjectProperty();return function(e,t,n){var o=p(e,t,n),c=r(o,h),f=a(e,t,c),l=s(e,t,n);return i(o,h,u(c,f,l)),l}}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),f=a(e,t,o),l=s(e,t,n);return u(r,i,u(o,f,l)),l}}if(!e.isSymbolNode(this.object))throw new TypeError("SymbolNode expected as object");return function(e,t,n){return i(e,f,s(e,t,n))}},l.prototype.forEach=function(e){e(this.object,"object",this),this.index&&e(this.index,"index",this),e(this.value,"value",this)},l.prototype.map=function(e){var t=this._ifNode(e(this.object,"object",this)),n=this.index?this._ifNode(e(this.index,"index",this)):null,r=this._ifNode(e(this.value,"value",this));return new l(t,n,r)},l.prototype.clone=function(){return new l(this.object,this.index,this.value)},l.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},l.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},l.fromJSON=function(e){return new l(e.object,e.index,e.value)},l.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},l.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},l}t.name="AssignmentNode",t.path="expression.node",t.factory=o},bb75:function(e,t,n){"use strict";e.exports={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]}},bb7b:function(e,t,n){"use strict";var r=n("6762"),i=n("a4d3");function o(e,t,r,u,c){c.on("config",function(n,i){n.number!==i.number&&o(e,t,r,u,c)}),a(c,"true",!0),a(c,"false",!1),a(c,"null",null),a(c,"uninitialized","Error: Constant uninitialized is removed since v4.0.0. Use null instead"),"BigNumber"===t.number?(a(c,"Infinity",new e.BigNumber(1/0)),a(c,"NaN",new e.BigNumber(NaN)),s(c,"pi",function(){return i.pi(e.BigNumber)}),s(c,"tau",function(){return i.tau(e.BigNumber)}),s(c,"e",function(){return i.e(e.BigNumber)}),s(c,"phi",function(){return i.phi(e.BigNumber)}),s(c,"E",function(){return c.e}),s(c,"LN2",function(){return new e.BigNumber(2).ln()}),s(c,"LN10",function(){return new e.BigNumber(10).ln()}),s(c,"LOG2E",function(){return new e.BigNumber(1).div(new e.BigNumber(2).ln())}),s(c,"LOG10E",function(){return new e.BigNumber(1).div(new e.BigNumber(10).ln())}),s(c,"PI",function(){return c.pi}),s(c,"SQRT1_2",function(){return new e.BigNumber("0.5").sqrt()}),s(c,"SQRT2",function(){return new e.BigNumber(2).sqrt()})):(a(c,"Infinity",1/0),a(c,"NaN",NaN),a(c,"pi",Math.PI),a(c,"tau",2*Math.PI),a(c,"e",Math.E),a(c,"phi",1.618033988749895),a(c,"E",c.e),a(c,"LN2",Math.LN2),a(c,"LN10",Math.LN10),a(c,"LOG2E",Math.LOG2E),a(c,"LOG10E",Math.LOG10E),a(c,"PI",c.pi),a(c,"SQRT1_2",Math.SQRT1_2),a(c,"SQRT2",Math.SQRT2)),e.Complex&&a(c,"i",e.Complex.I),a(c,"version",n("857e"))}function a(e,t,n){e[t]=n,e.expression.mathWithTransform[t]=n}function s(e,t,n){r.lazy(e,t,n),r.lazy(e.expression.mathWithTransform,t,n)}t.factory=o,t.lazy=!1,t.math=!0},bbdf:function(e,t,n){"use strict";var r=n("d6cb"),i=n("d7df").isInteger;function o(e,t,o,u){var c=o(n("354f")),f=o(n("09a6")),l=n("1bea"),p=u("gamma",{number:function(e){var t,n;if(i(e))return e<=0?isFinite(e)?1/0:NaN:e>171?1/0:l(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,o=r*e,u=o*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*o)-571/(2488320*u)+163879/(209018880*c)+5246819/(75246796800*c*e))}--e,n=s[0];for(var f=1;f1)o=o.times(a),a--;return new e.BigNumber(o.toPrecision(e.BigNumber.precision))}return p.toTex={1:"\\Gamma\\left(${args[0]}\\right)"},p}var a=4.7421875,s=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];t.name="gamma",t.factory=o},bcaa:function(e,t,n){var r=n("cb7c"),i=n("d3f4"),o=n("a5b8");e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e),a=n.resolve;return a(t),n.promise}},bd86:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("85f2"),i=n.n(r);function o(e,t,n){return t in e?i()(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},be13:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},be97:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("tan",{number:Math.tan,Complex:function(e){return e.tan()},BigNumber:function(e){return e.tan()},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tan is no angle");return o(t.value)},"Array | Matrix":function(e){return r(e,o,!0)}});return o.toTex={1:"\\tan\\left(${args[0]}\\right)"},o}t.name="tan",t.factory=i},bed4:function(e,t,n){"use strict";e.exports={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]}},beef:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("acsch",{number:function(e){return e=1/e,Math.log(e+Math.sqrt(e*e+1))},Complex:function(e){return e.acsch()},BigNumber:function(t){return new e.BigNumber(1).div(t).asinh()},"Array | Matrix":function(e){return r(e,o)}});return o.toTex={1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},o}t.name="acsch",t.factory=i},bf0b:function(e,t,n){var r=n("355d"),i=n("aebd"),o=n("36c3"),a=n("1bc3"),s=n("07e3"),u=n("794b"),c=Object.getOwnPropertyDescriptor;t.f=n("8e60")?c:function(e,t){if(e=o(e),t=a(t,!0),u)try{return c(e,t)}catch(n){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},bf4c:function(e,t,n){"use strict";var r=n("b13c").map;function i(e,t,i,o){var a=i(n("2ba9"));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)}),i="Array"!==e.config().matrix;if(i){var o=e.matrix;return function(e,t,i){return o(r(n,function(n){return n(e,t,i)}))}}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['+t.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}",t},s}t.name="ArrayNode",t.path="expression.node",t.factory=i},bfb7:function(e,t,n){"use strict";var r=n("b13c");function i(e,t,i,o){var a=i(n("4781")),s=o("size",{Matrix:function(e){return a(e.size())},Array:r.size,string:function(e){return"Array"===t.matrix?[e.length]:a([e.length])},"number | Complex | BigNumber | Unit | boolean | null":function(e){return"Array"===t.matrix?[]:a([])}});return s.toTex=void 0,s}t.name="size",t.factory=i},bfee:function(e,t,n){"use strict";function r(e,t,n,r){var i=e.DenseMatrix,o=function(e,t,n,o){var a=e._values,s=e._index,u=e._ptr,c=e._size,f=e._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var l,p=c[0],h=c[1],d=n;"string"===typeof f&&(l=f,t=r.convert(t,l),d=r.find(n,[l,l]));for(var m=[],v=new i({data:m,size:[p,h],datatype:l}),y=[],g=[],b=0;b> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]}},c316:function(e,t,n){"use strict";e.exports=[n("ee25"),n("5b00"),n("63ca"),n("ad15"),n("9a69"),n("7951"),n("052c"),n("15af"),n("3d89"),n("e05a"),n("3064"),n("655b"),n("ad6b"),n("7dbd"),n("532f"),n("2b06"),n("c531")]},c366:function(e,t,n){var r=n("6821"),i=n("9def"),o=n("77f1");e.exports=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),f=o(a,c);if(e&&n!=n){while(c>f)if(s=u[f++],s!=s)return!0}else for(;c>f;f++)if((e||f in u)&&u[f]===n)return e||f||0;return!e&&-1}}},c367:function(e,t,n){"use strict";var r=n("8436"),i=n("50ed"),o=n("481b"),a=n("36c3");e.exports=n("30f1")(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},c3a1:function(e,t,n){var r=n("e6f3"),i=n("1691");e.exports=Object.keys||function(e){return r(e,i)}},c3ed:function(e,t,n){"use strict";var r=n("3d75").format,i=n("6762").lazy;function o(e,t,n,o,a){function s(t){if(!(this instanceof s))throw new SyntaxError("Constructor must be called with the new operator");e.isChain(t)?this.value=t.value:this.value=t}function u(e,t){"function"===typeof t&&(s.prototype[e]=f(t))}function c(e,t){i(s.prototype,e,function(){var e=t();if("function"===typeof e)return f(e)})}function f(e){return function(){for(var t=[this.value],n=0;ne)throw new TypeError("k must be less than or equal to n");return o=e-t,t2){t=g?t.trim():p(t,3);var n,r,i,o=t.charCodeAt(0);if(43===o||45===o){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var a,u=t.slice(2),c=0,f=u.length;ci)return NaN;return parseInt(u,r)}}return+t};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof d&&(y?u(function(){v.valueOf.call(n)}):o(n)!=h)?a(new m(b(t)),n,d):b(t)};for(var x,w=n("9e1e")?c(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),N=0;w.length>N;N++)i(m,x=w[N])&&!i(d,x)&&l(d,x,f(m,x));d.prototype=v,v.constructor=d,n("2aba")(r,h,d)}},c663:function(e,t,n){"use strict";var r=n("d7df").nearlyEqual,i=n("acc2");function o(e,t,o,a){var s=o(n("4781")),u=o(n("858b")),c=o(n("6573")),f=o(n("ff3e")),l=o(n("cdb0")),p=o(n("04b6")),h=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 h(e.value,t.value)},"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 l(e,t,h)},"Array, Array":function(e,t){return h(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return h(s(e),t)},"Matrix, Array":function(e,t){return h(e,s(t))},"SparseMatrix, any":function(e,t){return f(e,t,h,!1)},"DenseMatrix, any":function(e,t){return p(e,t,h,!1)},"any, SparseMatrix":function(e,t){return f(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()}});return h.toTex=void 0,h}t.name="compare",t.factory=o},c69a:function(e,t,n){e.exports=!n("9e1e")&&!n("79e5")(function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a})},c6e9:function(e,t,n){"use strict";e.exports={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]}},c6fa:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var a=i("cosh",{number:o,Complex:function(e){return e.cosh()},BigNumber:function(e){return e.cosh()},Unit:function(t){if(!t.hasBase(e.Unit.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cosh is no angle");return a(t.value)},"Array | Matrix":function(e){return r(e,a)}});return a.toTex={1:"\\cosh\\left(${args[0]}\\right)"},a}var o=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2};t.name="cosh",t.factory=i},c73a:function(e,t,n){"use strict";e.exports={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]}},c7d6:function(e,t,n){"use strict";e.exports={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(num,den)"],description:"Create a fraction from a number or from a numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]}},c843:function(e,t,n){"use strict";e.exports={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]}},c878:function(e,t,n){"use strict";e.exports={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["forEach([1, 2, 3], function(val) { console.log(val) })"],seealso:["map","sort","filter"]}},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},c8bb:function(e,t,n){e.exports=n("54a1")},c981:function(e,t,n){"use strict";e.exports=[n("72ab"),n("bb7b"),n("c316"),n("3e88"),n("0427"),n("6aba")]},ca5a:function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},ca86:function(e,t,n){"use strict";var r=n("b13c");function i(e,t,i,o){var a=i(n("4781")),s=i(n("3b53")),u=i(n("354f")),c=o("cross",{"Matrix, Matrix":function(e,t){return a(f(e.toArray(),t.toArray()))},"Matrix, Array":function(e,t){return a(f(e.toArray(),t))},"Array, Matrix":function(e,t){return a(f(e,t.toArray()))},"Array, Array":f});return c.toTex={2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},c;function f(e,t){var n=Math.max(r.size(e).length,r.size(t).length);e=r.squeeze(e),t=r.squeeze(t);var i=r.size(e),o=r.size(t);if(1!==i.length||1!==o.length||3!==i[0]||3!==o[0])throw new RangeError("Vectors with length 3 expected (Size A = ["+i.join(", ")+"], B = ["+o.join(", ")+"])");var a=[s(u(e[1],t[2]),u(e[2],t[1])),s(u(e[2],t[0]),u(e[0],t[2])),s(u(e[0],t[1]),u(e[1],t[0]))];return n>1?[a]:a}}t.name="cross",t.factory=i},caa6:function(e,t,n){"use strict";e.exports={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]}},cadf:function(e,t,n){"use strict";var r=n("9c6c"),i=n("d53b"),o=n("84f2"),a=n("6821");e.exports=n("01f9")(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},cae5:function(e,t,n){"use strict";var r=n("5fc9");function i(e,t,i,o){var a=i(n("863e")),s=e.SparseMatrix,u=function(e,t,n){var i=e._values,u=e._index,c=e._ptr,f=e._size,l=e._datatype,p=t._values,h=t._index,d=t._ptr,m=t._size,v=t._datatype;if(f.length!==m.length)throw new r(f.length,m.length);if(f[0]!==m[0]||f[1]!==m[1])throw new RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+m+")");var y,g=f[0],b=f[1],x=a,w=0,N=n;"string"===typeof l&&l===v&&(y=l,x=o.find(a,[y,y]),w=o.convert(0,y),N=o.find(n,[y,y]));var E,M,S,_,A,O=i&&p?[]:void 0,T=[],C=[],k=new s({values:O,index:T,ptr:C,size:[g,b],datatype:y}),P=O?[]:void 0,I=[];for(M=0;M0?s(v,0,d,d[0],u,l):[];return new o({data:y,size:d,datatype:a})};function s(e,t,n,r,i,o){var a=[];if(t===n.length-1)for(var u=0;uu)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},ce78:function(e,t,n){"use strict";var r=n("5a55");function i(e){for(var t=e.d,n=t[0]+"",r=1;r0)if(++s>c){s-=c;while(s--)u+="0"}else s1&&(null!==f[h+1]&&void 0!==f[h+1]||(f[h+1]=0),f[h+1]+=f[h]>>1,f[h]&=1)}return f.reverse()}e.exports=function(e,t,n){var o,a,s,u,c,f=e.constructor,l=+(e.s<0),p=+(t.s<0);if(l){o=i(r(e));for(var h=0;h0)n(s[--m],u[--v])===y&&(g=g.plus(b)),b=b.times(x);while(v>0)n(c,u[--v])===y&&(g=g.plus(b)),b=b.times(x);return f.config({precision:w}),0===y&&(g.s=-g.s),g}},ce7e:function(e,t,n){var r=n("63b6"),i=n("584a"),o=n("294c");e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},cea0:function(e,t,n){"use strict";e.exports={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]}},cefe:function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("2ff4")),a=r(n("b4e9")),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}}}t.name="std",t.factory=r},cf0c:function(e,t,n){"use strict";e.exports={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]}},cf41:function(e,t,n){"use strict";var r=n("dcb2");function i(e,t,i,o){var a=i(n("3447")),s=i(n("354f")),u=i(n("ad52")),c=i(n("1356")),f=i(n("3db8")),l=i(n("a9ca"));return o("multinomial",{"Array | Matrix":function(e){var t=0,n=1;return r(e,function(e){if(!f(e)||!l(e))throw new TypeError("Positive integer value expected in function multinomial");t=a(t,e),n=s(n,c(e))}),u(c(t),n)}})}t.name="multinomial",t.factory=i},cfcb:function(e,t,n){"use strict";e.exports={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]}},d05c:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("isNumeric",{"number | BigNumber | Fraction | boolean":function(){return!0},"Complex | Unit | string | null | undefined | Node":function(){return!1},"Array | Matrix":function(e){return r(e,o)}});return o}t.name="isNumeric",t.factory=i},d139:function(e,t,n){"use strict";e.exports={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]}},d145:function(e,t,n){"use strict";function r(e,t,r){var i=r(n("2636")),o=r(n("ffc1")),a=function(e,t,n,r){if(!e||!t||!n)return null;var a,s,u,c,f,l,p,h=e._size,d=h[0],m=h[1],v=4*m+(r?m+d+1:0),y=[],g=0,b=m,x=2*m,w=3*m,N=4*m,E=5*m+1;for(u=0;u=1&&M[s]++,2===O.jleaf&&M[O.q]--}-1!==t[s]&&(y[g+s]=t[s])}for(s=0;s1?(l=w(p,y,d,n),b.unshift(l),l=w(p,b,d,n)):l=w(p,a,d,n)}else l=w(p,a,d,n);else a=t.args.map(function(e){return N(e,n)}),l=w(p,a,d,n);return l;case"ParenthesisNode":return N(t.content,n);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(t.type))}}return d}t.math=!0,t.name="simplifyConstant",t.path="algebra.simplify",t.factory=r},d225: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})},d27d:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("acoth",{number:function(n){return n>=1||n<=-1||t.predictable?isFinite(n)?(Math.log((n+1)/n)+Math.log(n/(n-1)))/2:0:new e.Complex(n,0).acoth()},Complex:function(e){return e.acoth()},BigNumber:function(t){return new e.BigNumber(1).div(t).atanh()},"Array | Matrix":function(e){return r(e,o)}});return o.toTex={1:"\\coth^{-1}\\left(${args[0]}\\right)"},o}t.name="acoth",t.factory=i},d2aa:function(e,t,n){"use strict";function r(){var e=function(e,t){if(!e)return null;var n,r,i=e._index,o=e._ptr,a=e._size,s=a[0],u=a[1],c=[],f=[],l=0,p=u;if(t)for(n=0;n0){e>=1&&(d=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)),e/=d);while(v<=b&&g<=b){if(n=(m+y)/(v+g),e===n){v+g<=b?(r=m+y,i=v+g):g>v?(r=y,i=g):(r=m,i=v);break}e>n?(m+=y,v+=g):(y+=m,g+=v),v>b?(r=y,i=g):(r=m,i=v)}r*=d}else(isNaN(e)||isNaN(t))&&(i=r=NaN);break;case"string":if(v=e.match(/\d+|./g),null===v&&l(),"-"===v[m]?(o=-1,m++):"+"===v[m]&&m++,v.length===m+1?c=f(v[m++],o):"."===v[m+1]||"."===v[m]?("."!==v[m]&&(s=f(v[m++],o)),m++,(m+1===v.length||"("===v[m+1]&&")"===v[m+3]||"'"===v[m+1]&&"'"===v[m+3])&&(c=f(v[m],o),h=Math.pow(10,v[m].length),m++),("("===v[m]&&")"===v[m+2]||"'"===v[m]&&"'"===v[m+2])&&(p=f(v[m+1],o),d=Math.pow(10,v[m+1].length)-1,m+=3)):"/"===v[m+1]||":"===v[m+1]?(c=f(v[m],o),h=f(v[m+2],1),m+=3):"/"===v[m+3]&&" "===v[m+1]&&(s=f(v[m],o),c=f(v[m+2],o),h=f(v[m+4],1),m+=5),v.length<=m){i=h*d,o=r=p+i*s+d*c;break}default:l()}if(0===i)throw new u;a["s"]=o<0?-1:1,a["n"]=Math.abs(r),a["d"]=Math.abs(i)};function h(e,t,n){for(var r=1;t>0;e=e*e%n,t>>=1)1&t&&(r=r*e%n);return r}function d(e,t){for(;t%2===0;t/=2);for(;t%5===0;t/=5);if(1===t)return 0;for(var n=10%t,r=1;1!==n;r++)if(n=10*n%t,r>o)return 0;return r}function m(e,t,n){for(var r=1,i=h(10,n,t),o=0;o<300;o++){if(r===i)return o;r=10*r%t,i=10*i%t}return 0}function v(e,t){if(!e)return t;if(!t)return e;while(1){if(e%=t,!e)return t;if(t%=e,!t)return e}}function y(e,t){if(!(this instanceof y))return new y(e,t);p(e,t),e=y["REDUCE"]?v(a["d"],a["n"]):1,this["s"]=a["s"],this["n"]=a["n"]/e,this["d"]=a["d"]/e}y["REDUCE"]=1,y.prototype={s:1,n:0,d:1,abs:function(){return new y(this["n"],this["d"])},neg:function(){return new y(-this["s"]*this["n"],this["d"])},add:function(e,t){return p(e,t),new y(this["s"]*this["n"]*a["d"]+a["s"]*this["d"]*a["n"],this["d"]*a["d"])},sub:function(e,t){return p(e,t),new y(this["s"]*this["n"]*a["d"]-a["s"]*this["d"]*a["n"],this["d"]*a["d"])},mul:function(e,t){return p(e,t),new y(this["s"]*a["s"]*this["n"]*a["n"],this["d"]*a["d"])},div:function(e,t){return p(e,t),new y(this["s"]*a["s"]*this["n"]*a["d"],this["d"]*a["n"])},clone:function(){return new y(this)},mod:function(e,t){return isNaN(this["n"])||isNaN(this["d"])?new y(NaN):void 0===e?new y(this["s"]*this["n"]%this["d"],1):(p(e,t),0===a["n"]&&0===this["d"]&&y(0,0),new y(this["s"]*(a["d"]*this["n"])%(a["n"]*this["d"]),a["d"]*this["d"]))},gcd:function(e,t){return p(e,t),new y(v(a["n"],this["n"])*v(a["d"],this["d"]),a["d"]*this["d"])},lcm:function(e,t){return p(e,t),0===a["n"]&&0===this["n"]?new y:new y(a["n"]*this["n"],v(a["n"],this["n"])*v(a["d"],this["d"]))},ceil:function(e){return e=Math.pow(10,e||0),isNaN(this["n"])||isNaN(this["d"])?new y(NaN):new y(Math.ceil(e*this["s"]*this["n"]/this["d"]),e)},floor:function(e){return e=Math.pow(10,e||0),isNaN(this["n"])||isNaN(this["d"])?new y(NaN):new y(Math.floor(e*this["s"]*this["n"]/this["d"]),e)},round:function(e){return e=Math.pow(10,e||0),isNaN(this["n"])||isNaN(this["d"])?new y(NaN):new y(Math.round(e*this["s"]*this["n"]/this["d"]),e)},inverse:function(){return new y(this["s"]*this["d"],this["n"])},pow:function(e){return e<0?new y(Math.pow(this["s"]*this["d"],-e),Math.pow(this["n"],-e)):new y(Math.pow(this["s"]*this["n"],e),Math.pow(this["d"],e))},equals:function(e,t){return p(e,t),this["s"]*this["n"]*a["d"]===a["s"]*a["n"]*this["d"]},compare:function(e,t){p(e,t);var n=this["s"]*this["n"]*a["d"]-a["s"]*a["n"]*this["d"];return(00&&(n+=t,n+=" ",r%=i),n+=r,n+="/",n+=i),n},toLatex:function(e){var t,n="",r=this["n"],i=this["d"];return this["s"]<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,r%=i),n+="\\frac{",n+=r,n+="}{",n+=i,n+="}"),n},toContinued:function(){var e,t=this["n"],n=this["d"],r=[];if(isNaN(this["n"])||isNaN(this["d"]))return r;do{r.push(Math.floor(t/n)),e=t%n,t=n,n=e}while(1!==t);return r},toString:function(e){var t,n=this["n"],r=this["d"];if(isNaN(n)||isNaN(r))return"NaN";y["REDUCE"]||(t=v(n,r),n/=t,r/=t),e=e||15;var i=d(n,r),o=m(n,r,i),a=-1===this["s"]?"-":"";if(a+=n/r|0,n%=r,n*=10,n&&(a+="."),i){for(var s=o;s--;)a+=n/r|0,n%=r,n*=10;a+="(";for(s=i;s--;)a+=n/r|0,n%=r,n*=10;a+=")"}else for(s=e;n&&s--;)a+=n/r|0,n%=r,n*=10;return a}},r=[],i=function(){return y}.apply(t,r),void 0===i||(e.exports=i)})()},d697:function(e,t,n){"use strict";var r=n("6762");function i(e,t,n,i,o){var a=["Matrix","Array"],u=["number","BigNumber","Fraction"];function c(e){if(e){var n=r.map(t,r.clone);s(e,"matrix",a),s(e,"number",u),r.deepExtend(t,e);var i=r.map(t,r.clone),c=r.map(e,r.clone);return o.emit("config",i,n,c),i}return r.map(t,r.clone)}return c.MATRIX=a,c.NUMBER=u,c}function o(e,t){return-1!==e.indexOf(t)}function a(e,t){return e.map(function(e){return e.toLowerCase()}).indexOf(t.toLowerCase())}function s(e,t,n){if(void 0!==e[t]&&!o(n,e[t])){var r=a(n,e[t]);-1!==r?(console.warn('Warning: Wrong casing for configuration option "'+t+'", should be "'+n[r]+'" instead of "'+e[t]+'".'),e[t]=n[r]):console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+n.map(JSON.stringify).join(", ")+".")}}t.name="config",t.math=!0,t.factory=i},d6b0:function(e,t,n){"use strict";e.exports={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]}},d6cb: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)}},d6cc:function(e,t,n){"use strict";var r=n("b13c"),i=n("6c54"),o=n("3d75");function a(e,t,a,s){var u=a(n("7d3c")),c=a(n("3447")),f=a(n("354f")),l=a(n("2ff4")),p=a(n("3b53")),h=a(n("41fb")),d=a(n("bfb7")),m=a(n("8ad0")),v=a(n("30a9")),y=s("sqrtm",{"Array | Matrix":function(t){var n=e.isMatrix(t)?t.size():r.size(t);switch(n.length){case 1:if(1===n[0])return l(t);throw new RangeError("Matrix must be square (size: "+o.format(n)+")");case 2:var i=n[0],a=n[1];if(i===a)return x(t);throw new RangeError("Matrix must be square (size: "+o.format(n)+")")}}}),g=1e3,b=1e-6;function x(e){var t,n=0,r=e,i=v(d(e));do{var o=r;if(r=f(.5,c(o,h(i))),i=f(.5,c(i,h(o))),t=m(u(p(r,o))),t>b&&++n>g)throw new Error("computing square root of matrix: iterative method could not converge")}while(t>b);return r}return y.toTex={1:"{${args[0]}}".concat(i.operators["pow"],"{\\frac{1}{2}}")},y}t.name="sqrtm",t.factory=a},d6ee:function(e,t,n){"use strict";var r=n("d7df").nearlyEqual,i=n("acc2");function o(e,t,o,a){var s=o(n("4781")),u=o(n("858b")),c=o(n("5d77")),f=o(n("ff3e")),l=o(n("cdb0")),p=o(n("04b6")),h=n("6c54"),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:m(e,t)},"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 l(e,t,m)},"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 f(e,t,m,!1)},"DenseMatrix, any":function(e,t){return p(e,t,m,!1)},"any, SparseMatrix":function(e,t){return f(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()}}),m=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(h.operators["unequal"],"${args[1]}\\right)")},d}t.name="unequal",t.factory=o},d70a:function(e,t,n){"use strict";var r=n("6762").clone,i=n("b13c"),o=n("4b6a"),a=n("5fc9");function s(e,t,s,c){var f=s(n("4781")),l=s(n("3db8")),p=c("concat",{"...Array | Matrix | number | BigNumber":function(t){var n,s,c=t.length,p=-1,h=!1,d=[];for(n=0;n0&&p>s)throw new o(p,s+1)}else{var v=r(m).valueOf(),y=i.size(v);if(d[n]=v,s=p,p=y.length-1,n>0&&p!==s)throw new a(s+1,p+1)}}if(0===d.length)throw new SyntaxError("At least one matrix expected");var g=d.shift();while(d.length)g=u(g,d.shift(),p,0);return h?f(g):g},"...string":function(e){return e.join("")}});return p.toTex=void 0,p}function u(e,t,n,r){if(r0?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)f++;var l=a.slice(f).join(""),p=t.isNumber(n)&&l.length||l.match(/[1-9]/)?"."+l:"",h=a.slice(0,f).join("")+p+"e"+(o>=0?"+":"")+s.toString();return r.sign+h},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,f=u.exponent;c.length0?f:0;return lt){var i=r.splice(t,r.length-t);if(i[0]>=5){var o=t-1;r[o]++;while(10===r[o])r.pop(),0===o&&(r.unshift(0),n.exponent++,o++),o--,r[o]++}}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=t)break;var d=p,m=0;while(!h[r.p[d]])h[r.p[d]]=!0,d=r.p[d],m++;m%2===0&&s++}return s%2===0?o:f(o)}}t.name="det",t.factory=a},de7b:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var a=i("acosh",{number:function(n){return n>=1||t.predictable?o(n):n<=-1?new e.Complex(Math.log(Math.sqrt(n*n-1)-n),Math.PI):new e.Complex(n,0).acosh()},Complex:function(e){return e.acosh()},BigNumber:function(e){return e.acosh()},"Array | Matrix":function(e){return r(e,a)}});return a.toTex={1:"\\cosh^{-1}\\left(${args[0]}\\right)"},a}var o=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)};t.name="acosh",t.factory=i},df97:function(e,t,n){"use strict";var r=n("4dbd");function i(e,t,i,o){var a=i(n("2ba9")),s=i(n("b940"));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}function c(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)+'"')}return u.prototype=new a,u.prototype.type="ConditionalNode",u.prototype.isConditionalNode=!0,u.prototype._compile=function(e,t){var n=this.condition._compile(e,t),r=this.trueExpr._compile(e,t),i=this.falseExpr._compile(e,t);return function(e,t,o){return c(n(e,t,o))?r(e,t,o):i(e,t,o)}},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}t.name="ConditionalNode",t.path="expression.node",t.factory=i},e05a:function(e,t,n){"use strict";e.exports=[n("c663"),n("2f6a"),n("65f4"),n("c4b9"),n("baf0"),n("8b4e"),n("1fe4"),n("9b5c"),n("9b87"),n("fdc1"),n("d6ee")]},e05c:function(e,t,n){"use strict";e.exports={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]}},e08d:function(e,t,n){"use strict";e.exports={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","var"]}},e0a0:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("arg",{number:function(e){return Math.atan2(0,e)},BigNumber:function(t){return e.BigNumber.atan2(0,t)},Complex:function(e){return e.arg()},"Array | Matrix":function(e){return r(e,o)}});return o.toTex={1:"\\arg\\left(${args[0]}\\right)"},o}t.name="arg",t.factory=i},e0df:function(e,t,n){"use strict";e.exports={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]}},e11e:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e132:function(e,t,n){"use strict";e.exports={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]}},e195:function(e,t,n){"use strict";e.exports={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]}},e1a9:function(e,t,n){"use strict";e.exports={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]}},e1b6: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},r(e)}var i=n("6762").hasOwnProperty;function o(e,t){if(f(e)&&s(e,t))return e[t];if("function"===typeof e[t]&&c(e,t))throw new Error('Cannot access method "'+t+'" as a property');throw new Error('No access to property "'+t+'"')}function a(e,t,n){if(f(e)&&s(e,t))return e[t]=n,n;throw new Error('No access to property "'+t+'"')}function s(e,t){return!(!e||"object"!==r(e))&&(!!i(l,t)||!(t in Object.prototype)&&!(t in Function.prototype))}function u(e,t){if(!c(e,t))throw new Error('No access to method "'+t+'"')}function c(e,t){return!(!e||"function"!==typeof e[t])&&(!(i(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e))&&(!!i(p,t)||!(t in Object.prototype)&&!(t in Function.prototype)))}function f(e){return"object"===r(e)&&e&&e.constructor===Object}var l={length:!0,name:!0},p={toString:!0,valueOf:!0,toLocaleString:!0};t.getSafeProperty=o,t.setSafeProperty=a,t.isSafeProperty=s,t.validateSafeMethod=u,t.isSafeMethod=c,t.isPlainObject=f},e1fc:function(e,t,n){"use strict";var r=n("5fc9");function i(e,t,i,o){var a=i(n("863e")),s=e.SparseMatrix,u=function(e,t,n,i){var u=e._data,c=e._size,f=e._datatype,l=t._values,p=t._index,h=t._ptr,d=t._size,m=t._datatype;if(c.length!==d.length)throw new r(c.length,d.length);if(c[0]!==d[0]||c[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+d+")");if(!l)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var v,y=c[0],g=c[1],b=a,x=0,w=n;"string"===typeof f&&f===m&&(v=f,b=o.find(a,[v,v]),x=o.convert(0,v),w=o.find(n,[v,v]));for(var N=[],E=[],M=[],S=0;Su)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},e760:function(e,t,n){"use strict";var r=n("d6cb"),i=n("d7df").sign;function o(e,t,n,o){var l=o("erf",{number:function(e){var t=Math.abs(e);return t>=f?i(e):t<=a?i(e)*p(t):t<=4?i(e)*(1-h(t)):i(e)*(1-d(t))},BigNumber:function(t){return new e.BigNumber(l(t.toNumber()))},"Array | Matrix":function(e){return r(e,l)}});function p(e){var t,n=e*e,r=u[0][4]*n,i=n;for(t=0;t<3;t+=1)r=(r+u[0][t])*n,i=(i+c[0][t])*n;return e*(r+u[0][3])/(i+c[0][3])}function h(e){var t,n=u[1][8]*e,r=e;for(t=0;t<7;t+=1)n=(n+u[1][t])*e,r=(r+c[1][t])*e;var i=(n+u[1][7])/(r+c[1][7]),o=parseInt(16*e)/16,a=(e-o)*(e+o);return Math.exp(-o*o)*Math.exp(-a)*i}function d(e){var t,n=1/(e*e),r=u[2][5]*n,i=n;for(t=0;t<4;t+=1)r=(r+u[2][t])*n,i=(i+c[2][t])*n;var o=n*(r+u[2][4])/(i+c[2][4]);o=(s-o)/e,n=parseInt(16*e)/16;var a=(e-n)*(e+n);return Math.exp(-n*n)*Math.exp(-a)*o}return l.toTex={1:"erf\\left(${args[0]}\\right)"},l}var a=.46875,s=.5641895835477563,u=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,2.1531153547440383e-8],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],c=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],f=Math.pow(2,53);t.name="erf",t.factory=o},e7dd:function(e,t,n){"use strict";var r=n("6762").lazy;function i(e,t,n,r,i){function a(t){var n=e.Unit.parse(t);return n.fixPrefix=!0,n}o(i,"speedOfLight",function(){return a("299792458 m s^-1")}),o(i,"gravitationConstant",function(){return a("6.6738480e-11 m^3 kg^-1 s^-2")}),o(i,"planckConstant",function(){return a("6.626069311e-34 J s")}),o(i,"reducedPlanckConstant",function(){return a("1.05457172647e-34 J s")}),o(i,"magneticConstant",function(){return a("1.2566370614e-6 N A^-2")}),o(i,"electricConstant",function(){return a("8.854187817e-12 F m^-1")}),o(i,"vacuumImpedance",function(){return a("376.730313461 ohm")}),o(i,"coulomb",function(){return a("8.9875517873681764e9 N m^2 C^-2")}),o(i,"elementaryCharge",function(){return a("1.60217656535e-19 C")}),o(i,"bohrMagneton",function(){return a("9.2740096820e-24 J T^-1")}),o(i,"conductanceQuantum",function(){return a("7.748091734625e-5 S")}),o(i,"inverseConductanceQuantum",function(){return a("12906.403721742 ohm")}),o(i,"magneticFluxQuantum",function(){return a("2.06783375846e-15 Wb")}),o(i,"nuclearMagneton",function(){return a("5.0507835311e-27 J T^-1")}),o(i,"klitzing",function(){return a("25812.807443484 ohm")}),o(i,"bohrRadius",function(){return a("5.291772109217e-11 m")}),o(i,"classicalElectronRadius",function(){return a("2.817940326727e-15 m")}),o(i,"electronMass",function(){return a("9.1093829140e-31 kg")}),o(i,"fermiCoupling",function(){return a("1.1663645e-5 GeV^-2")}),o(i,"fineStructure",function(){return.007297352569824}),o(i,"hartreeEnergy",function(){return a("4.3597443419e-18 J")}),o(i,"protonMass",function(){return a("1.67262177774e-27 kg")}),o(i,"deuteronMass",function(){return a("3.3435830926e-27 kg")}),o(i,"neutronMass",function(){return a("1.6749271613e-27 kg")}),o(i,"quantumOfCirculation",function(){return a("3.636947552024e-4 m^2 s^-1")}),o(i,"rydberg",function(){return a("10973731.56853955 m^-1")}),o(i,"thomsonCrossSection",function(){return a("6.65245873413e-29 m^2")}),o(i,"weakMixingAngle",function(){return.222321}),o(i,"efimovFactor",function(){return 22.7}),o(i,"atomicMass",function(){return a("1.66053892173e-27 kg")}),o(i,"avogadro",function(){return a("6.0221412927e23 mol^-1")}),o(i,"boltzmann",function(){return a("1.380648813e-23 J K^-1")}),o(i,"faraday",function(){return a("96485.336521 C mol^-1")}),o(i,"firstRadiation",function(){return a("3.7417715317e-16 W m^2")}),o(i,"loschmidt",function(){return a("2.686780524e25 m^-3")}),o(i,"gasConstant",function(){return a("8.314462175 J K^-1 mol^-1")}),o(i,"molarPlanckConstant",function(){return a("3.990312717628e-10 J s mol^-1")}),o(i,"molarVolume",function(){return a("2.241396820e-10 m^3 mol^-1")}),o(i,"sackurTetrode",function(){return-1.164870823}),o(i,"secondRadiation",function(){return a("1.438777013e-2 m K")}),o(i,"stefanBoltzmann",function(){return a("5.67037321e-8 W m^-2 K^-4")}),o(i,"wienDisplacement",function(){return a("2.897772126e-3 m K")}),o(i,"molarMass",function(){return a("1e-3 kg mol^-1")}),o(i,"molarMassC12",function(){return a("1.2e-2 kg mol^-1")}),o(i,"gravity",function(){return a("9.80665 m s^-2")}),o(i,"planckLength",function(){return a("1.61619997e-35 m")}),o(i,"planckMass",function(){return a("2.1765113e-8 kg")}),o(i,"planckTime",function(){return a("5.3910632e-44 s")}),o(i,"planckCharge",function(){return a("1.87554595641e-18 C")}),o(i,"planckTemperature",function(){return a("1.41683385e+32 K")})}function o(e,t,n){r(e,t,n),r(e.expression.mathWithTransform,t,n)}t.factory=i,t.lazy=!1,t.math=!0},e853:function(e,t,n){var r=n("d3f4"),i=n("1169"),o=n("2b4c")("species");e.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&(t=t[o],null===t&&(t=void 0))),void 0===t?Array:t}},e85e:function(e,t,n){"use strict";var r=n("d6cb");function i(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}t.name="isZero",t.factory=i},e8a8:function(e,t,n){"use strict";var r=Array.isArray;function i(e,t,i,o){var a=i(n("4781")),s=i(n("8292")),u=i(n("57bf")),c=i(n("ac79")),f=i(n("a09b")),l=i(n("14a0")),p=i(n("6c70")),h=o("lusolve",{"Array, Array | Matrix":function(e,t){e=a(e);var n=s(e),r=m(n.L,n.U,n.p,null,t);return r.valueOf()},"DenseMatrix, Array | Matrix":function(e,t){var n=s(e);return m(n.L,n.U,n.p,null,t)},"SparseMatrix, Array | Matrix":function(e,t){var n=s(e);return m(n.L,n.U,n.p,null,t)},"SparseMatrix, Array | Matrix, number, number":function(e,t,n,r){var i=u(e,n,r);return m(i.L,i.U,i.p,i.q,t)},"Object, Array | Matrix":function(e,t){return m(e.L,e.U,e.p,e.q,t)}}),d=function(t){if(e.isMatrix(t))return t;if(r(t))return a(t);throw new TypeError("Invalid Matrix LU decomposition")};function m(e,t,n,r,i){e=d(e),t=d(t),i=f(e,i,!1),n&&(i._data=c(n,i._data));var o=p(e,i),a=l(t,o);return r&&(a._data=c(r,a._data)),a}return h}t.name="lusolve",t.factory=i},e920:function(e,t,n){"use strict";e.exports={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]}},e975:function(e,t){e.exports=function e(t,n){"use strict";var r,i,o=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,s=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,u=/^0x[0-9a-f]+$/i,c=/^0/,f=function(t){return e.insensitive&&(""+t).toLowerCase()||""+t},l=f(t).replace(a,"")||"",p=f(n).replace(a,"")||"",h=l.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),d=p.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=parseInt(l.match(u),16)||1!==h.length&&l.match(s)&&Date.parse(l),v=parseInt(p.match(u),16)||m&&p.match(s)&&Date.parse(p)||null;if(v){if(mv)return 1}for(var y=0,g=Math.max(h.length,d.length);yi)return 1}return 0}},e9ac:function(e,t,n){"use strict";e.exports={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]}},e9c3:function(e,t,n){"use strict";e.exports=function(e){return e&&e.constructor.prototype.isMatrix||!1}},ea99:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,n,i){var o=i("cube",{number:function(e){return e*e*e},Complex:function(e){return e.mul(e).mul(e)},BigNumber:function(e){return e.times(e).times(e)},Fraction:function(e){return e.pow(3)},"Array | Matrix":function(e){return r(e,o,!0)},Unit:function(e){return e.pow(3)}});return o.toTex={1:"\\left(${args[0]}\\right)^3"},o}t.name="cube",t.factory=i},ead6:function(e,t,n){var r=n("f772"),i=n("e4ae"),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n("d864")(Function.call,n("bf0b").f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},eb38:function(e,t,n){"use strict";e.exports={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1)'],seealso:["sort"]}},ebd6:function(e,t,n){var r=n("cb7c"),i=n("d8e8"),o=n("2b4c")("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[o])?t:i(n)}},ebfd:function(e,t,n){var r=n("62a0")("meta"),i=n("f772"),o=n("07e3"),a=n("d9f6").f,s=0,u=Object.isExtensible||function(){return!0},c=!n("294c")(function(){return u(Object.preventExtensions({}))}),f=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},l=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";f(e)}return e[r].i},p=function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;f(e)}return e[r].w},h=function(e){return c&&d.NEED&&u(e)&&!o(e,r)&&f(e),e},d=e.exports={KEY:r,NEED:!1,fastKey:l,getWeak:p,onFreeze:h}},ec38:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,i,o){var a=n("6c54"),s=o("unaryMinus",{number:function(e){return-e},Complex:function(e){return e.neg()},BigNumber:function(e){return e.neg()},Fraction:function(e){return e.neg()},Unit:function(e){var t=e.clone();return t.value=s(e.value),t},"Array | Matrix":function(e){return r(e,s,!0)}});return s.toTex={1:"".concat(a.operators["unaryMinus"],"\\left(${args[0]}\\right)")},s}t.name="unaryMinus",t.factory=i},ec42:function(e,t,n){"use strict";var r=n("d6cb");function i(e,t,i,o){var a=i(n("58f1")),s=o("log",{number:function(n){return n>=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}t.name="log",t.factory=i},ec49:function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("3447")),a=r(n("3b53")),s=r(n("354f")),u=r(n("ad52")),c=r(n("09a6")),f=r(n("1356")),l=r(n("c430")),p=r(n("9adc")),h=r(n("3db8")),d=r(n("1fe4")),m=i("stirlingS2",{"number | BigNumber, number | BigNumber":function(e,t){if(!h(e)||p(e)||!h(t)||p(t))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(d(t,e))throw new TypeError("k must be less than or equal to n in function stirlingS2");for(var n=f(t),r=0,i=0;i<=t;i++){var m=c(-1,a(t,i)),v=l(t,i),y=c(i,e);r=o(r,s(s(v,y),m))}return u(r,n)}});return m.toTex={2:"\\mathrm{S}\\left(${args}\\right)"},m}t.name="stirlingS2",t.factory=r},ecf7:function(e,t,n){"use strict";e.exports=[n("b46a"),n("59b6"),n("da02"),n("9454"),n("0ea9")]},ed58:function(e,t,n){"use strict";var r=n("5c31").transform,i=n("1c94");function o(e,t,o,a){var s=o(n("b4e9"));return a("var",{"...any":function(t){if(t.length>=2&&i(t[0])){var n=t[1];e.isNumber(n)?t[1]=n-1:e.isBigNumber(n)&&(t[1]=n.minus(1))}try{return s.apply(null,t)}catch(o){throw r(o)}}})}t.name="var",t.path="expression.transform",t.factory=o},edaf:function(e,t,n){var r,i; /** * @license Complex.js v2.0.11 11/02/2016 * * Copyright (c) 2016, Robert Eisele (robert@xarg.org) * Dual licensed under the MIT or GPL Version 2 licenses. **/ /** * @license Complex.js v2.0.11 11/02/2016 * * Copyright (c) 2016, Robert Eisele (robert@xarg.org) * Dual licensed under the MIT or GPL Version 2 licenses. **/ (function(n){"use strict";var o=function(e){return.5*(Math.exp(e)+Math.exp(-e))},a=function(e){return.5*(Math.exp(e)-Math.exp(-e))},s=function(e){var t=Math.PI/4;if(e<-t||e>t)return Math.cos(e)-1;var n=e*e;return n*(n*(1/24+n*(-1/720+n*(1/40320+n*(-1/3628800+n*(1/4790014600+n*(-1/87178291200+n*(1/20922789888e3)))))))-.5)},u=function(e,t){var n=Math.abs(e),r=Math.abs(t);return n<3e3&&r<3e3?Math.sqrt(n*n+r*r):(n0&&c();break;case"number":n["im"]=0,n["re"]=e;break;default:c()}return isNaN(n["re"])||isNaN(n["im"]),n};function p(e,t){if(!(this instanceof p))return new p(e,t);var n=l(e,t);this["re"]=n["re"],this["im"]=n["im"]}p.prototype={re:0,im:0,sign:function(){var e=this["abs"]();return new p(this["re"]/e,this["im"]/e)},add:function(e,t){var n=new p(e,t);return this["isInfinite"]()&&n["isInfinite"]()?p["NAN"]:this["isInfinite"]()||n["isInfinite"]()?p["INFINITY"]:new p(this["re"]+n["re"],this["im"]+n["im"])},sub:function(e,t){var n=new p(e,t);return this["isInfinite"]()&&n["isInfinite"]()?p["NAN"]:this["isInfinite"]()||n["isInfinite"]()?p["INFINITY"]:new p(this["re"]-n["re"],this["im"]-n["im"])},mul:function(e,t){var n=new p(e,t);return this["isInfinite"]()&&n["isZero"]()||this["isZero"]()&&n["isInfinite"]()?p["NAN"]:this["isInfinite"]()||n["isInfinite"]()?p["INFINITY"]:0===n["im"]&&0===this["im"]?new p(this["re"]*n["re"],0):new p(this["re"]*n["re"]-this["im"]*n["im"],this["re"]*n["im"]+this["im"]*n["re"])},div:function(e,t){var n=new p(e,t);if(this["isZero"]()&&n["isZero"]()||this["isInfinite"]()&&n["isInfinite"]())return p["NAN"];if(this["isInfinite"]()||n["isZero"]())return p["INFINITY"];if(this["isZero"]()||n["isInfinite"]())return p["ZERO"];e=this["re"],t=this["im"];var r,i,o=n["re"],a=n["im"];return 0===a?new p(e/o,t/o):Math.abs(o)=0)return new p(Math.pow(e,n["re"]),0);if(0===e)switch((n["re"]%4+4)%4){case 0:return new p(Math.pow(t,n["re"]),0);case 1:return new p(0,Math.pow(t,n["re"]));case 2:return new p(-Math.pow(t,n["re"]),0);case 3:return new p(0,-Math.pow(t,n["re"]))}}if(0===e&&0===t&&n["re"]>0&&n["im"]>=0)return p["ZERO"];var r=Math.atan2(t,e),i=f(e,t);return e=Math.exp(n["re"]*i-n["im"]*r),t=n["im"]*i+n["re"]*r,new p(e*Math.cos(t),e*Math.sin(t))},sqrt:function(){var e,t,n=this["re"],r=this["im"],i=this["abs"]();if(n>=0){if(0===r)return new p(Math.sqrt(n),0);e=.5*Math.sqrt(2*(i+n))}else e=Math.abs(r)/Math.sqrt(2*(i-n));return t=n<=0?.5*Math.sqrt(2*(i-n)):Math.abs(r)/Math.sqrt(2*(i+n)),new p(e,r<0?-t:t)},exp:function(){var e=Math.exp(this["re"]);return this["im"],new p(e*Math.cos(this["im"]),e*Math.sin(this["im"]))},expm1:function(){var e=this["re"],t=this["im"];return new p(Math.expm1(e)*Math.cos(t)+s(t),Math.exp(e)*Math.sin(t))},log:function(){var e=this["re"],t=this["im"];return new p(f(e,t),Math.atan2(t,e))},abs:function(){return u(this["re"],this["im"])},arg:function(){return Math.atan2(this["im"],this["re"])},sin:function(){var e=this["re"],t=this["im"];return new p(Math.sin(e)*o(t),Math.cos(e)*a(t))},cos:function(){var e=this["re"],t=this["im"];return new p(Math.cos(e)*o(t),-Math.sin(e)*a(t))},tan:function(){var e=2*this["re"],t=2*this["im"],n=Math.cos(e)+o(t);return new p(Math.sin(e)/n,a(t)/n)},cot:function(){var e=2*this["re"],t=2*this["im"],n=Math.cos(e)-o(t);return new p(-Math.sin(e)/n,a(t)/n)},sec:function(){var e=this["re"],t=this["im"],n=.5*o(2*t)+.5*Math.cos(2*e);return new p(Math.cos(e)*o(t)/n,Math.sin(e)*a(t)/n)},csc:function(){var e=this["re"],t=this["im"],n=.5*o(2*t)-.5*Math.cos(2*e);return new p(Math.sin(e)*o(t)/n,-Math.cos(e)*a(t)/n)},asin:function(){var e=this["re"],t=this["im"],n=new p(t*t-e*e+1,-2*e*t)["sqrt"](),r=new p(n["re"]-t,n["im"]+e)["log"]();return new p(r["im"],-r["re"])},acos:function(){var e=this["re"],t=this["im"],n=new p(t*t-e*e+1,-2*e*t)["sqrt"](),r=new p(n["re"]-t,n["im"]+e)["log"]();return new p(Math.PI/2-r["im"],r["re"])},atan:function(){var e=this["re"],t=this["im"];if(0===e){if(1===t)return new p(0,1/0);if(-1===t)return new p(0,-1/0)}var n=e*e+(1-t)*(1-t),r=new p((1-t*t-e*e)/n,-2*e/n).log();return new p(-.5*r["im"],.5*r["re"])},acot:function(){var e=this["re"],t=this["im"];if(0===t)return new p(Math.atan2(1,e),0);var n=e*e+t*t;return 0!==n?new p(e/n,-t/n).atan():new p(0!==e?e/0:0,0!==t?-t/0:0).atan()},asec:function(){var e=this["re"],t=this["im"];if(0===e&&0===t)return new p(0,1/0);var n=e*e+t*t;return 0!==n?new p(e/n,-t/n).acos():new p(0!==e?e/0:0,0!==t?-t/0:0).acos()},acsc:function(){var e=this["re"],t=this["im"];if(0===e&&0===t)return new p(Math.PI/2,1/0);var n=e*e+t*t;return 0!==n?new p(e/n,-t/n).asin():new p(0!==e?e/0:0,0!==t?-t/0:0).asin()},sinh:function(){var e=this["re"],t=this["im"];return new p(a(e)*Math.cos(t),o(e)*Math.sin(t))},cosh:function(){var e=this["re"],t=this["im"];return new p(o(e)*Math.cos(t),a(e)*Math.sin(t))},tanh:function(){var e=2*this["re"],t=2*this["im"],n=o(e)+Math.cos(t);return new p(a(e)/n,Math.sin(t)/n)},coth:function(){var e=2*this["re"],t=2*this["im"],n=o(e)-Math.cos(t);return new p(a(e)/n,-Math.sin(t)/n)},csch:function(){var e=this["re"],t=this["im"],n=Math.cos(2*t)-o(2*e);return new p(-2*a(e)*Math.cos(t)/n,2*o(e)*Math.sin(t)/n)},sech:function(){var e=this["re"],t=this["im"],n=Math.cos(2*t)+o(2*e);return new p(2*o(e)*Math.cos(t)/n,-2*a(e)*Math.sin(t)/n)},asinh:function(){var e=this["im"];this["im"]=-this["re"],this["re"]=e;var t=this["asin"]();return this["re"]=-this["im"],this["im"]=e,e=t["re"],t["re"]=-t["im"],t["im"]=e,t},acosh:function(){var e=this["acos"]();if(e["im"]<=0){var t=e["re"];e["re"]=-e["im"],e["im"]=t}else{t=e["im"];e["im"]=-e["re"],e["re"]=t}return e},atanh:function(){var e=this["re"],t=this["im"],n=e>1&&0===t,r=1-e,i=1+e,o=r*r+t*t,a=0!==o?new p((i*r-t*t)/o,(t*r+i*t)/o):new p(-1!==e?e/0:0,0!==t?t/0:0),s=a["re"];return a["re"]=f(a["re"],a["im"])/2,a["im"]=Math.atan2(a["im"],s)/2,n&&(a["im"]=-a["im"]),a},acoth:function(){var e=this["re"],t=this["im"];if(0===e&&0===t)return new p(0,Math.PI/2);var n=e*e+t*t;return 0!==n?new p(e/n,-t/n).atanh():new p(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){var e=this["re"],t=this["im"];if(0===t)return new p(0!==e?Math.log(e+Math.sqrt(e*e+1)):1/0,0);var n=e*e+t*t;return 0!==n?new p(e/n,-t/n).asinh():new p(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){var e=this["re"],t=this["im"];if(this["isZero"]())return p["INFINITY"];var n=e*e+t*t;return 0!==n?new p(e/n,-t/n).acosh():new p(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this["isZero"]())return p["INFINITY"];if(this["isInfinite"]())return p["ZERO"];var e=this["re"],t=this["im"],n=e*e+t*t;return new p(e/n,-t/n)},conjugate:function(){return new p(this["re"],-this["im"])},neg:function(){return new p(-this["re"],-this["im"])},ceil:function(e){return e=Math.pow(10,e||0),new p(Math.ceil(this["re"]*e)/e,Math.ceil(this["im"]*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new p(Math.floor(this["re"]*e)/e,Math.floor(this["im"]*e)/e)},round:function(e){return e=Math.pow(10,e||0),new p(Math.round(this["re"]*e)/e,Math.round(this["im"]*e)/e)},equals:function(e,t){var n=new p(e,t);return Math.abs(n["re"]-this["re"])<=p["EPSILON"]&&Math.abs(n["im"]-this["im"])<=p["EPSILON"]},clone:function(){return new p(this["re"],this["im"])},toString:function(){var e=this["re"],t=this["im"],n="";return this["isNaN"]()?"NaN":this["isZero"]()?"0":this["isInfinite"]()?"Infinity":(0!==e&&(n+=e),0!==t&&(0!==e?n+=t<0?" - ":" + ":t<0&&(n+="-"),t=Math.abs(t),1!==t&&(n+=t),n+="i"),n||"0")},toVector:function(){return[this["re"],this["im"]]},valueOf:function(){return 0===this["im"]?this["re"]:null},isNaN:function(){return isNaN(this["re"])||isNaN(this["im"])},isZero:function(){return(0===this["re"]||-0===this["re"])&&(0===this["im"]||-0===this["im"])},isFinite:function(){return isFinite(this["re"])&&isFinite(this["im"])},isInfinite:function(){return!(this["isNaN"]()||this["isFinite"]())}},p["ZERO"]=new p(0,0),p["ONE"]=new p(1,0),p["I"]=new p(0,1),p["PI"]=new p(Math.PI,0),p["E"]=new p(Math.E,0),p["INFINITY"]=new p(1/0,1/0),p["NAN"]=new p(NaN,NaN),p["EPSILON"]=1e-16,r=[],i=function(){return p}.apply(t,r),void 0===i||(e.exports=i)})()},ee25:function(e,t,n){"use strict";e.exports=[n("3fcc"),n("452b"),n("835d"),n("1bc5"),n("8292"),n("57bf"),n("6c70"),n("e8a8"),n("14a0")]},ee51:function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("b940")),a={string:!0,number:!0,BigNumber:!0,Fraction:!0},s={number:r(n("efc3")),BigNumber:r(n("308f")),Fraction:r(n("c09f"))},u=function(e,t){var n=o(e);if(!(n in a))throw new TypeError("Cannot convert "+e+' of type "'+n+'"; valid input types are '+Object.keys(a).join(", "));if(!(t in s))throw new TypeError("Cannot convert "+e+' to type "'+t+'"; valid output types are '+Object.keys(s).join(", "));return t===n?e:s[t](e)};return u.toTex=function(e,t){return e.args[0].toTex()},u}t.path="type",t.name="_numeric",t.factory=r},ee94:function(e,t,n){"use strict";function r(e,t,n,r){return r("chain",{"":function(){return new e.Chain},any:function(t){return new e.Chain(t)}})}t.name="chain",t.factory=r},ee98:function(e,t,n){(function(t,r){e.exports=r(n("2b0e"))})(0,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s=2)}([function(e,t){e.exports=function(e,t,n,r){var i,o=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(i=e,o=e.default);var s="function"===typeof o?o.options:o;if(t&&(s.render=t.render,s.staticRenderFns=t.staticRenderFns),n&&(s._scopeId=n),r){var u=Object.create(s.computed||null);Object.keys(r).forEach(function(e){var t=r[e];u[e]=function(){return t}}),s.computed=u}return{esModule:i,exports:o,options:s}}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(20),i=n.n(r),o=new i.a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n.n(r),o=n(1),a="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},s={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.installed){this.installed=!0,this.params=t,e.component(t.componentName||"notifications",i.a);var n=function(e){"string"===typeof e&&(e={title:"",text:e}),"object"===("undefined"===typeof e?"undefined":a(e))&&o["a"].$emit("add",e)},r=t.name||"notify";e.prototype["$"+r]=n,e[r]=n}}};t["default"]=s},function(e,t,n){n(17);var r=n(0)(n(5),n(15),null,null);e.exports=r.exports},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={name:"CssGroup",props:["name"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(1),o=n(9),a=n(7),s=n(13),u=n.n(s),c=n(12),f=n.n(c),l=n(8);function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h={IDLE:0,DESTROYED:2},d={name:"Notifications",components:{VelocityGroup:u.a,CssGroup:f.a},props:{group:{type:String,default:""},width:{type:[Number,String],default:300},reverse:{type:Boolean,default:!1},position:{type:[String,Array],default:function(){return a["a"].position}},classes:{type:String,default:"vue-notification"},animationType:{type:String,default:"css",validator:function(e){return"css"===e||"velocity"===e}},animation:{type:Object,default:function(){return a["a"].velocityAnimation}},animationName:{type:String,default:a["a"].cssAnimation},speed:{type:Number,default:300},cooldown:{type:Number,default:0},duration:{type:Number,default:3e3},delay:{type:Number,default:0},max:{type:Number,default:1/0},closeOnClick:{type:Boolean,default:!0}},data:function(){return{list:[],velocity:r["default"].params.velocity}},mounted:function(){i["a"].$on("add",this.addItem)},computed:{actualWidth:function(){return n.i(l["a"])(this.width)},isVA:function(){return"velocity"===this.animationType},componentName:function(){return this.isVA?"VelocityGroup":"CssGroup"},styles:function(){var e=n.i(o["a"])(this.position),t=e.x,r=e.y,i=this.actualWidth.value,a=this.actualWidth.type,s=p({width:i+a},r,"0px");return"center"===t?s["left"]="calc(50% - "+i/2+a+")":s[t]="0px",s},active:function(){return this.list.filter(function(e){return e.state!==h.DESTROYED})},botToTop:function(){return this.styles.hasOwnProperty("bottom")}},methods:{addItem:function(e){var t=this;if(e.group=e.group||"",this.group===e.group)if(e.clean||e.clear)this.destroyAll();else{var r="number"===typeof e.duration?e.duration:this.duration,i="number"===typeof e.speed?e.speed:this.speed,a=e.title,s=e.text,u=e.type,c=e.data,f={id:n.i(o["b"])(),title:a,text:s,type:u,state:h.IDLE,speed:i,length:r+2*i,data:c};r>=0&&(f.timer=setTimeout(function(){t.destroy(f)},f.length));var l=this.reverse?!this.botToTop:this.botToTop,p=-1;l?(this.list.push(f),this.active.length>this.max&&(p=0)):(this.list.unshift(f),this.active.length>this.max&&(p=this.active.length-1)),-1!==p&&this.destroy(this.active[p])}},notifyClass:function(e){return["vue-notification-template",this.classes,e.type]},notifyWrapperStyle:function(e){return this.isVA?null:{transition:"all "+e.speed+"ms"}},destroy:function(e){clearTimeout(e.timer),e.state=h.DESTROYED,this.isVA||this.clean()},destroyAll:function(){this.active.forEach(this.destroy)},getAnimation:function(e,t){var n=this.animation[e];return"function"===typeof n?n.call(this,t):n},enter:function(e){var t=e.el,n=e.complete,r=this.getAnimation("enter",t);this.velocity(t,r,{duration:this.speed,complete:n})},leave:function(e){var t=e.el,n=e.complete,r=this.getAnimation("leave",t);this.velocity(t,r,{duration:this.speed,complete:n})},clean:function(){this.list=this.list.filter(function(e){return e.state!==h.DESTROYED})}}};t["default"]=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={name:"VelocityGroup",methods:{enter:function(e,t){this.$emit("enter",{el:e,complete:t})},leave:function(e,t){this.$emit("leave",{el:e,complete:t})},afterLeave:function(){this.$emit("afterLeave")}}}},function(e,t,n){"use strict";t["a"]={position:["top","right"],cssAnimation:"vn-fade",velocityAnimation:{enter:function(e){var t=e.clientHeight;return{height:[t,0],opacity:[1,0]}},leave:{height:0,opacity:[0,1]}}}},function(e,t,n){"use strict";var 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},i="[-+]?[0-9]*.?[0-9]+",o=[{name:"px",regexp:new RegExp("^"+i+"px$")},{name:"%",regexp:new RegExp("^"+i+"%$")},{name:"px",regexp:new RegExp("^"+i+"$")}],a=function(e){if("auto"===e)return{type:e,value:0};for(var t=0;tn.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(i=0;i=1||t.predictable?Math.asin(1/n):new e.Complex(n,0).acsc()},Complex:function(e){return e.acsc()},BigNumber:function(t){return new e.BigNumber(1).div(t).asin()},"Array | Matrix":function(e){return r(e,o)}});return o.toTex={1:"\\csc^{-1}\\left(${args[0]}\\right)"},o}t.name="acsc",t.factory=i},f1ad:function(e,t,n){"use strict";var r=n("2c72"),i=n("5fc9"),o=r.array,a=r.object,s=r.string,u=r.number,c=Array.isArray,f=u.isNumber,l=u.isInteger,p=s.isString,h=o.validateIndex;function d(e,t,d,m){var v=d(n("a216")),y=d(n("863e")),g=d(n("c459"));function b(t,n){if(!(this instanceof b))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))x(this,t,n);else if(t&&c(t.index)&&c(t.ptr)&&c(t.size))this._values=t.values,this._index=t.index,this._ptr=t.ptr,this._size=t.size,this._datatype=n||t.datatype;else if(c(t))w(this,t,n);else{if(t)throw new TypeError("Unsupported type of data ("+r.types.type(t)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=n}}function x(e,t,n){"SparseMatrix"===t.type?(e._values=t._values?a.clone(t._values):void 0,e._index=a.clone(t._index),e._ptr=a.clone(t._ptr),e._size=a.clone(t._size),e._datatype=n||t._datatype):w(e,t.valueOf(),n||t._datatype)}function w(e,t,n){e._values=[],e._index=[],e._ptr=[],e._datatype=n;var r=t.length,i=0,o=y,a=0;if(p(n)&&(o=m.find(y,[n,n])||y,a=m.convert(0,n)),r>0){var s=0;do{e._ptr.push(e._index.length);for(var u=0;u");for(var h=n.min()[0],d=n.min()[1],m=u[0],v=u[1],y=0;yh){for(u=h;ul){if(f){var d=0;for(u=0;ut-1&&(e._values.splice(c,1),e._index.splice(c,1),g++)}e._ptr[u]=e._values.length}return e._size[0]=t,e._size[1]=n,e}function O(e,t,n,r,i,o,a){var s=[],u=[],c=[],f=y,l=0;p(e._datatype)&&(f=m.find(y,[e._datatype,e._datatype])||y,l=m.convert(0,e._datatype));for(var h=function(e,t,n){e=o(e,t,n),f(e,l)||(s.push(e),u.push(t))},d=r;d<=i;d++){c.push(s.length);var v=e._ptr[d],g=e._ptr[d+1];if(a)for(var x=v;x=t&&w<=n&&h(e._values[x],w-t,d-r)}else{for(var N={},E=v;Ea-1||o>s-1)&&(A(this,Math.max(r+1,a),Math.max(o+1,s),n),a=this._size[0],s=this._size[1]),h(r,a),h(o,s);var l=M(r,this._ptr[o],this._ptr[o+1],this._index);return l "+(this._values?s.format(this._values[c],e):"X")}return i},b.prototype.toString=function(){return s.format(this.toArray())},b.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},b.prototype.diagonal=function(t){if(t){if(e.isBigNumber(t)&&(t=t.toNumber()),!f(t)||!l(t))throw new TypeError("The parameter k must be an integer number")}else t=0;var n=t>0?t:0,r=t<0?-t:0,i=this._size[0],o=this._size[1],a=Math.min(i-r,o-n),s=[],u=[],c=[];c[0]=0;for(var p=n;p0?r:0,d=r<0?-r:0,v=t[0],g=t[1],x=Math.min(v-d,g-h);if(c(n)){if(n.length!==x)throw new Error("Invalid value array length");u=function(e){return n[e]}}else if(e.isMatrix(n)){var w=n.size();if(1!==w.length||w[0]!==x)throw new Error("Invalid matrix length");u=function(e){return n.get([e])}}else u=function(){return n};for(var N=[],E=[],M=[],S=0;S=0&&_=u||i[f]!==t)){var p=r?r[c]:void 0;i.splice(f,0,t),r&&r.splice(f,0,p),i.splice(f<=c?c+1:c,1),r&&r.splice(f<=c?c+1:c,1)}else if(f=u||i[c]!==e)){var h=r?r[f]:void 0;i.splice(c,0,e),r&&r.splice(c,0,h),i.splice(c<=f?f+1:f,1),r&&r.splice(c<=f?f+1:f,1)}}},e.Matrix._storage.sparse=b,b}t.name="SparseMatrix",t.path="type",t.factory=d,t.lazy=!1},f1ae:function(e,t,n){"use strict";var r=n("86cc"),i=n("4630");e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},f2de: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},r(e)}var i=n("edaf"),o=n("d7df").format,a=n("d7df").isNumber;function s(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="",n=this.im,r=this.re,i=o(this.re,e),s=o(this.im,e),u=a(e)?e:e?e.precision:null;if(null!==u){var c=Math.pow(10,-u);Math.abs(r/n)t.re?1:e.ret.im?1:e.im0?a.resize(t,o):a}var u=[];return t.length>0?i(u,t,o):u}function f(t){var n=!1;return t.forEach(function(t,r,i){e.isBigNumber(t)&&(n=!0,i[r]=t.toNumber())}),n}function l(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.name="zeros",t.factory=o},f5e7:function(e,t,n){"use strict";e.exports={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of a matrix or string. Indexes are one-based. Both the ranges lower-bound and upper-bound are included.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]}},f605:function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},f64e:function(e,t,n){"use strict";var r=n("d7df").isInteger,i=n("2cec");function o(e,t,o,a){var s=n("6c54"),u=o(n("4781")),c=o(n("863e")),f=o(n("f5ae")),l=o(n("797d")),p=o(n("e1fc")),h=o(n("d1c4")),d=o(n("bfee")),m=o(n("9ebd")),v=o(n("cdb0")),y=o(n("04b6")),g=a("rightArithShift",{"number, number":function(e,t){if(!r(e)||!r(t))throw new Error("Integers expected in function rightArithShift");return e>>t},"BigNumber, BigNumber":i,"SparseMatrix, SparseMatrix":function(e,t){return h(e,t,g,!1)},"SparseMatrix, DenseMatrix":function(e,t){return p(t,e,g,!0)},"DenseMatrix, SparseMatrix":function(e,t){return l(e,t,g,!1)},"DenseMatrix, DenseMatrix":function(e,t){return v(e,t,g)},"Array, Array":function(e,t){return g(u(e),u(t)).valueOf()},"Array, Matrix":function(e,t){return g(u(e),t)},"Matrix, Array":function(e,t){return g(e,u(t))},"SparseMatrix, number | BigNumber":function(e,t){return c(t,0)?e.clone():m(e,t,g,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(t,0)?e.clone():y(e,t,g,!1)},"number | BigNumber, SparseMatrix":function(e,t){return c(e,0)?f(t.size(),t.storage()):d(t,e,g,!0)},"number | BigNumber, DenseMatrix":function(e,t){return c(e,0)?f(t.size(),t.storage()):y(t,e,g,!0)},"Array, number | BigNumber":function(e,t){return g(u(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return g(e,u(t)).valueOf()}});return g.toTex={2:"\\left(${args[0]}".concat(s.operators["rightArithShift"],"${args[1]}\\right)")},g}t.name="rightArithShift",t.factory=o},f68c:function(e,t,n){"use strict";function r(e,t,r,i){var o=n("6c54"),a=r(n("4781")),s=r(n("cdb0")),u=r(n("04b6")),c=i("to",{"Unit, Unit | string":function(e,t){return e.to(t)},"Matrix, Matrix":function(e,t){return s(e,t,c)},"Array, Array":function(e,t){return c(a(e),a(t)).valueOf()},"Array, Matrix":function(e,t){return c(a(e),t)},"Matrix, Array":function(e,t){return c(e,a(t))},"Matrix, any":function(e,t){return u(e,t,c,!1)},"any, Matrix":function(e,t){return u(t,e,c,!0)},"Array, any":function(e,t){return u(a(e),t,c,!1).valueOf()},"any, Array":function(e,t){return u(a(t),e,c,!0).valueOf()}});return c.toTex={2:"\\left(${args[0]}".concat(o.operators["to"],"${args[1]}\\right)")},c}t.name="to",t.factory=r},f6b1:function(e,t,n){"use strict";e.exports={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[1, 2], [3, 4]])"],seealso:["sqrt","abs","square","multiply"]}},f73b:function(e,t,n){"use strict";e.exports={name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]}},f751:function(e,t,n){var r=n("5ca1");r(r.S+r.F,"Object",{assign:n("7333")})},f772:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},f799:function(e,t,n){"use strict";e.exports={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]}},f84b:function(e,t,n){"use strict";var r=n("d7df").isInteger;function i(e,t,i,o){var a=n("6c54"),s=i(n("4781")),u=i(n("863e")),c=i(n("f5ae")),f=i(n("797d")),l=i(n("e1fc")),p=i(n("d1c4")),h=i(n("bfee")),d=i(n("9ebd")),m=i(n("cdb0")),v=i(n("04b6")),y=o("rightLogShift",{"number, number":function(e,t){if(!r(e)||!r(t))throw new Error("Integers expected in function rightLogShift");return e>>>t},"SparseMatrix, SparseMatrix":function(e,t){return p(e,t,y,!1)},"SparseMatrix, DenseMatrix":function(e,t){return l(t,e,y,!0)},"DenseMatrix, SparseMatrix":function(e,t){return f(e,t,y,!1)},"DenseMatrix, DenseMatrix":function(e,t){return m(e,t,y)},"Array, Array":function(e,t){return y(s(e),s(t)).valueOf()},"Array, Matrix":function(e,t){return y(s(e),t)},"Matrix, Array":function(e,t){return y(e,s(t))},"SparseMatrix, number | BigNumber":function(e,t){return u(t,0)?e.clone():d(e,t,y,!1)},"DenseMatrix, number | BigNumber":function(e,t){return u(t,0)?e.clone():v(e,t,y,!1)},"number | BigNumber, SparseMatrix":function(e,t){return u(e,0)?c(t.size(),t.storage()):h(t,e,y,!0)},"number | BigNumber, DenseMatrix":function(e,t){return u(e,0)?c(t.size(),t.storage()):v(t,e,y,!0)},"Array, number | BigNumber":function(e,t){return y(s(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return y(e,s(t)).valueOf()}});return y.toTex={2:"\\left(${args[0]}".concat(a.operators["rightLogShift"],"${args[1]}\\right)")},y}t.name="rightLogShift",t.factory=i},f921:function(e,t,n){n("014b"),n("c207"),n("69d3"),n("765d"),e.exports=n("584a").Symbol},f9e8:function(e,t,n){"use strict";e.exports={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]}},fa5b:function(e,t,n){e.exports=n("5537")("native-function-to-string",Function.toString)},fa94:function(e,t,n){"use strict";e.exports={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]}},fa99:function(e,t,n){n("0293"),e.exports=n("584a").Object.getPrototypeOf},fab2:function(e,t,n){var r=n("7726").document;e.exports=r&&r.documentElement},fbaa:function(e,t,n){"use strict";function r(e,t,r,i){var o=r(n("2ba9"));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){var t=e(this.content,"content",this);return new a(t)},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}t.name="ParenthesisNode",t.path="expression.node",t.factory=r},fbab:function(e,t,n){"use strict";var r=n("b13c").flatten;function i(e,t,i,o){var a=i(n("2f39")),s=i(n("652d")),u=i(n("bfb7")),c=i(n("59a8")),f=i(n("2f6a")),l=o("setDistinct",{"Array | Matrix":function(e){var t;if(0===c(u(e),new a(0)))t=[];else{var n=r(Array.isArray(e)?e:e.toArray()).sort(f);t=[],t.push(n[0]);for(var i=1;i3)return null;var n=t._size,r=n[0],s=n[1],u=0,c=Math.max(16,10*Math.sqrt(s));c=Math.min(s-2,c);var f=l(e,t,r,s,c);o(f,m,null);var v,y,g,b,x,w,N,E,M,S,_,A,O,T,C,k,P=f._index,I=f._ptr,z=I[s],B=[],R=[],D=0,j=s+1,L=2*(s+1),F=3*(s+1),q=4*(s+1),U=5*(s+1),$=6*(s+1),H=7*(s+1),V=B,G=p(s,I,R,D,F,V,L,H,j,$,q,U),W=h(s,I,R,U,q,$,c,j,F,V,L),Y=0;while(WX?(w=g,N=Q,E=R[D+g]-X):(w=P[Q++],N=I[w],E=R[D+w]),x=1;x<=E;x++)v=P[N++],(M=R[j+v])<=0||(J+=M,R[j+v]=-M,P[ee++]=v,-1!==R[L+v]&&(V[R[L+v]]=V[v]),-1!==V[v]?R[L+V[v]]=R[L+v]:R[F+R[U+v]]=R[L+v]);w!==g&&(I[w]=i(g),R[$+w]=0)}for(0!==X&&(z=ee),R[U+g]=J,I[g]=K,R[D+g]=ee-K,R[q+g]=-2,G=d(G,u,R,$,s),S=K;S=G?R[$+w]-=M:0!==R[$+w]&&(R[$+w]=R[U+w]+te)}for(S=K;S0?(k+=ne,P[T++]=w,C+=w):(I[w]=i(g),R[$+w]=0)}R[q+v]=T-A+1;var re=T,ie=A+R[D+v];for(Q=O+1;Q=0))for(C=V[v],v=R[H+C],R[H+C]=-1;-1!==v&&-1!==R[L+v];v=R[L+v],G++){for(E=R[D+v],_=R[q+v],Q=I[v]+1;Q<=I[v]+E-1;Q++)R[$+P[Q]]=G;var ae=v;for(y=R[L+v];-1!==y;){var se=R[D+y]===E&&R[q+y]===_;for(Q=I[y]+1;se&&Q<=I[y]+E-1;Q++)R[$+P[Q]]!==G&&(se=0);se?(I[y]=i(v),R[j+v]+=R[j+y],R[j+y]=0,R[q+y]=-1,y=R[L+y],R[L+ae]=y):(ae=y,y=R[L+y])}}for(Q=K,S=K;S=0;y--)R[j+y]>0||(R[L+y]=R[F+I[y]],R[F+I[y]]=y);for(w=s;w>=0;w--)R[j+w]<=0||-1!==I[w]&&(R[L+w]=R[F+I[w]],R[F+I[w]]=w);for(g=0,v=0;v<=s;v++)-1===I[v]&&(g=a(v,g,R,F,L,B,$));return B.splice(B.length-1,1),B};function l(e,t,n,r,i){var o=c(t);if(1===e&&r===n)return s(t,o);if(2===e){for(var a=o._index,f=o._ptr,l=0,p=0;pi))for(var d=f[p+1];hs)n[u+h]=0,n[o+h]=-1,p++,t[h]=i(e),n[u+e]++;else{var m=n[c+d];-1!==m&&(f[m]=h),n[l+h]=n[c+d],n[c+d]=h}}return p}function d(e,t,n,r,i){if(e<2||e+t<0){for(var o=0;o0?a.resize(t,o):a}var u=[];return t.length>0?i(u,t,o):u}function f(t){var n=!1;return t.forEach(function(t,r,i){e.isBigNumber(t)&&(n=!0,i[r]=t.toNumber())}),n}function l(e){e.forEach(function(e){if("number"!==typeof e||!r(e)||e<0)throw new Error("Parameters in function ones must be positive integers")})}}t.name="ones",t.factory=o},fe77:function(e,t,n){"use strict";e.exports={name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]}},feeb:function(e,t,n){"use strict";e.exports={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]}},ff3e:function(e,t,n){"use strict";function r(e,t,n,r){var i=e.DenseMatrix,o=function(e,t,n,o){var a=e._values,s=e._index,u=e._ptr,c=e._size,f=e._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var l,p=c[0],h=c[1],d=n;"string"===typeof f&&(l=f,t=r.convert(t,l),d=r.find(n,[l,l]));for(var m=[],v=new i({data:m,size:[p,h],datatype:l}),y=[],g=[],b=0;b