diff --git a/main.js b/main.js index 215816b..31f6b64 100644 --- a/main.js +++ b/main.js @@ -33010,48 +33010,52 @@ var SpaceManager = class { this.primarySpaceAdapter = spaceAdapter; this.spaceAdapters.push(spaceAdapter); } + adapterForPath(path2) { + const uri = this.uriByString(path2); + return this.spaceAdapters.find((f2) => f2.schemes.includes(uri.scheme)) ?? this.primarySpaceAdapter; + } createSpace(name317, parentPath, definition) { - return this.primarySpaceAdapter.createSpace(name317, parentPath, definition); + return this.adapterForPath(parentPath).createSpace(name317, parentPath, definition); } saveSpace(path2, definition, properties3) { - return this.primarySpaceAdapter.saveSpace(path2, definition, properties3); + return this.adapterForPath(path2).saveSpace(path2, definition, properties3); } renameSpace(path2, newPath) { - return this.primarySpaceAdapter.renameSpace(path2, newPath); + return this.adapterForPath(path2).renameSpace(path2, newPath); } deleteSpace(path2) { - return this.primarySpaceAdapter.deleteSpace(path2); + return this.adapterForPath(path2).deleteSpace(path2); } childrenForSpace(path2) { - return this.primarySpaceAdapter.childrenForSpace(path2); + return this.adapterForPath(path2).childrenForSpace(path2); } contextForSpace(path2) { - return this.primarySpaceAdapter.contextForSpace(path2); + return this.adapterForPath(path2).contextForSpace(path2); } async tablesForSpace(path2) { - return this.primarySpaceAdapter.tablesForSpace(path2); + return this.adapterForPath(path2).tablesForSpace(path2); } spaceInitiated(path2) { - return this.primarySpaceAdapter.spaceInitiated(path2); + return this.adapterForPath(path2).spaceInitiated(path2); } readTable(path2, schema) { - return this.primarySpaceAdapter.readTable(path2, schema); + return this.adapterForPath(path2).readTable(path2, schema); } createTable(path2, schema) { - return this.primarySpaceAdapter.createTable(path2, schema).then((f2) => this.superstate.reloadContextByPath(path2)); + return this.adapterForPath(path2).createTable(path2, schema).then((f2) => this.superstate.reloadContextByPath(path2)); } saveTableSchema(path2, schemaId, saveSchema) { - return this.primarySpaceAdapter.saveTableSchema(path2, schemaId, saveSchema).then((f2) => { + return this.adapterForPath(path2).saveTableSchema(path2, schemaId, saveSchema).then((f2) => { return this.superstate.reloadContextByPath(path2); }); } saveTable(path2, table, force) { - return this.primarySpaceAdapter.saveTable(path2, table, force).then((f2) => { + return this.adapterForPath(path2).saveTable(path2, table, force).then((f2) => { return this.superstate.reloadContextByPath(path2); }); } deleteTable(path2, name317) { - return this.primarySpaceAdapter.deleteTable(path2, name317).then((f2) => { + return this.adapterForPath(path2).deleteTable(path2, name317).then((f2) => { return this.superstate.reloadContextByPath(path2); }); } @@ -33065,111 +33069,111 @@ var SpaceManager = class { return this.primarySpaceAdapter.readAllTables(path2); } framesForSpace(path2) { - return this.primarySpaceAdapter.framesForSpace(path2); + return this.adapterForPath(path2).framesForSpace(path2); } readFrame(path2, schema) { - return this.primarySpaceAdapter.readFrame(path2, schema); + return this.adapterForPath(path2).readFrame(path2, schema); } readAllFrames(path2) { - return this.primarySpaceAdapter.readAllFrames(path2); + return this.adapterForPath(path2).readAllFrames(path2); } createFrame(path2, schema) { - return this.primarySpaceAdapter.createFrame(path2, schema); + return this.adapterForPath(path2).createFrame(path2, schema); } deleteFrame(path2, name317) { - return this.primarySpaceAdapter.deleteFrame(path2, name317); + return this.adapterForPath(path2).deleteFrame(path2, name317); } saveFrameSchema(path2, schemaId, saveSchema) { - return this.primarySpaceAdapter.saveFrameSchema(path2, schemaId, saveSchema); + return this.adapterForPath(path2).saveFrameSchema(path2, schemaId, saveSchema); } saveFrame(path2, frame) { - return this.primarySpaceAdapter.saveFrame(path2, frame).then((f2) => this.superstate.reloadFrames(this.spaceInfoForPath(path2))).then((f2) => this.superstate.dispatchEvent("frameStateUpdated", { path: this.spaceInfoForPath(path2).path, schemaId: frame.schema.id })); + return this.adapterForPath(path2).saveFrame(path2, frame).then((f2) => this.superstate.reloadFrames(this.spaceInfoForPath(path2))).then((f2) => this.superstate.dispatchEvent("frameStateUpdated", { path: this.spaceInfoForPath(path2).path, schemaId: frame.schema.id })); } commandsForSpace(path2) { - return this.primarySpaceAdapter.commandsForSpace(path2); + return this.adapterForPath(path2).commandsForSpace(path2); } runCommand(path2, name317, instance) { - return this.primarySpaceAdapter.runCommand(path2, name317, instance); + return this.adapterForPath(path2).runCommand(path2, name317, instance); } createCommand(path2, schema) { - return this.primarySpaceAdapter.createCommand(path2, schema).then((f2) => this.superstate.reloadActions(this.spaceInfoForPath(path2))); + return this.adapterForPath(path2).createCommand(path2, schema).then((f2) => this.superstate.reloadActions(this.spaceInfoForPath(path2))); } deleteCommand(path2, name317) { - return this.primarySpaceAdapter.deleteCommand(path2, name317).then((f2) => this.superstate.reloadActions(this.spaceInfoForPath(path2))); + return this.adapterForPath(path2).deleteCommand(path2, name317).then((f2) => this.superstate.reloadActions(this.spaceInfoForPath(path2))); } saveCommand(path2, schemaId, saveCommand) { - return this.primarySpaceAdapter.saveCommand(path2, schemaId, saveCommand).then((f2) => this.superstate.reloadActions(this.spaceInfoForPath(path2))); + return this.adapterForPath(path2).saveCommand(path2, schemaId, saveCommand).then((f2) => this.superstate.reloadActions(this.spaceInfoForPath(path2))); } allPaths(type) { return this.primarySpaceAdapter.allPaths(type); } createItemAtPath(parent, type, name317, content3) { - return this.primarySpaceAdapter.createItemAtPath(parent, type, name317, content3); + return this.adapterForPath(parent).createItemAtPath(parent, type, name317, content3); } renamePath(oldPath, newPath) { - return this.primarySpaceAdapter.renamePath(oldPath, newPath); + return this.adapterForPath(oldPath).renamePath(oldPath, newPath); } copyPath(source, destination, newName) { - return this.primarySpaceAdapter.copyPath(source, destination, newName); + return this.adapterForPath(source).copyPath(source, destination, newName); } getPathInfo(path2) { - return this.primarySpaceAdapter.getPathInfo(path2); + return this.adapterForPath(path2).getPathInfo(path2); } deletePath(path2) { - return this.primarySpaceAdapter.deletePath(path2); + return this.adapterForPath(path2).deletePath(path2); } readPath(path2) { - return this.primarySpaceAdapter.readPath(path2); + return this.adapterForPath(path2).readPath(path2); } writeToPath(path2, content3, binary) { - return this.primarySpaceAdapter.writeToPath(path2, content3, binary); + return this.adapterForPath(path2).writeToPath(path2, content3, binary); } parentPathForPath(path2) { - return this.primarySpaceAdapter.parentPathForPath(path2); + return this.adapterForPath(path2).parentPathForPath(path2); } readPathCache(path2) { - return this.primarySpaceAdapter.readPathCache(path2); + return this.adapterForPath(path2).readPathCache(path2); } allSpaces() { return this.primarySpaceAdapter.allSpaces(); } spaceInfoForPath(path2) { - return this.primarySpaceAdapter.spaceInfoForPath(path2); + return this.adapterForPath(path2).spaceInfoForPath(path2); } spaceDefForSpace(path2) { - return this.primarySpaceAdapter.spaceDefForSpace(path2); + return this.adapterForPath(path2).spaceDefForSpace(path2); } readLabel(path2) { - return this.primarySpaceAdapter.readLabel(path2); + return this.adapterForPath(path2).readLabel(path2); } saveLabel(path2, key2, value) { - return this.primarySpaceAdapter.saveLabel(path2, key2, value); + return this.adapterForPath(path2).saveLabel(path2, key2, value); } addProperty(path2, property) { - return this.primarySpaceAdapter.addProperty(path2, property); + return this.adapterForPath(path2).addProperty(path2, property); } saveProperties(path2, properties3) { if (!path2) return; - return this.primarySpaceAdapter.saveProperties(path2, properties3); + return this.adapterForPath(path2).saveProperties(path2, properties3); } readProperties(path2) { - return this.primarySpaceAdapter.readProperties(path2); + return this.adapterForPath(path2).readProperties(path2); } renameProperty(path2, property, newProperty) { - return this.primarySpaceAdapter.renameProperty(path2, property, newProperty); + return this.adapterForPath(path2).renameProperty(path2, property, newProperty); } deleteProperty(path2, property) { - return this.primarySpaceAdapter.deleteProperty(path2, property); + return this.adapterForPath(path2).deleteProperty(path2, property); } addSpaceProperty(path2, property) { - return this.primarySpaceAdapter.addSpaceProperty(path2, property).then((f2) => this.superstate.reloadContextByPath(path2)); + return this.adapterForPath(path2).addSpaceProperty(path2, property).then((f2) => this.superstate.reloadContextByPath(path2)); } deleteSpaceProperty(path2, property) { - return this.primarySpaceAdapter.deleteSpaceProperty(path2, property).then((f2) => this.superstate.reloadContextByPath(path2)); + return this.adapterForPath(path2).deleteSpaceProperty(path2, property).then((f2) => this.superstate.reloadContextByPath(path2)); } saveSpaceProperty(path2, property, oldProperty) { - return this.primarySpaceAdapter.saveSpaceProperty(path2, property, oldProperty).then((f2) => { + return this.adapterForPath(path2).saveSpaceProperty(path2, property, oldProperty).then((f2) => { if (oldProperty.name != property.name) { this.superstate.contextsIndex.get(path2).paths.forEach((f3) => { this.renameProperty(f3, oldProperty.name, property.name); @@ -33179,13 +33183,13 @@ var SpaceManager = class { }); } addTag(path2, tag2) { - return this.primarySpaceAdapter.addTag(path2, tag2); + return this.adapterForPath(path2).addTag(path2, tag2); } deleteTag(path2, tag2) { - return this.primarySpaceAdapter.deleteTag(path2, tag2); + return this.adapterForPath(path2).deleteTag(path2, tag2); } renameTag(path2, tag2, newTag) { - return this.primarySpaceAdapter.renameTag(path2, tag2, newTag); + return this.adapterForPath(path2).renameTag(path2, tag2, newTag); } readTags() { return this.primarySpaceAdapter.readTags(); @@ -33194,7 +33198,7 @@ var SpaceManager = class { return this.primarySpaceAdapter.pathsForTag(tag2); } childrenForPath(path2, type) { - return this.primarySpaceAdapter.childrenForPath(path2, type); + return this.adapterForPath(path2).childrenForPath(path2, type); } readWaypoints() { return this.primarySpaceAdapter.readWaypoints(); @@ -33205,10 +33209,10 @@ var SpaceManager = class { return this.primarySpaceAdapter.saveWaypoints(waypoints); } readTemplates(path2) { - return this.primarySpaceAdapter.readTemplates(path2); + return this.adapterForPath(path2).readTemplates(path2); } saveTemplate(path2, space2) { - return this.primarySpaceAdapter.saveTemplate(path2, space2).then((f2) => this.superstate.reloadSpace(this.spaceInfoForPath(space2), null, true)); + return this.adapterForPath(path2).saveTemplate(path2, space2).then((f2) => this.superstate.reloadSpace(this.spaceInfoForPath(space2), null, true)); } deleteTemplate(template2, space2) { return this.primarySpaceAdapter.deleteTemplate(template2, space2).then((f2) => this.superstate.reloadSpace(this.spaceInfoForPath(space2), null, true)); @@ -88804,7 +88808,7 @@ var filterFM = (paths, def, props) => { } return paths.filter((f2) => { const fm = f2.metadata?.property; - if (!fm || !fm[def.field]) { + if (!fm || fm[def.field] === void 0) { return false; } let result = true; @@ -91827,7 +91831,7 @@ q: \`+this.q.toString():"")+\` \`),n.seealso&&n.seealso.length&&(a+="See also: "+n.seealso.join(", ")+\` \`),a},t.prototype.toJSON=function(){var n=ar(this.doc);return n.mathjs="Help",n},t.fromJSON=function(n){var a={};return Object.keys(n).filter(i=>i!=="mathjs").forEach(i=>{a[i]=n[i]}),new t(a)},t.prototype.valueOf=t.prototype.toString,t},{isClass:!0});var vG="Chain",gG=["?on","math","typed"],dg=F(vG,gG,e=>{var{on:r,math:t,typed:n}=e;function a(o){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");bu(o)?this.value=o.value:this.value=o}a.prototype.type="Chain",a.prototype.isChain=!0,a.prototype.done=function(){return this.value},a.prototype.valueOf=function(){return this.value},a.prototype.toString=function(){return lr(this.value)},a.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},a.fromJSON=function(o){return new a(o.value)};function i(o,s){typeof s=="function"&&(a.prototype[o]=l(s))}function u(o,s){Du(a.prototype,o,function(){var d=s();if(typeof d=="function")return l(d)})}function l(o){return function(){if(arguments.length===0)return new a(o(this.value));for(var s=[this.value],m=0;mo[x])};for(var d in o)m(d)}};var c={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return a.createProxy(t),r&&r("import",function(o,s,m){m||u(o,s)}),a},{isClass:!0});var DD={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"]};var ET={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]};var TT={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]};var FT={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]};var _T={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]};var OT={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]};var BT={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]};var PT={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]};var IT={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]};var RT={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]};var kT={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as \`(1 + sqrt(5)) / 2\` and is approximately 1.618034...",examples:["phi"],seealso:[]};var SD={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"]};var qT={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]};var LT={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]};var zT={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"]};var UT={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]};var WT={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]};var YT={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]};var HT={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]};var $T={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"]};var GT={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"]};var VT={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]};var ZT={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = 1","B = [1, 2, 3]","B[B>1 and B<3]"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]};var QT={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]};var XT={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"]};var JT={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"]};var KT={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"]};var jT={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]};var eF={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]};var rF={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:[]};var tF={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:[]};var nF={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })',"double(2)",'double("hello")'],seealso:[]};var aF={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.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]};var iF={name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]};var oF={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]};var sF={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]};var uF={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"]};var fF={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"]};var cF={name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6, 1)"],seealso:["cbrt","sqrt"]};var lF={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"]};var mF={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]};var pF={name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]};var dF={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]};var hF={name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConstant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]};var vF={name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]};var gF={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"]};var xF={name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]};var yF={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of 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:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]};var bF={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of 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:["usolve","lup","lusolve","lsolve","matrix","sparse"]};var wF={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]};var DF={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]};var SF={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"]};var NF={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"]};var AF={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"]};var MF={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]};var CF={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"]};var EF={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]};var TF={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"]};var FF={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"]};var _F={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"]};var OF={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"]};var BF={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"]};var PF={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"]};var IF={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]};var RF={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"]};var kF={name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax \\u2263 1 (mod b)",examples:["invmod(8, 12)","invmod(7, 13)","invmod(15151, 15122)"],seealso:["gcd","xgcd"]};var qF={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]};var LF={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"]};var zF={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]};var UF={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"]};var WF={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"]};var YF={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"]};var HF={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]};var $F={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']};var GF={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"]};var VF={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]};var ZF={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)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]};var QF={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)","round(unit, valuelessUnit)","round(unit, n, valuelessUnit)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)","round(3.241cm, 2, cm)","round([3.2, 3.8, -4.7])"],seealso:["ceil","floor","fix"]};var XF={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"]};var JF={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"]};var KF={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([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]};var jF={name:"sylvester",category:"Algebra",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]","sylvester(A, B, C)"],seealso:["schur","lyap"]};var e_={name:"schur",category:"Algebra",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","A = [[1, 0], [-4, 3]]","schur(A)"],seealso:["lyap","sylvester"]};var r_={name:"lyap",category:"Algebra",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","A = [[-2, 0], [1, -4]]","Q = [[3, 1], [1, 3]]","lyap(A,Q)"],seealso:["schur","sylvester"]};var t_={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"]};var n_={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]};var a_={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]};var i_={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]};var o_={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]};var s_={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]};var u_={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"]};var f_={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"]};var c_={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]};var l_={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]};var m_={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"]};var p_={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"]};var d_={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. \`bellNumbers\` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]};var h_={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"]};var v_={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]};var g_={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"]};var x_={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"]};var y_={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"]};var b_={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]};var w_={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]};var D_={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate(expression, scope)","evaluate([expr1, expr2, expr3, ...])","evaluate([expr1, expr2, expr3, ...], scope)"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(16)")','evaluate("2 inch to cm")','evaluate("sin(x * pi)", { "x": 1/2 })','evaluate(["width=2", "height=4","width*height"])'],seealso:[]};var S_={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]};var N_={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:[]};var A_={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]};var M_={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]};var C_={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"]};var E_={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"]};var T_={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"]};var F_={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","matrixFromColumns"]};var __={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"]};var O_={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]};var B_={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]};var P_={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]};var I_={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"]};var R_={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"]};var k_={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicant the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["A = [1, 2, 4, 7, 0]","diff(A)","diff(A, 1)","B = [[1, 2], [3, 4]]","diff(B)","diff(B, 1)","diff(B, 2)","diff(B, bignumber(2))","diff([[1, 2], matrix([3, 4])], 2)"],seealso:["subtract","partitionSelect"]};var q_={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]};var L_={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and optionally eigenvectors of a square matrix",examples:["eigs([[5, 2.3], [2.3, 1]])","eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false })"],seealso:["inv"]};var z_={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"]};var U_={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"]};var W_={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]};var Y_={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]};var H_={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"]};var $_={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"]};var G_={name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore\\u2013Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]};var V_={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]};var Z_={name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]};var Q_={name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]};var X_={name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]};var J_={name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]};var K_={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"]};var j_={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, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]};var eO={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")',"range(1m, 1m, 3m)","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"]};var rO={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]};var tO={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"]};var nO={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]};var aO={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]};var iO={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","matrixFromRows"]};var oO={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","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]};var sO={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]};var uO={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"]};var fO={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation \`l:u\`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",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]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]};var cO={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]};var lO={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"]};var mO={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"]};var pO={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]};var dO={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]};var hO={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]};var vO={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]};var gO={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]};var xO={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"]};var yO={name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]};var bO={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]};var wO={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"]};var DO={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]};var SO={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]};var NO={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"]};var AO={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]};var MO={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"]};var CO={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"]};var EO={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > 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"]};var TO={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"]};var FO={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"]};var _O={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"]};var OO={name:"larger",category:"Relational",syntax:["x > 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"]};var BO={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"]};var PO={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"]};var IO={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"]};var RO={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]};var kO={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 and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]};var qO={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]};var LO={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]};var zO={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]};var UO={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]};var WO={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]};var YO={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]};var HO={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"]};var $O={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"]};var GO={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"]};var VO={name:"zpk2tf",category:"Signal",syntax:["zpk2tf(z, p, k)"],description:"Compute the transfer function of a zero-pole-gain model.",examples:["zpk2tf([1, 2], [-1, -2], 1)","zpk2tf([1, 2], [-1, -2])","zpk2tf([1 - 3i, 2 + 2i], [-1, -2])"],seealso:[]};var ZO={name:"freqz",category:"Signal",syntax:["freqz(b, a)","freqz(b, a, w)"],description:"Calculates the frequency response of a filter given its numerator and denominator coefficients.",examples:["freqz([1, 2], [1, 2, 3])","freqz([1, 2], [1, 2, 3], [0, 1])","freqz([1, 2], [1, 2, 3], 512)"],seealso:[]};var QO={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:[]};var XO={name:"zeta",category:"Special",syntax:["zeta(s)"],description:"Compute the Riemann Zeta Function using an infinite series and Riemanns Functional Equation for the entire complex plane",examples:["zeta(0.2)","zeta(-0.5)","zeta(4)"],seealso:[]};var JO={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"]};var KO={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],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","variance"]};var jO={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],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","variance"]};var e3={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","variance","quantileSeq"]};var r3={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]};var t3={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","variance"]};var n3={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","variance"]};var a3={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:\`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber. -In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.\`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};var i3={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(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","prod","sum","variance"]};var o3={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var s3={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],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","variance"]};var u3={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};var f3={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]};var c3={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"]};var l3={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"]};var m3={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};var p3={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"]};var d3={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};var h3={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as \`acsch(x) = ln(1/x + sqrt(1/x^2 + 1))\`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};var v3={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"]};var g3={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var x3={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};var y3={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as \`asinh(x) = ln(x + sqrt(x^2 + 1))\`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};var b3={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"]};var w3={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"]};var D3={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as \`atanh(x) = ln((1 + x)/(1 - x)) / 2\`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]};var S3={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"]};var N3={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]};var A3={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"]};var M3={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"]};var C3={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"]};var E3={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"]};var T3={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]};var F3={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]};var _3={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"]};var O3={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]};var B3={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]};var P3={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"]};var I3={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:[]};var R3={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]};var k3={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:[]};var q3={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"]};var L3={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]};var z3={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]};var U3={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"]};var W3={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var Y3={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"]};var H3={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"]};var $3={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var G3={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var V3={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"]};var Z3={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","fraction","bignumber","string","format"]};var Q3={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]};var X3={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]};var J3={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]};var K3={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]};var j3={bignumber:YT,boolean:HT,complex:$T,createUnit:GT,fraction:VT,index:ZT,matrix:QT,number:XT,sparse:JT,splitUnit:KT,string:jT,unit:eF,e:DD,E:DD,false:ET,i:TT,Infinity:FT,LN2:OT,LN10:_T,LOG2E:PT,LOG10E:BT,NaN:IT,null:RT,pi:SD,PI:SD,phi:kT,SQRT1_2:qT,SQRT2:LT,tau:zT,true:UT,version:WT,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:aF,lsolve:oF,lsolveAll:sF,lup:uF,lusolve:fF,leafCount:iF,polynomialRoot:cF,resolve:pF,simplify:dF,simplifyConstant:hF,simplifyCore:vF,symbolicEqual:xF,rationalize:mF,slu:gF,usolve:yF,usolveAll:bF,qr:lF,abs:wF,add:DF,cbrt:SF,ceil:NF,cube:AF,divide:MF,dotDivide:CF,dotMultiply:EF,dotPow:TF,exp:FF,expm:_F,expm1:OF,fix:BF,floor:PF,gcd:IF,hypot:RF,lcm:qF,log:LF,log2:WF,log1p:UF,log10:zF,mod:YF,multiply:HF,norm:$F,nthRoot:GF,nthRoots:VF,pow:ZF,round:QF,sign:XF,sqrt:JF,sqrtm:KF,square:t_,subtract:n_,unaryMinus:a_,unaryPlus:i_,xgcd:o_,invmod:kF,bitAnd:s_,bitNot:u_,bitOr:f_,bitXor:c_,leftShift:l_,rightArithShift:m_,rightLogShift:p_,bellNumbers:d_,catalan:h_,composition:v_,stirlingS2:g_,config:rF,import:tF,typed:nF,arg:x_,conj:y_,re:w_,im:b_,evaluate:D_,help:S_,distance:N_,intersect:A_,and:M_,not:C_,or:E_,xor:T_,concat:__,count:O_,cross:B_,column:F_,ctranspose:P_,det:I_,diag:R_,diff:k_,dot:q_,getMatrixDataType:Y_,identity:H_,filter:z_,flatten:U_,forEach:W_,inv:$_,pinv:G_,eigs:L_,kron:V_,matrixFromFunction:X_,matrixFromRows:J_,matrixFromColumns:Q_,map:Z_,ones:K_,partitionSelect:j_,range:eO,resize:tO,reshape:rO,rotate:nO,rotationMatrix:aO,row:iO,size:oO,sort:sO,squeeze:uO,subset:fO,trace:cO,transpose:lO,zeros:mO,fft:pO,ifft:dO,sylvester:jF,schur:e_,lyap:r_,solveODE:K3,combinations:hO,combinationsWithRep:vO,factorial:gO,gamma:xO,kldivergence:bO,lgamma:yO,multinomial:wO,permutations:DO,pickRandom:SO,random:NO,randomInt:AO,compare:MO,compareNatural:CO,compareText:EO,deepEqual:TO,equal:FO,equalText:_O,larger:OO,largerEq:BO,smaller:PO,smallerEq:IO,unequal:RO,setCartesian:kO,setDifference:qO,setDistinct:LO,setIntersect:zO,setIsSubset:UO,setMultiplicity:WO,setPowerset:YO,setSize:HO,setSymDifference:$O,setUnion:GO,zpk2tf:VO,freqz:ZO,erf:QO,zeta:XO,cumsum:o3,mad:JO,max:KO,mean:jO,median:e3,min:r3,mode:t3,prod:n3,quantileSeq:a3,std:i3,sum:s3,variance:u3,corr:f3,acos:c3,acosh:l3,acot:m3,acoth:p3,acsc:d3,acsch:h3,asec:v3,asech:g3,asin:x3,asinh:y3,atan:b3,atanh:D3,atan2:w3,cos:S3,cosh:N3,cot:A3,coth:M3,csc:C3,csch:E3,sec:T3,sech:F3,sin:_3,sinh:O3,tan:B3,tanh:P3,to:I3,clone:k3,format:q3,bin:R3,oct:Q3,hex:z3,isNaN:W3,isInteger:U3,isNegative:Y3,isNumeric:H3,hasNumericValue:L3,isPositive:$3,isPrime:G3,isZero:V3,print:X3,typeOf:J3,numeric:Z3};var eB="help",xG=["typed","mathWithTransform","Help"],hg=F(eB,xG,e=>{var{typed:r,mathWithTransform:t,Help:n}=e;return r(eB,{any:function(i){var u,l=i;if(typeof i!="string"){for(u in t)if(Xe(t,u)&&i===t[u]){l=u;break}}var c=wt(j3,l);if(!c){var o=typeof l=="function"?l.name:l;throw new Error('No documentation found on "'+o+'"')}return new n(c)}})});var rB="chain",yG=["typed","Chain"],vg=F(rB,yG,e=>{var{typed:r,Chain:t}=e;return r(rB,{"":function(){return new t},any:function(a){return new t(a)}})});var tB="det",bG=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],gg=F(tB,bG,e=>{var{typed:r,matrix:t,subtractScalar:n,multiply:a,divideScalar:i,isZero:u,unaryMinus:l}=e;return r(tB,{any:function(s){return ar(s)},"Array | Matrix":function(s){var m;switch(Qe(s)?m=s.size():Array.isArray(s)?(s=t(s),m=s.size()):m=[],m.length){case 0:return ar(s);case 1:if(m[0]===1)return ar(s.valueOf()[0]);if(m[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+lr(m)+")");case 2:{var d=m[0],h=m[1];if(d===h)return c(s.clone().valueOf(),d,h);if(h===0)return 1;throw new RangeError("Matrix must be square (size: "+lr(m)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(m)+")")}}});function c(o,s,m){if(s===1)return ar(o[0][0]);if(s===2)return n(a(o[0][0],o[1][1]),a(o[1][0],o[0][1]));for(var d=!1,h=new Array(s).fill(0).map((O,_)=>_),x=0;x{var{typed:r,matrix:t,divideScalar:n,addScalar:a,multiply:i,unaryMinus:u,det:l,identity:c,abs:o}=e;return r(nB,{"Array | Matrix":function(d){var h=Qe(d)?d.size():ur(d);switch(h.length){case 1:if(h[0]===1)return Qe(d)?t([n(1,d.valueOf()[0])]):[n(1,d[0])];throw new RangeError("Matrix must be square (size: "+lr(h)+")");case 2:{var x=h[0],v=h[1];if(x===v)return Qe(d)?t(s(d.valueOf(),x,v),d.storage()):s(d,x,v);throw new RangeError("Matrix must be square (size: "+lr(h)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(h)+")")}},any:function(d){return n(1,d)}});function s(m,d,h){var x,v,y,w,C;if(d===1){if(w=m[0][0],w===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,w)]]}else if(d===2){var b=l(m);if(b===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(m[1][1],b),n(u(m[0][1]),b)],[n(u(m[1][0]),b),n(m[0][0],b)]]}else{var M=m.concat();for(x=0;xO&&(O=o(M[x][S]),_=x),x++;if(O===0)throw Error("Cannot calculate inverse, determinant is zero");x=_,x!==S&&(C=M[S],M[S]=M[x],M[x]=C,C=A[S],A[S]=A[x],A[x]=C);var E=M[S],T=A[S];for(x=0;x{var{typed:r,matrix:t,inv:n,deepEqual:a,equal:i,dotDivide:u,dot:l,ctranspose:c,divideScalar:o,multiply:s,add:m,Complex:d}=e;return r(aB,{"Array | Matrix":function(b){var M=Qe(b)?b.size():ur(b);switch(M.length){case 1:return w(b)?c(b):M[0]===1?n(b):u(c(b),l(b,b));case 2:{if(w(b))return c(b);var A=M[0],S=M[1];if(A===S)try{return n(b)}catch(O){if(!(O instanceof Error&&O.message.match(/Cannot calculate inverse, determinant is zero/)))throw O}return Qe(b)?t(h(b.valueOf(),A,S),b.storage()):h(b,A,S)}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(M)+")")}},any:function(b){return i(b,0)?ar(b):o(1,b)}});function h(C,b,M){var{C:A,F:S}=v(C,b,M),O=s(n(s(c(A),A)),c(A)),_=s(c(S),n(s(S,c(S))));return s(_,O)}function x(C,b,M){for(var A=ar(C),S=0,O=0;O_.filter((T,R)=>R!y(l(A[E],A[E])));return{C:S,F:O}}function y(C){return i(m(C,d(1,1)),m(0,d(1,1)))}function w(C){return a(m(C,d(1,1)),m(s(C,0),d(1,1)))}});function iB(e){var{addScalar:r,subtract:t,flatten:n,multiply:a,multiplyScalar:i,divideScalar:u,sqrt:l,abs:c,bignumber:o,diag:s,size:m,reshape:d,inv:h,qr:x,usolve:v,usolveAll:y,equal:w,complex:C,larger:b,smaller:M,matrixFromColumns:A,dot:S}=e;function O(ae,$,le,Ee){var me=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,ge=_(ae,$,le,Ee,me);E(ae,$,le,Ee,me,ge);var{values:Se,C:xe}=T(ae,$,le,Ee,me);if(me){var be=R(ae,$,xe,ge,Se,le,Ee);return{values:Se,eigenvectors:be}}return{values:Se}}function _(ae,$,le,Ee,me){var ge=Ee==="BigNumber",Se=Ee==="Complex",xe=ge?o(0):0,be=ge?o(1):Se?C(1):1,De=ge?o(1):1,Ae=ge?o(10):2,We=i(Ae,Ae),Je;me&&(Je=Array($).fill(be));for(var J=!1;!J;){J=!0;for(var re=0;re<$;re++){for(var ye=xe,j=xe,ne=0;ne<$;ne++)re!==ne&&(ye=r(ye,c(ae[ne][re])),j=r(j,c(ae[re][ne])));if(!w(ye,0)&&!w(j,0)){for(var ue=De,Me=ye,Ce=u(j,Ae),Le=i(j,Ae);M(Me,Ce);)Me=i(Me,We),ue=i(ue,Ae);for(;b(Me,Le);)Me=u(Me,We),ue=u(ue,Ae);var Ie=M(u(r(Me,j),ue),i(r(ye,j),.95));if(Ie){J=!1;for(var fr=u(1,ue),or=0;or<$;or++)re!==or&&(ae[re][or]=i(ae[re][or],fr),ae[or][re]=i(ae[or][re],ue));me&&(Je[re]=i(Je[re],fr))}}}}return me?s(Je):null}function E(ae,$,le,Ee,me,ge){var Se=Ee==="BigNumber",xe=Ee==="Complex",be=Se?o(0):xe?C(0):0;Se&&(le=o(le));for(var De=0;De<$-2;De++){for(var Ae=0,We=be,Je=De+1;Je<$;Je++){var J=ae[Je][De];M(c(We),c(J))&&(We=J,Ae=Je)}if(!M(c(We),le)){if(Ae!==De+1){var re=ae[Ae];ae[Ae]=ae[De+1],ae[De+1]=re;for(var ye=0;ye<$;ye++){var j=ae[ye][Ae];ae[ye][Ae]=ae[ye][De+1],ae[ye][De+1]=j}if(me){var ne=ge[Ae];ge[Ae]=ge[De+1],ge[De+1]=ne}}for(var ue=De+2;ue<$;ue++){var Me=u(ae[ue][De],We);if(Me!==0){for(var Ce=0;Ce<$;Ce++)ae[ue][Ce]=t(ae[ue][Ce],i(Me,ae[De+1][Ce]));for(var Le=0;Le<$;Le++)ae[Le][De+1]=r(ae[Le][De+1],i(Me,ae[Le][ue]));if(me)for(var Ie=0;Ie<$;Ie++)ge[ue][Ie]=t(ge[ue][Ie],i(Me,ge[De+1][Ie]))}}}}return ge}function T(ae,$,le,Ee,me){var ge=Ee==="BigNumber",Se=Ee==="Complex",xe=ge?o(1):Se?C(1):1;ge&&(le=o(le));for(var be=ar(ae),De=[],Ae=$,We=[],Je=me?s(Array($).fill(xe)):void 0,J=me?s(Array(Ae).fill(xe)):void 0,re=0;re<=100;){re+=1;for(var ye=be[Ae-1][Ae-1],j=0;j1&&(J=s(Array(Ae-1).fill(xe)))),Ae-=1,be.pop();for(var Ce=0;Ce2&&(J=s(Array(Ae-2).fill(xe)))),Ae-=2,be.pop(),be.pop();for(var Ie=0;Ie+t(c(Ke),c(Pr))),re>100){var fr=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+De.join(", "));throw fr.values=De,fr.vectors=[],fr}var or=me?a(Je,H(We,$)):void 0;return{values:De,C:or}}function R(ae,$,le,Ee,me,ge,Se){var xe=h(le),be=a(xe,ae,le),De=Se==="BigNumber",Ae=Se==="Complex",We=De?o(0):Ae?C(0):0,Je=De?o(1):Ae?C(1):1,J=[],re=[];for(var ye of me){var j=L(J,ye,w);j===-1?(J.push(ye),re.push(1)):re[j]+=1}for(var ne=[],ue=J.length,Me=Array($).fill(We),Ce=s(Array($).fill(Je)),Le=function(){var or=J[Ie],Ke=t(be,a(or,Ce)),Pr=y(Ke,Me);for(Pr.shift();Pr.lengtha(ce,we)),ne.push(...Pr.map(we=>({value:or,vector:n(we)})))},Ie=0;Ie=5)return null;for(xe=0;;){var be=v(ae,Se);if(M(oe(z(Se,[be])),Ee))break;if(++xe>=10)return null;Se=pe(be)}return Se}function K(ae,$,le){var Ee=le==="BigNumber",me=le==="Complex",ge=Array(ae).fill(0).map(Se=>2*Math.random()-1);return Ee&&(ge=ge.map(Se=>o(Se))),me&&(ge=ge.map(Se=>C(Se))),ge=z(ge,$),pe(ge,le)}function z(ae,$){var le=m(ae);for(var Ee of $)Ee=d(Ee,le),ae=t(ae,a(u(S(Ee,ae),S(Ee,Ee)),Ee));return ae}function oe(ae){return c(l(S(ae,ae)))}function pe(ae,$){var le=$==="BigNumber",Ee=$==="Complex",me=le?o(1):Ee?C(1):1;return a(u(me,oe(ae)),ae)}return O}function oB(e){var{config:r,addScalar:t,subtract:n,abs:a,atan:i,cos:u,sin:l,multiplyScalar:c,inv:o,bignumber:s,multiply:m,add:d}=e;function h(E,T){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r.epsilon,q=arguments.length>3?arguments[3]:void 0,W=arguments.length>4?arguments[4]:void 0;if(q==="number")return x(E,R,W);if(q==="BigNumber")return v(E,R,W);throw TypeError("Unsupported data type: "+q)}function x(E,T,R){var q=E.length,W=Math.abs(T/q),G,H;if(R){H=new Array(q);for(var L=0;L=Math.abs(W);){var K=k[0][0],z=k[0][1];G=y(E[K][K],E[z][z],E[K][z]),E=A(E,G,K,z),R&&(H=C(H,G,K,z)),k=S(E)}for(var oe=Array(q).fill(0),pe=0;pe=a(W);){var K=k[0][0],z=k[0][1];G=w(E[K][K],E[z][z],E[K][z]),E=M(E,G,K,z),R&&(H=b(H,G,K,z)),k=O(E)}for(var oe=Array(q).fill(0),pe=0;pe({value:W[$],vector:ae}));return{values:W,eigenvectors:pe}}return h}var SG="eigs",NG=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],bg=F(SG,NG,e=>{var{config:r,typed:t,matrix:n,addScalar:a,subtract:i,equal:u,abs:l,atan:c,cos:o,sin:s,multiplyScalar:m,divideScalar:d,inv:h,bignumber:x,multiply:v,add:y,larger:w,column:C,flatten:b,number:M,complex:A,sqrt:S,diag:O,size:_,reshape:E,qr:T,usolve:R,usolveAll:q,im:W,re:G,smaller:H,matrixFromColumns:L,dot:k}=e,K=oB({config:r,addScalar:a,subtract:i,column:C,flatten:b,equal:u,abs:l,atan:c,cos:o,sin:s,multiplyScalar:m,inv:h,bignumber:x,complex:A,multiply:v,add:y}),z=iB({config:r,addScalar:a,subtract:i,multiply:v,multiplyScalar:m,flatten:b,divideScalar:d,sqrt:S,abs:l,bignumber:x,diag:O,size:_,reshape:E,qr:T,inv:h,usolve:R,usolveAll:q,equal:u,complex:A,larger:w,smaller:H,matrixFromColumns:L,dot:k});return t("eigs",{Array:function(ge){return oe(n(ge))},"Array, number|BigNumber":function(ge,Se){return oe(n(ge),{precision:Se})},"Array, Object"(me,ge){return oe(n(me),ge)},Matrix:function(ge){return oe(ge,{matricize:!0})},"Matrix, number|BigNumber":function(ge,Se){return oe(ge,{precision:Se,matricize:!0})},"Matrix, Object":function(ge,Se){var xe={matricize:!0};return ht(xe,Se),oe(ge,xe)}});function oe(me){var ge,Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},xe="eigenvectors"in Se?Se.eigenvectors:!0,be=(ge=Se.precision)!==null&&ge!==void 0?ge:r.epsilon,De=pe(me,be,xe);return Se.matricize&&(De.values=n(De.values),xe&&(De.eigenvectors=De.eigenvectors.map(Ae=>{var{value:We,vector:Je}=Ae;return{value:We,vector:n(Je)}}))),xe&&Object.defineProperty(De,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),De}function pe(me,ge,Se){var xe=me.toArray(),be=me.size();if(be.length!==2||be[0]!==be[1])throw new RangeError("Matrix must be square (size: ".concat(lr(be),")"));var De=be[0];if($(xe,De,ge)&&(le(xe,De),ae(xe,De,ge))){var Ae=Ee(me,xe,De);return K(xe,De,ge,Ae,Se)}var We=Ee(me,xe,De);return z(xe,De,ge,We,Se)}function ae(me,ge,Se){for(var xe=0;xe{var{typed:r,abs:t,add:n,identity:a,inv:i,multiply:u}=e;return r(sB,{Matrix:function(m){var d=m.size();if(d.length!==2||d[0]!==d[1])throw new RangeError("Matrix must be square (size: "+lr(d)+")");for(var h=d[0],x=1e-15,v=l(m),y=c(v,x),w=y.q,C=y.j,b=u(m,Math.pow(2,-C)),M=a(h),A=a(h),S=1,O=b,_=-1,E=1;E<=w;E++)E>1&&(O=u(O,b),_=-_),S=S*(w-E+1)/((2*w-E+1)*E),M=n(M,u(S,O)),A=n(A,u(S*_,O));for(var T=u(i(A),M),R=0;R{var{typed:r,abs:t,add:n,multiply:a,map:i,sqrt:u,subtract:l,inv:c,size:o,max:s,identity:m}=e,d=1e3,h=1e-6;function x(v){var y,w=0,C=v,b=m(o(v));do{var M=C;if(C=a(.5,n(M,c(b))),b=a(.5,n(b,c(M))),y=s(t(l(C,M))),y>h&&++w>d)throw new Error("computing square root of matrix: iterative method could not converge")}while(y>h);return C}return r(uB,{"Array | Matrix":function(y){var w=Qe(y)?y.size():ur(y);switch(w.length){case 1:if(w[0]===1)return i(y,u);throw new RangeError("Matrix must be square (size: "+lr(w)+")");case 2:{var C=w[0],b=w[1];if(C===b)return x(y);throw new RangeError("Matrix must be square (size: "+lr(w)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+lr(w)+")")}}})});var fB="sylvester",CG=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],Sg=F(fB,CG,e=>{var{typed:r,schur:t,matrixFromColumns:n,matrix:a,multiply:i,range:u,concat:l,transpose:c,index:o,subset:s,add:m,subtract:d,identity:h,lusolve:x,abs:v}=e;return r(fB,{"Matrix, Matrix, Matrix":y,"Array, Matrix, Matrix":function(C,b,M){return y(a(C),b,M)},"Array, Array, Matrix":function(C,b,M){return y(a(C),a(b),M)},"Array, Matrix, Array":function(C,b,M){return y(a(C),b,a(M))},"Matrix, Array, Matrix":function(C,b,M){return y(C,a(b),M)},"Matrix, Array, Array":function(C,b,M){return y(C,a(b),a(M))},"Matrix, Matrix, Array":function(C,b,M){return y(C,b,a(M))},"Array, Array, Array":function(C,b,M){return y(a(C),a(b),a(M)).toArray()}});function y(w,C,b){for(var M=C.size()[0],A=w.size()[0],S=t(w),O=S.T,_=S.U,E=t(i(-1,C)),T=E.T,R=E.U,q=i(i(c(_),b),R),W=u(0,A),G=[],H=(Ae,We)=>l(Ae,We,1),L=(Ae,We)=>l(Ae,We,0),k=0;k1e-5){for(var K=L(s(q,o(W,k)),s(q,o(W,k+1))),z=0;z{var{typed:r,matrix:t,identity:n,multiply:a,qr:i,norm:u,subtract:l}=e;return r(cB,{Array:function(s){var m=c(t(s));return{U:m.U.valueOf(),T:m.T.valueOf()}},Matrix:function(s){return c(s)}});function c(o){var s=o.size()[0],m=o,d=n(s),h=0,x;do{x=m;var v=i(m),y=v.Q,w=v.R;if(m=a(w,y),d=a(d,y),h++>100)break}while(u(l(m,x))>1e-4);return{U:d,T:m}}});var lB="lyap",TG=["typed","matrix","sylvester","multiply","transpose"],Ag=F(lB,TG,e=>{var{typed:r,matrix:t,sylvester:n,multiply:a,transpose:i}=e;return r(lB,{"Matrix, Matrix":function(l,c){return n(l,i(l),a(-1,c))},"Array, Matrix":function(l,c){return n(t(l),i(t(l)),a(-1,c))},"Matrix, Array":function(l,c){return n(l,i(t(l)),t(a(-1,c)))},"Array, Array":function(l,c){return n(t(l),i(t(l)),t(a(-1,c))).toArray()}})});var FG="divide",_G=["typed","matrix","multiply","equalScalar","divideScalar","inv"],Mg=F(FG,_G,e=>{var{typed:r,matrix:t,multiply:n,equalScalar:a,divideScalar:i,inv:u}=e,l=jr({typed:r,equalScalar:a}),c=qt({typed:r});return r("divide",Dm({"Array | Matrix, Array | Matrix":function(s,m){return n(s,u(m))},"DenseMatrix, any":function(s,m){return c(s,m,i,!1)},"SparseMatrix, any":function(s,m){return l(s,m,i,!1)},"Array, any":function(s,m){return c(t(s),m,i,!1).valueOf()},"any, Array | Matrix":function(s,m){return n(s,u(m))}},i.signatures))});var mB="distance",OG=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],Cg=F(mB,OG,e=>{var{typed:r,addScalar:t,subtractScalar:n,multiplyScalar:a,divideScalar:i,deepEqual:u,sqrt:l,abs:c}=e;return r(mB,{"Array, Array, Array":function(A,S,O){if(A.length===2&&S.length===2&&O.length===2){if(!s(A))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!s(S))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!s(O))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(u(S,O))throw new TypeError("LinePoint1 should not be same with LinePoint2");var _=n(O[1],S[1]),E=n(S[0],O[0]),T=n(a(O[0],S[1]),a(S[0],O[1]));return y(A[0],A[1],_,E,T)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(A,S,O){if(Object.keys(A).length===2&&Object.keys(S).length===2&&Object.keys(O).length===2){if(!s(A))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!s(S))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!s(O))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(u(x(S),x(O)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in A&&"pointY"in A&&"lineOnePtX"in S&&"lineOnePtY"in S&&"lineTwoPtX"in O&&"lineTwoPtY"in O){var _=n(O.lineTwoPtY,S.lineOnePtY),E=n(S.lineOnePtX,O.lineTwoPtX),T=n(a(O.lineTwoPtX,S.lineOnePtY),a(S.lineOnePtX,O.lineTwoPtY));return y(A.pointX,A.pointY,_,E,T)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(A,S){if(A.length===2&&S.length===3){if(!s(A))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!m(S))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return y(A[0],A[1],S[0],S[1],S[2])}else if(A.length===3&&S.length===6){if(!m(A))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!h(S))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return w(A[0],A[1],A[2],S[0],S[1],S[2],S[3],S[4],S[5])}else if(A.length===S.length&&A.length>0){if(!d(A))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!d(S))throw new TypeError("All values of an array should be numbers or BigNumbers");return C(A,S)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(A,S){if(Object.keys(A).length===2&&Object.keys(S).length===3){if(!s(A))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!m(S))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in A&&"pointY"in A&&"xCoeffLine"in S&&"yCoeffLine"in S&&"constant"in S)return y(A.pointX,A.pointY,S.xCoeffLine,S.yCoeffLine,S.constant);throw new TypeError("Key names do not match")}else if(Object.keys(A).length===3&&Object.keys(S).length===6){if(!m(A))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!h(S))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in A&&"pointY"in A&&"x0"in S&&"y0"in S&&"z0"in S&&"a"in S&&"b"in S&&"c"in S)return w(A.pointX,A.pointY,A.pointZ,S.x0,S.y0,S.z0,S.a,S.b,S.c);throw new TypeError("Key names do not match")}else if(Object.keys(A).length===2&&Object.keys(S).length===2){if(!s(A))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!s(S))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in A&&"pointOneY"in A&&"pointTwoX"in S&&"pointTwoY"in S)return C([A.pointOneX,A.pointOneY],[S.pointTwoX,S.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(A).length===3&&Object.keys(S).length===3){if(!m(A))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!m(S))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in A&&"pointOneY"in A&&"pointOneZ"in A&&"pointTwoX"in S&&"pointTwoY"in S&&"pointTwoZ"in S)return C([A.pointOneX,A.pointOneY,A.pointOneZ],[S.pointTwoX,S.pointTwoY,S.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(A){if(!v(A))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return b(A)}});function o(M){return typeof M=="number"||rr(M)}function s(M){return M.constructor!==Array&&(M=x(M)),o(M[0])&&o(M[1])}function m(M){return M.constructor!==Array&&(M=x(M)),o(M[0])&&o(M[1])&&o(M[2])}function d(M){return Array.isArray(M)||(M=x(M)),M.every(o)}function h(M){return M.constructor!==Array&&(M=x(M)),o(M[0])&&o(M[1])&&o(M[2])&&o(M[3])&&o(M[4])&&o(M[5])}function x(M){for(var A=Object.keys(M),S=[],O=0;OA.length!==2||!o(A[0])||!o(A[1])))return!1}else if(M[0].length===3&&o(M[0][0])&&o(M[0][1])&&o(M[0][2])){if(M.some(A=>A.length!==3||!o(A[0])||!o(A[1])||!o(A[2])))return!1}else return!1;return!0}function y(M,A,S,O,_){var E=c(t(t(a(S,M),a(O,A)),_)),T=l(t(a(S,S),a(O,O)));return i(E,T)}function w(M,A,S,O,_,E,T,R,q){var W=[n(a(n(_,A),q),a(n(E,S),R)),n(a(n(E,S),T),a(n(O,M),q)),n(a(n(O,M),R),a(n(_,A),T))];W=l(t(t(a(W[0],W[0]),a(W[1],W[1])),a(W[2],W[2])));var G=l(t(t(a(T,T),a(R,R)),a(q,q)));return i(W,G)}function C(M,A){for(var S=M.length,O=0,_=0,E=0;E{var{typed:r,config:t,abs:n,add:a,addScalar:i,matrix:u,multiply:l,multiplyScalar:c,divideScalar:o,subtract:s,smaller:m,equalScalar:d,flatten:h,isZero:x,isNumeric:v}=e;return r("intersect",{"Array, Array, Array":y,"Array, Array, Array, Array":w,"Matrix, Matrix, Matrix":function(R,q,W){var G=y(R.valueOf(),q.valueOf(),W.valueOf());return G===null?null:u(G)},"Matrix, Matrix, Matrix, Matrix":function(R,q,W,G){var H=w(R.valueOf(),q.valueOf(),W.valueOf(),G.valueOf());return H===null?null:u(H)}});function y(T,R,q){if(T=C(T),R=C(R),q=C(q),!M(T))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!M(R))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!A(q))throw new TypeError("Array with 4 numbers expected as third argument");return E(T[0],T[1],T[2],R[0],R[1],R[2],q[0],q[1],q[2],q[3])}function w(T,R,q,W){if(T=C(T),R=C(R),q=C(q),W=C(W),T.length===2){if(!b(T))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!b(R))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!b(q))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!b(W))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return S(T,R,q,W)}else if(T.length===3){if(!M(T))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!M(R))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!M(q))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!M(W))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return _(T[0],T[1],T[2],R[0],R[1],R[2],q[0],q[1],q[2],W[0],W[1],W[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function C(T){return T.length===1?T[0]:T.length>1&&Array.isArray(T[0])&&T.every(R=>Array.isArray(R)&&R.length===1)?h(T):T}function b(T){return T.length===2&&v(T[0])&&v(T[1])}function M(T){return T.length===3&&v(T[0])&&v(T[1])&&v(T[2])}function A(T){return T.length===4&&v(T[0])&&v(T[1])&&v(T[2])&&v(T[3])}function S(T,R,q,W){var G=T,H=q,L=s(G,R),k=s(H,W),K=s(c(L[0],k[1]),c(k[0],L[1]));if(x(K)||m(n(K),t.epsilon))return null;var z=c(k[0],G[1]),oe=c(k[1],G[0]),pe=c(k[0],H[1]),ae=c(k[1],H[0]),$=o(i(s(s(z,oe),pe),ae),K);return a(l(L,$),G)}function O(T,R,q,W,G,H,L,k,K,z,oe,pe){var ae=c(s(T,R),s(q,W)),$=c(s(G,H),s(L,k)),le=c(s(K,z),s(oe,pe));return i(i(ae,$),le)}function _(T,R,q,W,G,H,L,k,K,z,oe,pe){var ae=O(T,L,z,L,R,k,oe,k,q,K,pe,K),$=O(z,L,W,T,oe,k,G,R,pe,K,H,q),le=O(T,L,W,T,R,k,G,R,q,K,H,q),Ee=O(z,L,z,L,oe,k,oe,k,pe,K,pe,K),me=O(W,T,W,T,G,R,G,R,H,q,H,q),ge=s(c(ae,$),c(le,Ee)),Se=s(c(me,Ee),c($,$));if(x(Se))return null;var xe=o(ge,Se),be=o(i(ae,c(xe,$)),Ee),De=i(T,c(xe,s(W,T))),Ae=i(R,c(xe,s(G,R))),We=i(q,c(xe,s(H,q))),Je=i(L,c(be,s(z,L))),J=i(k,c(be,s(oe,k))),re=i(K,c(be,s(pe,K)));return d(De,Je)&&d(Ae,J)&&d(We,re)?[De,Ae,We]:null}function E(T,R,q,W,G,H,L,k,K,z){var oe=c(T,L),pe=c(W,L),ae=c(R,k),$=c(G,k),le=c(q,K),Ee=c(H,K),me=s(s(s(z,oe),ae),le),ge=s(s(s(i(i(pe,$),Ee),oe),ae),le),Se=o(me,ge),xe=i(T,c(Se,s(W,T))),be=i(R,c(Se,s(G,R))),De=i(q,c(Se,s(H,q)));return[xe,be,De]}});var pB="sum",IG=["typed","config","add","numeric"],nf=F(pB,IG,e=>{var{typed:r,config:t,add:n,numeric:a}=e;return r(pB,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":u,"...":function(c){if(Ba(c))throw new TypeError("Scalar values expected in function sum");return i(c)}});function i(l){var c;return An(l,function(o){try{c=c===void 0?o:n(c,o)}catch(s){throw Et(s,"sum",o)}}),c===void 0&&(c=a(0,t.number)),typeof c=="string"&&(c=a(c,t.number)),c}function u(l,c){try{var o=ko(l,c,n);return o}catch(s){throw Et(s,"sum")}}});var Tg="cumsum",RG=["typed","add","unaryPlus"],af=F(Tg,RG,e=>{var{typed:r,add:t,unaryPlus:n}=e;return r(Tg,{Array:a,Matrix:function(o){return o.create(a(o.valueOf()))},"Array, number | BigNumber":u,"Matrix, number | BigNumber":function(o,s){return o.create(u(o.valueOf(),s))},"...":function(o){if(Ba(o))throw new TypeError("All values expected to be scalar in function cumsum");return a(o)}});function a(c){try{return i(c)}catch(o){throw Et(o,Tg)}}function i(c){if(c.length===0)return[];for(var o=[n(c[0])],s=1;s=s.length)throw new tn(o,s.length);try{return l(c,o)}catch(m){throw Et(m,Tg)}}function l(c,o){var s,m,d;if(o<=0){var h=c[0][0];if(Array.isArray(h)){for(d=Km(c),m=[],s=0;s{var{typed:r,add:t,divide:n}=e;return r(dB,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":a,"...":function(l){if(Ba(l))throw new TypeError("Scalar values expected in function mean");return i(l)}});function a(u,l){try{var c=ko(u,l,t),o=Array.isArray(u)?ur(u):u.size();return n(c,o[l])}catch(s){throw Et(s,"mean")}}function i(u){var l,c=0;if(An(u,function(o){try{l=l===void 0?o:t(l,o),c++}catch(s){throw Et(s,"mean",o)}}),c===0)throw new Error("Cannot calculate the mean of an empty array");return n(l,c)}});var hB="median",qG=["typed","add","divide","compare","partitionSelect"],Fg=F(hB,qG,e=>{var{typed:r,add:t,divide:n,compare:a,partitionSelect:i}=e;function u(o){try{o=gr(o.valueOf());var s=o.length;if(s===0)throw new Error("Cannot calculate median of an empty array");if(s%2===0){for(var m=s/2-1,d=i(o,m+1),h=o[m],x=0;x0&&(h=o[x]);return c(h,d)}else{var v=i(o,(s-1)/2);return l(v)}}catch(y){throw Et(y,"median")}}var l=r({"number | BigNumber | Complex | Unit":function(s){return s}}),c=r({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(s,m){return n(t(s,m),2)}});return r(hB,{"Array | Matrix":u,"Array | Matrix, number | BigNumber":function(s,m){throw new Error("median(A, dim) is not yet supported")},"...":function(s){if(Ba(s))throw new TypeError("Scalar values expected in function median");return u(s)}})});var vB="mad",LG=["typed","abs","map","median","subtract"],_g=F(vB,LG,e=>{var{typed:r,abs:t,map:n,median:a,subtract:i}=e;return r(vB,{"Array | Matrix":u,"...":function(c){return u(c)}});function u(l){if(l=gr(l.valueOf()),l.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var c=a(l);return a(n(l,function(o){return t(i(o,c))}))}catch(o){throw o instanceof TypeError&&o.message.indexOf("median")!==-1?new TypeError(o.message.replace("median","mad")):Et(o,"mad")}}});var ND="unbiased",gB="variance",zG=["typed","add","subtract","multiply","divide","apply","isNaN"],sf=F(gB,zG,e=>{var{typed:r,add:t,subtract:n,multiply:a,divide:i,apply:u,isNaN:l}=e;return r(gB,{"Array | Matrix":function(m){return c(m,ND)},"Array | Matrix, string":c,"Array | Matrix, number | BigNumber":function(m,d){return o(m,d,ND)},"Array | Matrix, number | BigNumber, string":o,"...":function(m){return c(m,ND)}});function c(s,m){var d,h=0;if(s.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(An(s,function(y){try{d=d===void 0?y:t(d,y),h++}catch(w){throw Et(w,"variance",y)}}),h===0)throw new Error("Cannot calculate variance of an empty array");var x=i(d,h);if(d=void 0,An(s,function(y){var w=n(y,x);d=d===void 0?a(w,w):t(d,a(w,w))}),l(d))return d;switch(m){case"uncorrected":return i(d,h);case"biased":return i(d,h+1);case"unbiased":{var v=rr(d)?d.mul(0):0;return h===1?v:i(d,h-1)}default:throw new Error('Unknown normalization "'+m+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function o(s,m,d){try{if(s.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return u(s,m,h=>c(h,d))}catch(h){throw Et(h,"variance")}}});var xB="quantileSeq",UG=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],uf=F(xB,UG,e=>{var{typed:r,bignumber:t,add:n,subtract:a,divide:i,multiply:u,partitionSelect:l,compare:c,isInteger:o,smaller:s,smallerEq:m,larger:d}=e,h=qo({typed:r,isInteger:o});return r(xB,{"Array | Matrix, number | BigNumber":(C,b)=>v(C,b,!1),"Array | Matrix, number | BigNumber, number":(C,b,M)=>x(C,b,!1,M,v),"Array | Matrix, number | BigNumber, boolean":v,"Array | Matrix, number | BigNumber, boolean, number":(C,b,M,A)=>x(C,b,M,A,v),"Array | Matrix, Array | Matrix":(C,b)=>y(C,b,!1),"Array | Matrix, Array | Matrix, number":(C,b,M)=>x(C,b,!1,M,y),"Array | Matrix, Array | Matrix, boolean":y,"Array | Matrix, Array | Matrix, boolean, number":(C,b,M,A)=>x(C,b,M,A,y)});function x(C,b,M,A,S){return h(C,A,O=>S(O,b,M))}function v(C,b,M){var A,S=C.valueOf();if(s(b,0))throw new Error("N/prob must be non-negative");if(m(b,1))return sr(b)?w(S,b,M):t(w(S,b,M));if(d(b,1)){if(!o(b))throw new Error("N must be a positive integer");if(d(b,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var O=n(b,1);A=[];for(var _=0;s(_,b);_++){var E=i(_+1,O);A.push(w(S,E,M))}return sr(b)?A:t(A)}}function y(C,b,M){for(var A=C.valueOf(),S=b.valueOf(),O=[],_=0;_0&&(T=A[q])}return n(u(T,a(1,E)),u(R,E))}});var yB="std",WG=["typed","map","sqrt","variance"],ff=F(yB,WG,e=>{var{typed:r,map:t,sqrt:n,variance:a}=e;return r(yB,{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(l){return i(l)}});function i(u,l){if(u.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var c=a.apply(null,arguments);return Nt(c)?t(c,n):n(c)}catch(o){throw o instanceof TypeError&&o.message.indexOf(" variance")!==-1?new TypeError(o.message.replace(" variance"," std")):o}}});var bB="corr",YG=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],Og=F(bB,YG,e=>{var{typed:r,matrix:t,sqrt:n,sum:a,add:i,subtract:u,multiply:l,pow:c,divide:o}=e;return r(bB,{"Array, Array":function(h,x){return s(h,x)},"Matrix, Matrix":function(h,x){var v=s(h.toArray(),x.toArray());return Array.isArray(v)?t(v):v}});function s(d,h){var x=[];if(Array.isArray(d[0])&&Array.isArray(h[0])){if(d.length!==h.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var v=0;vi(S,l(O,h[_])),0),C=a(d.map(S=>c(S,2))),b=a(h.map(S=>c(S,2))),M=u(l(x,w),l(v,y)),A=n(l(u(l(x,C),c(v,2)),u(l(x,b),c(y,2))));return o(M,A)}});var wB="combinations",HG=["typed"],Bg=F(wB,HG,e=>{var{typed:r}=e;return r(wB,{"number, number":kw,"BigNumber, BigNumber":function(n,a){var i=n.constructor,u,l,c=n.minus(a),o=new i(1);if(!DB(n)||!DB(a))throw new TypeError("Positive integer value expected in function combinations");if(a.gt(n))throw new TypeError("k must be less than n in function combinations");if(u=o,a.lt(c))for(l=o;l.lte(c);l=l.plus(o))u=u.times(a.plus(l)).dividedBy(l);else for(l=o;l.lte(a);l=l.plus(o))u=u.times(c.plus(l)).dividedBy(l);return u}})});function DB(e){return e.isInteger()&&e.gte(0)}var SB="combinationsWithRep",$G=["typed"],Pg=F(SB,$G,e=>{var{typed:r}=e;return r(SB,{"number, number":function(n,a){if(!Ze(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Ze(a)||a<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n<1)throw new TypeError("k must be less than or equal to n + k - 1");if(a{var{typed:r,config:t,multiplyScalar:n,pow:a,BigNumber:i,Complex:u}=e;function l(o){if(o.im===0)return _c(o.re);if(o.re<.5){var s=new u(1-o.re,-o.im),m=new u(Math.PI*o.re,Math.PI*o.im);return new u(Math.PI).div(m.sin()).div(l(s))}o=new u(o.re-1,o.im);for(var d=new u(Ts[0],0),h=1;h2;)d-=2,x+=d,h=h.times(x);return new i(h.toPrecision(i.precision))}});var MB="lgamma",VG=["Complex","typed"],Rg=F(MB,VG,e=>{var{Complex:r,typed:t}=e,n=7,a=7,i=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return t(MB,{number:Oc,Complex:u,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function u(o){var s=6.283185307179586,m=1.1447298858494002,d=.1;if(o.isNaN())return new r(NaN,NaN);if(o.im===0)return new r(Oc(o.re),0);if(o.re>=n||Math.abs(o.im)>=a)return l(o);if(o.re<=d){var h=nM(s,o.im)*Math.floor(.5*o.re+.25),x=o.mul(Math.PI).sin().log(),v=u(new r(1-o.re,-o.im));return new r(m,h).sub(x).sub(v)}else return o.im>=0?c(o):c(o.conjugate()).conjugate()}function l(o){for(var s=o.sub(.5).mul(o.log()).sub(o).add(Hw),m=new r(1,0).div(o),d=m.div(o),h=i[0],x=i[1],v=2*d.re,y=d.re*d.re+d.im*d.im,w=2;w<8;w++){var C=x;x=-y*h+i[w],h=v*h+C}var b=m.mul(d.mul(h).add(x));return s.add(b)}function c(o){var s=0,m=0,d=o;for(o=o.add(1);o.re<=n;){d=d.mul(o);var h=d.im<0?1:0;h!==0&&m===0&&s++,m=h,o=o.add(1)}return l(o).sub(d.log()).sub(new r(0,s*2*Math.PI*1))}});var CB="factorial",ZG=["typed","gamma"],kg=F(CB,ZG,e=>{var{typed:r,gamma:t}=e;return r(CB,{number:function(a){if(a<0)throw new Error("Value must be non-negative");return t(a+1)},BigNumber:function(a){if(a.isNegative())throw new Error("Value must be non-negative");return t(a.plus(1))},"Array | Matrix":r.referToSelf(n=>a=>je(a,n))})});var EB="kldivergence",QG=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],qg=F(EB,QG,e=>{var{typed:r,matrix:t,divide:n,sum:a,multiply:i,map:u,dotDivide:l,log:c,isNumeric:o}=e;return r(EB,{"Array, Array":function(d,h){return s(t(d),t(h))},"Matrix, Array":function(d,h){return s(d,t(h))},"Array, Matrix":function(d,h){return s(t(d),h)},"Matrix, Matrix":function(d,h){return s(d,h)}});function s(m,d){var h=d.size().length,x=m.size().length;if(h>1)throw new Error("first object must be one dimensional");if(x>1)throw new Error("second object must be one dimensional");if(h!==x)throw new Error("Length of two vectors must be equal");var v=a(m);if(v===0)throw new Error("Sum of elements in first object must be non zero");var y=a(d);if(y===0)throw new Error("Sum of elements in second object must be non zero");var w=n(m,a(m)),C=n(d,a(d)),b=a(i(w,u(l(w,C),M=>c(M))));return o(b)?b:Number.NaN}});var TB="multinomial",XG=["typed","add","divide","multiply","factorial","isInteger","isPositive"],Lg=F(TB,XG,e=>{var{typed:r,add:t,divide:n,multiply:a,factorial:i,isInteger:u,isPositive:l}=e;return r(TB,{"Array | Matrix":function(o){var s=0,m=1;return An(o,function(d){if(!u(d)||!l(d))throw new TypeError("Positive integer value expected in function multinomial");s=t(s,d),m=a(m,i(d))}),n(i(s),m)}})});var FB="permutations",JG=["typed","factorial"],zg=F(FB,JG,e=>{var{typed:r,factorial:t}=e;return r(FB,{"number | BigNumber":t,"number, number":function(a,i){if(!Ze(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(!Ze(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(i>a)throw new TypeError("second argument k must be less than or equal to first argument n");return da(a-i+1,a)},"BigNumber, BigNumber":function(a,i){var u,l;if(!_B(a)||!_B(i))throw new TypeError("Positive integer value expected in function permutations");if(i.gt(a))throw new TypeError("second argument k must be less than or equal to first argument n");var c=a.mul(0).add(1);for(u=c,l=a.minus(i).plus(1);l.lte(a);l=l.plus(1))u=u.times(l);return u}})});function _B(e){return e.isInteger()&&e.gte(0)}var _D=ca(ZB(),1),aV=(0,_D.default)(Date.now());function to(e){var r;function t(a){r=a===null?aV:(0,_D.default)(String(a))}t(e);function n(){return r()}return n}var QB="pickRandom",iV=["typed","config","?on"],Wg=F(QB,iV,e=>{var{typed:r,config:t,on:n}=e,a=to(t.randomSeed);return n&&n("config",function(u,l){u.randomSeed!==l.randomSeed&&(a=to(u.randomSeed))}),r(QB,{"Array | Matrix":function(l){return i(l,{})},"Array | Matrix, Object":function(l,c){return i(l,c)},"Array | Matrix, number":function(l,c){return i(l,{number:c})},"Array | Matrix, Array | Matrix":function(l,c){return i(l,{weights:c})},"Array | Matrix, Array | Matrix, number":function(l,c,o){return i(l,{number:o,weights:c})},"Array | Matrix, number, Array | Matrix":function(l,c,o){return i(l,{number:c,weights:o})}});function i(u,l){var{number:c,weights:o,elementWise:s=!0}=l,m=typeof c>"u";m&&(c=1);var d=Qe(u)?u.create:Qe(o)?o.create:null;u=u.valueOf(),o&&(o=o.valueOf()),s===!0&&(u=gr(u),o=gr(o));var h=0;if(typeof o<"u"){if(o.length!==u.length)throw new Error("Weights must have the same length as possibles");for(var x=0,v=o.length;x"u")C=u[Math.floor(a()*y)];else for(var b=a()*h,M=0,A=u.length;M1)for(var n=0,a=e.shift();n{var{typed:r,config:t,on:n}=e,a=to(t.randomSeed);return n&&n("config",function(l,c){l.randomSeed!==c.randomSeed&&(a=to(l.randomSeed))}),r(XB,{"":()=>u(0,1),number:l=>u(0,l),"number, number":(l,c)=>u(l,c),"Array | Matrix":l=>i(l,0,1),"Array | Matrix, number":(l,c)=>i(l,0,c),"Array | Matrix, number, number":(l,c,o)=>i(l,c,o)});function i(l,c,o){var s=kc(l.valueOf(),()=>u(c,o));return Qe(l)?l.create(s):s}function u(l,c){return l+a()*(c-l)}});var JB="randomInt",sV=["typed","config","?on"],Hg=F(JB,sV,e=>{var{typed:r,config:t,on:n}=e,a=to(t.randomSeed);return n&&n("config",function(l,c){l.randomSeed!==c.randomSeed&&(a=to(l.randomSeed))}),r(JB,{"":()=>u(0,1),number:l=>u(0,l),"number, number":(l,c)=>u(l,c),"Array | Matrix":l=>i(l,0,1),"Array | Matrix, number":(l,c)=>i(l,0,c),"Array | Matrix, number, number":(l,c,o)=>i(l,c,o)});function i(l,c,o){var s=kc(l.valueOf(),()=>u(c,o));return Qe(l)?l.create(s):s}function u(l,c){return Math.floor(l+a()*(c-l))}});var KB="stirlingS2",uV=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],$g=F(KB,uV,e=>{var{typed:r,addScalar:t,subtractScalar:n,multiplyScalar:a,divideScalar:i,pow:u,factorial:l,combinations:c,isNegative:o,isInteger:s,number:m,bignumber:d,larger:h}=e,x=[],v=[];return r(KB,{"number | BigNumber, number | BigNumber":function(w,C){if(!s(w)||o(w)||!s(C)||o(C))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(h(C,w))throw new TypeError("k must be less than or equal to n in function stirlingS2");var b=!(sr(w)&&sr(C)),M=b?v:x,A=b?d:m,S=m(w),O=m(C);if(M[S]&&M[S].length>O)return M[S][O];for(var _=0;_<=S;++_)if(M[_]||(M[_]=[A(_===0?1:0)]),_!==0)for(var E=M[_],T=M[_-1],R=E.length;R<=_&&R<=O;++R)R===_?E[R]=1:E[R]=t(a(A(R),T[R]),T[R-1]);return M[S][O]}})});var jB="bellNumbers",fV=["typed","addScalar","isNegative","isInteger","stirlingS2"],Gg=F(jB,fV,e=>{var{typed:r,addScalar:t,isNegative:n,isInteger:a,stirlingS2:i}=e;return r(jB,{"number | BigNumber":function(l){if(!a(l)||n(l))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var c=0,o=0;o<=l;o++)c=t(c,i(l,o));return c}})});var eP="catalan",cV=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],Vg=F(eP,cV,e=>{var{typed:r,addScalar:t,divideScalar:n,multiplyScalar:a,combinations:i,isNegative:u,isInteger:l}=e;return r(eP,{"number | BigNumber":function(o){if(!l(o)||u(o))throw new TypeError("Non-negative integer value expected in function catalan");return n(i(a(o,2),o),t(o,1))}})});var rP="composition",lV=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],Zg=F(rP,lV,e=>{var{typed:r,addScalar:t,combinations:n,isPositive:a,isNegative:i,isInteger:u,larger:l}=e;return r(rP,{"number | BigNumber, number | BigNumber":function(o,s){if(!u(o)||!a(o)||!u(s)||!a(s))throw new TypeError("Positive integer value expected in function composition");if(l(s,o))throw new TypeError("k must be less than or equal to n in function composition");return n(t(o,-1),t(s,-1))}})});var tP="leafCount",mV=["parse","typed"],Qg=F(tP,mV,e=>{var{parse:r,typed:t}=e;function n(a){var i=0;return a.forEach(u=>{i+=n(u)}),i||1}return t(tP,{Node:function(i){return n(i)}})});function OD(e){return yr(e)||ct(e)&&e.isUnary()&&yr(e.args[0])}function qc(e){return!!(yr(e)||(gn(e)||ct(e))&&e.args.every(qc)||en(e)&&qc(e.content))}function nP(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function BD(e){for(var r=1;r{var{FunctionNode:r,OperatorNode:t,SymbolNode:n}=e,a=!0,i=!1,u="defaultF",l={add:{trivial:a,total:a,commutative:a,associative:a},unaryPlus:{trivial:a,total:a,commutative:a,associative:a},subtract:{trivial:i,total:a,commutative:i,associative:i},multiply:{trivial:a,total:a,commutative:a,associative:a},divide:{trivial:i,total:a,commutative:i,associative:i},paren:{trivial:a,total:a,commutative:a,associative:i},defaultF:{trivial:i,total:a,commutative:i,associative:i}},c={divide:{total:i},log:{total:i}},o={subtract:{total:i},abs:{trivial:a},log:{total:a}};function s(b,M){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l,S=u;if(typeof b=="string"?S=b:ct(b)?S=b.fn.toString():gn(b)?S=b.name:en(b)&&(S="paren"),Xe(A,S)){var O=A[S];if(Xe(O,M))return O[M];if(Xe(l,S))return l[S][M]}if(Xe(A,u)){var _=A[u];return Xe(_,M)?_[M]:l[u][M]}if(Xe(l,S)){var E=l[S];if(Xe(E,M))return E[M]}return l[u][M]}function m(b){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return s(b,"commutative",M)}function d(b){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return s(b,"associative",M)}function h(b,M){var A=BD({},b);for(var S in M)Xe(b,S)?A[S]=BD(BD({},M[S]),b[S]):A[S]=M[S];return A}function x(b,M){if(!b.args||b.args.length===0)return b;b.args=v(b,M);for(var A=0;A2&&d(b,M)){for(var _=b.args.pop();b.args.length>0;)_=A([b.args.pop(),_]);b.args=_.args}}}function w(b,M){if(!(!b.args||b.args.length===0)){for(var A=C(b),S=b.args.length,O=0;O2&&d(b,M)){for(var _=b.args.shift();b.args.length>0;)_=A([_,b.args.shift()]);b.args=_.args}}}function C(b){return ct(b)?function(M){try{return new t(b.op,b.fn,M,b.implicit)}catch(A){return console.error(A),[]}}:function(M){return new r(new n(b.name),M)}}return{createMakeNodeFunction:C,hasProperty:s,isCommutative:m,isAssociative:d,mergeContext:h,flatten:x,allChildren:v,unflattenr:y,unflattenl:w,defaultContext:l,realContext:c,positiveContext:o}});var hV="simplify",vV=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],Xg=F(hV,vV,e=>{var{config:r,typed:t,parse:n,add:a,subtract:i,multiply:u,divide:l,pow:c,isZero:o,equal:s,resolve:m,simplifyConstant:d,simplifyCore:h,fraction:x,bignumber:v,mathWithTransform:y,matrix:w,AccessorNode:C,ArrayNode:b,ConstantNode:M,FunctionNode:A,IndexNode:S,ObjectNode:O,OperatorNode:_,ParenthesisNode:E,SymbolNode:T}=e,{hasProperty:R,isCommutative:q,isAssociative:W,mergeContext:G,flatten:H,unflattenr:L,unflattenl:k,createMakeNodeFunction:K,defaultContext:z,realContext:oe,positiveContext:pe}=cf({FunctionNode:A,OperatorNode:_,SymbolNode:T});t.addConversion({from:"Object",to:"Map",convert:Ki});var ae=t("simplify",{Node:xe,"Node, Map":(j,ne)=>xe(j,!1,ne),"Node, Map, Object":(j,ne,ue)=>xe(j,!1,ne,ue),"Node, Array":xe,"Node, Array, Map":xe,"Node, Array, Map, Object":xe});t.removeConversion({from:"Object",to:"Map",convert:Ki}),ae.defaultContext=z,ae.realContext=oe,ae.positiveContext=pe;function $(j){return j.transform(function(ne,ue,Me){return en(ne)?$(ne.content):ne})}var le={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};ae.rules=[h,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},d,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},d,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function Ee(j,ne){var ue={};if(j.s){var Me=j.s.split("->");if(Me.length===2)ue.l=Me[0],ue.r=Me[1];else throw SyntaxError("Could not parse rule: "+j.s)}else ue.l=j.l,ue.r=j.r;ue.l=$(n(ue.l)),ue.r=$(n(ue.r));for(var Ce of["imposeContext","repeat","assuming"])Ce in j&&(ue[Ce]=j[Ce]);if(j.evaluate&&(ue.evaluate=n(j.evaluate)),W(ue.l,ne)){var Le=!q(ue.l,ne),Ie;Le&&(Ie=Se());var fr=K(ue.l),or=Se();ue.expanded={},ue.expanded.l=fr([ue.l,or]),H(ue.expanded.l,ne),L(ue.expanded.l,ne),ue.expanded.r=fr([ue.r,or]),Le&&(ue.expandedNC1={},ue.expandedNC1.l=fr([Ie,ue.l]),ue.expandedNC1.r=fr([Ie,ue.r]),ue.expandedNC2={},ue.expandedNC2.l=fr([Ie,ue.expanded.l]),ue.expandedNC2.r=fr([Ie,ue.expanded.r]))}return ue}function me(j,ne){for(var ue=[],Me=0;Me2&&arguments[2]!==void 0?arguments[2]:Oo(),Me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Ce=Me.consoleDebug;ne=me(ne||ae.rules,Me.context);var Le=m(j,ue);Le=$(Le);for(var Ie={},fr=Le.toString({parenthesis:"all"});!Ie[fr];){Ie[fr]=!0,ge=0;var or=fr;Ce&&console.log("Working on: ",fr);for(var Ke=0;Ke ").concat(ne[Ke].r.toString()))),Ce){var ee=Le.toString({parenthesis:"all"});ee!==or&&(console.log("Applying",Pr,"produced",ee),or=ee)}k(Le,Me.context)}fr=Le.toString({parenthesis:"all"})}return Le}function be(j,ne,ue){var Me=j;if(j)for(var Ce=0;Ce1&&(or=Le(j.args.slice(0,fr))),Ce=j.args.slice(fr),Me=Ce.length===1?Ce[0]:Le(Ce),ue.push(Le([or,Me]))}return ue}function We(j,ne){var ue={placeholders:{}};if(!j.placeholders&&!ne.placeholders)return ue;if(j.placeholders){if(!ne.placeholders)return j}else return ne;for(var Me in j.placeholders)if(Xe(j.placeholders,Me)&&(ue.placeholders[Me]=j.placeholders[Me],Xe(ne.placeholders,Me)&&!ye(j.placeholders[Me],ne.placeholders[Me])))return null;for(var Ce in ne.placeholders)Xe(ne.placeholders,Ce)&&(ue.placeholders[Ce]=ne.placeholders[Ce]);return ue}function Je(j,ne){var ue=[];if(j.length===0||ne.length===0)return ue;for(var Me,Ce=0;Ce2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var or=re(j.args[0],ne.args[1],ue);if(or.length===0)return[];var Ke=re(j.args[1],ne.args[0],ue);if(Ke.length===0)return[];Le=[or,Ke]}Ce=J(Le)}else if(ne.args.length>=2&&j.args.length===2){for(var Pr=Ae(ne,ue),ee=[],ce=0;ce2)throw Error("Unexpected non-binary associative function: "+j.toString());return[]}}else if(j instanceof T){if(j.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(le[j.name]){if(j.name!==ne.name)return[]}else switch(j.name[1]>="a"&&j.name[1]<="z"?j.name.substring(0,2):j.name[0]){case"n":case"_p":Ce[0].placeholders[j.name]=ne;break;case"c":case"cl":if(yr(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"v":if(!yr(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"vl":if(at(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"cd":if(OD(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"vd":if(!OD(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"ce":if(qc(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"ve":if(!qc(ne))Ce[0].placeholders[j.name]=ne;else return[];break;default:throw new Error("Invalid symbol in rule: "+j.name)}}else if(j instanceof M){if(!s(j.value,ne.value))return[]}else return[];return Ce}function ye(j,ne){if(j instanceof M&&ne instanceof M){if(!s(j.value,ne.value))return!1}else if(j instanceof T&&ne instanceof T){if(j.name!==ne.name)return!1}else if(j instanceof _&&ne instanceof _||j instanceof A&&ne instanceof A){if(j instanceof _){if(j.op!==ne.op||j.fn!==ne.fn)return!1}else if(j instanceof A&&j.name!==ne.name)return!1;if(j.args.length!==ne.args.length)return!1;for(var ue=0;ue{var{typed:r,config:t,mathWithTransform:n,matrix:a,fraction:i,bignumber:u,AccessorNode:l,ArrayNode:c,ConstantNode:o,FunctionNode:s,IndexNode:m,ObjectNode:d,OperatorNode:h,SymbolNode:x}=e,{isCommutative:v,isAssociative:y,allChildren:w,createMakeNodeFunction:C}=cf({FunctionNode:s,OperatorNode:h,SymbolNode:x}),b=r("simplifyConstant",{Node:H=>O(G(H,{})),"Node, Object":function(L,k){return O(G(L,k))}});function M(H){return ma(H)?H.valueOf():H instanceof Array?H.map(M):Qe(H)?a(M(H.valueOf())):H}function A(H,L,k){try{return n[H].apply(null,L)}catch{return L=L.map(M),E(n[H].apply(null,L),k)}}var S=r({Fraction:R,number:function(L){return L<0?T(new o(-L)):new o(L)},BigNumber:function(L){return L<0?T(new o(-L)):new o(L)},Complex:function(L){throw new Error("Cannot convert Complex number to Node")},string:function(L){return new o(L)},Matrix:function(L){return new c(L.valueOf().map(k=>S(k)))}});function O(H){return Nr(H)?H:S(H)}function _(H,L){var k=L&&L.exactFractions!==!1;if(k&&isFinite(H)&&i){var K=i(H),z=L&&typeof L.fractionsLimit=="number"?L.fractionsLimit:1/0;if(K.valueOf()===H&&K.n0;)if(yr(K[0])&&typeof K[0].value!="string"){var z=E(K.shift().value,k);jt(H)?H=H.items[z-1]:(H=H.valueOf()[z-1],H instanceof Array&&(H=a(H)))}else if(K.length>1&&yr(K[1])&&typeof K[1].value!="string"){var oe=E(K[1].value,k),pe=[],ae=jt(H)?H.items:H.valueOf();for(var $ of ae)if(jt($))pe.push($.items[oe-1]);else if(Qe(H))pe.push($[oe-1]);else break;if(pe.length===ae.length)jt(H)?H=new c(pe):H=a(pe),K.splice(1,1);else break}else break;return K.length===L.dimensions.length?new l(O(H),L):K.length>0?(L=new m(K),new l(O(H),L)):H}if(Ci(H)&&L.dimensions.length===1&&yr(L.dimensions[0])){var le=L.dimensions[0].value;return le in H.properties?H.properties[le]:new o}return new l(O(H),L)}function W(H,L,k,K){var z=L.shift(),oe=L.reduce((pe,ae)=>{if(!Nr(ae)){var $=pe.pop();if(Nr($))return[$,ae];try{return pe.push(A(H,[$,ae],K)),pe}catch{pe.push($)}}pe.push(O(pe.pop()));var le=pe.length===1?pe[0]:k(pe);return[k([le,O(ae)])]},[z]);return oe.length===1?oe[0]:k([oe[0],S(oe[1])])}function G(H,L){switch(H.type){case"SymbolNode":return H;case"ConstantNode":switch(typeof H.value){case"number":return E(H.value,L);case"string":return H.value;default:if(!isNaN(H.value))return E(H.value,L)}return H;case"FunctionNode":if(n[H.name]&&n[H.name].rawArgs)return H;{var k=["add","multiply"];if(k.indexOf(H.name)===-1){var K=H.args.map(De=>G(De,L));if(!K.some(Nr))try{return A(H.name,K,L)}catch{}if(H.name==="size"&&K.length===1&&jt(K[0])){for(var z=[],oe=K[0];jt(oe);)z.push(oe.items.length),oe=oe.items[0];return a(z)}return new s(H.name,K.map(O))}}case"OperatorNode":{var pe=H.fn.toString(),ae,$,le=C(H);if(ct(H)&&H.isUnary())ae=[G(H.args[0],L)],Nr(ae[0])?$=le(ae):$=A(pe,ae,L);else if(y(H,L.context))if(ae=w(H,L.context),ae=ae.map(De=>G(De,L)),v(pe,L.context)){for(var Ee=[],me=[],ge=0;ge1?($=W(pe,Ee,le,L),me.unshift($),$=W(pe,me,le,L)):$=W(pe,ae,le,L)}else $=W(pe,ae,le,L);else ae=H.args.map(De=>G(De,L)),$=W(pe,ae,le,L);return $}case"ParenthesisNode":return G(H.content,L);case"AccessorNode":return q(G(H.object,L),G(H.index,L),L);case"ArrayNode":{var Se=H.items.map(De=>G(De,L));return Se.some(Nr)?new c(Se.map(O)):a(Se)}case"IndexNode":return new m(H.dimensions.map(De=>b(De,L)));case"ObjectNode":{var xe={};for(var be in H.properties)xe[be]=b(H.properties[be],L);return new d(xe)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(H.type))}}return b});var aP="simplifyCore",yV=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],Kg=F(aP,yV,e=>{var{typed:r,parse:t,equal:n,isZero:a,add:i,subtract:u,multiply:l,divide:c,pow:o,AccessorNode:s,ArrayNode:m,ConstantNode:d,FunctionNode:h,IndexNode:x,ObjectNode:v,OperatorNode:y,ParenthesisNode:w,SymbolNode:C}=e,b=new d(0),M=new d(1),A=new d(!0),S=new d(!1);function O(R){return ct(R)&&["and","not","or"].includes(R.op)}var{hasProperty:_,isCommutative:E}=cf({FunctionNode:h,OperatorNode:y,SymbolNode:C});function T(R){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=q?q.context:void 0;if(_(R,"trivial",W)){if(gn(R)&&R.args.length===1)return T(R.args[0],q);var G=!1,H=0;if(R.forEach(me=>{++H,H===1&&(G=T(me,q))}),H===1)return G}var L=R;if(gn(L)){var k=rT(L.name);if(k){if(L.args.length>2&&_(L,"associative",W))for(;L.args.length>2;){var K=L.args.pop(),z=L.args.pop();L.args.push(new y(k,L.name,[K,z]))}L=new y(k,L.name,L.args)}else return new h(T(L.fn),L.args.map(me=>T(me,q)))}if(ct(L)&&L.isUnary()){var oe=T(L.args[0],q);if(L.op==="~"&&ct(oe)&&oe.isUnary()&&oe.op==="~"||L.op==="not"&&ct(oe)&&oe.isUnary()&&oe.op==="not"&&O(oe.args[0]))return oe.args[0];var pe=!0;if(L.op==="-"&&ct(oe)&&(oe.isBinary()&&oe.fn==="subtract"&&(L=new y("-","subtract",[oe.args[1],oe.args[0]]),pe=!1),oe.isUnary()&&oe.op==="-"))return oe.args[0];if(pe)return new y(L.op,L.fn,[oe])}if(ct(L)&&L.isBinary()){var ae=T(L.args[0],q),$=T(L.args[1],q);if(L.op==="+"){if(yr(ae)&&a(ae.value))return $;if(yr($)&&a($.value))return ae;ct($)&&$.isUnary()&&$.op==="-"&&($=$.args[0],L=new y("-","subtract",[ae,$]))}if(L.op==="-")return ct($)&&$.isUnary()&&$.op==="-"?T(new y("+","add",[ae,$.args[0]]),q):yr(ae)&&a(ae.value)?T(new y("-","unaryMinus",[$])):yr($)&&a($.value)?ae:new y(L.op,L.fn,[ae,$]);if(L.op==="*"){if(yr(ae)){if(a(ae.value))return b;if(n(ae.value,1))return $}if(yr($)){if(a($.value))return b;if(n($.value,1))return ae;if(E(L,W))return new y(L.op,L.fn,[$,ae],L.implicit)}return new y(L.op,L.fn,[ae,$],L.implicit)}if(L.op==="/")return yr(ae)&&a(ae.value)?b:yr($)&&n($.value,1)?ae:new y(L.op,L.fn,[ae,$]);if(L.op==="^"&&yr($)){if(a($.value))return M;if(n($.value,1))return ae}if(L.op==="and"){if(yr(ae))if(ae.value){if(O($))return $;if(yr($))return $.value?A:S}else return S;if(yr($))if($.value){if(O(ae))return ae}else return S}if(L.op==="or"){if(yr(ae)){if(ae.value)return A;if(O($))return $}if(yr($)){if($.value)return A;if(O(ae))return ae}}return new y(L.op,L.fn,[ae,$])}if(ct(L))return new y(L.op,L.fn,L.args.map(me=>T(me,q)));if(jt(L))return new m(L.items.map(me=>T(me,q)));if(qn(L))return new s(T(L.object,q),T(L.index,q));if(Qn(L))return new x(L.dimensions.map(me=>T(me,q)));if(Ci(L)){var le={};for(var Ee in L.properties)le[Ee]=T(L.properties[Ee],q);return new v(le)}return L}return r(aP,{Node:T,"Node,Object":T})});var bV="resolve",wV=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],jg=F(bV,wV,e=>{var{typed:r,parse:t,ConstantNode:n,FunctionNode:a,OperatorNode:i,ParenthesisNode:u}=e;function l(c,o){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!o)return c;if(at(c)){if(s.has(c.name)){var m=Array.from(s).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(m,"}"))}var d=o.get(c.name);if(Nr(d)){var h=new Set(s);return h.add(c.name),l(d,o,h)}else return typeof d=="number"?t(String(d)):d!==void 0?new n(d):c}else if(ct(c)){var x=c.args.map(function(y){return l(y,o,s)});return new i(c.op,c.fn,x,c.implicit)}else{if(en(c))return new u(l(c.content,o,s));if(gn(c)){var v=c.args.map(function(y){return l(y,o,s)});return new a(c.name,v)}}return c.map(y=>l(y,o,s))}return r("resolve",{Node:l,"Node, Map | null | undefined":l,"Node, Object":(c,o)=>l(c,Ki(o)),"Array | Matrix":r.referToSelf(c=>o=>o.map(s=>c(s))),"Array | Matrix, null | undefined":r.referToSelf(c=>o=>o.map(s=>c(s))),"Array, Object":r.referTo("Array,Map",c=>(o,s)=>c(o,Ki(s))),"Matrix, Object":r.referTo("Matrix,Map",c=>(o,s)=>c(o,Ki(s))),"Array | Matrix, Map":r.referToSelf(c=>(o,s)=>o.map(m=>c(m,s)))})});var iP="symbolicEqual",DV=["parse","simplify","typed","OperatorNode"],e0=F(iP,DV,e=>{var{parse:r,simplify:t,typed:n,OperatorNode:a}=e;function i(u,l){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=new a("-","subtract",[u,l]),s=t(o,{},c);return yr(s)&&!s.value}return n(iP,{"Node, Node":i,"Node, Node, Object":i})});var oP="derivative",SV=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],r0=F(oP,SV,e=>{var{typed:r,config:t,parse:n,simplify:a,equal:i,isZero:u,numeric:l,ConstantNode:c,FunctionNode:o,OperatorNode:s,ParenthesisNode:m,SymbolNode:d}=e;function h(b,M){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},S={};y(S,b,M.name);var O=w(b,S);return A.simplify?a(O):O}r.addConversion({from:"identifier",to:"SymbolNode",convert:n});var x=r(oP,{"Node, SymbolNode":h,"Node, SymbolNode, Object":h});r.removeConversion({from:"identifier",to:"SymbolNode",convert:n}),x._simplify=!0,x.toTex=function(b){return v.apply(null,b.args)};var v=r("_derivTex",{"Node, SymbolNode":function(M,A){return yr(M)&&Fr(M.value)==="string"?v(n(M.value).toString(),A.toString(),1):v(M.toTex(),A.toString(),1)},"Node, ConstantNode":function(M,A){if(Fr(A.value)==="string")return v(M,n(A.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(M,A,S){return v(M.toString(),A.name,S.value)},"string, string, number":function(M,A,S){var O;return S===1?O="{d\\\\over d"+A+"}":O="{d^{"+S+"}\\\\over d"+A+"^{"+S+"}}",O+"\\\\left[".concat(M,"\\\\right]")}}),y=r("constTag",{"Object, ConstantNode, string":function(M,A){return M[A]=!0,!0},"Object, SymbolNode, string":function(M,A,S){return A.name!==S?(M[A]=!0,!0):!1},"Object, ParenthesisNode, string":function(M,A,S){return y(M,A.content,S)},"Object, FunctionAssignmentNode, string":function(M,A,S){return A.params.indexOf(S)===-1?(M[A]=!0,!0):y(M,A.expr,S)},"Object, FunctionNode | OperatorNode, string":function(M,A,S){if(A.args.length>0){for(var O=y(M,A.args[0],S),_=1;_0){var O=M.args.filter(function(H){return A[H]===void 0}),_=O.length===1?O[0]:new s("*","multiply",O),E=S.concat(w(_,A));return new s("*","multiply",E)}return new s("+","add",M.args.map(function(H){return new s("*","multiply",M.args.map(function(L){return L===H?w(L,A):L.clone()}))}))}if(M.op==="/"&&M.isBinary()){var T=M.args[0],R=M.args[1];return A[R]!==void 0?new s("/","divide",[w(T,A),R]):A[T]!==void 0?new s("*","multiply",[new s("-","unaryMinus",[T]),new s("/","divide",[w(R,A),new s("^","pow",[R.clone(),C(2)])])]):new s("/","divide",[new s("-","subtract",[new s("*","multiply",[w(T,A),R.clone()]),new s("*","multiply",[T.clone(),w(R,A)])]),new s("^","pow",[R.clone(),C(2)])])}if(M.op==="^"&&M.isBinary()){var q=M.args[0],W=M.args[1];if(A[q]!==void 0)return yr(q)&&(u(q.value)||i(q.value,1))?C(0):new s("*","multiply",[M,new s("*","multiply",[new o("log",[q.clone()]),w(W.clone(),A)])]);if(A[W]!==void 0){if(yr(W)){if(u(W.value))return C(0);if(i(W.value,1))return w(q,A)}var G=new s("^","pow",[q.clone(),new s("-","subtract",[W,C(1)])]);return new s("*","multiply",[W.clone(),new s("*","multiply",[w(q,A),G])])}return new s("*","multiply",[new s("^","pow",[q.clone(),W.clone()]),new s("+","add",[new s("*","multiply",[w(q,A),new s("/","divide",[W.clone(),q.clone()])]),new s("*","multiply",[w(W,A),new o("log",[q.clone()])])])])}throw new Error('Cannot process operator "'+M.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function C(b,M){return new c(l(b,M||t.number))}return x});var sP="rationalize",NV=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],t0=F(sP,NV,e=>{var{config:r,typed:t,equal:n,isZero:a,add:i,subtract:u,multiply:l,divide:c,pow:o,parse:s,simplifyConstant:m,simplifyCore:d,simplify:h,fraction:x,bignumber:v,mathWithTransform:y,matrix:w,AccessorNode:C,ArrayNode:b,ConstantNode:M,FunctionNode:A,IndexNode:S,ObjectNode:O,OperatorNode:_,SymbolNode:E,ParenthesisNode:T}=e;function R(L){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,z=W(),oe=q(L,k,!0,z.firstRules),pe=oe.variables.length,ae={exactFractions:!1},$={exactFractions:!0};if(L=oe.expression,pe>=1){L=G(L);var le,Ee,me=!0,ge=!1;L=h(L,z.firstRules,{},ae);for(var Se;Ee=me?z.distrDivRules:z.sucDivRules,L=h(L,Ee,{},$),me=!me,Se=L.toString(),Se!==le;)ge=!0,le=Se;ge&&(L=h(L,z.firstRulesAgain,{},ae)),L=h(L,z.finalRules,{},ae)}var xe=[],be={};return L.type==="OperatorNode"&&L.isBinary()&&L.op==="/"?(pe===1&&(L.args[0]=H(L.args[0],xe),L.args[1]=H(L.args[1])),K&&(be.numerator=L.args[0],be.denominator=L.args[1])):(pe===1&&(L=H(L,xe)),K&&(be.numerator=L,be.denominator=null)),K?(be.coefficients=xe,be.variables=oe.variables,be.expression=L,be):L}return t(sP,{Node:R,"Node, boolean":(L,k)=>R(L,{},k),"Node, Object":R,"Node, Object, boolean":R});function q(L,k,K,z){var oe=[],pe=h(L,z,k,{exactFractions:!1});K=!!K;var ae="+-*"+(K?"/":"");le(pe);var $={};return $.expression=pe,$.variables=oe,$;function le(Ee){var me=Ee.type;if(me==="FunctionNode")throw new Error("There is an unsolved function call");if(me==="OperatorNode")if(Ee.op==="^"){if(Ee.args[1].type!=="ConstantNode"||!Ze(parseFloat(Ee.args[1].value)))throw new Error("There is a non-integer exponent");le(Ee.args[0])}else{if(ae.indexOf(Ee.op)===-1)throw new Error("Operator "+Ee.op+" invalid in polynomial expression");for(var ge=0;ge1;if(z==="OperatorNode"&&L.isBinary()){var pe=!1,ae;if(L.op==="^"&&(L.args[0].type==="ParenthesisNode"||L.args[0].type==="OperatorNode")&&L.args[1].type==="ConstantNode"&&(ae=parseFloat(L.args[1].value),pe=ae>=2&&Ze(ae)),pe){if(ae>2){var $=L.args[0],le=new _("^","pow",[L.args[0].cloneDeep(),new M(ae-1)]);L=new _("*","multiply",[$,le])}else L=new _("*","multiply",[L.args[0],L.args[0].cloneDeep()]);oe&&(K==="content"?k.content=L:k.args[K]=L)}}if(z==="ParenthesisNode")G(L.content,L,"content");else if(z!=="ConstantNode"&&z!=="SymbolNode")for(var Ee=0;Ee=0;$--)if(k[$]!==0){var le=new M(pe?k[$]:Math.abs(k[$])),Ee=k[$]<0?"-":"+";if($>0){var me=new E(oe);if($>1){var ge=new M($);me=new _("^","pow",[me,ge])}k[$]===-1&&pe?le=new _("-","unaryMinus",[me]):Math.abs(k[$])===1?le=me:le=new _("*","multiply",[le,me])}pe?ae=le:Ee==="+"?ae=new _("+","add",[ae,le]):ae=new _("-","subtract",[ae,le]),pe=!1}if(pe)return new M(0);return ae;function Se(xe,be,De){var Ae=xe.type;if(Ae==="FunctionNode")throw new Error("There is an unsolved function call");if(Ae==="OperatorNode"){if("+-*^".indexOf(xe.op)===-1)throw new Error("Operator "+xe.op+" invalid");if(be!==null){if((xe.fn==="unaryMinus"||xe.fn==="pow")&&be.fn!=="add"&&be.fn!=="subtract"&&be.fn!=="multiply")throw new Error("Invalid "+xe.op+" placing");if((xe.fn==="subtract"||xe.fn==="add"||xe.fn==="multiply")&&be.fn!=="add"&&be.fn!=="subtract")throw new Error("Invalid "+xe.op+" placing");if((xe.fn==="subtract"||xe.fn==="add"||xe.fn==="unaryMinus")&&De.noFil!==0)throw new Error("Invalid "+xe.op+" placing")}(xe.op==="^"||xe.op==="*")&&(De.fire=xe.op);for(var We=0;Wez&&(k[Je]=0),k[Je]+=De.cte*(De.oper==="+"?1:-1),z=Math.max(Je,z);return}De.cte=Je,De.fire===""&&(k[0]+=De.cte*(De.oper==="+"?1:-1))}else throw new Error("Type "+Ae+" is not allowed")}}});var uP="zpk2tf",AV=["typed","add","multiply","Complex","number"],n0=F(uP,AV,e=>{var{typed:r,add:t,multiply:n,Complex:a,number:i}=e;return r(uP,{"Array,Array,number":function(o,s,m){return u(o,s,m)},"Array,Array":function(o,s){return u(o,s,1)},"Matrix,Matrix,number":function(o,s,m){return u(o.valueOf(),s.valueOf(),m)},"Matrix,Matrix":function(o,s){return u(o.valueOf(),s.valueOf(),1)}});function u(c,o,s){c.some(C=>C.type==="BigNumber")&&(c=c.map(C=>i(C))),o.some(C=>C.type==="BigNumber")&&(o=o.map(C=>i(C)));for(var m=[a(1,0)],d=[a(1,0)],h=0;h=0&&m-d{var{typed:r,add:t,multiply:n,Complex:a,divide:i,matrix:u}=e;return r(fP,{"Array, Array":function(s,m){var d=c(512);return l(s,m,d)},"Array, Array, Array":function(s,m,d){return l(s,m,d)},"Array, Array, number":function(s,m,d){if(d<0)throw new Error("w must be a positive number");var h=c(d);return l(s,m,h)},"Matrix, Matrix":function(s,m){var d=c(512),{w:h,h:x}=l(s.valueOf(),m.valueOf(),d);return{w:u(h),h:u(x)}},"Matrix, Matrix, Matrix":function(s,m,d){var{h}=l(s.valueOf(),m.valueOf(),d.valueOf());return{h:u(h),w:u(d)}},"Matrix, Matrix, number":function(s,m,d){if(d<0)throw new Error("w must be a positive number");var h=c(d),{h:x}=l(s.valueOf(),m.valueOf(),h);return{h:u(x),w:u(h)}}});function l(o,s,m){for(var d=[],h=[],x=0;x{var{classes:r}=e;return function(n,a){var i=r[a&&a.mathjs];return i&&typeof i.fromJSON=="function"?i.fromJSON(a):a}});var TV="replacer",FV=[],o0=F(TV,FV,()=>function(r,t){return typeof t=="number"&&(!isFinite(t)||isNaN(t))?{mathjs:"number",value:String(t)}:t});var cP="12.4.1";var s0=F("true",[],()=>!0),u0=F("false",[],()=>!1),f0=F("null",[],()=>null),c0=va("Infinity",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1/0):1/0}),l0=va("NaN",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(NaN):NaN}),m0=va("pi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?Ic(t):HM}),p0=va("tau",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?mE(t):$M}),d0=va("e",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?cE(t):GM}),h0=va("phi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?lE(t):VM}),v0=va("LN2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).ln():Math.LN2}),g0=va("LN10",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(10).ln():Math.LN10}),x0=va("LOG2E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(2).ln()):Math.LOG2E}),y0=va("LOG10E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(10).ln()):Math.LOG10E}),b0=va("SQRT1_2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t("0.5").sqrt():Math.SQRT1_2}),w0=va("SQRT2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).sqrt():Math.SQRT2}),D0=va("i",["Complex"],e=>{var{Complex:r}=e;return r.I}),lP=F("PI",["pi"],e=>{var{pi:r}=e;return r}),mP=F("E",["e"],e=>{var{e:r}=e;return r}),S0=F("version",[],()=>cP);function va(e,r,t){return F(e,r,t,{recreateOnConfigChange:!0})}var N0=Er("speedOfLight","299792458","m s^-1"),A0=Er("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),M0=Er("planckConstant","6.62607015e-34","J s"),C0=Er("reducedPlanckConstant","1.0545718176461565e-34","J s"),E0=Er("magneticConstant","1.25663706212e-6","N A^-2"),T0=Er("electricConstant","8.8541878128e-12","F m^-1"),F0=Er("vacuumImpedance","376.730313667","ohm"),_0=Er("coulomb","8.987551792261171e9","N m^2 C^-2"),O0=Er("elementaryCharge","1.602176634e-19","C"),B0=Er("bohrMagneton","9.2740100783e-24","J T^-1"),P0=Er("conductanceQuantum","7.748091729863649e-5","S"),I0=Er("inverseConductanceQuantum","12906.403729652257","ohm"),R0=Er("magneticFluxQuantum","2.0678338484619295e-15","Wb"),k0=Er("nuclearMagneton","5.0507837461e-27","J T^-1"),q0=Er("klitzing","25812.807459304513","ohm");var L0=Er("bohrRadius","5.29177210903e-11","m"),z0=Er("classicalElectronRadius","2.8179403262e-15","m"),U0=Er("electronMass","9.1093837015e-31","kg"),W0=Er("fermiCoupling","1.1663787e-5","GeV^-2"),Y0=bx("fineStructure",.0072973525693),H0=Er("hartreeEnergy","4.3597447222071e-18","J"),$0=Er("protonMass","1.67262192369e-27","kg"),G0=Er("deuteronMass","3.3435830926e-27","kg"),V0=Er("neutronMass","1.6749271613e-27","kg"),Z0=Er("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),Q0=Er("rydberg","10973731.568160","m^-1"),X0=Er("thomsonCrossSection","6.6524587321e-29","m^2"),J0=bx("weakMixingAngle",.2229),K0=bx("efimovFactor",22.7),j0=Er("atomicMass","1.66053906660e-27","kg"),ex=Er("avogadro","6.02214076e23","mol^-1"),rx=Er("boltzmann","1.380649e-23","J K^-1"),tx=Er("faraday","96485.33212331001","C mol^-1"),nx=Er("firstRadiation","3.7417718521927573e-16","W m^2"),ax=Er("loschmidt","2.686780111798444e25","m^-3"),ix=Er("gasConstant","8.31446261815324","J K^-1 mol^-1"),ox=Er("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),sx=Er("molarVolume","0.022413969545014137","m^3 mol^-1"),ux=bx("sackurTetrode",-1.16487052358),fx=Er("secondRadiation","0.014387768775039337","m K"),cx=Er("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),lx=Er("wienDisplacement","2.897771955e-3","m K"),mx=Er("molarMass","0.99999999965e-3","kg mol^-1"),px=Er("molarMassC12","11.9999999958e-3","kg mol^-1"),dx=Er("gravity","9.80665","m s^-2"),hx=Er("planckLength","1.616255e-35","m"),vx=Er("planckMass","2.176435e-8","kg"),gx=Er("planckTime","5.391245e-44","s"),xx=Er("planckCharge","1.87554603778e-18","C"),yx=Er("planckTemperature","1.416785e+32","K");function Er(e,r,t){var n=["config","Unit","BigNumber"];return F(e,n,a=>{var{config:i,Unit:u,BigNumber:l}=a,c=i.number==="BigNumber"?new l(r):parseFloat(r),o=new u(c,t);return o.fixPrefix=!0,o})}function bx(e,r){var t=["config","BigNumber"];return F(e,t,n=>{var{config:a,BigNumber:i}=n;return a.number==="BigNumber"?new i(r):r})}var _V="apply",OV=["typed","isInteger"],wx=F(_V,OV,e=>{var{typed:r,isInteger:t}=e,n=qo({typed:r,isInteger:t});return r("apply",{"...any":function(i){var u=i[1];sr(u)?i[1]=u-1:rr(u)&&(i[1]=u.minus(1));try{return n.apply(null,i)}catch(l){throw mt(l)}}})},{isTransformFunction:!0});var BV="column",PV=["typed","Index","matrix","range"],Dx=F(BV,PV,e=>{var{typed:r,Index:t,matrix:n,range:a}=e,i=Wu({typed:r,Index:t,matrix:n,range:a});return r("column",{"...any":function(l){var c=l.length-1,o=l[c];sr(o)&&(l[c]=o-1);try{return i.apply(null,l)}catch(s){throw mt(s)}}})},{isTransformFunction:!0});function lf(e,r,t){var n=e.filter(function(c){return at(c)&&!(c.name in r)&&!t.has(c.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var a=n.name,i=new Map,u=new Eu(t,i,new Set([a])),l=e.compile();return function(o){return i.set(a,o),l.evaluate(u)}}var IV="filter",RV=["typed"],Sx=F(IV,RV,e=>{var{typed:r}=e;function t(a,i,u){var l,c;return a[0]&&(l=a[0].compile().evaluate(u)),a[1]&&(at(a[1])||_a(a[1])?c=a[1].compile().evaluate(u):c=lf(a[1],i,u)),n(l,c)}t.rawArgs=!0;var n=r("filter",{"Array, function":pP,"Matrix, function":function(i,u){return i.create(pP(i.toArray(),u))},"Array, RegExp":Mu,"Matrix, RegExp":function(i,u){return i.create(Mu(i.toArray(),u))}});return t},{isTransformFunction:!0});function pP(e,r){return Om(e,function(t,n,a){return Ia(r,t,[n+1],a,"filter")})}var kV="forEach",qV=["typed"],Nx=F(kV,qV,e=>{var{typed:r}=e;function t(a,i,u){var l,c;return a[0]&&(l=a[0].compile().evaluate(u)),a[1]&&(at(a[1])||_a(a[1])?c=a[1].compile().evaluate(u):c=lf(a[1],i,u)),n(l,c)}t.rawArgs=!0;var n=r("forEach",{"Array | Matrix, function":function(i,u){var l=function c(o,s){if(Array.isArray(o))Fo(o,function(m,d){c(m,s.concat(d+1))});else return Ia(u,o,s,i,"forEach")};l(i.valueOf(),[])}});return t},{isTransformFunction:!0});var LV="index",zV=["Index","getMatrixDataType"],Ax=F(LV,zV,e=>{var{Index:r,getMatrixDataType:t}=e;return function(){for(var a=[],i=0,u=arguments.length;i0?0:2;else if(l&&l.isSet===!0)l=l.map(function(o){return o-1});else if(Mr(l)||Qe(l))t(l)!=="boolean"&&(l=l.map(function(o){return o-1}));else if(sr(l))l--;else if(rr(l))l=l.toNumber()-1;else if(typeof l!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");a[i]=l}var c=new r;return r.apply(c,a),c}},{isTransformFunction:!0});var UV="map",WV=["typed"],Mx=F(UV,WV,e=>{var{typed:r}=e;function t(a,i,u){var l,c;return a[0]&&(l=a[0].compile().evaluate(u)),a[1]&&(at(a[1])||_a(a[1])?c=a[1].compile().evaluate(u):c=lf(a[1],i,u)),n(l,c)}t.rawArgs=!0;var n=r("map",{"Array, function":function(i,u){return dP(i,u,i)},"Matrix, function":function(i,u){return i.create(dP(i.valueOf(),u,i))}});return t},{isTransformFunction:!0});function dP(e,r,t){function n(a,i){return Array.isArray(a)?Xn(a,function(u,l){return n(u,i.concat(l+1))}):Ia(r,a,i,t,"map")}return n(e,[])}function Cn(e){if(e.length===2&&Nt(e[0])){e=e.slice();var r=e[1];sr(r)?e[1]=r-1:rr(r)&&(e[1]=r.minus(1))}return e}var YV="max",HV=["typed","config","numeric","larger"],Cx=F(YV,HV,e=>{var{typed:r,config:t,numeric:n,larger:a}=e,i=ef({typed:r,config:t,numeric:n,larger:a});return r("max",{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var $V="mean",GV=["typed","add","divide"],Ex=F($V,GV,e=>{var{typed:r,add:t,divide:n}=e,a=of({typed:r,add:t,divide:n});return r("mean",{"...any":function(u){u=Cn(u);try{return a.apply(null,u)}catch(l){throw mt(l)}}})},{isTransformFunction:!0});var VV="min",ZV=["typed","config","numeric","smaller"],Tx=F(VV,ZV,e=>{var{typed:r,config:t,numeric:n,smaller:a}=e,i=rf({typed:r,config:t,numeric:n,smaller:a});return r("min",{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var QV="range",XV=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],Fx=F(QV,XV,e=>{var{typed:r,config:t,matrix:n,bignumber:a,smaller:i,smallerEq:u,larger:l,largerEq:c,add:o,isPositive:s}=e,m=$u({typed:r,config:t,matrix:n,bignumber:a,smaller:i,smallerEq:u,larger:l,largerEq:c,add:o,isPositive:s});return r("range",{"...any":function(h){var x=h.length-1,v=h[x];return typeof v!="boolean"&&h.push(!0),m.apply(null,h)}})},{isTransformFunction:!0});var JV="row",KV=["typed","Index","matrix","range"],_x=F(JV,KV,e=>{var{typed:r,Index:t,matrix:n,range:a}=e,i=Gu({typed:r,Index:t,matrix:n,range:a});return r("row",{"...any":function(l){var c=l.length-1,o=l[c];sr(o)&&(l[c]=o-1);try{return i.apply(null,l)}catch(s){throw mt(s)}}})},{isTransformFunction:!0});var jV="subset",eZ=["typed","matrix","zeros","add"],Ox=F(jV,eZ,e=>{var{typed:r,matrix:t,zeros:n,add:a}=e,i=Vu({typed:r,matrix:t,zeros:n,add:a});return r("subset",{"...any":function(l){try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var rZ="concat",tZ=["typed","matrix","isInteger"],Bx=F(rZ,tZ,e=>{var{typed:r,matrix:t,isInteger:n}=e,a=Uu({typed:r,matrix:t,isInteger:n});return r("concat",{"...any":function(u){var l=u.length-1,c=u[l];sr(c)?u[l]=c-1:rr(c)&&(u[l]=c.minus(1));try{return a.apply(null,u)}catch(o){throw mt(o)}}})},{isTransformFunction:!0});var hP="diff",nZ=["typed","matrix","subtract","number","bignumber"],Px=F(hP,nZ,e=>{var{typed:r,matrix:t,subtract:n,number:a,bignumber:i}=e,u=Yu({typed:r,matrix:t,subtract:n,number:a,bignumber:i});return r(hP,{"...any":function(c){c=Cn(c);try{return u.apply(null,c)}catch(o){throw mt(o)}}})},{isTransformFunction:!0});var aZ="std",iZ=["typed","map","sqrt","variance"],Ix=F(aZ,iZ,e=>{var{typed:r,map:t,sqrt:n,variance:a}=e,i=ff({typed:r,map:t,sqrt:n,variance:a});return r("std",{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var vP="sum",oZ=["typed","config","add","numeric"],Rx=F(vP,oZ,e=>{var{typed:r,config:t,add:n,numeric:a}=e,i=nf({typed:r,config:t,add:n,numeric:a});return r(vP,{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var sZ="quantileSeq",uZ=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],kx=F(sZ,uZ,e=>{var{typed:r,bignumber:t,add:n,subtract:a,divide:i,multiply:u,partitionSelect:l,compare:c,isInteger:o,smaller:s,smallerEq:m,larger:d}=e,h=uf({typed:r,bignumber:t,add:n,subtract:a,divide:i,multiply:u,partitionSelect:l,compare:c,isInteger:o,smaller:s,smallerEq:m,larger:d});return r("quantileSeq",{"Array | Matrix, number | BigNumber":h,"Array | Matrix, number | BigNumber, number":(v,y,w)=>h(v,y,x(w)),"Array | Matrix, number | BigNumber, boolean":h,"Array | Matrix, number | BigNumber, boolean, number":(v,y,w,C)=>h(v,y,w,x(C)),"Array | Matrix, Array | Matrix":h,"Array | Matrix, Array | Matrix, number":(v,y,w)=>h(v,y,x(w)),"Array | Matrix, Array | Matrix, boolean":h,"Array | Matrix, Array | Matrix, boolean, number":(v,y,w,C)=>h(v,y,w,x(C))});function x(v){return Cn([[],v])[1]}},{isTransformFunction:!0});var gP="cumsum",fZ=["typed","add","unaryPlus"],qx=F(gP,fZ,e=>{var{typed:r,add:t,unaryPlus:n}=e,a=af({typed:r,add:t,unaryPlus:n});return r(gP,{"...any":function(u){if(u.length===2&&Nt(u[0])){var l=u[1];sr(l)?u[1]=l-1:rr(l)&&(u[1]=l.minus(1))}try{return a.apply(null,u)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var xP="variance",cZ=["typed","add","subtract","multiply","divide","apply","isNaN"],Lx=F(xP,cZ,e=>{var{typed:r,add:t,subtract:n,multiply:a,divide:i,apply:u,isNaN:l}=e,c=sf({typed:r,add:t,subtract:n,multiply:a,divide:i,apply:u,isNaN:l});return r(xP,{"...any":function(s){s=Cn(s);try{return c.apply(null,s)}catch(m){throw mt(m)}}})},{isTransformFunction:!0});var yP="print",lZ=["typed","matrix","zeros","add"],zx=F(yP,lZ,e=>{var{typed:r,matrix:t,zeros:n,add:a}=e,i=Qu({typed:r,matrix:t,zeros:n,add:a});return r(yP,{"string, Object | Array":function(c,o){return i(u(c),o)},"string, Object | Array, number | Object":function(c,o,s){return i(u(c),o,s)}});function u(l){return l.replace(qd,c=>{var o=c.slice(1).split("."),s=o.map(function(m){return!isNaN(m)&&m.length>0?parseInt(m)-1:m});return"$"+s.join(".")})}},{isTransformFunction:!0});var mZ="and",pZ=["typed","matrix","zeros","add","equalScalar","not","concat"],Ux=F(mZ,pZ,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:u}=e,l=ju({typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:u});function c(o,s,m){var d=o[0].compile().evaluate(m);if(!Nt(d)&&!l(d,!0))return!1;var h=o[1].compile().evaluate(m);return l(d,h)}return c.rawArgs=!0,c},{isTransformFunction:!0});var dZ="or",hZ=["typed","matrix","equalScalar","DenseMatrix","concat"],Wx=F(dZ,hZ,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,u=zu({typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i});function l(c,o,s){var m=c[0].compile().evaluate(s);if(!Nt(m)&&u(m,!1))return!0;var d=c[1].compile().evaluate(s);return u(m,d)}return l.rawArgs=!0,l},{isTransformFunction:!0});var vZ="bitAnd",gZ=["typed","matrix","zeros","add","equalScalar","not","concat"],Yx=F(vZ,gZ,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:u}=e,l=qu({typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:u});function c(o,s,m){var d=o[0].compile().evaluate(m);if(!Nt(d)){if(isNaN(d))return NaN;if(d===0||d===!1)return 0}var h=o[1].compile().evaluate(m);return l(d,h)}return c.rawArgs=!0,c},{isTransformFunction:!0});var xZ="bitOr",yZ=["typed","matrix","equalScalar","DenseMatrix","concat"],Hx=F(xZ,yZ,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,u=Lu({typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i});function l(c,o,s){var m=c[0].compile().evaluate(s);if(!Nt(m)){if(isNaN(m))return NaN;if(m===-1)return-1;if(m===!0)return 1}var d=c[1].compile().evaluate(s);return u(m,d)}return l.rawArgs=!0,l},{isTransformFunction:!0});var Ge=Hm({config:Oe}),pt=$m({}),ID=d0({BigNumber:Ge,config:Oe}),bP=u0({}),wP=Y0({BigNumber:Ge,config:Oe}),Uo=Gm({}),RD=D0({Complex:pt}),DP=c0({BigNumber:Ge,config:Oe}),SP=g0({BigNumber:Ge,config:Oe}),NP=y0({BigNumber:Ge,config:Oe}),Lc=Zm({}),AP=l0({BigNumber:Ge,config:Oe}),MP=f0({}),CP=h0({BigNumber:Ge,config:Oe}),EP=Vm({}),kD=Rm({}),TP=b0({BigNumber:Ge,config:Oe}),FP=ux({BigNumber:Ge,config:Oe}),qD=p0({BigNumber:Ge,config:Oe}),_P=s0({}),OP=S0({}),_r=Xm({Matrix:Lc}),BP=K0({BigNumber:Ge,config:Oe}),PP=v0({BigNumber:Ge,config:Oe}),$x=m0({BigNumber:Ge,config:Oe}),IP=o0({}),RP=w0({BigNumber:Ge,config:Oe}),te=Im({BigNumber:Ge,Complex:pt,DenseMatrix:_r,Fraction:Uo}),Gx=Np({BigNumber:Ge,config:Oe,typed:te}),kP=J0({BigNumber:Ge,config:Oe}),En=Ap({typed:te}),qP=Oh({Complex:pt,config:Oe,typed:te}),LP=Ph({BigNumber:Ge,typed:te}),zP=Rh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),Qt=Cp({typed:te}),UP=jp({typed:te}),WP=Lh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),YP=Uh({typed:te}),LD=Wh({typed:te}),HP=Hh({Complex:pt,config:Oe,typed:te}),ea=hp({BigNumber:Ge,typed:te}),$P=Jp({typed:te}),GP=dp({typed:te}),VP=Jm({typed:te}),zc=Bg({typed:te}),Uc=vp({Complex:pt,typed:te}),Wo=ed({typed:te}),Vx=$h({typed:te}),ZP=Vh({BigNumber:Ge,typed:te}),QP=Qh({BigNumber:Ge,typed:te}),XP=_p({typed:te}),Ir=cp({config:Oe,typed:te}),JP=Fd({typed:te}),zD=Op({typed:te}),KP=Bp({Complex:pt,typed:te}),jP=ud({typed:te}),eI=cd({typed:te}),mf=Pd({typed:te}),Zx=ld({typed:te}),rI=kd({format:mf,typed:te}),Qx=rd({typed:te}),Ln=ep({typed:te}),no=tp({typed:te}),Yo=ip({typed:te}),qa=op({typed:te}),tI=x0({BigNumber:Ge,config:Oe}),nI=Rg({Complex:pt,typed:te}),aI=kp({Complex:pt,config:Oe,typed:te}),UD=qp({Complex:pt,config:Oe,typed:te}),Ho=dd({typed:te}),Ot=Lp({typed:te}),Wc=nd({typed:te}),Oi=mp({typed:te}),iI=Rd({format:mf,typed:te}),oI=Wg({config:Oe,typed:te}),sI=Qu({typed:te}),uI=Yg({config:Oe,typed:te}),Xx=td({typed:te}),fI=Jh({BigNumber:Ge,typed:te}),WD=Wp({BigNumber:Ge,Fraction:Uo,complex:Uc,typed:te}),Yc=jh({typed:te}),Bi=lp({Matrix:Lc,equalScalar:Ir,typed:te}),cI=Dp({typed:te}),lI=Hp({typed:te}),mI=pp({typed:te}),ga=Ep({typed:te}),pI=rv({typed:te}),YD=up({typed:te}),dI=Bh({Complex:pt,config:Oe,typed:te}),hI=kh({BigNumber:Ge,typed:te}),Jx=qo({isInteger:Ln,typed:te}),vI=qh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),gI=Id({format:mf,typed:te}),xI=Pg({typed:te}),yI=Gh({typed:te}),bI=Xh({BigNumber:Ge,typed:te}),pf=sp({typed:te}),wI=zd({typed:te}),DI=Hg({config:Oe,typed:te}),SI=Kh({BigNumber:Ge,typed:te}),NI=ev({typed:te}),AI=Fh({SparseMatrix:Bi,typed:te}),La=Yp({Complex:pt,config:Oe,typed:te}),MI=tv({typed:te}),fi=Sp({typed:te}),CI=Ih({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),EI=Zh({BigNumber:Ge,typed:te}),Bs=gp({Fraction:Uo,typed:te}),$o=np({typed:te}),$e=xp({DenseMatrix:_r,Matrix:Lc,SparseMatrix:Bi,typed:te}),TI=yp({isZero:qa,matrix:$e,typed:te}),FI=Od({isNaN:pf,isNumeric:$o,typed:te}),za=Ud({bignumber:ea,fraction:Bs,number:Oi}),HD=Bd({config:Oe,multiplyScalar:Ot,numeric:za,typed:te}),$D=xd({isInteger:Ln,matrix:$e,typed:te}),cn=Dd({matrix:$e,config:Oe,typed:te}),_I=Sd({matrix:$e,typed:te}),df=Nd({matrix:$e,typed:te}),GD=Gp({BigNumber:Ge,config:Oe,matrix:$e,typed:te}),ln=Md({BigNumber:Ge,config:Oe,matrix:$e,typed:te}),OI=zh({Complex:pt,config:Oe,typed:te}),VD=Tp({BigNumber:Ge,Complex:pt,Fraction:Uo,config:Oe,isNegative:no,matrix:$e,typed:te,unaryMinus:fi}),Gr=Uu({isInteger:Ln,matrix:$e,typed:te}),BI=id({prod:HD,size:cn,typed:te}),Kx=Ad({conj:Wo,transpose:df,typed:te}),ZD=sd({DenseMatrix:_r,SparseMatrix:Bi,matrix:$e,typed:te}),Mt=Wd({numeric:za,typed:te}),hf=Qd({DenseMatrix:_r,concat:Gr,divideScalar:Mt,equalScalar:Ir,matrix:$e,typed:te}),xa=uh({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),vf=fd({matrix:$e,typed:te}),PI=ap({isNumeric:$o,typed:te}),ao=md({BigNumber:Ge,DenseMatrix:_r,SparseMatrix:Bi,config:Oe,matrix:$e,typed:te}),II=pd({matrix:$e,multiplyScalar:Ot,typed:te}),Hc=gh({DenseMatrix:_r,concat:Gr,config:Oe,matrix:$e,typed:te}),RI=eh({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te,zeros:ln}),QD=Xd({DenseMatrix:_r,divideScalar:Mt,equalScalar:Ir,matrix:$e,multiplyScalar:Ot,subtractScalar:ga,typed:te}),jx=wp({flatten:vf,matrix:$e,size:cn,typed:te}),kI=Up({BigNumber:Ge,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),qI=hd({BigNumber:Ge,config:Oe,matrix:$e,typed:te}),ey=sg({addScalar:Qt,complex:Uc,conj:Wo,divideScalar:Mt,equal:xa,identity:ao,isZero:qa,matrix:$e,multiplyScalar:Ot,sign:WD,sqrt:La,subtractScalar:ga,typed:te,unaryMinus:fi,zeros:ln}),LI=yd({config:Oe,matrix:$e}),zI=rh({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te,zeros:ln}),Ps=Hd({BigNumber:Ge,DenseMatrix:_r,config:Oe,equalScalar:Ir,matrix:$e,typed:te,zeros:ln}),Tn=lh({DenseMatrix:_r,concat:Gr,config:Oe,matrix:$e,typed:te}),Bt=$p({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,subtractScalar:ga,typed:te,unaryMinus:fi}),UI=Ld({concat:Gr,matrix:$e,typed:te}),WI=bh({DenseMatrix:_r,concat:Gr,config:Oe,equalScalar:Ir,matrix:$e,typed:te}),ry=Jd({DenseMatrix:_r,divideScalar:Mt,equalScalar:Ir,matrix:$e,multiplyScalar:Ot,subtractScalar:ga,typed:te}),YI=ad({DenseMatrix:_r,concat:Gr,matrix:$e,typed:te}),Lr=pv({DenseMatrix:_r,SparseMatrix:Bi,addScalar:Qt,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),HI=Yh({BigNumber:Ge,DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),$I=qu({concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),GI=Lu({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),VI=Kp({DenseMatrix:_r,concat:Gr,matrix:$e,typed:te}),ZI=Vg({addScalar:Qt,combinations:zc,divideScalar:Mt,isInteger:Ln,isNegative:no,multiplyScalar:Ot,typed:te}),Go=ah({BigNumber:Ge,DenseMatrix:_r,Fraction:Uo,concat:Gr,config:Oe,equalScalar:Ir,matrix:$e,typed:te}),XD=oh({concat:Gr,matrix:$e,typed:te}),QI=af({add:Lr,typed:te,unaryPlus:Gx}),ty=xh({equal:xa,typed:te}),XI=Yu({matrix:$e,number:Oi,subtract:Bt,typed:te}),JI=Cg({abs:En,addScalar:Qt,deepEqual:ty,divideScalar:Mt,multiplyScalar:Ot,sqrt:La,subtractScalar:ga,typed:te}),$c=vv({addScalar:Qt,conj:Wo,multiplyScalar:Ot,size:cn,typed:te}),KI=fh({compareText:XD,isZero:qa,typed:te}),JD=Pu({DenseMatrix:_r,config:Oe,equalScalar:Ir,matrix:$e,round:Ps,typed:te,zeros:ln}),jI=Ip({BigNumber:Ge,DenseMatrix:_r,concat:Gr,config:Oe,equalScalar:Ir,matrix:$e,round:Ps,typed:te,zeros:ln}),e4=dv({abs:En,addScalar:Qt,divideScalar:Mt,isPositive:Yo,multiplyScalar:Ot,smaller:Tn,sqrt:La,typed:te}),KD=Sh({DenseMatrix:_r,smaller:Tn}),yn=Nh({ImmutableDenseMatrix:KD,getMatrixDataType:Zx}),Fn=hh({DenseMatrix:_r,concat:Gr,config:Oe,matrix:$e,typed:te}),ny=$d({Complex:pt,config:Oe,divideScalar:Mt,typed:te}),r4=Kd({DenseMatrix:_r,divideScalar:Mt,equalScalar:Ir,matrix:$e,multiplyScalar:Ot,subtractScalar:ga,typed:te}),t4=bp({flatten:vf,matrix:$e,size:cn,typed:te}),n4=rf({config:Oe,numeric:za,smaller:Tn,typed:te}),jD=Iu({DenseMatrix:_r,concat:Gr,config:Oe,equalScalar:Ir,matrix:$e,round:Ps,typed:te,zeros:ln}),it=zp({addScalar:Qt,dot:$c,equalScalar:Ir,matrix:$e,multiplyScalar:Ot,typed:te}),a4=Vd({Complex:pt,config:Oe,divideScalar:Mt,typed:te}),i4=zu({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),Gc=wh({compare:Go,isNaN:pf,isNumeric:$o,typed:te}),o4=th({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te,zeros:ln}),eS=cg({SparseMatrix:Bi,abs:En,add:Lr,divideScalar:Mt,larger:Fn,largerEq:Hc,multiply:it,subtract:Bt,transpose:df,typed:te}),ra=Vu({add:Lr,matrix:$e,typed:te,zeros:ln}),ay=nf({add:Lr,config:Oe,numeric:za,typed:te}),s4=gv({add:Lr,matrix:$e,typed:te}),rS=jd({DenseMatrix:_r,divideScalar:Mt,equalScalar:Ir,matrix:$e,multiplyScalar:Ot,subtractScalar:ga,typed:te}),u4=n0({Complex:pt,add:Lr,multiply:it,number:Oi,typed:te}),iy=Fp({DenseMatrix:_r,config:Oe,equalScalar:Ir,matrix:$e,round:Ps,typed:te,zeros:ln}),ci=ih({compare:Go,typed:te}),f4=Zg({addScalar:Qt,combinations:zc,isInteger:Ln,isNegative:no,isPositive:Yo,larger:Fn,typed:te}),c4=od({matrix:$e,multiply:it,subtract:Bt,typed:te}),tS=gg({divideScalar:Mt,isZero:qa,matrix:$e,multiply:it,subtractScalar:ga,typed:te,unaryMinus:fi}),l4=Qp({concat:Gr,equalScalar:Ir,matrix:$e,multiplyScalar:Ot,typed:te}),nS=Ah({larger:Fn,smaller:Tn}),aS=Pp({Complex:pt,DenseMatrix:_r,ceil:iy,equalScalar:Ir,floor:JD,matrix:$e,typed:te,zeros:ln}),iS=xv({Index:yn,typed:te}),m4=Eg({abs:En,add:Lr,addScalar:Qt,config:Oe,divideScalar:Mt,equalScalar:Ir,flatten:vf,isNumeric:$o,isZero:qa,matrix:$e,multiply:it,multiplyScalar:Ot,smaller:Tn,subtract:Bt,typed:te}),p4=Vp({BigNumber:Ge,add:Lr,config:Oe,equal:xa,isInteger:Ln,mod:jD,smaller:Tn,typed:te,xgcd:GD}),d4=Rp({concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),h4=Gd({Complex:pt,config:Oe,divideScalar:Mt,log:ny,typed:te}),oy=ef({config:Oe,larger:Fn,numeric:za,typed:te}),v4=nv({DenseMatrix:_r,Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),g4=iv({DenseMatrix:_r,Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),x4=sv({Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),y4=fv({Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),Is=ph({DenseMatrix:_r,concat:Gr,config:Oe,matrix:$e,typed:te}),b4=Dh({compare:Go,compareNatural:ci,matrix:$e,typed:te}),w4=ju({concat:Gr,equalScalar:Ir,matrix:$e,not:Wc,typed:te,zeros:ln}),Rs=$u({bignumber:ea,matrix:$e,add:Lr,config:Oe,isPositive:Yo,larger:Fn,largerEq:Hc,smaller:Tn,smallerEq:Is,typed:te}),D4=Gu({Index:yn,matrix:$e,range:Rs,typed:te}),oS=av({DenseMatrix:_r,Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),S4=uv({Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),sS=lv({Index:yn,concat:Gr,setDifference:oS,size:cn,subset:ra,typed:te}),uS=Mh({FibonacciHeap:nS,addScalar:Qt,equalScalar:Ir}),fS=Wu({Index:yn,matrix:$e,range:Rs,typed:te}),Vo=xg({abs:En,addScalar:Qt,det:tS,divideScalar:Mt,identity:ao,matrix:$e,multiply:it,typed:te,unaryMinus:fi}),cS=og({DenseMatrix:_r,Spa:uS,SparseMatrix:Bi,abs:En,addScalar:Qt,divideScalar:Mt,equalScalar:Ir,larger:Fn,matrix:$e,multiplyScalar:Ot,subtractScalar:ga,typed:te,unaryMinus:fi}),N4=yg({Complex:pt,add:Lr,ctranspose:Kx,deepEqual:ty,divideScalar:Mt,dot:$c,dotDivide:hf,equal:xa,inv:Vo,matrix:$e,multiply:it,typed:te}),ya=Yd({Complex:pt,config:Oe,fraction:Bs,identity:ao,inv:Vo,matrix:$e,multiply:it,number:Oi,typed:te}),lS=ov({DenseMatrix:_r,Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),A4=mv({Index:yn,concat:Gr,setIntersect:lS,setSymDifference:sS,size:cn,subset:ra,typed:te}),M4=Dg({abs:En,add:Lr,identity:ao,inv:Vo,map:Ho,max:oy,multiply:it,size:cn,sqrt:La,subtract:Bt,typed:te}),wr=Eh({BigNumber:Ge,Complex:pt,Fraction:Uo,abs:En,addScalar:Qt,config:Oe,divideScalar:Mt,equal:xa,fix:aS,format:mf,isNumeric:$o,multiplyScalar:Ot,number:Oi,pow:ya,round:Ps,subtractScalar:ga}),C4=F0({BigNumber:Ge,Unit:wr,config:Oe}),E4=lx({BigNumber:Ge,Unit:wr,config:Oe}),T4=j0({BigNumber:Ge,Unit:wr,config:Oe}),F4=B0({BigNumber:Ge,Unit:wr,config:Oe}),_4=rx({BigNumber:Ge,Unit:wr,config:Oe}),O4=P0({BigNumber:Ge,Unit:wr,config:Oe}),B4=_0({BigNumber:Ge,Unit:wr,config:Oe}),P4=G0({BigNumber:Ge,Unit:wr,config:Oe}),I4=Zd({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,pow:ya,typed:te}),R4=T0({BigNumber:Ge,Unit:wr,config:Oe}),k4=O0({BigNumber:Ge,Unit:wr,config:Oe}),q4=wg({abs:En,add:Lr,identity:ao,inv:Vo,multiply:it,typed:te}),L4=tx({BigNumber:Ge,Unit:wr,config:Oe}),mS=Cd({addScalar:Qt,ceil:iy,conj:Wo,divideScalar:Mt,dotDivide:hf,exp:zD,i:RD,log2:UD,matrix:$e,multiplyScalar:Ot,pow:ya,tau:qD,typed:te}),sy=Ig({BigNumber:Ge,Complex:pt,config:Oe,multiplyScalar:Ot,pow:ya,typed:te}),z4=A0({BigNumber:Ge,Unit:wr,config:Oe}),U4=H0({BigNumber:Ge,Unit:wr,config:Oe}),W4=Ed({conj:Wo,dotDivide:hf,fft:mS,typed:te}),Y4=q0({BigNumber:Ge,Unit:wr,config:Oe}),H4=ax({BigNumber:Ge,Unit:wr,config:Oe}),$4=E0({BigNumber:Ge,Unit:wr,config:Oe}),G4=mx({BigNumber:Ge,Unit:wr,config:Oe}),V4=ox({BigNumber:Ge,Unit:wr,config:Oe}),Z4=V0({BigNumber:Ge,Unit:wr,config:Oe}),Q4=k0({BigNumber:Ge,Unit:wr,config:Oe}),X4=xx({BigNumber:Ge,Unit:wr,config:Oe}),J4=hx({BigNumber:Ge,Unit:wr,config:Oe}),K4=yx({BigNumber:Ge,Unit:wr,config:Oe}),j4=$0({BigNumber:Ge,Unit:wr,config:Oe}),eR=Z0({BigNumber:Ge,Unit:wr,config:Oe}),rR=C0({BigNumber:Ge,Unit:wr,config:Oe}),tR=Q0({BigNumber:Ge,Unit:wr,config:Oe}),nR=fx({BigNumber:Ge,Unit:wr,config:Oe}),aR=N0({BigNumber:Ge,Unit:wr,config:Oe}),iR=cx({BigNumber:Ge,Unit:wr,config:Oe}),oR=X0({BigNumber:Ge,Unit:wr,config:Oe}),sR=ex({BigNumber:Ge,Unit:wr,config:Oe}),uR=L0({BigNumber:Ge,Unit:wr,config:Oe}),fR=_h({Unit:wr,typed:te}),an=Mg({divideScalar:Mt,equalScalar:Ir,inv:Vo,matrix:$e,multiply:it,typed:te}),cR=U0({BigNumber:Ge,Unit:wr,config:Oe}),gf=kg({gamma:sy,typed:te}),lR=nx({BigNumber:Ge,Unit:wr,config:Oe}),mR=dx({BigNumber:Ge,Unit:wr,config:Oe}),pR=I0({BigNumber:Ge,Unit:wr,config:Oe}),pS=lg({DenseMatrix:_r,lsolve:QD,lup:cS,matrix:$e,slu:eS,typed:te,usolve:ry}),dR=R0({BigNumber:Ge,Unit:wr,config:Oe}),hR=px({BigNumber:Ge,Unit:wr,config:Oe}),vR=Lg({add:Lr,divide:an,factorial:gf,isInteger:Ln,isPositive:Yo,multiply:it,typed:te}),gR=zg({factorial:gf,typed:te}),xR=vx({BigNumber:Ge,Unit:wr,config:Oe}),yR=mg({add:Lr,cbrt:VD,divide:an,equalScalar:Ir,im:Qx,isZero:qa,multiply:it,re:Xx,sqrt:La,subtract:Bt,typeOf:YD,typed:te,unaryMinus:fi}),bR=cv({compareNatural:ci,typed:te}),wR=Td({abs:En,add:Lr,bignumber:ea,divide:an,isNegative:no,isPositive:Yo,larger:Fn,map:Ho,matrix:$e,max:oy,multiply:it,smaller:Tn,subtract:Bt,typed:te,unaryMinus:fi}),dS=$g({bignumber:ea,addScalar:Qt,combinations:zc,divideScalar:Mt,factorial:gf,isInteger:Ln,isNegative:no,larger:Fn,multiplyScalar:Ot,number:Oi,pow:ya,subtractScalar:ga,typed:te}),DR=Th({Unit:wr,typed:te}),SR=Gg({addScalar:Qt,isInteger:Ln,isNegative:no,stirlingS2:dS,typed:te}),hS=bg({abs:En,add:Lr,addScalar:Qt,atan:LD,bignumber:ea,column:fS,complex:Uc,config:Oe,cos:Vx,diag:ZD,divideScalar:Mt,dot:$c,equal:xa,flatten:vf,im:Qx,inv:Vo,larger:Fn,matrix:$e,matrixFromColumns:jx,multiply:it,multiplyScalar:Ot,number:Oi,qr:ey,re:Xx,reshape:$D,sin:Yc,size:cn,smaller:Tn,sqrt:La,subtract:Bt,typed:te,usolve:ry,usolveAll:rS}),NR=W0({BigNumber:Ge,Unit:wr,config:Oe}),AR=ix({BigNumber:Ge,Unit:wr,config:Oe}),MR=qg({divide:an,dotDivide:hf,isNumeric:$o,log:ny,map:Ho,matrix:$e,multiply:it,sum:ay,typed:te}),vS=of({add:Lr,divide:an,typed:te}),CR=sx({BigNumber:Ge,Unit:wr,config:Oe}),ER=M0({BigNumber:Ge,Unit:wr,config:Oe}),TR=uf({bignumber:ea,add:Lr,compare:Go,divide:an,isInteger:Ln,larger:Fn,multiply:it,partitionSelect:Gc,smaller:Tn,smallerEq:Is,subtract:Bt,typed:te}),uy=sf({add:Lr,apply:Jx,divide:an,isNaN:pf,multiply:it,subtract:Bt,typed:te}),FR=z0({BigNumber:Ge,Unit:wr,config:Oe}),gS=Fg({add:Lr,compare:Go,divide:an,partitionSelect:Gc,typed:te}),_R=Og({add:Lr,divide:an,matrix:$e,mean:vS,multiply:it,pow:ya,sqrt:La,subtract:Bt,sum:ay,typed:te}),OR=a0({Complex:pt,add:Lr,divide:an,matrix:$e,multiply:it,typed:te}),BR=_g({abs:En,map:Ho,median:gS,subtract:Bt,typed:te}),PR=ff({map:Ho,sqrt:La,typed:te,variance:uy}),IR=_d({BigNumber:Ge,Complex:pt,add:Lr,config:Oe,divide:an,equal:xa,factorial:gf,gamma:sy,isNegative:no,multiply:it,pi:$x,pow:ya,sin:Yc,smallerEq:Is,subtract:Bt,typed:te}),fy=hv({abs:En,add:Lr,conj:Wo,ctranspose:Kx,eigs:hS,equalScalar:Ir,larger:Fn,matrix:$e,multiply:it,pow:ya,smaller:Tn,sqrt:La,typed:te}),xS=wd({BigNumber:Ge,DenseMatrix:_r,SparseMatrix:Bi,addScalar:Qt,config:Oe,cos:Vx,matrix:$e,multiplyScalar:Ot,norm:fy,sin:Yc,typed:te,unaryMinus:fi}),RR=gx({BigNumber:Ge,Unit:wr,config:Oe}),yS=Ng({identity:ao,matrix:$e,multiply:it,norm:fy,qr:ey,subtract:Bt,typed:te}),kR=bd({multiply:it,rotationMatrix:xS,typed:te}),bS=Sg({abs:En,add:Lr,concat:Gr,identity:ao,index:iS,lusolve:pS,matrix:$e,matrixFromColumns:jx,multiply:it,range:Rs,schur:yS,subset:ra,subtract:Bt,transpose:df,typed:te}),qR=Ag({matrix:$e,multiply:it,sylvester:bS,transpose:df,typed:te});var xf={},yf={},LR={},_n=bv({mathWithTransform:yf}),bf=Yv({Node:_n}),io=$v({Node:_n}),ks=Vv({Node:_n}),zR=Jv({Node:_n}),wf=Av({Node:_n}),UR=_v({Node:_n,ResultSet:kD}),WR=Bv({Node:_n}),Zo=kv({Node:_n}),YR=Qv({Node:_n}),bZ=i0({classes:LR}),wS=dg({math:xf,typed:te}),HR=Lv({Node:_n,typed:te}),wZ=vg({Chain:wS,typed:te}),Df=Uv({Node:_n,size:cn}),Sf=Sv({Node:_n,subset:ra}),$R=Tv({matrix:$e,Node:_n,subset:ra}),Qo=Kv({Unit:wr,Node:_n,math:xf}),Xo=eg({Node:_n,SymbolNode:Qo,math:xf}),Ua=rg({AccessorNode:Sf,ArrayNode:wf,AssignmentNode:$R,BlockNode:UR,ConditionalNode:WR,ConstantNode:Zo,FunctionAssignmentNode:HR,FunctionNode:Xo,IndexNode:Df,ObjectNode:bf,OperatorNode:io,ParenthesisNode:ks,RangeNode:YR,RelationalNode:zR,SymbolNode:Qo,config:Oe,numeric:za,typed:te}),GR=jg({ConstantNode:Zo,FunctionNode:Xo,OperatorNode:io,ParenthesisNode:ks,parse:Ua,typed:te}),DS=Jg({bignumber:ea,fraction:Bs,AccessorNode:Sf,ArrayNode:wf,ConstantNode:Zo,FunctionNode:Xo,IndexNode:Df,ObjectNode:bf,OperatorNode:io,SymbolNode:Qo,config:Oe,mathWithTransform:yf,matrix:$e,typed:te}),DZ=tg({parse:Ua,typed:te}),SS=Kg({AccessorNode:Sf,ArrayNode:wf,ConstantNode:Zo,FunctionNode:Xo,IndexNode:Df,ObjectNode:bf,OperatorNode:io,ParenthesisNode:ks,SymbolNode:Qo,add:Lr,divide:an,equal:xa,isZero:qa,multiply:it,parse:Ua,pow:ya,subtract:Bt,typed:te}),NS=ng({parse:Ua,typed:te}),VR=pg({evaluate:NS}),ZR=ag({evaluate:NS}),cy=Xg({bignumber:ea,fraction:Bs,AccessorNode:Sf,ArrayNode:wf,ConstantNode:Zo,FunctionNode:Xo,IndexNode:Df,ObjectNode:bf,OperatorNode:io,ParenthesisNode:ks,SymbolNode:Qo,add:Lr,config:Oe,divide:an,equal:xa,isZero:qa,mathWithTransform:yf,matrix:$e,multiply:it,parse:Ua,pow:ya,resolve:GR,simplifyConstant:DS,simplifyCore:SS,subtract:Bt,typed:te}),SZ=e0({OperatorNode:io,parse:Ua,simplify:cy,typed:te}),NZ=Qg({parse:Ua,typed:te}),AZ=ig({Parser:ZR,typed:te}),MZ=t0({bignumber:ea,fraction:Bs,AccessorNode:Sf,ArrayNode:wf,ConstantNode:Zo,FunctionNode:Xo,IndexNode:Df,ObjectNode:bf,OperatorNode:io,ParenthesisNode:ks,SymbolNode:Qo,add:Lr,config:Oe,divide:an,equal:xa,isZero:qa,mathWithTransform:yf,matrix:$e,multiply:it,parse:Ua,pow:ya,simplify:cy,simplifyConstant:DS,simplifyCore:SS,subtract:Bt,typed:te}),CZ=r0({ConstantNode:Zo,FunctionNode:Xo,OperatorNode:io,ParenthesisNode:ks,SymbolNode:Qo,config:Oe,equal:xa,isZero:qa,numeric:za,parse:Ua,simplify:cy,typed:te}),EZ=hg({Help:VR,mathWithTransform:yf,typed:te});ht(xf,{e:ID,false:bP,fineStructure:wP,i:RD,Infinity:DP,LN10:SP,LOG10E:NP,NaN:AP,null:MP,phi:CP,SQRT1_2:TP,sackurTetrode:FP,tau:qD,true:_P,E:ID,version:OP,efimovFactor:BP,LN2:PP,pi:$x,replacer:IP,reviver:bZ,SQRT2:RP,typed:te,unaryPlus:Gx,PI:$x,weakMixingAngle:kP,abs:En,acos:qP,acot:LP,acsc:zP,addScalar:Qt,arg:UP,asech:WP,asinh:YP,atan:LD,atanh:HP,bignumber:ea,bitNot:$P,boolean:GP,clone:VP,combinations:zc,complex:Uc,conj:Wo,cos:Vx,cot:ZP,csc:QP,cube:XP,equalScalar:Ir,erf:JP,exp:zD,expm1:KP,filter:jP,forEach:eI,format:mf,getMatrixDataType:Zx,hex:rI,im:Qx,isInteger:Ln,isNegative:no,isPositive:Yo,isZero:qa,LOG2E:tI,lgamma:nI,log10:aI,log2:UD,map:Ho,multiplyScalar:Ot,not:Wc,number:Oi,oct:iI,pickRandom:oI,print:sI,random:uI,re:Xx,sec:fI,sign:WD,sin:Yc,splitUnit:cI,square:lI,string:mI,subtractScalar:ga,tan:pI,typeOf:YD,acosh:dI,acsch:hI,apply:Jx,asec:vI,bin:gI,chain:wZ,combinationsWithRep:xI,cosh:yI,csch:bI,isNaN:pf,isPrime:wI,randomInt:DI,sech:SI,sinh:NI,sparse:AI,sqrt:La,tanh:MI,unaryMinus:fi,acoth:CI,coth:EI,fraction:Bs,isNumeric:$o,matrix:$e,matrixFromFunction:TI,mode:FI,numeric:za,prod:HD,reshape:$D,size:cn,squeeze:_I,transpose:df,xgcd:GD,zeros:ln,asin:OI,cbrt:VD,concat:Gr,count:BI,ctranspose:Kx,diag:ZD,divideScalar:Mt,dotDivide:hf,equal:xa,flatten:vf,hasNumericValue:PI,identity:ao,kron:II,largerEq:Hc,leftShift:RI,lsolve:QD,matrixFromColumns:jx,nthRoot:kI,ones:qI,qr:ey,resize:LI,rightArithShift:zI,round:Ps,smaller:Tn,subtract:Bt,to:UI,unequal:WI,usolve:ry,xor:YI,add:Lr,atan2:HI,bitAnd:$I,bitOr:GI,bitXor:VI,catalan:ZI,compare:Go,compareText:XD,cumsum:QI,deepEqual:ty,diff:XI,distance:JI,dot:$c,equalText:KI,floor:JD,gcd:jI,hypot:e4,larger:Fn,log:ny,lsolveAll:r4,matrixFromRows:t4,min:n4,mod:jD,multiply:it,nthRoots:a4,or:i4,partitionSelect:Gc,rightLogShift:o4,slu:eS,subset:ra,sum:ay,trace:s4,usolveAll:rS,zpk2tf:u4,ceil:iy,compareNatural:ci,composition:f4,cross:c4,det:tS,dotMultiply:l4,fix:aS,index:iS,intersect:m4,invmod:p4,lcm:d4,log1p:h4,max:oy,setCartesian:v4,setDistinct:g4,setIsSubset:x4,setPowerset:y4,smallerEq:Is,sort:b4,and:w4,range:Rs,row:D4,setDifference:oS,setMultiplicity:S4,setSymDifference:sS,column:fS,inv:Vo,lup:cS,pinv:N4,pow:ya,setIntersect:lS,setUnion:A4,sqrtm:M4,vacuumImpedance:C4,wienDisplacement:E4,atomicMass:T4,bohrMagneton:F4,boltzmann:_4,conductanceQuantum:O4,coulomb:B4,deuteronMass:P4,dotPow:I4,electricConstant:R4,elementaryCharge:k4,expm:q4,faraday:L4,fft:mS,gamma:sy,gravitationConstant:z4,hartreeEnergy:U4,ifft:W4,klitzing:Y4,loschmidt:H4,magneticConstant:$4,molarMass:G4,molarPlanckConstant:V4,neutronMass:Z4,nuclearMagneton:Q4,planckCharge:X4,planckLength:J4,planckTemperature:K4,protonMass:j4,quantumOfCirculation:eR,reducedPlanckConstant:rR,rydberg:tR,secondRadiation:nR,speedOfLight:aR,stefanBoltzmann:iR,thomsonCrossSection:oR,avogadro:sR,bohrRadius:uR,createUnit:fR,divide:an,electronMass:cR,factorial:gf,firstRadiation:lR,gravity:mR,inverseConductanceQuantum:pR,lusolve:pS,magneticFluxQuantum:dR,molarMassC12:hR,multinomial:vR,parse:Ua,permutations:gR,planckMass:xR,polynomialRoot:yR,resolve:GR,setSize:bR,simplifyConstant:DS,solveODE:wR,stirlingS2:dS,unit:DR,bellNumbers:SR,compile:DZ,eigs:hS,fermiCoupling:NR,gasConstant:AR,kldivergence:MR,mean:vS,molarVolume:CR,planckConstant:ER,quantileSeq:TR,simplifyCore:SS,variance:uy,classicalElectronRadius:FR,evaluate:NS,median:gS,simplify:cy,symbolicEqual:SZ,corr:_R,freqz:OR,leafCount:NZ,mad:BR,parser:AZ,rationalize:MZ,std:PR,zeta:IR,derivative:CZ,norm:fy,rotationMatrix:xS,help:EZ,planckTime:RR,schur:yS,rotate:kR,sylvester:bS,lyap:qR,config:Oe});ht(yf,xf,{filter:Sx({typed:te}),forEach:Nx({typed:te}),map:Mx({typed:te}),apply:wx({isInteger:Ln,typed:te}),or:Wx({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),and:Ux({add:Lr,concat:Gr,equalScalar:Ir,matrix:$e,not:Wc,typed:te,zeros:ln}),concat:Bx({isInteger:Ln,matrix:$e,typed:te}),max:Cx({config:Oe,larger:Fn,numeric:za,typed:te}),print:zx({add:Lr,matrix:$e,typed:te,zeros:ln}),bitAnd:Yx({add:Lr,concat:Gr,equalScalar:Ir,matrix:$e,not:Wc,typed:te,zeros:ln}),diff:Px({bignumber:ea,matrix:$e,number:Oi,subtract:Bt,typed:te}),min:Tx({config:Oe,numeric:za,smaller:Tn,typed:te}),subset:Ox({add:Lr,matrix:$e,typed:te,zeros:ln}),bitOr:Hx({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),cumsum:qx({add:Lr,typed:te,unaryPlus:Gx}),index:Ax({Index:yn,getMatrixDataType:Zx}),sum:Rx({add:Lr,config:Oe,numeric:za,typed:te}),range:Fx({bignumber:ea,matrix:$e,add:Lr,config:Oe,isPositive:Yo,larger:Fn,largerEq:Hc,smaller:Tn,smallerEq:Is,typed:te}),row:_x({Index:yn,matrix:$e,range:Rs,typed:te}),column:Dx({Index:yn,matrix:$e,range:Rs,typed:te}),mean:Ex({add:Lr,divide:an,typed:te}),quantileSeq:kx({add:Lr,bignumber:ea,compare:Go,divide:an,isInteger:Ln,larger:Fn,multiply:it,partitionSelect:Gc,smaller:Tn,smallerEq:Is,subtract:Bt,typed:te}),variance:Lx({add:Lr,apply:Jx,divide:an,isNaN:pf,multiply:it,subtract:Bt,typed:te}),std:Ix({map:Ho,sqrt:La,typed:te,variance:uy})});ht(LR,{BigNumber:Ge,Complex:pt,Fraction:Uo,Matrix:Lc,Node:_n,ObjectNode:bf,OperatorNode:io,ParenthesisNode:ks,Range:EP,RelationalNode:zR,ResultSet:kD,ArrayNode:wf,BlockNode:UR,ConditionalNode:WR,ConstantNode:Zo,DenseMatrix:_r,RangeNode:YR,Chain:wS,FunctionAssignmentNode:HR,SparseMatrix:Bi,IndexNode:Df,ImmutableDenseMatrix:KD,Index:yn,AccessorNode:Sf,AssignmentNode:$R,FibonacciHeap:nS,Spa:uS,Unit:wr,SymbolNode:Qo,FunctionNode:Xo,Help:VR,Parser:ZR});wS.createProxy(xf);var AS=PD;var jR=ca(Am(),1);var XR=ca(QR(),1);function JR(e){var r=new XR.default;return e.on=r.on.bind(r),e.off=r.off.bind(r),e.once=r.once.bind(r),e.emit=r.emit.bind(r),e}function KR(e,r,t,n){function a(y,w){var C=arguments.length;if(C!==1&&C!==2)throw new ha("import",C,1,2);w||(w={});function b(O,_,E){if(Array.isArray(_))_.forEach(q=>b(O,q));else if(typeof _=="object")for(var T in _)Xe(_,T)&&b(O,_[T],T);else if(As(_)||E!==void 0){var R=As(_)?x(_)?_.fn+".transform":_.fn:E;if(Xe(O,R)&&O[R]!==_&&!w.silent)throw new Error('Cannot import "'+R+'" twice');O[R]=_}else if(!w.silent)throw new TypeError("Factory, Object, or Array expected")}var M={};b(M,y);for(var A in M)if(Xe(M,A)){var S=M[A];if(As(S))o(S,w);else if(s(S))i(A,S,w);else if(!w.silent)throw new TypeError("Factory, Object, or Array expected")}}function i(y,w,C){if(C.wrap&&typeof w=="function"&&(w=c(w)),m(w)&&(w=e(y,{[w.signature]:w})),e.isTypedFunction(t[y])&&e.isTypedFunction(w)){C.override?w=e(y,w.signatures):w=e(t[y],w),t[y]=w,delete n[y],u(y,w),t.emit("import",y,function(){return w});return}if(t[y]===void 0||C.override){t[y]=w,delete n[y],u(y,w),t.emit("import",y,function(){return w});return}if(!C.silent)throw new Error('Cannot import "'+y+'": already exists')}function u(y,w){w&&typeof w.transform=="function"?(t.expression.transform[y]=w.transform,d(y)&&(t.expression.mathWithTransform[y]=w.transform)):(delete t.expression.transform[y],d(y)&&(t.expression.mathWithTransform[y]=w))}function l(y){delete t.expression.transform[y],d(y)?t.expression.mathWithTransform[y]=t[y]:delete t.expression.mathWithTransform[y]}function c(y){var w=function(){for(var b=[],M=0,A=arguments.length;M2&&arguments[2]!==void 0?arguments[2]:y.fn;if(Jb(C,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(C));var b=x(y)?t.expression.transform:t,M=C in t.expression.transform,A=Xe(b,C)?b[C]:void 0,S=function(){var _={};y.dependencies.map(ew).forEach(T=>{if(Jb(T,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(T));T==="math"?_.math=t:T==="mathWithTransform"?_.mathWithTransform=t.expression.mathWithTransform:T==="classes"?_.classes=t:_[T]=t[T]});var E=y(_);if(E&&typeof E.transform=="function")throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(A===void 0||w.override)return E;if(e.isTypedFunction(A)&&e.isTypedFunction(E))return e(A,E);if(w.silent)return A;throw new Error('Cannot import "'+C+'": already exists')};!y.meta||y.meta.lazy!==!1?(Du(b,C,S),A&&M?l(C):(x(y)||h(y))&&Du(t.expression.mathWithTransform,C,()=>b[C])):(b[C]=S(),A&&M?l(C):(x(y)||h(y))&&Du(t.expression.mathWithTransform,C,()=>b[C])),n[C]=y,t.emit("import",C,S)}function s(y){return typeof y=="function"||typeof y=="number"||typeof y=="string"||typeof y=="boolean"||y===null||Ht(y)||Kt(y)||rr(y)||ma(y)||Qe(y)||Array.isArray(y)}function m(y){return typeof y=="function"&&typeof y.signature=="string"}function d(y){return!Xe(v,y)}function h(y){return y.fn.indexOf(".")===-1&&!Xe(v,y.fn)&&(!y.meta||!y.meta.isClass)}function x(y){return y!==void 0&&y.meta!==void 0&&y.meta.isTransformFunction===!0||!1}var v={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return a}function ly(e,r){var t=ht({},Ds,r);if(typeof Object.create!="function")throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var n=JR({isNumber:sr,isComplex:Kt,isBigNumber:rr,isFraction:ma,isUnit:Ht,isString:St,isArray:Mr,isMatrix:Qe,isCollection:Nt,isDenseMatrix:Xi,isSparseMatrix:pa,isRange:To,isIndex:Ai,isBoolean:cm,isResultSet:lm,isHelp:yu,isFunction:mm,isDate:pm,isRegExp:dm,isObject:Mi,isNull:hm,isUndefined:vm,isAccessorNode:qn,isArrayNode:jt,isAssignmentNode:gm,isBlockNode:xm,isConditionalNode:ym,isConstantNode:yr,isFunctionAssignmentNode:_a,isFunctionNode:gn,isIndexNode:Qn,isNode:Nr,isObjectNode:Ci,isOperatorNode:ct,isParenthesisNode:en,isRangeNode:bm,isRelationalNode:wm,isSymbolNode:at,isChain:bu});n.config=HA(t,n.emit),n.expression={transform:{},mathWithTransform:{config:n.config}};var a=[],i=[];function u(s){if(As(s))return s(n);var m=s[Object.keys(s)[0]];if(As(m))return m(n);if(!UA(s))throw console.warn("Factory object with properties \`type\`, \`name\`, and \`factory\` expected",s),new Error("Factory object with properties \`type\`, \`name\`, and \`factory\` expected");var d=a.indexOf(s),h;return d===-1?(s.math===!0?h=s.factory(n.type,t,u,n.typed,n):h=s.factory(n.type,t,u,n.typed),a.push(s),i.push(h)):h=i[d],h}var l={};function c(){for(var s=arguments.length,m=new Array(s),d=0;d{Ub(l).forEach(s=>{s&&s.meta&&s.meta.recreateOnConfigChange&&o(s,{override:!0})})}),n.create=ly.bind(null,e),n.factory=F,n.import(Ub(LA(e))),n.ArgumentsError=ha,n.DimensionError=pr,n.IndexError=tn,n}var vy=ca(fm());var r5=ca(e5()),TS=class{constructor(){this.lang="en";this.all={en:{hintText:{dragDropModifierKeys:"Hold \${1} to Pin and \${2} to Copy",createListItem:"Select/Create List Item Frame",dragDropProperties:"Drag and drop properties to link them into the list",newItem:"+ New",selectNote:"Select Note...",newFrame:"New"},defaults:{spaceNote:"Current Note",spaceContext:"Current Space"},commands:{h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",columns:"Columns",tabs:"Tabs",button:"Button",label:"Label",column:"Column",idea:"New",group:"Group",paragraph:"Text",card:"Card",progress:"Progress",rating:"Rating",circularProgress:"Circular Progress",list:"Bullet List","ordered-list":"Numbered List",todo:"To-do List",quote:"Quote",divider:"Divider",note:"Link to Note",link:"Link",callout:"Callout",bookmark:"Bookmark",table:"Table",codeblock:"Code Block",toggle:"Toggle",emoji:"Emoji",image:"Image",flow:"Linked Note",newNote:"New Note",tag:"Tag",makeMenu:"Flow Menu",selectStyle:"Style",toggleKeyboard:"Toggle Keyboard",rows:"Rows",masonry:"Gallery"},styles:{bold:"Bold",italics:"Italics",strikethrough:"Strikethrough",code:"Code",link:"Web Link",blocklink:"Link to Note",textColor:"Text Color",highlight:"Highlight"},commandsSuggest:{noResult:"No result"},commandPalette:{enable:"Enable",disabled:"Disable",openFlow:"Open Flow Blocks in Selection",closeFlow:"Close Flow Blocks in Selection",toggleBold:"Toggle Bold",toggleItalics:"Toggle Italics",openSpaces:"Open Spaces",migrateData:"Migrate Spaces From 0.7",blink:"Blink",openFileContext:"Open Explorer",convertPathToSpace:"Convert to Space",revealFile:"Reveal File in Spaces",releaseNotes:"Release Notes",toggleBacklinks:"Toggle Backlinks",collapseAllFolders:"Collapse All Folders",addFileSpace:"Add File to Space",removeFileSpace:"Remove File from Space"},frames:{sections:{kit:"Kit",paths:"Paths"},label:{label:"Label",description:"Label"},note:{label:"Note",description:"Link to a note"},table:{label:"Table",description:"Table"},context:{label:"Context",description:"Display a context view from another space"},calendar:{label:"Calendar View"},field:{label:"Field",description:"Dynamic node that displays a value based on property type"},event:{label:"Event"},divider:{label:"Divider",description:"Divider to separate your content"},button:{label:"Button",description:"Buttons can perform actions and open links"},callout:{label:"Callout",description:"Callout to highlight important information"},toggle:{label:"Toggle",description:"Toggle to show/hide content"}},menu:{newView:"New View",closeSpace:"Close Space",customView:"Custom View",detailsView:"Details View",catalogView:"Catalog View",galleryView:"Gallery View",deleteContext:"Delete Context",openSpace:"Open Space",revealInDefault:"Reveal in Finder",setNone:"None",fileMetadataDescription:"This note only",openFilePane:"Open in a new pane",rename:"Rename",changeToFolderNote:"New Space from Note",moveFile:"Move file to...",moveFolder:"Move folder to...",duplicate:"Make a copy",edit:"Edit",delete:"Delete",getHelp:"Make.md Community",vault:"Vault",openVault:"Open Another Vault",openVaultInFolder:"Open Vault Folder",obSettings:"Obsidian Settings",commandPalette:"Command Palette",backToSpace:"Back to Spaces",collapseAllSections:"Collapse All Spaces",expandAllSections:"Expand All Spaces",collapseAllFolders:"Collapse All Folders",expandAllFolders:"Expand All Folders",spaceTitle:"Add/Remove in Space",home:"Home",waypoints:"Waypoints",none:"None",tableView:"Table View",cardView:"Card View",boardView:"Board View",listView:"List View",flowView:"Flow View",groupBy:"Group By",sortBy:"Sort By",newFilter:"New Filter",clearFilters:"Clear Filters",hide:"Hide",unhideFields:"Unhide All Properties",importDataview:"Import All Dataview Properties",saveAllProperties:"Save All Properties to Files",mergeProperties:"Merge Properties",removeFromSpace:"Unpin from Space",removeFromWaypoints:"Unpin from Waypoints",editCode:"Edit Code",deleteProperty:"Delete Property",hideProperty:"Hide Property",unhideProperty:"Unhide Property",saveProperty:"Save Property",sortAscending:"Sort Ascending",sortDescending:"Sort Descending",deleteRow:"Delete Item",collapseAll:"Collapse All",customSort:"Custom Sort",groupSpaces:"Group Spaces",fileNameSortAlphaAsc:"File Name (A to Z)",fileNameSortAlphaDesc:"File Name (Z to A)",fileNameSortNumericalAsc:"File Name (1 to 9)",fileNameSortNumericalDesc:"File Name (9 to 1)",createdTimeSortAsc:"Created Time (new to old)",createdTimeSortDesc:"Created Time (old to new)",modifiedTimeSortAsc:"Modified Time (new to old)",modifiedTimeSortDesc:"Modified Time (old to new)",sizeSortAsc:"Size (smallest to largest)",sizeSortDesc:"Size (largest to smallest)",spaces:"Spaces",tags:"Tags",manageHiddenFiles:"Manage Hidden Files",manageActions:"Manage Actions",deleteSpace:"Delete",changeColor:"Change Color",changePropertyType:"Change Type",deleteFiles:"Delete Files",createFolderSpace:"Create Space from Folder",folder:"Folder",syncToContext:"Add Property to Context",setIcon:"Set Icon",copyEmbedLink:"Copy Embed Link",moveUp:"Move Up",moveDown:"Move Down",moveTo:"Move To",groupNodes:"Group Nodes",moveFrame:"Move Frame",renameFrame:"Rename Frame",deleteFrame:"Delete Frame",insertAbove:"Insert Above",insertBelow:"Insert Below"},editor:{rows:"Rows",columns:"Columns",catalog:"Catalog",gallery:"Gallery",grid:"Grid",scaleToFit:"Change to Fit",scaleToFill:"Change to Fill",fit:"Fit",strokeNone:"None",strokeSolid:"Solid",strokeDotted:"Dotted",strokeDashed:"Dashed",size:"Size",gap:"Gap",marginLeft:"Left",marginTop:"Top",marginRight:"Right",marginBottom:"Bottom",minimize:"Minimize",paddingLeft:"Left",paddingTop:"Top",paddingRight:"Right",paddingBottom:"Bottom",unlinkProperty:"Unlink Property",linkedProperty:"Linked Property",linkProperty:"Link Property",currentSpace:"Current Space",linkName:"\${1} Link",linkThumbnail:"\${1} Thumbnail",linkSticker:"\${1} Sticker",opacity:"Opacity",shadowSpread:"Spread",shadowBlur:"Blur",width:"Width",height:"Height",margin:"Margin",padding:"Padding",bold:"Bold",italic:"Italic",underline:"Underline",alignLeft:"Align Left",alignCenter:"Align Center",alignRight:"Align Right",alignJustify:"Align Justify",numberOfLines:"Lines",createVerticalSection:"Create Vertical Section",createHorizontalSection:"Create Horizontal Section",themeColors:"Theme Colors",uiColors:"UI Colors",hex:"Hex"},buttons:{add:"Add",addFilter:"Add Filter",addCondition:"Add Condition",customize:"Customize",moreOptions:"More Options",saveProperty:"Save Property",newNote:"New Note",changeIcon:"Change Sticker",removeIcon:"Remove Sticker",addIcon:"Add Sticker",addCover:"Add Cover",changeBanner:"Change Cover",changeBannerShort:"Cover",saveChanges:"Save Changes",removeBanner:"Remove Cover",rename:"Change Name",editFrame:"Edit Frame",saveSpace:"Save Space",createSpace:"New Space",createFolder:"New Folder",createNote:"New Note",createCanvas:"New Canvas",addIntoSpace:"New Pin",addSmartSearch:"Add Live Search",addItem:"Add Item",addProperty:"Add Property",editProperty:"Edit Property",addContext:"Add Context",cancel:"Cancel",search:"Search",delete:"Delete",toggleFlow:"Toggle Flow",openFlow:"Open Flow",hideFlow:"Hide Flow",openLink:"Open Link",addToSpace:"Add to Space",addToSpaceShort:"Pin",addTag:"Add Tag",tag:"Tag",syncFields:"Sync Properties",convertTable:"Convert to Markdown",cutTable:"Cut Table",deleteTable:"Delete Table",blink:"Blink",addFile:"Add Item",merge:"Merge",saveView:"Save View",saveTable:"Save Table",renameView:"Rename View",deleteView:"Delete View",renameTable:"Rename Table",renameTag:"Rename Tag",createTag:"Create Tag",currentFolder:"Current Folder",sync:"Sync",pasteCSS:"Paste CSS",save:"Save",run:"Run"},metadataTypes:{fileName:"File Name",contexts:"Contexts",path:"Path",folder:"Folder",sticker:"Sticker",color:"Color",created:"Created",lastModified:"Last Modified",extension:"Extension",size:"Size",tags:"Tags",inlinks:"Linked Mentions",outlinks:"Links",label:"Label",fileMetadata:"File Metadata",frontmatter:"Frontmatter"},filterTypes:{contains:"contains",notContains:"does not contain",is:"is",isNot:"is not",before:"before",after:"on or after",anyOf:"is any of",noneOf:"is none of",checked:"is checked",unchecked:"is unchecked",isEmpty:"is empty",isNotEmpty:"is not empty",isSameDate:"is same date",isSameDateAsToday:"today"},sortTypes:{alphaAsc:"A to Z",alphaDesc:"Z to A",earliest:"Earliest",latest:"Latest",checkAsc:"Checked \\u2192 Unchecked",checkDesc:"Unchecked \\u2192 Checked",itemsAsc:"Least Items",itemsDesc:"Most Items"},properties:{defaultField:"Name",audio:{label:"Audio",description:"Audio"},text:{label:"Text",description:"Text field"},number:{label:"Number",description:"Number field with optional unit"},boolean:{label:"Yes/No",description:"Yes or No toggle to indicate the status"},date:{label:"Date",description:"Select a date from a calendar"},option:{label:"Option",description:"Select one or multiple option from a list"},file:{label:"File"},link:{label:"Link",description:"Link to another note or a website"},tags:{label:"Tags",description:"Use tags to quickly organize your items"},object:{label:"Object",description:"Store any complex objects"},context:{label:"Relation",description:"Connect to another context property and create a relation"},image:{label:"Image",description:"Select any image from your system or from the internet"},color:{label:"Color",description:"Use colors to label your items or status"},space:{label:"Context",description:"Link to a context"},icon:{label:"Sticker",description:"Use stickers to uniquely label your items or status"},super:{label:"Super Property",links:"Open Link",properties:"Update Property",api:"API",obsidianCommands:"Run Command",runCommand:"Run Command",performAction:"Perform Action",whenClicked:"When Clicked"},fileProperty:{name:"Name",label:"Formula",createdTime:"Created",modifiedTime:"Last Edited",sticker:"Sticker",links:"Links",tags:"Tags",spaces:"Spaces",extension:"Extension",size:"Size",preview:"Note Preview",parentFolder:"Folder",description:"Use a formula to dynamically display a property"}},views:{navigator:"Navigator",explorer:"Explorer",space:"Space"},subViews:{spaceItems:"Items",spaceContext:"Context",spaceLists:"Lists",spaceActions:"Actions",spaceTemplates:"Templates",smartSearch:"Live Searches",filesAndFolders:"Files and Folders"},labels:{duplicateTable:"Duplicate Table",moveTable:"Move Table",editFormula:"Edit Formula",editObject:"Edit Object",properties:"Properties",newAction:"New Action",newTable:"New Table",createFolder:"New Folder Name",rename:"Rename",createNew:"New",default:"Default",done:"Done",tables:"Tables",selectDateFormat:"Select/Type Date Format",renameSection:"Edit Space",createSection:"New Folder",createNote:"New Note",contextMaker:"Context Maker",select:"Select",pinnedItems:"Pinned Items",collapse:"Collapse",expand:"Expand",all:"All",none:"None",view:"View",findStickers:"Find Sticker",mergeProperties:"Merge Properties",placeholder:"Type '\${1}' for commands",notePlaceholder:"New Note for \${1}",itemsSelected:"\${1} Selected",selectNote:"Select Note",selectIcon:"Select Icon",selectImage:"Select Image",selectSpace:"Select Space",styleSmall:"Small",styleMedium:"Medium",styleLarge:"Large",hiddenFilePattern:"Name, Suffixes and Extension",hiddenFileSpecific:"Exclude specific files and folders",textPlaceholder:"Enter Text",noFile:"is not created yet. Click to create.",navigatorSearchPlaceholder:"Search by Text or Filters",blinkPlaceholder:"Quickly Search a File, Folder, Tag... Press Tab to Edit",searchPlaceholder:"Type to search...",contextItemSelectPlaceholder:"Find Item",linkItemSelectPlaceholder:"Find or Create Note",pinNotePlaceholder:"Select a Note or Space to Pin",optionItemSelectPlaceholder:"Select Option",viewItemSelectPlaceholder:"Select View",tagItemSelectPlaceholder:"Find Tag",spaceSelectPlaceholder:"Select any Folder or Tag",propertyItemSelectPlaceholder:"Select Property",sortItemSelectPlaceholder:"Select Sort",filterItemSelectPlaceholder:"Select Filter",imageSelectPlaceholder:"Select an image or paste a URL",imageNotFoundPlaceholder:"No Images Found",syncFrontmatterProperty:"Sync Frontmatter Property",newProperty:"New Property",newPropertyShort:"New Property",propertyType:"Type",propertyDynamic:"Dyanmic",propertyValueSpace:"Space",propertyValueProperty:"Property",propertyLookup:"Edit Formula",dateFormat:"Date Format",propertyFileProp:"Property",multiple:"Multiple",filesCount:"{$1} Files",hiddenFiles:"Hidden Files",addExtension:"Add Rule",saveView:"Save View",saveTable:"Save Table",renameView:"Rename View",renameTable:"Rename Table",syncMetadata:"Sync Metadata",syncProperties:"Sync Properties",selectContext:"Select Context",metadata:"Metadata",backlinks:"Backlinks",spaces:"Spaces",context:"Context",content:"Content",deleteSpace:"Delete Space",deleteFiles:"Delete Files",outgoingLinks:"Outgoing Links",moveTo:"Move to",addTo:"Pin to",copyTo:"Copy to",reorderIn:"Reorder in",border:"Border",corners:"Corners",color:"Color",backgroundColor:"Background",cornerRadius:"Radius",onClick:"On Click",layout:"Layout",element:"Element",name:"Name",display:"Display",alignment:"Alignment",margin:"Margin",padding:"Padding",gap:"Gap",width:"Width",height:"Height",opacity:"Opacity",shadow:"Shadow",shadowBlur:"Blur",shadowSpread:"Spread",typography:"Typography",layers:"Layers",fontSize:"Size",props:"Props",styles:"Styles",events:"Events",code:"Code",selectedLayers:"\${1} Layers"},descriptions:{spaceActions:"Create actions that runs when you press a button",spaceLists:"Create lists to track data and organize them in your space",spaceItems:"Add new items to the space or pin items to the space",spaceTemplates:"Create templates to quickly add items to your space",smartSearch:"Automatically pin notes to this space based on a set of searches",hiddenFileOptions:"Exclude any files and folders by name, suffix or extension.",deleteSpace:"Deleting the space will also delete the folder and its contents.",deleteFiles:"Delete \${1} files/folders and their contents?",addContext:"Contexts lets you connect properties from your tags",spaceProperties:"Define Properties for your Space Items",syncMetadata:"Select which fields from your notes to start syncing with the context.",syncProperties:"Contexts defines and syncs the same fields across your notes depending on their folder or tag.",selectContext:"Select which folder or tag context you want to sync the fields."},flowView:{emptyDoc:"Empty Document",itemsCount:" Items",emptyFolder:"This Folder is Empty"},notice:{duplicateFile:"Folder already contains note with same name",addedToSection:"Added to Space",fileExists:"File Already Exists",folderExists:"Folder Already Exists",noPropertyName:"Property Name is Required",duplicatePropertyName:"Duplicate Property Name",newSpaceName:"Enter a name for your space",duplicateSpaceName:"Space name already exists",cantConvertNoteToSpace:"The view is not a note",templateSaved:"Template saved to space: "},settings:{layoutVertical:"Vertical",layoutHorizontal:"Horizontal",sectionSidebar:"Spaces",sectionEditor:"Maker Mode",sectionFlow:"Flow",sectionAdvanced:"Advanced",sectionDataview:"Dataview",sectionContext:"Context",sectionStickers:"Stickers",sectionNavigator:"Navigator",sectionDefault:"Default Spaces",sectionSpaceView:"Space View",sectionBlink:"Blink",sectionInlineContext:"Inline Context",sectionFlowBlock:"Flow Block",sectionFlowMenu:"Flow Menu",sectionFlowStyler:"Flow Styler",experimental:{name:"Experimental",desc:"Experimental features that are subject to change and may not be optimized for performance"},generateThumbnails:{name:"Generate Thumbnails",desc:"Create thumbnails for images to speed up performance"},minimalThemeFix:{name:"Minimal Theme Fix",description:"Apply fixes for the popular theme Minimal"},inlineStickerMenu:{name:"Inline Stickers",desc:"Add inline stickers by typing :"},openSpacesOnLaunch:{name:"Open Spaces as Default Tab",desc:"Open the Spaces tab when Obsidian launches"},defaultSpaceTemplate:{name:"Default Space Template",desc:"Select the default template for new spaces"},defaultDateFormat:{name:"Default Date Format",desc:"Set the default date format, example: yyyy-MM-dd (see https://date-fns.org/v2.30.0/docs/format)"},newNotePlaceholder:{name:"New Note Placeholder",desc:"Default name for new notes"},folderIndentationLines:{name:"Show Folder Indentation Lines",desc:"Turn on to show a line on the left of folders to indicate indentation"},folderNoteLocation:{name:"Folder Note Location Inside Folder",desc:"Turn on to have folder notes inside the folder, turn off to have it outside"},folderViewDefault:{name:"Show Folder Note by Default",desc:"Show the folder note by default when opening a folder"},internalLinkFlowEditor:{name:"Open Flow Blocks on Internal Link Click",desc:"Turn on to toggle Flow Blocks directly by clicking on internal links, otherwise a tooltip will be shown"},syncContextToFrontmatter:{name:"Sync Context Fields to Frontmatter",desc:"Turn on to automatically save all context fields to frontmatter fields, not just existing frontmatter fields."},syncFormulaToFrontmatter:{name:"Sync Formula Fields to Frontmatter",desc:"Turn on to save calculated formula values to frontmatter fields."},inlineBacklinks:{name:"Show Inline Backlinks (Inline Context required)",desc:"Show editable backlinks at the bottom of your notes"},dataviewInlineContext:{name:"Show Dataview in Inline Context",desc:"Show dataview when inline context is enabled"},inlineContextExplorer:{name:"Inline Context",desc:"Display the context and a banner at the top of your notes"},inlineContextExpanded:{name:"Auto Expand Inline Context",desc:"Expand the inline context sections when opening a note"},inlineContextHorizontal:{name:"Inline Title and Sticker Layout",desc:"Layout for inline title and sticker in Inline Context"},hideFrontmatter:{name:"Hide Frontmatter Properties",desc:"Hide the frontmatter properties in inline context"},openFileContext:{name:"Auto Open Explorer",desc:"Automatically open explorer panel in the right panel"},folderNote:{name:"Enable Folder Note",desc:"Access the folder note in the folder page and hide the folder note from spaces"},expandFolder:{name:"Auto Expand Folder",desc:"Auto expand folders on click"},hoverPreview:{name:"Preview on Hover",desc:"Preview on Hover while holding Control/Command key"},activeFile:{name:"Reveal Active File",desc:"Automatically reveal the active file in Spaces"},contexts:{name:"Contexts",desc:"Contexts allows you to have full control over the metadata of your files"},spaces:{name:"Navigator",desc:"The navigator lets you create and organize your spaces"},spacesStickers:{name:"Stickers",desc:"Use Emojis to make it easier to find your notes"},spacesAlias:{name:"Alias",desc:"Use the alias metadata to show in Spaces"},spacesFileExplorerDual:{name:"Compatibility Mode",desc:"This will improve the compatibility of plugins while using Spaces"},spacesDeleteOption:{name:"Delete File Option",desc:"Select how you want files to be deleted"},spacesDeleteOptions:{permanant:"Delete Permanently",trash:"Move to Obsidian Trash","system-trash":"Move to System Trash"},hideRibbon:{name:"App Ribbon",desc:"Show/hide the left menu aka. ribbon"},spaceView:{name:"Space View",desc:"Open the space view when you click on a space"},defaultSpaces:{name:"Default Spaces",desc:"Recommended spaces for quickly organizing your vault"},homeSpace:{name:"Home Space",desc:"An easy-to-access space where you can add/organize your other spaces"},tagSpaces:{name:"Tag Spaces",desc:"Automatically create spaces for each of your tags"},readableLineWidth:{name:"Readable Line Width",desc:"Use Readable Line Width"},sidebarTabs:{name:"Sidebar Tabs",desc:"Show/hide other sidebar tabs"},spacesPerformance:{name:"Performance Mode",desc:"Turn on performance mode for Spaces, may affect scrolling appearance. Requires Restart"},indexSVG:{name:"Use SVGs as Stickers",desc:"Use any svg file in your vault as a sticker"},inlineStyler:{name:"Flow Styler",desc:"Select text to add styling"},inlineStylerColor:{name:"Text and Highlight Colors \\u{1F9EA}",desc:"Select text color and highlight color, (this may change in the future because of the limitations with HTML and Obsidian)"},spaceRowHeight:{name:"Row Height",desc:"The height for each row in spaces (in pixels), default is 28"},coverHeight:{name:"Cover Height",desc:"The height for the cover of the note or space, default is 200"},makeChar:{name:"Flow Menu Trigger",desc:"Character to open the Flow Menu"},mobileMakeBar:{name:"Flow Styler (Mobile)",desc:"Replaces the mobile toolbar"},editorMarkSans:{name:"Mark Sans \\u{1F9EA}",desc:"Use the editor without Markdown."},editorMakerMode:{name:"Flow (Beta)",desc:"An integrated and intuitive editor experience"},editorMakePlacholder:{name:"Flow Menu Hint Text",desc:"Show a hint text on how to open the Flow Menu Shortcut"},blink:{name:"Blink",desc:"A faster way to search and edit your notes"},editorMakeMenu:{name:"Flow Menu",desc:"Open the Flow menu to quickly add content"},editorMakeMenuTrigger:{name:"Flow Menu Shortcut",desc:"Trigger key to use flow menu"},editorFlowReplace:{name:"Flow Block",desc:"Open your internal links or toggle your embeds in the flow block."},editorFlowStyle:{name:"Flow Block Style",desc:"Select a theme for your flow block",seamless:"Seamless",classic:"Classic",minimal:"Minimal"}}}};this.lang="en";let r=r5.default.locale();["en"].includes(r)&&(this.lang=r)}get texts(){return this.all.en}},Tr=new TS().texts;var RZ=ca(fm());var _Z=(e,r)=>{let t=n=>n=="builtin"?"Builtin":n=="api"?"Spaces":"Action";return[...(e.actionsIndex.get(r)??[]).map(n=>({name:n.schema.name,description:"Action",value:\`\${r}/#;\${n.schema.id}\`,section:"Action"}))??[],...[...e.cli.allCommands()].map(n=>({name:n.schema.name,description:t(n.schema.type),value:n.path,section:t(n.schema.type)}))]};var t5=({field:e,value:r})=>r=="ctime"?{value:\`parseDate(prop('\${e}')['metadata']['file']['\${r}'])\`,type:"date"}:{value:\`prop('\${e}')['metadata']['file']['\${r}']\`,type:"string"},my=(e,r,t,n)=>{let a=wc(e);if(a)return r=="fileprop"&&a.field?t5(a):(r=="option"&&a.source?.length>0&&(a.source=="$commands"?a.options=t.cli.allCommands():a.source=="$links"?a.options=t.spaceManager.allPaths().map(i=>({name:i,value:i})):a.source=="$super"?a.options=_Z(t,n):a.source=="$properties"&&(a.options=t.contextsIndex.get(n)?.cols?.map(i=>({name:i.name,value:i.name}))??[])),[...n5(r).configKeys??[],"alias","default"].reduce((i,u)=>({...i,[u]:a[u]}),{}));if(!r)return{};if(!a)if(r=="context")e?.length>0?a={space:e}:a={};else if(r.startsWith("date"))e?.length>0?a={format:e}:a={};else if(r.startsWith("fileprop"))if(e?.length>0){let[i,u]=e.split(".");a=t5({field:i,value:u})}else a={};else r.startsWith("option")&&(e?.length>0?a={options:Sn(e).map(u=>({name:u,value:u}))}:a={});return a??{}};var n5=(e,r)=>r==Fa?Af.find(t=>t.type=="file"):r=="tags"?Af.find(t=>t.type=="tags-multi"):r=="aliases"?Af.find(t=>t.type=="option-multi"):r=="sticker"?Af.find(t=>e=="icon"):Af.find(t=>e==t.type)||Af.find(t=>e==t.multiType),Af=[{type:"unknown",label:"",restricted:!0,icon:"ui//file-question"},{type:"text",label:Tr.properties.text.label,metadata:!0,icon:"ui//text",primative:!0,description:Tr.properties.text.description},{type:"number",label:Tr.properties.number.label,metadata:!0,icon:"ui//binary",configKeys:["unit"],primative:!0,description:Tr.properties.number.description},{type:"boolean",label:Tr.properties.boolean.label,metadata:!0,icon:"ui//check-square",primative:!0,description:Tr.properties.boolean.description},{type:"date",label:Tr.properties.date.label,metadata:!0,icon:"ui//calendar",configKeys:["format"],primative:!0,description:Tr.properties.date.description},{type:"option",label:Tr.properties.option.label,multi:!0,multiType:"option-multi",icon:"ui//list",configKeys:["options","source"],description:Tr.properties.option.description},{type:"tags-multi",label:Tr.properties.tags.label,icon:"ui//tags",description:Tr.properties.tags.description},{type:"file",label:Tr.properties.file.label,restricted:!0,icon:"ui//mk-make-h3"},{type:"fileprop",label:Tr.properties.fileProperty.label,icon:"ui//formula",configKeys:["field","value","type"],description:Tr.properties.fileProperty.description},{type:"link",label:Tr.properties.link.label,multi:!0,multiType:"link-multi",metadata:!0,icon:"ui//file-text",primative:!0,description:Tr.properties.link.description},{type:"context",label:Tr.properties.context.label,icon:"ui//mk-make-note",multi:!0,multiType:"context-multi",configKeys:["space"],description:Tr.properties.context.description},{type:"object",label:Tr.properties.object.label,multi:!0,multiType:"object-multi",metadata:!0,icon:"ui//list-tree",configKeys:["type","typeName"],description:Tr.properties.object.description},{type:"icon",label:Tr.properties.icon.label,multi:!0,multiType:"icon-multi",icon:"ui//gem",restricted:!0,primative:!0,description:Tr.properties.icon.description},{type:"image",label:Tr.properties.image.label,multi:!0,multiType:"image-multi",metadata:!0,icon:"ui//mk-make-image",primative:!0,description:Tr.properties.image.description},{type:"color",label:Tr.properties.color.label,icon:"ui//mk-make-image",restricted:!0,description:Tr.properties.color.description},{type:"space",label:Tr.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:Tr.properties.space.description},{type:"table",label:Tr.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:Tr.properties.space.description},{type:"super",label:Tr.properties.super.label,icon:"ui//zap",restricted:!0,configKeys:["dynamic","field"]},{type:"input",label:Tr.properties.super.label,icon:"ui//input",restricted:!0}];var qs="files",hy={id:qs,name:"Files",type:"db",primary:"true"},OZ="filesView",BZ={id:OZ,name:"All",type:"view",def:JSON.stringify({db:qs,icon:"ui//file-stack"})},PZ="main",IZ=e=>({id:e,name:e,type:"frame",def:"",predicate:"",primary:"true"}),N4e={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[IZ(PZ),BZ]},py={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[hy]},a5={uniques:["name,schemaId"],cols:["name","schemaId","type","value","attrs","hidden","unique","primary"]},dy={...a5,rows:[{name:Fa,schemaId:qs,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""},{name:Tr.properties.fileProperty.createdTime,schemaId:qs,type:"fileprop",value:Fa+".ctime",hidden:"",unique:"",attrs:"",primary:"true"}]};var A4e=[{name:Tr.properties.defaultField,schemaId:"",type:"text",primary:"true"}],FS={...a5,rows:[{name:Fa,schemaId:qs,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""}]};var M4e={schema:hy,cols:dy.rows,rows:[]},C4e={schema:hy,cols:dy.rows,rows:[]},E4e={schema:hy,cols:FS.rows,rows:[]},i5=(e,r)=>e.filter(t=>r.find(n=>n.id==t.schemaId&&n.type=="db")).reduce((t,n)=>({...t,...t[n.schemaId]?{[n.schemaId]:{uniques:n.unique=="true"?[...t[n.schemaId].uniques,n.name]:t[n.schemaId].uniques,cols:[...t[n.schemaId].cols,n.name],rows:[]}}:{[n.schemaId]:{uniques:n.unique=="true"?[n.name]:[],cols:[n.name],rows:[]}}}),{});var T4e={m_schema:py,m_fields:dy,...i5(dy.rows,py.rows)},F4e={m_schema:py,m_fields:FS,...i5(FS.rows,py.rows)};var _S="spaces://$tags";var fRe={name:Tr.menu.waypoints,displayName:Tr.menu.waypoints,path:"spaces://$waypoints",label:{name:Tr.menu.waypoints,thumbnail:"",sticker:"ui//tags",color:""},type:"default"},cRe={name:Tr.menu.tags,displayName:Tr.menu.tags,path:"spaces://$tags",label:{thumbnail:"",name:Tr.menu.tags,sticker:"ui//tags",color:""},type:"default"},lRe={name:Tr.menu.vault,displayName:Tr.menu.vault,path:"/",label:{thumbnail:"",name:Tr.menu.vault,sticker:"ui//vault",color:""},type:"default"};var o5=(e,r,t,n,a,i,u)=>{if(!t)return"";let l=new Map;Object.keys(a).forEach(o=>l.set(o,a[o])),l.set("$properties",n),l.set("$paths",r),i&&l.set("$current",i);let c;try{e.evaluate("current = current()",l),c=e.evaluate(t,l),c=ws("",c)}catch(o){if(u)throw o}return c};var OS=e=>{let r=new Map;e.filter(u=>u.type=="fileprop"||u.name.startsWith("tags")).forEach(u=>{let{value:l}=my(u.value,u.type),c=[];try{let s=Ua(l).filter(m=>m.type=="FunctionNode").filter(m=>m.fn.name=="prop"&&m.args[0].type=="ConstantNode").map(m=>m.args[0]?.value);c.push(...s)}catch{}let o=u.name;r.has(o)||r.set(o,new Set);for(let s of c){let m=s;m!==o&&r.get(o).add(m)}});let t=new Set,n=[],a=new Set,i=u=>{if(a.has(u))throw new Error("Circular dependency detected");if(!t.has(u)){a.add(u);let l=r.get(u)||new Set;for(let c of l)i(c);t.add(u),a.delete(u),n.push(u)}};for(let u of e)t.has(u.name)||i(u.name);return n},s5=(e,r,t,n,a,i)=>{if(!t)return{};let u=i??OS(n),l=r.get(t[Fa])?.metadata?.property??{},c=Object.keys(l).filter(m=>n.some(d=>d.name==m)).reduce((m,d)=>({...m,[d]:ws(d,l[d])}),{}),o=u.map(m=>n.find(d=>d.name==m)).filter(m=>m&&(m.type=="fileprop"||m.name=="tags")),s=n.reduce((m,d)=>({...m,[d.name]:d}),{});return{...t,...c,...o.reduce((m,d)=>{let{value:h}=my(d.value,d.type);return{...m,[d.name]:o5(e,r,h,s,{...t,...m},a)}},{})}};var u5=(e,r)=>{let t=e?Sn(e):[],n=r?Sn(r):[];return n.every(a=>t.some(i=>i==a))&&t.every(a=>n.some(i=>i==a))},Mf=(e,r)=>e==r,BS=(e,r)=>(e??"").length==0,PS=(e,r)=>(e??"").toLowerCase().includes((r??"").toLowerCase()),IS=(e,r)=>parseFloat(e)>parseFloat(r),RS=(e,r)=>parseInt(e){let t=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e),n=isNaN(Date.parse(r))?new Date(parseInt(r)):new Date(r);return t.valueOf()>=n.valueOf()},c5=(e,r)=>{let t=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e),n=isNaN(Date.parse(r))?new Date(parseInt(r)):new Date(r);return t.valueOf(){let t=e?Sn(e):[],n=r?Sn(r):[];return t.length==0?!1:n.some(a=>t.some(i=>i==a))},l5=(e,r)=>{if(!e)return!1;let t=new Date(\`\${e.toString().replace(".",":")}\`),n=new Date(\`\${r}\`);return t.getMonth()===n.getMonth()&&t.getDate()===n.getDate()},m5=e=>{if(!e)return!1;let r=new Date(\`\${e.toString()}T00:00\`),t=new Date;return r.getMonth()===t.getMonth()&&r.getDate()===t.getDate()};var Cf={isNotEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(e,r)=>!BS(e,""),valueType:"none"},isEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(e,r)=>BS(e,""),valueType:"none"},include:{fn:(e,r)=>PS(e,r),type:["text","file","link","image"],valueType:"text"},notInclude:{type:["text","file","link","image"],fn:(e,r)=>!PS(e,r),valueType:"text"},is:{type:["text"],fn:(e,r)=>Mf(e,r),valueType:"text"},isNot:{type:["text"],fn:(e,r)=>!Mf(e,r),valueType:"text"},equal:{type:["number"],fn:(e,r)=>Mf(e,r),valueType:"number"},isLink:{type:["link","context"],fn:(e,r)=>Mf(e,r),valueType:"link"},isNotLink:{type:["link","context"],fn:(e,r)=>!Mf(e,r),valueType:"link"},isGreatThan:{type:["number"],fn:(e,r)=>IS(e,r),valueType:"number"},isLessThan:{type:["number"],fn:(e,r)=>RS(e,r),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(e,r)=>!IS(e,r),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(e,r)=>!RS(e,r),valueType:"number"},dateBefore:{type:["date"],fn:(e,r)=>c5(e,r),valueType:"date"},dateAfter:{type:["date"],fn:(e,r)=>f5(e,r),valueType:"date"},isSameDate:{type:["date"],fn:(e,r)=>l5(e,r),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(e,r)=>m5(e,r),valueType:"none"},isExactList:{type:["option","option-multi","link-multi","context-multi","tags-multi"],fn:(e,r)=>u5(e,r),valueType:"list"},isAnyInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(e,r)=>kS(e,r),valueType:"list"},isNoneInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(e,r)=>!kS(e,r),valueType:"list"},isTrue:{type:["boolean"],fn:(e,r)=>e=="true",valueType:"none"},isFalse:{type:["boolean"],fn:(e,r)=>e!="true",valueType:"none"}};var qZ=(e,r,t)=>r.reduce((a,i)=>{let[u,l]=a,c=i.type=="context"?p5(l,i,t):i.type=="path"?h5(l,i,t):i.type=="frontmatter"?d5(l,i,t):v5(l,i,t),o=l.filter(s=>!c.includes(s));return[[...u,...c],o]},[[],e])[0],LZ=(e,r,t)=>r.reduce((n,a)=>a.type=="context"?p5(n,a,t):a.type=="path"?h5(n,a,t):a.type=="frontmatter"?d5(n,a,t):v5(n,a,t),e),p5=(e,r,t)=>{let n=Cf[r.fn];return!n||n.valueType!="none"&&r.value.length==0?[]:e.filter(a=>{let[i,u]=r.field.split("."),l=a.metadata?.property;if(!a.spaces?.includes(i)||!l||!l[u])return!1;let c=!0;if(n){let o=r.fType=="property"?t[r.value]:r.value;c=n.fn(ws(u,l[u]),o)}return c})},d5=(e,r,t)=>{let n=Cf[r.fn];return!n||n.valueType!="none"&&r.value.length==0?[]:e.filter(a=>{let i=a.metadata?.property;if(!i||!i[r.field])return!1;let u=!0;if(n){let l=r.fType=="property"?t[r.value]:r.value;u=n.fn(ws(r.field,i[r.field]),l)}return u})},h5=(e,r,t)=>{let n=Cf[r.fn];return!n||n.valueType!="none"&&r.value.length==0?[]:e.filter(a=>{let i="";r.field=="outlinks"?i=bs(a.outlinks??[]):r.field=="inlinks"?i=bs(a.inlinks??[]):r.field=="tags"&&(i=bs(a.tags??[]));let u=!0;if(n){let l=r.fType=="property"?t[r.value]:r.value;u=n.fn(i,l)}return u})},v5=(e,r,t)=>{let n=Cf[r.fn];return!n||n.valueType!="none"&&r.value.length==0?[]:e.filter(a=>{let i=!0;if(n){let u=r.fType=="property"?t[r.value]:r.value;i=n.fn(a.metadata?.[r.type]?.[r.field],u)}return i})},g5=(e,r,t)=>e.reduce((a,i)=>!a||i.filters.length==0?!1:i.type=="any"?qZ([r],i.filters,t).length>0:LZ([r],i.filters,t).length>0,!0);var x5=(e,r)=>e.hiddenExtensions.some(t=>r.endsWith(t))||r.startsWith(e.spacesFolder+"/#")||e.hiddenFiles.some(t=>t==r);var y5=(e,r,t)=>{if(!e)return{changed:!1,cache:null};if(!r)return{changed:!1,cache:{path:e.path,frames:{},schemas:[]}};let n=Object.values(r).map(l=>l.schema),a=n.filter(l=>l.type=="frame").reduce((l,c)=>({...l,[c.id]:r[c.id]}),{}),i={path:e.path,frames:a,schemas:n},u=!0;return t&&vy.default.isEqual(i,t)&&(u=!1),{changed:u,cache:i}},b5=(e,r,t,n,a,i,u)=>{let l={};if(!e)return{changed:!1,cache:null};if(!r)return{changed:!1,cache:{cols:[],path:e.path,schemas:[],outlinks:[],contexts:[],paths:[],tables:{},space:e,spaceMap:l,dbExists:!1}};let c=Object.values(r).map(A=>A.schema),o=c.find(A=>A.primary=="true"),s=OS(r[o.id].cols),m={...r[o.id],rows:r[o.id].rows.map(A=>s5(u,i,A,r[o.id].cols,i.get(e.path),s))},d={...r,[o.id]:m},h=m.cols?.filter(A=>A.type.startsWith("context"))??[],x=m.cols?.filter(A=>A.type.startsWith("link"))??[],v=ti(h.map(A=>A.value));h.forEach(A=>{l[A.name]={},m.rows.forEach(S=>{Sn(S[A.name]).forEach(O=>l[A.name][O]=[...l[A.name][O]??[],S[Fa]])})});let y=d[qs]?.rows?.map(A=>A[Fa])??[],w=NA(t??[],y),C=ti(m.rows.reduce((A,S)=>ti([...A,...[...h,...x].flatMap(O=>Sn(S[O.name]).map(_=>Dc(_)))]),[])),b={cols:m.cols,path:e.path,contexts:v,outlinks:C,paths:w,tables:d,schemas:c,space:e,spaceMap:l,dbExists:a},M=!0;return n&&vy.default.isEqual(b,n)&&(M=!0),{changed:M,cache:b}},w5=(e,r,t,n)=>{let a={};for(let[i,u]of e){let l=t.get(i)?.defPath??i,c=e.get(l)??u,o=u?.parent??"",s=u?.type??"",m=u?.subtype??"",d=c?.label,h=n?.get(i),{changed:x,cache:v}=qS(i,r,t,c,d,s,m,o,h);a[i]={changed:x,cache:v}}return a},qS=(e,r,t,n,a,i,u,l,c)=>{let o=(W,G,H)=>W?.length>0||W?.length>0?W:G=="space"?H=="Spaces/Home"?"ui//home":H=="/"?"ui//vault":H.startsWith("spaces://")?"ui//tags":"ui//folder":"ui//file",s={label:n?.label,path:e,name:yc(e),displayName:yc(e)},m=[],d=n?.tags?.map(W=>W)??[],h=x5(r,e),x=(W,G,H=new Set)=>{let L=[];for(let k of G){let K=W.get(k)?.contexts??[];for(let z of K)H.has(z)||(L.push(z),H.add(z),L.push(...x(W,[bc(z)],H)))}return L};if(t.has(l))for(let W of t.get(l).contexts??[])m.push(W);m.push(...d);let v=a?.name,y=n?.properties?um(n.properties[r.fmKeyAlias]):[],w=o(a?.sticker,i,e),C=a?.color??"",b=n?.inlinks??[],M=n?.links??[],A=r.spacesUseAlias?y[0]??v:v,S={...s,name:v,tags:ti(m),type:i,subtype:u,displayName:A,parent:l,label:{name:v,sticker:w,color:C,thumbnail:a?.thumbnail??"",preview:a?.preview??""},metadata:{...n},inlinks:b,outlinks:M},O=[];u=="tag"&&O.push(_S);for(let W of m)O.push(bc(W));let _=new Set,E=(W,G)=>{if(!_.has(W)){if(_.add(W),G.dependencies?.length>0)for(let H of G.dependencies)t.has(H)&&E(H,t.get(H));if(G.defPath==e&&(h=!0),u!="tag"&&u!="default"&&G.space&&G.space.path==l){O.push(W);return}if(G.metadata?.filters?.length>0&&g5(G.metadata.filters,{...S,spaces:O},G.properties)){O.push(W);return}if(G.metadata?.links?.length>0&&(G.metadata?.links??[]).find(L=>L==S.path)){O.push(W);return}}};for(let[W,G]of t)E(W,G);let T=x(t,O);O.push(...T.map(W=>bc(W))),S.tags.push(...T);let R=h?{...S,spaces:[],hidden:h}:{...S,spaces:ti(O),hidden:h},q=!0;return c&&vy.default.isEqual(R,c)&&(q=!1),{changed:q,cache:R}};function D5(e){let{path:r,settings:t,spacesCache:n,pathMetadata:a,label:i,type:u,subtype:l,parent:c,oldMetadata:o}=e;return qS(r,t,n,a,i,u,l,c,o)}function LS(e,r){let{space:t,mdb:n,paths:a,oldCache:i,dbExists:u,pathsIndex:l}=e;return b5(t,n,a,i,u,l,r)}function S5(e,r){let{map:t,pathsIndex:n}=e,a=new Map;for(let[i,u]of t)a.set(i,LS({...u,pathsIndex:n},r));return a}function N5(e){let{pathCache:r,settings:t,spacesCache:n,oldMetadata:a}=e;return w5(r,t,n,a)}function A5(e){let{space:r,mdb:t,oldCache:n}=e;return y5(r,t,n)}var zZ=self,UZ={...AS,createAdd:F("add",[],()=>function(r,t){return r+t})},zS=ly(UZ);zS.import(Lb,{override:!0});zZ.onmessage=async e=>{let{payload:r,job:t}=e.data,n;t.type=="path"?n=D5(r):t.type=="context"?n=LS(r,zS):t.type=="contexts"?n=S5(r,zS):t.type=="frames"?n=A5(r):t.type=="paths"&&(n=N5(r));try{postMessage({job:t,result:n})}catch(a){console.log(a),postMessage({job:t,result:{$error:\`Failed to index \${t.type} \${t.path}: \${a}\`}})}}; +In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.\`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]};var i3={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(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","prod","sum","variance"]};var o3={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]};var s3={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],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","variance"]};var u3={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]};var f3={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]};var c3={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"]};var l3={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"]};var m3={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]};var p3={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"]};var d3={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]};var h3={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as \`acsch(x) = ln(1/x + sqrt(1/x^2 + 1))\`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]};var v3={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"]};var g3={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]};var x3={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]};var y3={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as \`asinh(x) = ln(x + sqrt(x^2 + 1))\`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]};var b3={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"]};var w3={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"]};var D3={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as \`atanh(x) = ln((1 + x)/(1 - x)) / 2\`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]};var S3={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"]};var N3={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]};var A3={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"]};var M3={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"]};var C3={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"]};var E3={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"]};var T3={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]};var F3={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]};var _3={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"]};var O3={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]};var B3={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]};var P3={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"]};var I3={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:[]};var R3={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]};var k3={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:[]};var q3={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"]};var L3={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]};var z3={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]};var U3={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"]};var W3={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]};var Y3={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"]};var H3={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"]};var $3={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var G3={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]};var V3={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"]};var Z3={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","fraction","bignumber","string","format"]};var Q3={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]};var X3={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]};var J3={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]};var K3={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]};var j3={bignumber:YT,boolean:HT,complex:$T,createUnit:GT,fraction:VT,index:ZT,matrix:QT,number:XT,sparse:JT,splitUnit:KT,string:jT,unit:eF,e:DD,E:DD,false:ET,i:TT,Infinity:FT,LN2:OT,LN10:_T,LOG2E:PT,LOG10E:BT,NaN:IT,null:RT,pi:SD,PI:SD,phi:kT,SQRT1_2:qT,SQRT2:LT,tau:zT,true:UT,version:WT,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:aF,lsolve:oF,lsolveAll:sF,lup:uF,lusolve:fF,leafCount:iF,polynomialRoot:cF,resolve:pF,simplify:dF,simplifyConstant:hF,simplifyCore:vF,symbolicEqual:xF,rationalize:mF,slu:gF,usolve:yF,usolveAll:bF,qr:lF,abs:wF,add:DF,cbrt:SF,ceil:NF,cube:AF,divide:MF,dotDivide:CF,dotMultiply:EF,dotPow:TF,exp:FF,expm:_F,expm1:OF,fix:BF,floor:PF,gcd:IF,hypot:RF,lcm:qF,log:LF,log2:WF,log1p:UF,log10:zF,mod:YF,multiply:HF,norm:$F,nthRoot:GF,nthRoots:VF,pow:ZF,round:QF,sign:XF,sqrt:JF,sqrtm:KF,square:t_,subtract:n_,unaryMinus:a_,unaryPlus:i_,xgcd:o_,invmod:kF,bitAnd:s_,bitNot:u_,bitOr:f_,bitXor:c_,leftShift:l_,rightArithShift:m_,rightLogShift:p_,bellNumbers:d_,catalan:h_,composition:v_,stirlingS2:g_,config:rF,import:tF,typed:nF,arg:x_,conj:y_,re:w_,im:b_,evaluate:D_,help:S_,distance:N_,intersect:A_,and:M_,not:C_,or:E_,xor:T_,concat:__,count:O_,cross:B_,column:F_,ctranspose:P_,det:I_,diag:R_,diff:k_,dot:q_,getMatrixDataType:Y_,identity:H_,filter:z_,flatten:U_,forEach:W_,inv:$_,pinv:G_,eigs:L_,kron:V_,matrixFromFunction:X_,matrixFromRows:J_,matrixFromColumns:Q_,map:Z_,ones:K_,partitionSelect:j_,range:eO,resize:tO,reshape:rO,rotate:nO,rotationMatrix:aO,row:iO,size:oO,sort:sO,squeeze:uO,subset:fO,trace:cO,transpose:lO,zeros:mO,fft:pO,ifft:dO,sylvester:jF,schur:e_,lyap:r_,solveODE:K3,combinations:hO,combinationsWithRep:vO,factorial:gO,gamma:xO,kldivergence:bO,lgamma:yO,multinomial:wO,permutations:DO,pickRandom:SO,random:NO,randomInt:AO,compare:MO,compareNatural:CO,compareText:EO,deepEqual:TO,equal:FO,equalText:_O,larger:OO,largerEq:BO,smaller:PO,smallerEq:IO,unequal:RO,setCartesian:kO,setDifference:qO,setDistinct:LO,setIntersect:zO,setIsSubset:UO,setMultiplicity:WO,setPowerset:YO,setSize:HO,setSymDifference:$O,setUnion:GO,zpk2tf:VO,freqz:ZO,erf:QO,zeta:XO,cumsum:o3,mad:JO,max:KO,mean:jO,median:e3,min:r3,mode:t3,prod:n3,quantileSeq:a3,std:i3,sum:s3,variance:u3,corr:f3,acos:c3,acosh:l3,acot:m3,acoth:p3,acsc:d3,acsch:h3,asec:v3,asech:g3,asin:x3,asinh:y3,atan:b3,atanh:D3,atan2:w3,cos:S3,cosh:N3,cot:A3,coth:M3,csc:C3,csch:E3,sec:T3,sech:F3,sin:_3,sinh:O3,tan:B3,tanh:P3,to:I3,clone:k3,format:q3,bin:R3,oct:Q3,hex:z3,isNaN:W3,isInteger:U3,isNegative:Y3,isNumeric:H3,hasNumericValue:L3,isPositive:$3,isPrime:G3,isZero:V3,print:X3,typeOf:J3,numeric:Z3};var eB="help",xG=["typed","mathWithTransform","Help"],hg=F(eB,xG,e=>{var{typed:r,mathWithTransform:t,Help:n}=e;return r(eB,{any:function(i){var u,l=i;if(typeof i!="string"){for(u in t)if(Xe(t,u)&&i===t[u]){l=u;break}}var c=wt(j3,l);if(!c){var o=typeof l=="function"?l.name:l;throw new Error('No documentation found on "'+o+'"')}return new n(c)}})});var rB="chain",yG=["typed","Chain"],vg=F(rB,yG,e=>{var{typed:r,Chain:t}=e;return r(rB,{"":function(){return new t},any:function(a){return new t(a)}})});var tB="det",bG=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],gg=F(tB,bG,e=>{var{typed:r,matrix:t,subtractScalar:n,multiply:a,divideScalar:i,isZero:u,unaryMinus:l}=e;return r(tB,{any:function(s){return ar(s)},"Array | Matrix":function(s){var m;switch(Qe(s)?m=s.size():Array.isArray(s)?(s=t(s),m=s.size()):m=[],m.length){case 0:return ar(s);case 1:if(m[0]===1)return ar(s.valueOf()[0]);if(m[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+lr(m)+")");case 2:{var d=m[0],h=m[1];if(d===h)return c(s.clone().valueOf(),d,h);if(h===0)return 1;throw new RangeError("Matrix must be square (size: "+lr(m)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(m)+")")}}});function c(o,s,m){if(s===1)return ar(o[0][0]);if(s===2)return n(a(o[0][0],o[1][1]),a(o[1][0],o[0][1]));for(var d=!1,h=new Array(s).fill(0).map((O,_)=>_),x=0;x{var{typed:r,matrix:t,divideScalar:n,addScalar:a,multiply:i,unaryMinus:u,det:l,identity:c,abs:o}=e;return r(nB,{"Array | Matrix":function(d){var h=Qe(d)?d.size():ur(d);switch(h.length){case 1:if(h[0]===1)return Qe(d)?t([n(1,d.valueOf()[0])]):[n(1,d[0])];throw new RangeError("Matrix must be square (size: "+lr(h)+")");case 2:{var x=h[0],v=h[1];if(x===v)return Qe(d)?t(s(d.valueOf(),x,v),d.storage()):s(d,x,v);throw new RangeError("Matrix must be square (size: "+lr(h)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(h)+")")}},any:function(d){return n(1,d)}});function s(m,d,h){var x,v,y,w,C;if(d===1){if(w=m[0][0],w===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,w)]]}else if(d===2){var b=l(m);if(b===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(m[1][1],b),n(u(m[0][1]),b)],[n(u(m[1][0]),b),n(m[0][0],b)]]}else{var M=m.concat();for(x=0;xO&&(O=o(M[x][S]),_=x),x++;if(O===0)throw Error("Cannot calculate inverse, determinant is zero");x=_,x!==S&&(C=M[S],M[S]=M[x],M[x]=C,C=A[S],A[S]=A[x],A[x]=C);var E=M[S],T=A[S];for(x=0;x{var{typed:r,matrix:t,inv:n,deepEqual:a,equal:i,dotDivide:u,dot:l,ctranspose:c,divideScalar:o,multiply:s,add:m,Complex:d}=e;return r(aB,{"Array | Matrix":function(b){var M=Qe(b)?b.size():ur(b);switch(M.length){case 1:return w(b)?c(b):M[0]===1?n(b):u(c(b),l(b,b));case 2:{if(w(b))return c(b);var A=M[0],S=M[1];if(A===S)try{return n(b)}catch(O){if(!(O instanceof Error&&O.message.match(/Cannot calculate inverse, determinant is zero/)))throw O}return Qe(b)?t(h(b.valueOf(),A,S),b.storage()):h(b,A,S)}default:throw new RangeError("Matrix must be two dimensional (size: "+lr(M)+")")}},any:function(b){return i(b,0)?ar(b):o(1,b)}});function h(C,b,M){var{C:A,F:S}=v(C,b,M),O=s(n(s(c(A),A)),c(A)),_=s(c(S),n(s(S,c(S))));return s(_,O)}function x(C,b,M){for(var A=ar(C),S=0,O=0;O_.filter((T,R)=>R!y(l(A[E],A[E])));return{C:S,F:O}}function y(C){return i(m(C,d(1,1)),m(0,d(1,1)))}function w(C){return a(m(C,d(1,1)),m(s(C,0),d(1,1)))}});function iB(e){var{addScalar:r,subtract:t,flatten:n,multiply:a,multiplyScalar:i,divideScalar:u,sqrt:l,abs:c,bignumber:o,diag:s,size:m,reshape:d,inv:h,qr:x,usolve:v,usolveAll:y,equal:w,complex:C,larger:b,smaller:M,matrixFromColumns:A,dot:S}=e;function O(ae,$,le,Ee){var me=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,ge=_(ae,$,le,Ee,me);E(ae,$,le,Ee,me,ge);var{values:Se,C:xe}=T(ae,$,le,Ee,me);if(me){var be=R(ae,$,xe,ge,Se,le,Ee);return{values:Se,eigenvectors:be}}return{values:Se}}function _(ae,$,le,Ee,me){var ge=Ee==="BigNumber",Se=Ee==="Complex",xe=ge?o(0):0,be=ge?o(1):Se?C(1):1,De=ge?o(1):1,Ae=ge?o(10):2,We=i(Ae,Ae),Je;me&&(Je=Array($).fill(be));for(var J=!1;!J;){J=!0;for(var re=0;re<$;re++){for(var ye=xe,j=xe,ne=0;ne<$;ne++)re!==ne&&(ye=r(ye,c(ae[ne][re])),j=r(j,c(ae[re][ne])));if(!w(ye,0)&&!w(j,0)){for(var ue=De,Me=ye,Ce=u(j,Ae),Le=i(j,Ae);M(Me,Ce);)Me=i(Me,We),ue=i(ue,Ae);for(;b(Me,Le);)Me=u(Me,We),ue=u(ue,Ae);var Ie=M(u(r(Me,j),ue),i(r(ye,j),.95));if(Ie){J=!1;for(var fr=u(1,ue),or=0;or<$;or++)re!==or&&(ae[re][or]=i(ae[re][or],fr),ae[or][re]=i(ae[or][re],ue));me&&(Je[re]=i(Je[re],fr))}}}}return me?s(Je):null}function E(ae,$,le,Ee,me,ge){var Se=Ee==="BigNumber",xe=Ee==="Complex",be=Se?o(0):xe?C(0):0;Se&&(le=o(le));for(var De=0;De<$-2;De++){for(var Ae=0,We=be,Je=De+1;Je<$;Je++){var J=ae[Je][De];M(c(We),c(J))&&(We=J,Ae=Je)}if(!M(c(We),le)){if(Ae!==De+1){var re=ae[Ae];ae[Ae]=ae[De+1],ae[De+1]=re;for(var ye=0;ye<$;ye++){var j=ae[ye][Ae];ae[ye][Ae]=ae[ye][De+1],ae[ye][De+1]=j}if(me){var ne=ge[Ae];ge[Ae]=ge[De+1],ge[De+1]=ne}}for(var ue=De+2;ue<$;ue++){var Me=u(ae[ue][De],We);if(Me!==0){for(var Ce=0;Ce<$;Ce++)ae[ue][Ce]=t(ae[ue][Ce],i(Me,ae[De+1][Ce]));for(var Le=0;Le<$;Le++)ae[Le][De+1]=r(ae[Le][De+1],i(Me,ae[Le][ue]));if(me)for(var Ie=0;Ie<$;Ie++)ge[ue][Ie]=t(ge[ue][Ie],i(Me,ge[De+1][Ie]))}}}}return ge}function T(ae,$,le,Ee,me){var ge=Ee==="BigNumber",Se=Ee==="Complex",xe=ge?o(1):Se?C(1):1;ge&&(le=o(le));for(var be=ar(ae),De=[],Ae=$,We=[],Je=me?s(Array($).fill(xe)):void 0,J=me?s(Array(Ae).fill(xe)):void 0,re=0;re<=100;){re+=1;for(var ye=be[Ae-1][Ae-1],j=0;j1&&(J=s(Array(Ae-1).fill(xe)))),Ae-=1,be.pop();for(var Ce=0;Ce2&&(J=s(Array(Ae-2).fill(xe)))),Ae-=2,be.pop(),be.pop();for(var Ie=0;Ie+t(c(Ke),c(Pr))),re>100){var fr=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+De.join(", "));throw fr.values=De,fr.vectors=[],fr}var or=me?a(Je,H(We,$)):void 0;return{values:De,C:or}}function R(ae,$,le,Ee,me,ge,Se){var xe=h(le),be=a(xe,ae,le),De=Se==="BigNumber",Ae=Se==="Complex",We=De?o(0):Ae?C(0):0,Je=De?o(1):Ae?C(1):1,J=[],re=[];for(var ye of me){var j=L(J,ye,w);j===-1?(J.push(ye),re.push(1)):re[j]+=1}for(var ne=[],ue=J.length,Me=Array($).fill(We),Ce=s(Array($).fill(Je)),Le=function(){var or=J[Ie],Ke=t(be,a(or,Ce)),Pr=y(Ke,Me);for(Pr.shift();Pr.lengtha(ce,we)),ne.push(...Pr.map(we=>({value:or,vector:n(we)})))},Ie=0;Ie=5)return null;for(xe=0;;){var be=v(ae,Se);if(M(oe(z(Se,[be])),Ee))break;if(++xe>=10)return null;Se=pe(be)}return Se}function K(ae,$,le){var Ee=le==="BigNumber",me=le==="Complex",ge=Array(ae).fill(0).map(Se=>2*Math.random()-1);return Ee&&(ge=ge.map(Se=>o(Se))),me&&(ge=ge.map(Se=>C(Se))),ge=z(ge,$),pe(ge,le)}function z(ae,$){var le=m(ae);for(var Ee of $)Ee=d(Ee,le),ae=t(ae,a(u(S(Ee,ae),S(Ee,Ee)),Ee));return ae}function oe(ae){return c(l(S(ae,ae)))}function pe(ae,$){var le=$==="BigNumber",Ee=$==="Complex",me=le?o(1):Ee?C(1):1;return a(u(me,oe(ae)),ae)}return O}function oB(e){var{config:r,addScalar:t,subtract:n,abs:a,atan:i,cos:u,sin:l,multiplyScalar:c,inv:o,bignumber:s,multiply:m,add:d}=e;function h(E,T){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r.epsilon,q=arguments.length>3?arguments[3]:void 0,W=arguments.length>4?arguments[4]:void 0;if(q==="number")return x(E,R,W);if(q==="BigNumber")return v(E,R,W);throw TypeError("Unsupported data type: "+q)}function x(E,T,R){var q=E.length,W=Math.abs(T/q),G,H;if(R){H=new Array(q);for(var L=0;L=Math.abs(W);){var K=k[0][0],z=k[0][1];G=y(E[K][K],E[z][z],E[K][z]),E=A(E,G,K,z),R&&(H=C(H,G,K,z)),k=S(E)}for(var oe=Array(q).fill(0),pe=0;pe=a(W);){var K=k[0][0],z=k[0][1];G=w(E[K][K],E[z][z],E[K][z]),E=M(E,G,K,z),R&&(H=b(H,G,K,z)),k=O(E)}for(var oe=Array(q).fill(0),pe=0;pe({value:W[$],vector:ae}));return{values:W,eigenvectors:pe}}return h}var SG="eigs",NG=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],bg=F(SG,NG,e=>{var{config:r,typed:t,matrix:n,addScalar:a,subtract:i,equal:u,abs:l,atan:c,cos:o,sin:s,multiplyScalar:m,divideScalar:d,inv:h,bignumber:x,multiply:v,add:y,larger:w,column:C,flatten:b,number:M,complex:A,sqrt:S,diag:O,size:_,reshape:E,qr:T,usolve:R,usolveAll:q,im:W,re:G,smaller:H,matrixFromColumns:L,dot:k}=e,K=oB({config:r,addScalar:a,subtract:i,column:C,flatten:b,equal:u,abs:l,atan:c,cos:o,sin:s,multiplyScalar:m,inv:h,bignumber:x,complex:A,multiply:v,add:y}),z=iB({config:r,addScalar:a,subtract:i,multiply:v,multiplyScalar:m,flatten:b,divideScalar:d,sqrt:S,abs:l,bignumber:x,diag:O,size:_,reshape:E,qr:T,inv:h,usolve:R,usolveAll:q,equal:u,complex:A,larger:w,smaller:H,matrixFromColumns:L,dot:k});return t("eigs",{Array:function(ge){return oe(n(ge))},"Array, number|BigNumber":function(ge,Se){return oe(n(ge),{precision:Se})},"Array, Object"(me,ge){return oe(n(me),ge)},Matrix:function(ge){return oe(ge,{matricize:!0})},"Matrix, number|BigNumber":function(ge,Se){return oe(ge,{precision:Se,matricize:!0})},"Matrix, Object":function(ge,Se){var xe={matricize:!0};return ht(xe,Se),oe(ge,xe)}});function oe(me){var ge,Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},xe="eigenvectors"in Se?Se.eigenvectors:!0,be=(ge=Se.precision)!==null&&ge!==void 0?ge:r.epsilon,De=pe(me,be,xe);return Se.matricize&&(De.values=n(De.values),xe&&(De.eigenvectors=De.eigenvectors.map(Ae=>{var{value:We,vector:Je}=Ae;return{value:We,vector:n(Je)}}))),xe&&Object.defineProperty(De,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),De}function pe(me,ge,Se){var xe=me.toArray(),be=me.size();if(be.length!==2||be[0]!==be[1])throw new RangeError("Matrix must be square (size: ".concat(lr(be),")"));var De=be[0];if($(xe,De,ge)&&(le(xe,De),ae(xe,De,ge))){var Ae=Ee(me,xe,De);return K(xe,De,ge,Ae,Se)}var We=Ee(me,xe,De);return z(xe,De,ge,We,Se)}function ae(me,ge,Se){for(var xe=0;xe{var{typed:r,abs:t,add:n,identity:a,inv:i,multiply:u}=e;return r(sB,{Matrix:function(m){var d=m.size();if(d.length!==2||d[0]!==d[1])throw new RangeError("Matrix must be square (size: "+lr(d)+")");for(var h=d[0],x=1e-15,v=l(m),y=c(v,x),w=y.q,C=y.j,b=u(m,Math.pow(2,-C)),M=a(h),A=a(h),S=1,O=b,_=-1,E=1;E<=w;E++)E>1&&(O=u(O,b),_=-_),S=S*(w-E+1)/((2*w-E+1)*E),M=n(M,u(S,O)),A=n(A,u(S*_,O));for(var T=u(i(A),M),R=0;R{var{typed:r,abs:t,add:n,multiply:a,map:i,sqrt:u,subtract:l,inv:c,size:o,max:s,identity:m}=e,d=1e3,h=1e-6;function x(v){var y,w=0,C=v,b=m(o(v));do{var M=C;if(C=a(.5,n(M,c(b))),b=a(.5,n(b,c(M))),y=s(t(l(C,M))),y>h&&++w>d)throw new Error("computing square root of matrix: iterative method could not converge")}while(y>h);return C}return r(uB,{"Array | Matrix":function(y){var w=Qe(y)?y.size():ur(y);switch(w.length){case 1:if(w[0]===1)return i(y,u);throw new RangeError("Matrix must be square (size: "+lr(w)+")");case 2:{var C=w[0],b=w[1];if(C===b)return x(y);throw new RangeError("Matrix must be square (size: "+lr(w)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+lr(w)+")")}}})});var fB="sylvester",CG=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],Sg=F(fB,CG,e=>{var{typed:r,schur:t,matrixFromColumns:n,matrix:a,multiply:i,range:u,concat:l,transpose:c,index:o,subset:s,add:m,subtract:d,identity:h,lusolve:x,abs:v}=e;return r(fB,{"Matrix, Matrix, Matrix":y,"Array, Matrix, Matrix":function(C,b,M){return y(a(C),b,M)},"Array, Array, Matrix":function(C,b,M){return y(a(C),a(b),M)},"Array, Matrix, Array":function(C,b,M){return y(a(C),b,a(M))},"Matrix, Array, Matrix":function(C,b,M){return y(C,a(b),M)},"Matrix, Array, Array":function(C,b,M){return y(C,a(b),a(M))},"Matrix, Matrix, Array":function(C,b,M){return y(C,b,a(M))},"Array, Array, Array":function(C,b,M){return y(a(C),a(b),a(M)).toArray()}});function y(w,C,b){for(var M=C.size()[0],A=w.size()[0],S=t(w),O=S.T,_=S.U,E=t(i(-1,C)),T=E.T,R=E.U,q=i(i(c(_),b),R),W=u(0,A),G=[],H=(Ae,We)=>l(Ae,We,1),L=(Ae,We)=>l(Ae,We,0),k=0;k1e-5){for(var K=L(s(q,o(W,k)),s(q,o(W,k+1))),z=0;z{var{typed:r,matrix:t,identity:n,multiply:a,qr:i,norm:u,subtract:l}=e;return r(cB,{Array:function(s){var m=c(t(s));return{U:m.U.valueOf(),T:m.T.valueOf()}},Matrix:function(s){return c(s)}});function c(o){var s=o.size()[0],m=o,d=n(s),h=0,x;do{x=m;var v=i(m),y=v.Q,w=v.R;if(m=a(w,y),d=a(d,y),h++>100)break}while(u(l(m,x))>1e-4);return{U:d,T:m}}});var lB="lyap",TG=["typed","matrix","sylvester","multiply","transpose"],Ag=F(lB,TG,e=>{var{typed:r,matrix:t,sylvester:n,multiply:a,transpose:i}=e;return r(lB,{"Matrix, Matrix":function(l,c){return n(l,i(l),a(-1,c))},"Array, Matrix":function(l,c){return n(t(l),i(t(l)),a(-1,c))},"Matrix, Array":function(l,c){return n(l,i(t(l)),t(a(-1,c)))},"Array, Array":function(l,c){return n(t(l),i(t(l)),t(a(-1,c))).toArray()}})});var FG="divide",_G=["typed","matrix","multiply","equalScalar","divideScalar","inv"],Mg=F(FG,_G,e=>{var{typed:r,matrix:t,multiply:n,equalScalar:a,divideScalar:i,inv:u}=e,l=jr({typed:r,equalScalar:a}),c=qt({typed:r});return r("divide",Dm({"Array | Matrix, Array | Matrix":function(s,m){return n(s,u(m))},"DenseMatrix, any":function(s,m){return c(s,m,i,!1)},"SparseMatrix, any":function(s,m){return l(s,m,i,!1)},"Array, any":function(s,m){return c(t(s),m,i,!1).valueOf()},"any, Array | Matrix":function(s,m){return n(s,u(m))}},i.signatures))});var mB="distance",OG=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],Cg=F(mB,OG,e=>{var{typed:r,addScalar:t,subtractScalar:n,multiplyScalar:a,divideScalar:i,deepEqual:u,sqrt:l,abs:c}=e;return r(mB,{"Array, Array, Array":function(A,S,O){if(A.length===2&&S.length===2&&O.length===2){if(!s(A))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!s(S))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!s(O))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(u(S,O))throw new TypeError("LinePoint1 should not be same with LinePoint2");var _=n(O[1],S[1]),E=n(S[0],O[0]),T=n(a(O[0],S[1]),a(S[0],O[1]));return y(A[0],A[1],_,E,T)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(A,S,O){if(Object.keys(A).length===2&&Object.keys(S).length===2&&Object.keys(O).length===2){if(!s(A))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!s(S))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!s(O))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(u(x(S),x(O)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in A&&"pointY"in A&&"lineOnePtX"in S&&"lineOnePtY"in S&&"lineTwoPtX"in O&&"lineTwoPtY"in O){var _=n(O.lineTwoPtY,S.lineOnePtY),E=n(S.lineOnePtX,O.lineTwoPtX),T=n(a(O.lineTwoPtX,S.lineOnePtY),a(S.lineOnePtX,O.lineTwoPtY));return y(A.pointX,A.pointY,_,E,T)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(A,S){if(A.length===2&&S.length===3){if(!s(A))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!m(S))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return y(A[0],A[1],S[0],S[1],S[2])}else if(A.length===3&&S.length===6){if(!m(A))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!h(S))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return w(A[0],A[1],A[2],S[0],S[1],S[2],S[3],S[4],S[5])}else if(A.length===S.length&&A.length>0){if(!d(A))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!d(S))throw new TypeError("All values of an array should be numbers or BigNumbers");return C(A,S)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(A,S){if(Object.keys(A).length===2&&Object.keys(S).length===3){if(!s(A))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!m(S))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in A&&"pointY"in A&&"xCoeffLine"in S&&"yCoeffLine"in S&&"constant"in S)return y(A.pointX,A.pointY,S.xCoeffLine,S.yCoeffLine,S.constant);throw new TypeError("Key names do not match")}else if(Object.keys(A).length===3&&Object.keys(S).length===6){if(!m(A))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!h(S))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in A&&"pointY"in A&&"x0"in S&&"y0"in S&&"z0"in S&&"a"in S&&"b"in S&&"c"in S)return w(A.pointX,A.pointY,A.pointZ,S.x0,S.y0,S.z0,S.a,S.b,S.c);throw new TypeError("Key names do not match")}else if(Object.keys(A).length===2&&Object.keys(S).length===2){if(!s(A))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!s(S))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in A&&"pointOneY"in A&&"pointTwoX"in S&&"pointTwoY"in S)return C([A.pointOneX,A.pointOneY],[S.pointTwoX,S.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(A).length===3&&Object.keys(S).length===3){if(!m(A))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!m(S))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in A&&"pointOneY"in A&&"pointOneZ"in A&&"pointTwoX"in S&&"pointTwoY"in S&&"pointTwoZ"in S)return C([A.pointOneX,A.pointOneY,A.pointOneZ],[S.pointTwoX,S.pointTwoY,S.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(A){if(!v(A))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return b(A)}});function o(M){return typeof M=="number"||rr(M)}function s(M){return M.constructor!==Array&&(M=x(M)),o(M[0])&&o(M[1])}function m(M){return M.constructor!==Array&&(M=x(M)),o(M[0])&&o(M[1])&&o(M[2])}function d(M){return Array.isArray(M)||(M=x(M)),M.every(o)}function h(M){return M.constructor!==Array&&(M=x(M)),o(M[0])&&o(M[1])&&o(M[2])&&o(M[3])&&o(M[4])&&o(M[5])}function x(M){for(var A=Object.keys(M),S=[],O=0;OA.length!==2||!o(A[0])||!o(A[1])))return!1}else if(M[0].length===3&&o(M[0][0])&&o(M[0][1])&&o(M[0][2])){if(M.some(A=>A.length!==3||!o(A[0])||!o(A[1])||!o(A[2])))return!1}else return!1;return!0}function y(M,A,S,O,_){var E=c(t(t(a(S,M),a(O,A)),_)),T=l(t(a(S,S),a(O,O)));return i(E,T)}function w(M,A,S,O,_,E,T,R,q){var W=[n(a(n(_,A),q),a(n(E,S),R)),n(a(n(E,S),T),a(n(O,M),q)),n(a(n(O,M),R),a(n(_,A),T))];W=l(t(t(a(W[0],W[0]),a(W[1],W[1])),a(W[2],W[2])));var G=l(t(t(a(T,T),a(R,R)),a(q,q)));return i(W,G)}function C(M,A){for(var S=M.length,O=0,_=0,E=0;E{var{typed:r,config:t,abs:n,add:a,addScalar:i,matrix:u,multiply:l,multiplyScalar:c,divideScalar:o,subtract:s,smaller:m,equalScalar:d,flatten:h,isZero:x,isNumeric:v}=e;return r("intersect",{"Array, Array, Array":y,"Array, Array, Array, Array":w,"Matrix, Matrix, Matrix":function(R,q,W){var G=y(R.valueOf(),q.valueOf(),W.valueOf());return G===null?null:u(G)},"Matrix, Matrix, Matrix, Matrix":function(R,q,W,G){var H=w(R.valueOf(),q.valueOf(),W.valueOf(),G.valueOf());return H===null?null:u(H)}});function y(T,R,q){if(T=C(T),R=C(R),q=C(q),!M(T))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!M(R))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!A(q))throw new TypeError("Array with 4 numbers expected as third argument");return E(T[0],T[1],T[2],R[0],R[1],R[2],q[0],q[1],q[2],q[3])}function w(T,R,q,W){if(T=C(T),R=C(R),q=C(q),W=C(W),T.length===2){if(!b(T))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!b(R))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!b(q))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!b(W))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return S(T,R,q,W)}else if(T.length===3){if(!M(T))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!M(R))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!M(q))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!M(W))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return _(T[0],T[1],T[2],R[0],R[1],R[2],q[0],q[1],q[2],W[0],W[1],W[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function C(T){return T.length===1?T[0]:T.length>1&&Array.isArray(T[0])&&T.every(R=>Array.isArray(R)&&R.length===1)?h(T):T}function b(T){return T.length===2&&v(T[0])&&v(T[1])}function M(T){return T.length===3&&v(T[0])&&v(T[1])&&v(T[2])}function A(T){return T.length===4&&v(T[0])&&v(T[1])&&v(T[2])&&v(T[3])}function S(T,R,q,W){var G=T,H=q,L=s(G,R),k=s(H,W),K=s(c(L[0],k[1]),c(k[0],L[1]));if(x(K)||m(n(K),t.epsilon))return null;var z=c(k[0],G[1]),oe=c(k[1],G[0]),pe=c(k[0],H[1]),ae=c(k[1],H[0]),$=o(i(s(s(z,oe),pe),ae),K);return a(l(L,$),G)}function O(T,R,q,W,G,H,L,k,K,z,oe,pe){var ae=c(s(T,R),s(q,W)),$=c(s(G,H),s(L,k)),le=c(s(K,z),s(oe,pe));return i(i(ae,$),le)}function _(T,R,q,W,G,H,L,k,K,z,oe,pe){var ae=O(T,L,z,L,R,k,oe,k,q,K,pe,K),$=O(z,L,W,T,oe,k,G,R,pe,K,H,q),le=O(T,L,W,T,R,k,G,R,q,K,H,q),Ee=O(z,L,z,L,oe,k,oe,k,pe,K,pe,K),me=O(W,T,W,T,G,R,G,R,H,q,H,q),ge=s(c(ae,$),c(le,Ee)),Se=s(c(me,Ee),c($,$));if(x(Se))return null;var xe=o(ge,Se),be=o(i(ae,c(xe,$)),Ee),De=i(T,c(xe,s(W,T))),Ae=i(R,c(xe,s(G,R))),We=i(q,c(xe,s(H,q))),Je=i(L,c(be,s(z,L))),J=i(k,c(be,s(oe,k))),re=i(K,c(be,s(pe,K)));return d(De,Je)&&d(Ae,J)&&d(We,re)?[De,Ae,We]:null}function E(T,R,q,W,G,H,L,k,K,z){var oe=c(T,L),pe=c(W,L),ae=c(R,k),$=c(G,k),le=c(q,K),Ee=c(H,K),me=s(s(s(z,oe),ae),le),ge=s(s(s(i(i(pe,$),Ee),oe),ae),le),Se=o(me,ge),xe=i(T,c(Se,s(W,T))),be=i(R,c(Se,s(G,R))),De=i(q,c(Se,s(H,q)));return[xe,be,De]}});var pB="sum",IG=["typed","config","add","numeric"],nf=F(pB,IG,e=>{var{typed:r,config:t,add:n,numeric:a}=e;return r(pB,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":u,"...":function(c){if(Ba(c))throw new TypeError("Scalar values expected in function sum");return i(c)}});function i(l){var c;return An(l,function(o){try{c=c===void 0?o:n(c,o)}catch(s){throw Et(s,"sum",o)}}),c===void 0&&(c=a(0,t.number)),typeof c=="string"&&(c=a(c,t.number)),c}function u(l,c){try{var o=ko(l,c,n);return o}catch(s){throw Et(s,"sum")}}});var Tg="cumsum",RG=["typed","add","unaryPlus"],af=F(Tg,RG,e=>{var{typed:r,add:t,unaryPlus:n}=e;return r(Tg,{Array:a,Matrix:function(o){return o.create(a(o.valueOf()))},"Array, number | BigNumber":u,"Matrix, number | BigNumber":function(o,s){return o.create(u(o.valueOf(),s))},"...":function(o){if(Ba(o))throw new TypeError("All values expected to be scalar in function cumsum");return a(o)}});function a(c){try{return i(c)}catch(o){throw Et(o,Tg)}}function i(c){if(c.length===0)return[];for(var o=[n(c[0])],s=1;s=s.length)throw new tn(o,s.length);try{return l(c,o)}catch(m){throw Et(m,Tg)}}function l(c,o){var s,m,d;if(o<=0){var h=c[0][0];if(Array.isArray(h)){for(d=Km(c),m=[],s=0;s{var{typed:r,add:t,divide:n}=e;return r(dB,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":a,"...":function(l){if(Ba(l))throw new TypeError("Scalar values expected in function mean");return i(l)}});function a(u,l){try{var c=ko(u,l,t),o=Array.isArray(u)?ur(u):u.size();return n(c,o[l])}catch(s){throw Et(s,"mean")}}function i(u){var l,c=0;if(An(u,function(o){try{l=l===void 0?o:t(l,o),c++}catch(s){throw Et(s,"mean",o)}}),c===0)throw new Error("Cannot calculate the mean of an empty array");return n(l,c)}});var hB="median",qG=["typed","add","divide","compare","partitionSelect"],Fg=F(hB,qG,e=>{var{typed:r,add:t,divide:n,compare:a,partitionSelect:i}=e;function u(o){try{o=gr(o.valueOf());var s=o.length;if(s===0)throw new Error("Cannot calculate median of an empty array");if(s%2===0){for(var m=s/2-1,d=i(o,m+1),h=o[m],x=0;x0&&(h=o[x]);return c(h,d)}else{var v=i(o,(s-1)/2);return l(v)}}catch(y){throw Et(y,"median")}}var l=r({"number | BigNumber | Complex | Unit":function(s){return s}}),c=r({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(s,m){return n(t(s,m),2)}});return r(hB,{"Array | Matrix":u,"Array | Matrix, number | BigNumber":function(s,m){throw new Error("median(A, dim) is not yet supported")},"...":function(s){if(Ba(s))throw new TypeError("Scalar values expected in function median");return u(s)}})});var vB="mad",LG=["typed","abs","map","median","subtract"],_g=F(vB,LG,e=>{var{typed:r,abs:t,map:n,median:a,subtract:i}=e;return r(vB,{"Array | Matrix":u,"...":function(c){return u(c)}});function u(l){if(l=gr(l.valueOf()),l.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var c=a(l);return a(n(l,function(o){return t(i(o,c))}))}catch(o){throw o instanceof TypeError&&o.message.indexOf("median")!==-1?new TypeError(o.message.replace("median","mad")):Et(o,"mad")}}});var ND="unbiased",gB="variance",zG=["typed","add","subtract","multiply","divide","apply","isNaN"],sf=F(gB,zG,e=>{var{typed:r,add:t,subtract:n,multiply:a,divide:i,apply:u,isNaN:l}=e;return r(gB,{"Array | Matrix":function(m){return c(m,ND)},"Array | Matrix, string":c,"Array | Matrix, number | BigNumber":function(m,d){return o(m,d,ND)},"Array | Matrix, number | BigNumber, string":o,"...":function(m){return c(m,ND)}});function c(s,m){var d,h=0;if(s.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(An(s,function(y){try{d=d===void 0?y:t(d,y),h++}catch(w){throw Et(w,"variance",y)}}),h===0)throw new Error("Cannot calculate variance of an empty array");var x=i(d,h);if(d=void 0,An(s,function(y){var w=n(y,x);d=d===void 0?a(w,w):t(d,a(w,w))}),l(d))return d;switch(m){case"uncorrected":return i(d,h);case"biased":return i(d,h+1);case"unbiased":{var v=rr(d)?d.mul(0):0;return h===1?v:i(d,h-1)}default:throw new Error('Unknown normalization "'+m+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function o(s,m,d){try{if(s.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return u(s,m,h=>c(h,d))}catch(h){throw Et(h,"variance")}}});var xB="quantileSeq",UG=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],uf=F(xB,UG,e=>{var{typed:r,bignumber:t,add:n,subtract:a,divide:i,multiply:u,partitionSelect:l,compare:c,isInteger:o,smaller:s,smallerEq:m,larger:d}=e,h=qo({typed:r,isInteger:o});return r(xB,{"Array | Matrix, number | BigNumber":(C,b)=>v(C,b,!1),"Array | Matrix, number | BigNumber, number":(C,b,M)=>x(C,b,!1,M,v),"Array | Matrix, number | BigNumber, boolean":v,"Array | Matrix, number | BigNumber, boolean, number":(C,b,M,A)=>x(C,b,M,A,v),"Array | Matrix, Array | Matrix":(C,b)=>y(C,b,!1),"Array | Matrix, Array | Matrix, number":(C,b,M)=>x(C,b,!1,M,y),"Array | Matrix, Array | Matrix, boolean":y,"Array | Matrix, Array | Matrix, boolean, number":(C,b,M,A)=>x(C,b,M,A,y)});function x(C,b,M,A,S){return h(C,A,O=>S(O,b,M))}function v(C,b,M){var A,S=C.valueOf();if(s(b,0))throw new Error("N/prob must be non-negative");if(m(b,1))return sr(b)?w(S,b,M):t(w(S,b,M));if(d(b,1)){if(!o(b))throw new Error("N must be a positive integer");if(d(b,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var O=n(b,1);A=[];for(var _=0;s(_,b);_++){var E=i(_+1,O);A.push(w(S,E,M))}return sr(b)?A:t(A)}}function y(C,b,M){for(var A=C.valueOf(),S=b.valueOf(),O=[],_=0;_0&&(T=A[q])}return n(u(T,a(1,E)),u(R,E))}});var yB="std",WG=["typed","map","sqrt","variance"],ff=F(yB,WG,e=>{var{typed:r,map:t,sqrt:n,variance:a}=e;return r(yB,{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(l){return i(l)}});function i(u,l){if(u.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var c=a.apply(null,arguments);return Nt(c)?t(c,n):n(c)}catch(o){throw o instanceof TypeError&&o.message.indexOf(" variance")!==-1?new TypeError(o.message.replace(" variance"," std")):o}}});var bB="corr",YG=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],Og=F(bB,YG,e=>{var{typed:r,matrix:t,sqrt:n,sum:a,add:i,subtract:u,multiply:l,pow:c,divide:o}=e;return r(bB,{"Array, Array":function(h,x){return s(h,x)},"Matrix, Matrix":function(h,x){var v=s(h.toArray(),x.toArray());return Array.isArray(v)?t(v):v}});function s(d,h){var x=[];if(Array.isArray(d[0])&&Array.isArray(h[0])){if(d.length!==h.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var v=0;vi(S,l(O,h[_])),0),C=a(d.map(S=>c(S,2))),b=a(h.map(S=>c(S,2))),M=u(l(x,w),l(v,y)),A=n(l(u(l(x,C),c(v,2)),u(l(x,b),c(y,2))));return o(M,A)}});var wB="combinations",HG=["typed"],Bg=F(wB,HG,e=>{var{typed:r}=e;return r(wB,{"number, number":kw,"BigNumber, BigNumber":function(n,a){var i=n.constructor,u,l,c=n.minus(a),o=new i(1);if(!DB(n)||!DB(a))throw new TypeError("Positive integer value expected in function combinations");if(a.gt(n))throw new TypeError("k must be less than n in function combinations");if(u=o,a.lt(c))for(l=o;l.lte(c);l=l.plus(o))u=u.times(a.plus(l)).dividedBy(l);else for(l=o;l.lte(a);l=l.plus(o))u=u.times(c.plus(l)).dividedBy(l);return u}})});function DB(e){return e.isInteger()&&e.gte(0)}var SB="combinationsWithRep",$G=["typed"],Pg=F(SB,$G,e=>{var{typed:r}=e;return r(SB,{"number, number":function(n,a){if(!Ze(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!Ze(a)||a<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n<1)throw new TypeError("k must be less than or equal to n + k - 1");if(a{var{typed:r,config:t,multiplyScalar:n,pow:a,BigNumber:i,Complex:u}=e;function l(o){if(o.im===0)return _c(o.re);if(o.re<.5){var s=new u(1-o.re,-o.im),m=new u(Math.PI*o.re,Math.PI*o.im);return new u(Math.PI).div(m.sin()).div(l(s))}o=new u(o.re-1,o.im);for(var d=new u(Ts[0],0),h=1;h2;)d-=2,x+=d,h=h.times(x);return new i(h.toPrecision(i.precision))}});var MB="lgamma",VG=["Complex","typed"],Rg=F(MB,VG,e=>{var{Complex:r,typed:t}=e,n=7,a=7,i=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return t(MB,{number:Oc,Complex:u,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function u(o){var s=6.283185307179586,m=1.1447298858494002,d=.1;if(o.isNaN())return new r(NaN,NaN);if(o.im===0)return new r(Oc(o.re),0);if(o.re>=n||Math.abs(o.im)>=a)return l(o);if(o.re<=d){var h=nM(s,o.im)*Math.floor(.5*o.re+.25),x=o.mul(Math.PI).sin().log(),v=u(new r(1-o.re,-o.im));return new r(m,h).sub(x).sub(v)}else return o.im>=0?c(o):c(o.conjugate()).conjugate()}function l(o){for(var s=o.sub(.5).mul(o.log()).sub(o).add(Hw),m=new r(1,0).div(o),d=m.div(o),h=i[0],x=i[1],v=2*d.re,y=d.re*d.re+d.im*d.im,w=2;w<8;w++){var C=x;x=-y*h+i[w],h=v*h+C}var b=m.mul(d.mul(h).add(x));return s.add(b)}function c(o){var s=0,m=0,d=o;for(o=o.add(1);o.re<=n;){d=d.mul(o);var h=d.im<0?1:0;h!==0&&m===0&&s++,m=h,o=o.add(1)}return l(o).sub(d.log()).sub(new r(0,s*2*Math.PI*1))}});var CB="factorial",ZG=["typed","gamma"],kg=F(CB,ZG,e=>{var{typed:r,gamma:t}=e;return r(CB,{number:function(a){if(a<0)throw new Error("Value must be non-negative");return t(a+1)},BigNumber:function(a){if(a.isNegative())throw new Error("Value must be non-negative");return t(a.plus(1))},"Array | Matrix":r.referToSelf(n=>a=>je(a,n))})});var EB="kldivergence",QG=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],qg=F(EB,QG,e=>{var{typed:r,matrix:t,divide:n,sum:a,multiply:i,map:u,dotDivide:l,log:c,isNumeric:o}=e;return r(EB,{"Array, Array":function(d,h){return s(t(d),t(h))},"Matrix, Array":function(d,h){return s(d,t(h))},"Array, Matrix":function(d,h){return s(t(d),h)},"Matrix, Matrix":function(d,h){return s(d,h)}});function s(m,d){var h=d.size().length,x=m.size().length;if(h>1)throw new Error("first object must be one dimensional");if(x>1)throw new Error("second object must be one dimensional");if(h!==x)throw new Error("Length of two vectors must be equal");var v=a(m);if(v===0)throw new Error("Sum of elements in first object must be non zero");var y=a(d);if(y===0)throw new Error("Sum of elements in second object must be non zero");var w=n(m,a(m)),C=n(d,a(d)),b=a(i(w,u(l(w,C),M=>c(M))));return o(b)?b:Number.NaN}});var TB="multinomial",XG=["typed","add","divide","multiply","factorial","isInteger","isPositive"],Lg=F(TB,XG,e=>{var{typed:r,add:t,divide:n,multiply:a,factorial:i,isInteger:u,isPositive:l}=e;return r(TB,{"Array | Matrix":function(o){var s=0,m=1;return An(o,function(d){if(!u(d)||!l(d))throw new TypeError("Positive integer value expected in function multinomial");s=t(s,d),m=a(m,i(d))}),n(i(s),m)}})});var FB="permutations",JG=["typed","factorial"],zg=F(FB,JG,e=>{var{typed:r,factorial:t}=e;return r(FB,{"number | BigNumber":t,"number, number":function(a,i){if(!Ze(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(!Ze(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(i>a)throw new TypeError("second argument k must be less than or equal to first argument n");return da(a-i+1,a)},"BigNumber, BigNumber":function(a,i){var u,l;if(!_B(a)||!_B(i))throw new TypeError("Positive integer value expected in function permutations");if(i.gt(a))throw new TypeError("second argument k must be less than or equal to first argument n");var c=a.mul(0).add(1);for(u=c,l=a.minus(i).plus(1);l.lte(a);l=l.plus(1))u=u.times(l);return u}})});function _B(e){return e.isInteger()&&e.gte(0)}var _D=ca(ZB(),1),aV=(0,_D.default)(Date.now());function to(e){var r;function t(a){r=a===null?aV:(0,_D.default)(String(a))}t(e);function n(){return r()}return n}var QB="pickRandom",iV=["typed","config","?on"],Wg=F(QB,iV,e=>{var{typed:r,config:t,on:n}=e,a=to(t.randomSeed);return n&&n("config",function(u,l){u.randomSeed!==l.randomSeed&&(a=to(u.randomSeed))}),r(QB,{"Array | Matrix":function(l){return i(l,{})},"Array | Matrix, Object":function(l,c){return i(l,c)},"Array | Matrix, number":function(l,c){return i(l,{number:c})},"Array | Matrix, Array | Matrix":function(l,c){return i(l,{weights:c})},"Array | Matrix, Array | Matrix, number":function(l,c,o){return i(l,{number:o,weights:c})},"Array | Matrix, number, Array | Matrix":function(l,c,o){return i(l,{number:c,weights:o})}});function i(u,l){var{number:c,weights:o,elementWise:s=!0}=l,m=typeof c>"u";m&&(c=1);var d=Qe(u)?u.create:Qe(o)?o.create:null;u=u.valueOf(),o&&(o=o.valueOf()),s===!0&&(u=gr(u),o=gr(o));var h=0;if(typeof o<"u"){if(o.length!==u.length)throw new Error("Weights must have the same length as possibles");for(var x=0,v=o.length;x"u")C=u[Math.floor(a()*y)];else for(var b=a()*h,M=0,A=u.length;M1)for(var n=0,a=e.shift();n{var{typed:r,config:t,on:n}=e,a=to(t.randomSeed);return n&&n("config",function(l,c){l.randomSeed!==c.randomSeed&&(a=to(l.randomSeed))}),r(XB,{"":()=>u(0,1),number:l=>u(0,l),"number, number":(l,c)=>u(l,c),"Array | Matrix":l=>i(l,0,1),"Array | Matrix, number":(l,c)=>i(l,0,c),"Array | Matrix, number, number":(l,c,o)=>i(l,c,o)});function i(l,c,o){var s=kc(l.valueOf(),()=>u(c,o));return Qe(l)?l.create(s):s}function u(l,c){return l+a()*(c-l)}});var JB="randomInt",sV=["typed","config","?on"],Hg=F(JB,sV,e=>{var{typed:r,config:t,on:n}=e,a=to(t.randomSeed);return n&&n("config",function(l,c){l.randomSeed!==c.randomSeed&&(a=to(l.randomSeed))}),r(JB,{"":()=>u(0,1),number:l=>u(0,l),"number, number":(l,c)=>u(l,c),"Array | Matrix":l=>i(l,0,1),"Array | Matrix, number":(l,c)=>i(l,0,c),"Array | Matrix, number, number":(l,c,o)=>i(l,c,o)});function i(l,c,o){var s=kc(l.valueOf(),()=>u(c,o));return Qe(l)?l.create(s):s}function u(l,c){return Math.floor(l+a()*(c-l))}});var KB="stirlingS2",uV=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],$g=F(KB,uV,e=>{var{typed:r,addScalar:t,subtractScalar:n,multiplyScalar:a,divideScalar:i,pow:u,factorial:l,combinations:c,isNegative:o,isInteger:s,number:m,bignumber:d,larger:h}=e,x=[],v=[];return r(KB,{"number | BigNumber, number | BigNumber":function(w,C){if(!s(w)||o(w)||!s(C)||o(C))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(h(C,w))throw new TypeError("k must be less than or equal to n in function stirlingS2");var b=!(sr(w)&&sr(C)),M=b?v:x,A=b?d:m,S=m(w),O=m(C);if(M[S]&&M[S].length>O)return M[S][O];for(var _=0;_<=S;++_)if(M[_]||(M[_]=[A(_===0?1:0)]),_!==0)for(var E=M[_],T=M[_-1],R=E.length;R<=_&&R<=O;++R)R===_?E[R]=1:E[R]=t(a(A(R),T[R]),T[R-1]);return M[S][O]}})});var jB="bellNumbers",fV=["typed","addScalar","isNegative","isInteger","stirlingS2"],Gg=F(jB,fV,e=>{var{typed:r,addScalar:t,isNegative:n,isInteger:a,stirlingS2:i}=e;return r(jB,{"number | BigNumber":function(l){if(!a(l)||n(l))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var c=0,o=0;o<=l;o++)c=t(c,i(l,o));return c}})});var eP="catalan",cV=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],Vg=F(eP,cV,e=>{var{typed:r,addScalar:t,divideScalar:n,multiplyScalar:a,combinations:i,isNegative:u,isInteger:l}=e;return r(eP,{"number | BigNumber":function(o){if(!l(o)||u(o))throw new TypeError("Non-negative integer value expected in function catalan");return n(i(a(o,2),o),t(o,1))}})});var rP="composition",lV=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],Zg=F(rP,lV,e=>{var{typed:r,addScalar:t,combinations:n,isPositive:a,isNegative:i,isInteger:u,larger:l}=e;return r(rP,{"number | BigNumber, number | BigNumber":function(o,s){if(!u(o)||!a(o)||!u(s)||!a(s))throw new TypeError("Positive integer value expected in function composition");if(l(s,o))throw new TypeError("k must be less than or equal to n in function composition");return n(t(o,-1),t(s,-1))}})});var tP="leafCount",mV=["parse","typed"],Qg=F(tP,mV,e=>{var{parse:r,typed:t}=e;function n(a){var i=0;return a.forEach(u=>{i+=n(u)}),i||1}return t(tP,{Node:function(i){return n(i)}})});function OD(e){return yr(e)||ct(e)&&e.isUnary()&&yr(e.args[0])}function qc(e){return!!(yr(e)||(gn(e)||ct(e))&&e.args.every(qc)||en(e)&&qc(e.content))}function nP(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function BD(e){for(var r=1;r{var{FunctionNode:r,OperatorNode:t,SymbolNode:n}=e,a=!0,i=!1,u="defaultF",l={add:{trivial:a,total:a,commutative:a,associative:a},unaryPlus:{trivial:a,total:a,commutative:a,associative:a},subtract:{trivial:i,total:a,commutative:i,associative:i},multiply:{trivial:a,total:a,commutative:a,associative:a},divide:{trivial:i,total:a,commutative:i,associative:i},paren:{trivial:a,total:a,commutative:a,associative:i},defaultF:{trivial:i,total:a,commutative:i,associative:i}},c={divide:{total:i},log:{total:i}},o={subtract:{total:i},abs:{trivial:a},log:{total:a}};function s(b,M){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:l,S=u;if(typeof b=="string"?S=b:ct(b)?S=b.fn.toString():gn(b)?S=b.name:en(b)&&(S="paren"),Xe(A,S)){var O=A[S];if(Xe(O,M))return O[M];if(Xe(l,S))return l[S][M]}if(Xe(A,u)){var _=A[u];return Xe(_,M)?_[M]:l[u][M]}if(Xe(l,S)){var E=l[S];if(Xe(E,M))return E[M]}return l[u][M]}function m(b){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return s(b,"commutative",M)}function d(b){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return s(b,"associative",M)}function h(b,M){var A=BD({},b);for(var S in M)Xe(b,S)?A[S]=BD(BD({},M[S]),b[S]):A[S]=M[S];return A}function x(b,M){if(!b.args||b.args.length===0)return b;b.args=v(b,M);for(var A=0;A2&&d(b,M)){for(var _=b.args.pop();b.args.length>0;)_=A([b.args.pop(),_]);b.args=_.args}}}function w(b,M){if(!(!b.args||b.args.length===0)){for(var A=C(b),S=b.args.length,O=0;O2&&d(b,M)){for(var _=b.args.shift();b.args.length>0;)_=A([_,b.args.shift()]);b.args=_.args}}}function C(b){return ct(b)?function(M){try{return new t(b.op,b.fn,M,b.implicit)}catch(A){return console.error(A),[]}}:function(M){return new r(new n(b.name),M)}}return{createMakeNodeFunction:C,hasProperty:s,isCommutative:m,isAssociative:d,mergeContext:h,flatten:x,allChildren:v,unflattenr:y,unflattenl:w,defaultContext:l,realContext:c,positiveContext:o}});var hV="simplify",vV=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","resolve","simplifyConstant","simplifyCore","?fraction","?bignumber","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],Xg=F(hV,vV,e=>{var{config:r,typed:t,parse:n,add:a,subtract:i,multiply:u,divide:l,pow:c,isZero:o,equal:s,resolve:m,simplifyConstant:d,simplifyCore:h,fraction:x,bignumber:v,mathWithTransform:y,matrix:w,AccessorNode:C,ArrayNode:b,ConstantNode:M,FunctionNode:A,IndexNode:S,ObjectNode:O,OperatorNode:_,ParenthesisNode:E,SymbolNode:T}=e,{hasProperty:R,isCommutative:q,isAssociative:W,mergeContext:G,flatten:H,unflattenr:L,unflattenl:k,createMakeNodeFunction:K,defaultContext:z,realContext:oe,positiveContext:pe}=cf({FunctionNode:A,OperatorNode:_,SymbolNode:T});t.addConversion({from:"Object",to:"Map",convert:Ki});var ae=t("simplify",{Node:xe,"Node, Map":(j,ne)=>xe(j,!1,ne),"Node, Map, Object":(j,ne,ue)=>xe(j,!1,ne,ue),"Node, Array":xe,"Node, Array, Map":xe,"Node, Array, Map, Object":xe});t.removeConversion({from:"Object",to:"Map",convert:Ki}),ae.defaultContext=z,ae.realContext=oe,ae.positiveContext=pe;function $(j){return j.transform(function(ne,ue,Me){return en(ne)?$(ne.content):ne})}var le={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};ae.rules=[h,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},d,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},d,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function Ee(j,ne){var ue={};if(j.s){var Me=j.s.split("->");if(Me.length===2)ue.l=Me[0],ue.r=Me[1];else throw SyntaxError("Could not parse rule: "+j.s)}else ue.l=j.l,ue.r=j.r;ue.l=$(n(ue.l)),ue.r=$(n(ue.r));for(var Ce of["imposeContext","repeat","assuming"])Ce in j&&(ue[Ce]=j[Ce]);if(j.evaluate&&(ue.evaluate=n(j.evaluate)),W(ue.l,ne)){var Le=!q(ue.l,ne),Ie;Le&&(Ie=Se());var fr=K(ue.l),or=Se();ue.expanded={},ue.expanded.l=fr([ue.l,or]),H(ue.expanded.l,ne),L(ue.expanded.l,ne),ue.expanded.r=fr([ue.r,or]),Le&&(ue.expandedNC1={},ue.expandedNC1.l=fr([Ie,ue.l]),ue.expandedNC1.r=fr([Ie,ue.r]),ue.expandedNC2={},ue.expandedNC2.l=fr([Ie,ue.expanded.l]),ue.expandedNC2.r=fr([Ie,ue.expanded.r]))}return ue}function me(j,ne){for(var ue=[],Me=0;Me2&&arguments[2]!==void 0?arguments[2]:Oo(),Me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},Ce=Me.consoleDebug;ne=me(ne||ae.rules,Me.context);var Le=m(j,ue);Le=$(Le);for(var Ie={},fr=Le.toString({parenthesis:"all"});!Ie[fr];){Ie[fr]=!0,ge=0;var or=fr;Ce&&console.log("Working on: ",fr);for(var Ke=0;Ke ").concat(ne[Ke].r.toString()))),Ce){var ee=Le.toString({parenthesis:"all"});ee!==or&&(console.log("Applying",Pr,"produced",ee),or=ee)}k(Le,Me.context)}fr=Le.toString({parenthesis:"all"})}return Le}function be(j,ne,ue){var Me=j;if(j)for(var Ce=0;Ce1&&(or=Le(j.args.slice(0,fr))),Ce=j.args.slice(fr),Me=Ce.length===1?Ce[0]:Le(Ce),ue.push(Le([or,Me]))}return ue}function We(j,ne){var ue={placeholders:{}};if(!j.placeholders&&!ne.placeholders)return ue;if(j.placeholders){if(!ne.placeholders)return j}else return ne;for(var Me in j.placeholders)if(Xe(j.placeholders,Me)&&(ue.placeholders[Me]=j.placeholders[Me],Xe(ne.placeholders,Me)&&!ye(j.placeholders[Me],ne.placeholders[Me])))return null;for(var Ce in ne.placeholders)Xe(ne.placeholders,Ce)&&(ue.placeholders[Ce]=ne.placeholders[Ce]);return ue}function Je(j,ne){var ue=[];if(j.length===0||ne.length===0)return ue;for(var Me,Ce=0;Ce2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var or=re(j.args[0],ne.args[1],ue);if(or.length===0)return[];var Ke=re(j.args[1],ne.args[0],ue);if(Ke.length===0)return[];Le=[or,Ke]}Ce=J(Le)}else if(ne.args.length>=2&&j.args.length===2){for(var Pr=Ae(ne,ue),ee=[],ce=0;ce2)throw Error("Unexpected non-binary associative function: "+j.toString());return[]}}else if(j instanceof T){if(j.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if(le[j.name]){if(j.name!==ne.name)return[]}else switch(j.name[1]>="a"&&j.name[1]<="z"?j.name.substring(0,2):j.name[0]){case"n":case"_p":Ce[0].placeholders[j.name]=ne;break;case"c":case"cl":if(yr(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"v":if(!yr(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"vl":if(at(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"cd":if(OD(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"vd":if(!OD(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"ce":if(qc(ne))Ce[0].placeholders[j.name]=ne;else return[];break;case"ve":if(!qc(ne))Ce[0].placeholders[j.name]=ne;else return[];break;default:throw new Error("Invalid symbol in rule: "+j.name)}}else if(j instanceof M){if(!s(j.value,ne.value))return[]}else return[];return Ce}function ye(j,ne){if(j instanceof M&&ne instanceof M){if(!s(j.value,ne.value))return!1}else if(j instanceof T&&ne instanceof T){if(j.name!==ne.name)return!1}else if(j instanceof _&&ne instanceof _||j instanceof A&&ne instanceof A){if(j instanceof _){if(j.op!==ne.op||j.fn!==ne.fn)return!1}else if(j instanceof A&&j.name!==ne.name)return!1;if(j.args.length!==ne.args.length)return!1;for(var ue=0;ue{var{typed:r,config:t,mathWithTransform:n,matrix:a,fraction:i,bignumber:u,AccessorNode:l,ArrayNode:c,ConstantNode:o,FunctionNode:s,IndexNode:m,ObjectNode:d,OperatorNode:h,SymbolNode:x}=e,{isCommutative:v,isAssociative:y,allChildren:w,createMakeNodeFunction:C}=cf({FunctionNode:s,OperatorNode:h,SymbolNode:x}),b=r("simplifyConstant",{Node:H=>O(G(H,{})),"Node, Object":function(L,k){return O(G(L,k))}});function M(H){return ma(H)?H.valueOf():H instanceof Array?H.map(M):Qe(H)?a(M(H.valueOf())):H}function A(H,L,k){try{return n[H].apply(null,L)}catch{return L=L.map(M),E(n[H].apply(null,L),k)}}var S=r({Fraction:R,number:function(L){return L<0?T(new o(-L)):new o(L)},BigNumber:function(L){return L<0?T(new o(-L)):new o(L)},Complex:function(L){throw new Error("Cannot convert Complex number to Node")},string:function(L){return new o(L)},Matrix:function(L){return new c(L.valueOf().map(k=>S(k)))}});function O(H){return Nr(H)?H:S(H)}function _(H,L){var k=L&&L.exactFractions!==!1;if(k&&isFinite(H)&&i){var K=i(H),z=L&&typeof L.fractionsLimit=="number"?L.fractionsLimit:1/0;if(K.valueOf()===H&&K.n0;)if(yr(K[0])&&typeof K[0].value!="string"){var z=E(K.shift().value,k);jt(H)?H=H.items[z-1]:(H=H.valueOf()[z-1],H instanceof Array&&(H=a(H)))}else if(K.length>1&&yr(K[1])&&typeof K[1].value!="string"){var oe=E(K[1].value,k),pe=[],ae=jt(H)?H.items:H.valueOf();for(var $ of ae)if(jt($))pe.push($.items[oe-1]);else if(Qe(H))pe.push($[oe-1]);else break;if(pe.length===ae.length)jt(H)?H=new c(pe):H=a(pe),K.splice(1,1);else break}else break;return K.length===L.dimensions.length?new l(O(H),L):K.length>0?(L=new m(K),new l(O(H),L)):H}if(Ci(H)&&L.dimensions.length===1&&yr(L.dimensions[0])){var le=L.dimensions[0].value;return le in H.properties?H.properties[le]:new o}return new l(O(H),L)}function W(H,L,k,K){var z=L.shift(),oe=L.reduce((pe,ae)=>{if(!Nr(ae)){var $=pe.pop();if(Nr($))return[$,ae];try{return pe.push(A(H,[$,ae],K)),pe}catch{pe.push($)}}pe.push(O(pe.pop()));var le=pe.length===1?pe[0]:k(pe);return[k([le,O(ae)])]},[z]);return oe.length===1?oe[0]:k([oe[0],S(oe[1])])}function G(H,L){switch(H.type){case"SymbolNode":return H;case"ConstantNode":switch(typeof H.value){case"number":return E(H.value,L);case"string":return H.value;default:if(!isNaN(H.value))return E(H.value,L)}return H;case"FunctionNode":if(n[H.name]&&n[H.name].rawArgs)return H;{var k=["add","multiply"];if(k.indexOf(H.name)===-1){var K=H.args.map(De=>G(De,L));if(!K.some(Nr))try{return A(H.name,K,L)}catch{}if(H.name==="size"&&K.length===1&&jt(K[0])){for(var z=[],oe=K[0];jt(oe);)z.push(oe.items.length),oe=oe.items[0];return a(z)}return new s(H.name,K.map(O))}}case"OperatorNode":{var pe=H.fn.toString(),ae,$,le=C(H);if(ct(H)&&H.isUnary())ae=[G(H.args[0],L)],Nr(ae[0])?$=le(ae):$=A(pe,ae,L);else if(y(H,L.context))if(ae=w(H,L.context),ae=ae.map(De=>G(De,L)),v(pe,L.context)){for(var Ee=[],me=[],ge=0;ge1?($=W(pe,Ee,le,L),me.unshift($),$=W(pe,me,le,L)):$=W(pe,ae,le,L)}else $=W(pe,ae,le,L);else ae=H.args.map(De=>G(De,L)),$=W(pe,ae,le,L);return $}case"ParenthesisNode":return G(H.content,L);case"AccessorNode":return q(G(H.object,L),G(H.index,L),L);case"ArrayNode":{var Se=H.items.map(De=>G(De,L));return Se.some(Nr)?new c(Se.map(O)):a(Se)}case"IndexNode":return new m(H.dimensions.map(De=>b(De,L)));case"ObjectNode":{var xe={};for(var be in H.properties)xe[be]=b(H.properties[be],L);return new d(xe)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(H.type))}}return b});var aP="simplifyCore",yV=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],Kg=F(aP,yV,e=>{var{typed:r,parse:t,equal:n,isZero:a,add:i,subtract:u,multiply:l,divide:c,pow:o,AccessorNode:s,ArrayNode:m,ConstantNode:d,FunctionNode:h,IndexNode:x,ObjectNode:v,OperatorNode:y,ParenthesisNode:w,SymbolNode:C}=e,b=new d(0),M=new d(1),A=new d(!0),S=new d(!1);function O(R){return ct(R)&&["and","not","or"].includes(R.op)}var{hasProperty:_,isCommutative:E}=cf({FunctionNode:h,OperatorNode:y,SymbolNode:C});function T(R){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=q?q.context:void 0;if(_(R,"trivial",W)){if(gn(R)&&R.args.length===1)return T(R.args[0],q);var G=!1,H=0;if(R.forEach(me=>{++H,H===1&&(G=T(me,q))}),H===1)return G}var L=R;if(gn(L)){var k=rT(L.name);if(k){if(L.args.length>2&&_(L,"associative",W))for(;L.args.length>2;){var K=L.args.pop(),z=L.args.pop();L.args.push(new y(k,L.name,[K,z]))}L=new y(k,L.name,L.args)}else return new h(T(L.fn),L.args.map(me=>T(me,q)))}if(ct(L)&&L.isUnary()){var oe=T(L.args[0],q);if(L.op==="~"&&ct(oe)&&oe.isUnary()&&oe.op==="~"||L.op==="not"&&ct(oe)&&oe.isUnary()&&oe.op==="not"&&O(oe.args[0]))return oe.args[0];var pe=!0;if(L.op==="-"&&ct(oe)&&(oe.isBinary()&&oe.fn==="subtract"&&(L=new y("-","subtract",[oe.args[1],oe.args[0]]),pe=!1),oe.isUnary()&&oe.op==="-"))return oe.args[0];if(pe)return new y(L.op,L.fn,[oe])}if(ct(L)&&L.isBinary()){var ae=T(L.args[0],q),$=T(L.args[1],q);if(L.op==="+"){if(yr(ae)&&a(ae.value))return $;if(yr($)&&a($.value))return ae;ct($)&&$.isUnary()&&$.op==="-"&&($=$.args[0],L=new y("-","subtract",[ae,$]))}if(L.op==="-")return ct($)&&$.isUnary()&&$.op==="-"?T(new y("+","add",[ae,$.args[0]]),q):yr(ae)&&a(ae.value)?T(new y("-","unaryMinus",[$])):yr($)&&a($.value)?ae:new y(L.op,L.fn,[ae,$]);if(L.op==="*"){if(yr(ae)){if(a(ae.value))return b;if(n(ae.value,1))return $}if(yr($)){if(a($.value))return b;if(n($.value,1))return ae;if(E(L,W))return new y(L.op,L.fn,[$,ae],L.implicit)}return new y(L.op,L.fn,[ae,$],L.implicit)}if(L.op==="/")return yr(ae)&&a(ae.value)?b:yr($)&&n($.value,1)?ae:new y(L.op,L.fn,[ae,$]);if(L.op==="^"&&yr($)){if(a($.value))return M;if(n($.value,1))return ae}if(L.op==="and"){if(yr(ae))if(ae.value){if(O($))return $;if(yr($))return $.value?A:S}else return S;if(yr($))if($.value){if(O(ae))return ae}else return S}if(L.op==="or"){if(yr(ae)){if(ae.value)return A;if(O($))return $}if(yr($)){if($.value)return A;if(O(ae))return ae}}return new y(L.op,L.fn,[ae,$])}if(ct(L))return new y(L.op,L.fn,L.args.map(me=>T(me,q)));if(jt(L))return new m(L.items.map(me=>T(me,q)));if(qn(L))return new s(T(L.object,q),T(L.index,q));if(Qn(L))return new x(L.dimensions.map(me=>T(me,q)));if(Ci(L)){var le={};for(var Ee in L.properties)le[Ee]=T(L.properties[Ee],q);return new v(le)}return L}return r(aP,{Node:T,"Node,Object":T})});var bV="resolve",wV=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],jg=F(bV,wV,e=>{var{typed:r,parse:t,ConstantNode:n,FunctionNode:a,OperatorNode:i,ParenthesisNode:u}=e;function l(c,o){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!o)return c;if(at(c)){if(s.has(c.name)){var m=Array.from(s).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(m,"}"))}var d=o.get(c.name);if(Nr(d)){var h=new Set(s);return h.add(c.name),l(d,o,h)}else return typeof d=="number"?t(String(d)):d!==void 0?new n(d):c}else if(ct(c)){var x=c.args.map(function(y){return l(y,o,s)});return new i(c.op,c.fn,x,c.implicit)}else{if(en(c))return new u(l(c.content,o,s));if(gn(c)){var v=c.args.map(function(y){return l(y,o,s)});return new a(c.name,v)}}return c.map(y=>l(y,o,s))}return r("resolve",{Node:l,"Node, Map | null | undefined":l,"Node, Object":(c,o)=>l(c,Ki(o)),"Array | Matrix":r.referToSelf(c=>o=>o.map(s=>c(s))),"Array | Matrix, null | undefined":r.referToSelf(c=>o=>o.map(s=>c(s))),"Array, Object":r.referTo("Array,Map",c=>(o,s)=>c(o,Ki(s))),"Matrix, Object":r.referTo("Matrix,Map",c=>(o,s)=>c(o,Ki(s))),"Array | Matrix, Map":r.referToSelf(c=>(o,s)=>o.map(m=>c(m,s)))})});var iP="symbolicEqual",DV=["parse","simplify","typed","OperatorNode"],e0=F(iP,DV,e=>{var{parse:r,simplify:t,typed:n,OperatorNode:a}=e;function i(u,l){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=new a("-","subtract",[u,l]),s=t(o,{},c);return yr(s)&&!s.value}return n(iP,{"Node, Node":i,"Node, Node, Object":i})});var oP="derivative",SV=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],r0=F(oP,SV,e=>{var{typed:r,config:t,parse:n,simplify:a,equal:i,isZero:u,numeric:l,ConstantNode:c,FunctionNode:o,OperatorNode:s,ParenthesisNode:m,SymbolNode:d}=e;function h(b,M){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},S={};y(S,b,M.name);var O=w(b,S);return A.simplify?a(O):O}r.addConversion({from:"identifier",to:"SymbolNode",convert:n});var x=r(oP,{"Node, SymbolNode":h,"Node, SymbolNode, Object":h});r.removeConversion({from:"identifier",to:"SymbolNode",convert:n}),x._simplify=!0,x.toTex=function(b){return v.apply(null,b.args)};var v=r("_derivTex",{"Node, SymbolNode":function(M,A){return yr(M)&&Fr(M.value)==="string"?v(n(M.value).toString(),A.toString(),1):v(M.toTex(),A.toString(),1)},"Node, ConstantNode":function(M,A){if(Fr(A.value)==="string")return v(M,n(A.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(M,A,S){return v(M.toString(),A.name,S.value)},"string, string, number":function(M,A,S){var O;return S===1?O="{d\\\\over d"+A+"}":O="{d^{"+S+"}\\\\over d"+A+"^{"+S+"}}",O+"\\\\left[".concat(M,"\\\\right]")}}),y=r("constTag",{"Object, ConstantNode, string":function(M,A){return M[A]=!0,!0},"Object, SymbolNode, string":function(M,A,S){return A.name!==S?(M[A]=!0,!0):!1},"Object, ParenthesisNode, string":function(M,A,S){return y(M,A.content,S)},"Object, FunctionAssignmentNode, string":function(M,A,S){return A.params.indexOf(S)===-1?(M[A]=!0,!0):y(M,A.expr,S)},"Object, FunctionNode | OperatorNode, string":function(M,A,S){if(A.args.length>0){for(var O=y(M,A.args[0],S),_=1;_0){var O=M.args.filter(function(H){return A[H]===void 0}),_=O.length===1?O[0]:new s("*","multiply",O),E=S.concat(w(_,A));return new s("*","multiply",E)}return new s("+","add",M.args.map(function(H){return new s("*","multiply",M.args.map(function(L){return L===H?w(L,A):L.clone()}))}))}if(M.op==="/"&&M.isBinary()){var T=M.args[0],R=M.args[1];return A[R]!==void 0?new s("/","divide",[w(T,A),R]):A[T]!==void 0?new s("*","multiply",[new s("-","unaryMinus",[T]),new s("/","divide",[w(R,A),new s("^","pow",[R.clone(),C(2)])])]):new s("/","divide",[new s("-","subtract",[new s("*","multiply",[w(T,A),R.clone()]),new s("*","multiply",[T.clone(),w(R,A)])]),new s("^","pow",[R.clone(),C(2)])])}if(M.op==="^"&&M.isBinary()){var q=M.args[0],W=M.args[1];if(A[q]!==void 0)return yr(q)&&(u(q.value)||i(q.value,1))?C(0):new s("*","multiply",[M,new s("*","multiply",[new o("log",[q.clone()]),w(W.clone(),A)])]);if(A[W]!==void 0){if(yr(W)){if(u(W.value))return C(0);if(i(W.value,1))return w(q,A)}var G=new s("^","pow",[q.clone(),new s("-","subtract",[W,C(1)])]);return new s("*","multiply",[W.clone(),new s("*","multiply",[w(q,A),G])])}return new s("*","multiply",[new s("^","pow",[q.clone(),W.clone()]),new s("+","add",[new s("*","multiply",[w(q,A),new s("/","divide",[W.clone(),q.clone()])]),new s("*","multiply",[w(W,A),new o("log",[q.clone()])])])])}throw new Error('Cannot process operator "'+M.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function C(b,M){return new c(l(b,M||t.number))}return x});var sP="rationalize",NV=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],t0=F(sP,NV,e=>{var{config:r,typed:t,equal:n,isZero:a,add:i,subtract:u,multiply:l,divide:c,pow:o,parse:s,simplifyConstant:m,simplifyCore:d,simplify:h,fraction:x,bignumber:v,mathWithTransform:y,matrix:w,AccessorNode:C,ArrayNode:b,ConstantNode:M,FunctionNode:A,IndexNode:S,ObjectNode:O,OperatorNode:_,SymbolNode:E,ParenthesisNode:T}=e;function R(L){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,z=W(),oe=q(L,k,!0,z.firstRules),pe=oe.variables.length,ae={exactFractions:!1},$={exactFractions:!0};if(L=oe.expression,pe>=1){L=G(L);var le,Ee,me=!0,ge=!1;L=h(L,z.firstRules,{},ae);for(var Se;Ee=me?z.distrDivRules:z.sucDivRules,L=h(L,Ee,{},$),me=!me,Se=L.toString(),Se!==le;)ge=!0,le=Se;ge&&(L=h(L,z.firstRulesAgain,{},ae)),L=h(L,z.finalRules,{},ae)}var xe=[],be={};return L.type==="OperatorNode"&&L.isBinary()&&L.op==="/"?(pe===1&&(L.args[0]=H(L.args[0],xe),L.args[1]=H(L.args[1])),K&&(be.numerator=L.args[0],be.denominator=L.args[1])):(pe===1&&(L=H(L,xe)),K&&(be.numerator=L,be.denominator=null)),K?(be.coefficients=xe,be.variables=oe.variables,be.expression=L,be):L}return t(sP,{Node:R,"Node, boolean":(L,k)=>R(L,{},k),"Node, Object":R,"Node, Object, boolean":R});function q(L,k,K,z){var oe=[],pe=h(L,z,k,{exactFractions:!1});K=!!K;var ae="+-*"+(K?"/":"");le(pe);var $={};return $.expression=pe,$.variables=oe,$;function le(Ee){var me=Ee.type;if(me==="FunctionNode")throw new Error("There is an unsolved function call");if(me==="OperatorNode")if(Ee.op==="^"){if(Ee.args[1].type!=="ConstantNode"||!Ze(parseFloat(Ee.args[1].value)))throw new Error("There is a non-integer exponent");le(Ee.args[0])}else{if(ae.indexOf(Ee.op)===-1)throw new Error("Operator "+Ee.op+" invalid in polynomial expression");for(var ge=0;ge1;if(z==="OperatorNode"&&L.isBinary()){var pe=!1,ae;if(L.op==="^"&&(L.args[0].type==="ParenthesisNode"||L.args[0].type==="OperatorNode")&&L.args[1].type==="ConstantNode"&&(ae=parseFloat(L.args[1].value),pe=ae>=2&&Ze(ae)),pe){if(ae>2){var $=L.args[0],le=new _("^","pow",[L.args[0].cloneDeep(),new M(ae-1)]);L=new _("*","multiply",[$,le])}else L=new _("*","multiply",[L.args[0],L.args[0].cloneDeep()]);oe&&(K==="content"?k.content=L:k.args[K]=L)}}if(z==="ParenthesisNode")G(L.content,L,"content");else if(z!=="ConstantNode"&&z!=="SymbolNode")for(var Ee=0;Ee=0;$--)if(k[$]!==0){var le=new M(pe?k[$]:Math.abs(k[$])),Ee=k[$]<0?"-":"+";if($>0){var me=new E(oe);if($>1){var ge=new M($);me=new _("^","pow",[me,ge])}k[$]===-1&&pe?le=new _("-","unaryMinus",[me]):Math.abs(k[$])===1?le=me:le=new _("*","multiply",[le,me])}pe?ae=le:Ee==="+"?ae=new _("+","add",[ae,le]):ae=new _("-","subtract",[ae,le]),pe=!1}if(pe)return new M(0);return ae;function Se(xe,be,De){var Ae=xe.type;if(Ae==="FunctionNode")throw new Error("There is an unsolved function call");if(Ae==="OperatorNode"){if("+-*^".indexOf(xe.op)===-1)throw new Error("Operator "+xe.op+" invalid");if(be!==null){if((xe.fn==="unaryMinus"||xe.fn==="pow")&&be.fn!=="add"&&be.fn!=="subtract"&&be.fn!=="multiply")throw new Error("Invalid "+xe.op+" placing");if((xe.fn==="subtract"||xe.fn==="add"||xe.fn==="multiply")&&be.fn!=="add"&&be.fn!=="subtract")throw new Error("Invalid "+xe.op+" placing");if((xe.fn==="subtract"||xe.fn==="add"||xe.fn==="unaryMinus")&&De.noFil!==0)throw new Error("Invalid "+xe.op+" placing")}(xe.op==="^"||xe.op==="*")&&(De.fire=xe.op);for(var We=0;Wez&&(k[Je]=0),k[Je]+=De.cte*(De.oper==="+"?1:-1),z=Math.max(Je,z);return}De.cte=Je,De.fire===""&&(k[0]+=De.cte*(De.oper==="+"?1:-1))}else throw new Error("Type "+Ae+" is not allowed")}}});var uP="zpk2tf",AV=["typed","add","multiply","Complex","number"],n0=F(uP,AV,e=>{var{typed:r,add:t,multiply:n,Complex:a,number:i}=e;return r(uP,{"Array,Array,number":function(o,s,m){return u(o,s,m)},"Array,Array":function(o,s){return u(o,s,1)},"Matrix,Matrix,number":function(o,s,m){return u(o.valueOf(),s.valueOf(),m)},"Matrix,Matrix":function(o,s){return u(o.valueOf(),s.valueOf(),1)}});function u(c,o,s){c.some(C=>C.type==="BigNumber")&&(c=c.map(C=>i(C))),o.some(C=>C.type==="BigNumber")&&(o=o.map(C=>i(C)));for(var m=[a(1,0)],d=[a(1,0)],h=0;h=0&&m-d{var{typed:r,add:t,multiply:n,Complex:a,divide:i,matrix:u}=e;return r(fP,{"Array, Array":function(s,m){var d=c(512);return l(s,m,d)},"Array, Array, Array":function(s,m,d){return l(s,m,d)},"Array, Array, number":function(s,m,d){if(d<0)throw new Error("w must be a positive number");var h=c(d);return l(s,m,h)},"Matrix, Matrix":function(s,m){var d=c(512),{w:h,h:x}=l(s.valueOf(),m.valueOf(),d);return{w:u(h),h:u(x)}},"Matrix, Matrix, Matrix":function(s,m,d){var{h}=l(s.valueOf(),m.valueOf(),d.valueOf());return{h:u(h),w:u(d)}},"Matrix, Matrix, number":function(s,m,d){if(d<0)throw new Error("w must be a positive number");var h=c(d),{h:x}=l(s.valueOf(),m.valueOf(),h);return{h:u(x),w:u(h)}}});function l(o,s,m){for(var d=[],h=[],x=0;x{var{classes:r}=e;return function(n,a){var i=r[a&&a.mathjs];return i&&typeof i.fromJSON=="function"?i.fromJSON(a):a}});var TV="replacer",FV=[],o0=F(TV,FV,()=>function(r,t){return typeof t=="number"&&(!isFinite(t)||isNaN(t))?{mathjs:"number",value:String(t)}:t});var cP="12.4.1";var s0=F("true",[],()=>!0),u0=F("false",[],()=>!1),f0=F("null",[],()=>null),c0=va("Infinity",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1/0):1/0}),l0=va("NaN",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(NaN):NaN}),m0=va("pi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?Ic(t):HM}),p0=va("tau",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?mE(t):$M}),d0=va("e",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?cE(t):GM}),h0=va("phi",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?lE(t):VM}),v0=va("LN2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).ln():Math.LN2}),g0=va("LN10",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(10).ln():Math.LN10}),x0=va("LOG2E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(2).ln()):Math.LOG2E}),y0=va("LOG10E",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(1).div(new t(10).ln()):Math.LOG10E}),b0=va("SQRT1_2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t("0.5").sqrt():Math.SQRT1_2}),w0=va("SQRT2",["config","?BigNumber"],e=>{var{config:r,BigNumber:t}=e;return r.number==="BigNumber"?new t(2).sqrt():Math.SQRT2}),D0=va("i",["Complex"],e=>{var{Complex:r}=e;return r.I}),lP=F("PI",["pi"],e=>{var{pi:r}=e;return r}),mP=F("E",["e"],e=>{var{e:r}=e;return r}),S0=F("version",[],()=>cP);function va(e,r,t){return F(e,r,t,{recreateOnConfigChange:!0})}var N0=Er("speedOfLight","299792458","m s^-1"),A0=Er("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),M0=Er("planckConstant","6.62607015e-34","J s"),C0=Er("reducedPlanckConstant","1.0545718176461565e-34","J s"),E0=Er("magneticConstant","1.25663706212e-6","N A^-2"),T0=Er("electricConstant","8.8541878128e-12","F m^-1"),F0=Er("vacuumImpedance","376.730313667","ohm"),_0=Er("coulomb","8.987551792261171e9","N m^2 C^-2"),O0=Er("elementaryCharge","1.602176634e-19","C"),B0=Er("bohrMagneton","9.2740100783e-24","J T^-1"),P0=Er("conductanceQuantum","7.748091729863649e-5","S"),I0=Er("inverseConductanceQuantum","12906.403729652257","ohm"),R0=Er("magneticFluxQuantum","2.0678338484619295e-15","Wb"),k0=Er("nuclearMagneton","5.0507837461e-27","J T^-1"),q0=Er("klitzing","25812.807459304513","ohm");var L0=Er("bohrRadius","5.29177210903e-11","m"),z0=Er("classicalElectronRadius","2.8179403262e-15","m"),U0=Er("electronMass","9.1093837015e-31","kg"),W0=Er("fermiCoupling","1.1663787e-5","GeV^-2"),Y0=bx("fineStructure",.0072973525693),H0=Er("hartreeEnergy","4.3597447222071e-18","J"),$0=Er("protonMass","1.67262192369e-27","kg"),G0=Er("deuteronMass","3.3435830926e-27","kg"),V0=Er("neutronMass","1.6749271613e-27","kg"),Z0=Er("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),Q0=Er("rydberg","10973731.568160","m^-1"),X0=Er("thomsonCrossSection","6.6524587321e-29","m^2"),J0=bx("weakMixingAngle",.2229),K0=bx("efimovFactor",22.7),j0=Er("atomicMass","1.66053906660e-27","kg"),ex=Er("avogadro","6.02214076e23","mol^-1"),rx=Er("boltzmann","1.380649e-23","J K^-1"),tx=Er("faraday","96485.33212331001","C mol^-1"),nx=Er("firstRadiation","3.7417718521927573e-16","W m^2"),ax=Er("loschmidt","2.686780111798444e25","m^-3"),ix=Er("gasConstant","8.31446261815324","J K^-1 mol^-1"),ox=Er("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),sx=Er("molarVolume","0.022413969545014137","m^3 mol^-1"),ux=bx("sackurTetrode",-1.16487052358),fx=Er("secondRadiation","0.014387768775039337","m K"),cx=Er("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),lx=Er("wienDisplacement","2.897771955e-3","m K"),mx=Er("molarMass","0.99999999965e-3","kg mol^-1"),px=Er("molarMassC12","11.9999999958e-3","kg mol^-1"),dx=Er("gravity","9.80665","m s^-2"),hx=Er("planckLength","1.616255e-35","m"),vx=Er("planckMass","2.176435e-8","kg"),gx=Er("planckTime","5.391245e-44","s"),xx=Er("planckCharge","1.87554603778e-18","C"),yx=Er("planckTemperature","1.416785e+32","K");function Er(e,r,t){var n=["config","Unit","BigNumber"];return F(e,n,a=>{var{config:i,Unit:u,BigNumber:l}=a,c=i.number==="BigNumber"?new l(r):parseFloat(r),o=new u(c,t);return o.fixPrefix=!0,o})}function bx(e,r){var t=["config","BigNumber"];return F(e,t,n=>{var{config:a,BigNumber:i}=n;return a.number==="BigNumber"?new i(r):r})}var _V="apply",OV=["typed","isInteger"],wx=F(_V,OV,e=>{var{typed:r,isInteger:t}=e,n=qo({typed:r,isInteger:t});return r("apply",{"...any":function(i){var u=i[1];sr(u)?i[1]=u-1:rr(u)&&(i[1]=u.minus(1));try{return n.apply(null,i)}catch(l){throw mt(l)}}})},{isTransformFunction:!0});var BV="column",PV=["typed","Index","matrix","range"],Dx=F(BV,PV,e=>{var{typed:r,Index:t,matrix:n,range:a}=e,i=Wu({typed:r,Index:t,matrix:n,range:a});return r("column",{"...any":function(l){var c=l.length-1,o=l[c];sr(o)&&(l[c]=o-1);try{return i.apply(null,l)}catch(s){throw mt(s)}}})},{isTransformFunction:!0});function lf(e,r,t){var n=e.filter(function(c){return at(c)&&!(c.name in r)&&!t.has(c.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var a=n.name,i=new Map,u=new Eu(t,i,new Set([a])),l=e.compile();return function(o){return i.set(a,o),l.evaluate(u)}}var IV="filter",RV=["typed"],Sx=F(IV,RV,e=>{var{typed:r}=e;function t(a,i,u){var l,c;return a[0]&&(l=a[0].compile().evaluate(u)),a[1]&&(at(a[1])||_a(a[1])?c=a[1].compile().evaluate(u):c=lf(a[1],i,u)),n(l,c)}t.rawArgs=!0;var n=r("filter",{"Array, function":pP,"Matrix, function":function(i,u){return i.create(pP(i.toArray(),u))},"Array, RegExp":Mu,"Matrix, RegExp":function(i,u){return i.create(Mu(i.toArray(),u))}});return t},{isTransformFunction:!0});function pP(e,r){return Om(e,function(t,n,a){return Ia(r,t,[n+1],a,"filter")})}var kV="forEach",qV=["typed"],Nx=F(kV,qV,e=>{var{typed:r}=e;function t(a,i,u){var l,c;return a[0]&&(l=a[0].compile().evaluate(u)),a[1]&&(at(a[1])||_a(a[1])?c=a[1].compile().evaluate(u):c=lf(a[1],i,u)),n(l,c)}t.rawArgs=!0;var n=r("forEach",{"Array | Matrix, function":function(i,u){var l=function c(o,s){if(Array.isArray(o))Fo(o,function(m,d){c(m,s.concat(d+1))});else return Ia(u,o,s,i,"forEach")};l(i.valueOf(),[])}});return t},{isTransformFunction:!0});var LV="index",zV=["Index","getMatrixDataType"],Ax=F(LV,zV,e=>{var{Index:r,getMatrixDataType:t}=e;return function(){for(var a=[],i=0,u=arguments.length;i0?0:2;else if(l&&l.isSet===!0)l=l.map(function(o){return o-1});else if(Mr(l)||Qe(l))t(l)!=="boolean"&&(l=l.map(function(o){return o-1}));else if(sr(l))l--;else if(rr(l))l=l.toNumber()-1;else if(typeof l!="string")throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");a[i]=l}var c=new r;return r.apply(c,a),c}},{isTransformFunction:!0});var UV="map",WV=["typed"],Mx=F(UV,WV,e=>{var{typed:r}=e;function t(a,i,u){var l,c;return a[0]&&(l=a[0].compile().evaluate(u)),a[1]&&(at(a[1])||_a(a[1])?c=a[1].compile().evaluate(u):c=lf(a[1],i,u)),n(l,c)}t.rawArgs=!0;var n=r("map",{"Array, function":function(i,u){return dP(i,u,i)},"Matrix, function":function(i,u){return i.create(dP(i.valueOf(),u,i))}});return t},{isTransformFunction:!0});function dP(e,r,t){function n(a,i){return Array.isArray(a)?Xn(a,function(u,l){return n(u,i.concat(l+1))}):Ia(r,a,i,t,"map")}return n(e,[])}function Cn(e){if(e.length===2&&Nt(e[0])){e=e.slice();var r=e[1];sr(r)?e[1]=r-1:rr(r)&&(e[1]=r.minus(1))}return e}var YV="max",HV=["typed","config","numeric","larger"],Cx=F(YV,HV,e=>{var{typed:r,config:t,numeric:n,larger:a}=e,i=ef({typed:r,config:t,numeric:n,larger:a});return r("max",{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var $V="mean",GV=["typed","add","divide"],Ex=F($V,GV,e=>{var{typed:r,add:t,divide:n}=e,a=of({typed:r,add:t,divide:n});return r("mean",{"...any":function(u){u=Cn(u);try{return a.apply(null,u)}catch(l){throw mt(l)}}})},{isTransformFunction:!0});var VV="min",ZV=["typed","config","numeric","smaller"],Tx=F(VV,ZV,e=>{var{typed:r,config:t,numeric:n,smaller:a}=e,i=rf({typed:r,config:t,numeric:n,smaller:a});return r("min",{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var QV="range",XV=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq","add","isPositive"],Fx=F(QV,XV,e=>{var{typed:r,config:t,matrix:n,bignumber:a,smaller:i,smallerEq:u,larger:l,largerEq:c,add:o,isPositive:s}=e,m=$u({typed:r,config:t,matrix:n,bignumber:a,smaller:i,smallerEq:u,larger:l,largerEq:c,add:o,isPositive:s});return r("range",{"...any":function(h){var x=h.length-1,v=h[x];return typeof v!="boolean"&&h.push(!0),m.apply(null,h)}})},{isTransformFunction:!0});var JV="row",KV=["typed","Index","matrix","range"],_x=F(JV,KV,e=>{var{typed:r,Index:t,matrix:n,range:a}=e,i=Gu({typed:r,Index:t,matrix:n,range:a});return r("row",{"...any":function(l){var c=l.length-1,o=l[c];sr(o)&&(l[c]=o-1);try{return i.apply(null,l)}catch(s){throw mt(s)}}})},{isTransformFunction:!0});var jV="subset",eZ=["typed","matrix","zeros","add"],Ox=F(jV,eZ,e=>{var{typed:r,matrix:t,zeros:n,add:a}=e,i=Vu({typed:r,matrix:t,zeros:n,add:a});return r("subset",{"...any":function(l){try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var rZ="concat",tZ=["typed","matrix","isInteger"],Bx=F(rZ,tZ,e=>{var{typed:r,matrix:t,isInteger:n}=e,a=Uu({typed:r,matrix:t,isInteger:n});return r("concat",{"...any":function(u){var l=u.length-1,c=u[l];sr(c)?u[l]=c-1:rr(c)&&(u[l]=c.minus(1));try{return a.apply(null,u)}catch(o){throw mt(o)}}})},{isTransformFunction:!0});var hP="diff",nZ=["typed","matrix","subtract","number","bignumber"],Px=F(hP,nZ,e=>{var{typed:r,matrix:t,subtract:n,number:a,bignumber:i}=e,u=Yu({typed:r,matrix:t,subtract:n,number:a,bignumber:i});return r(hP,{"...any":function(c){c=Cn(c);try{return u.apply(null,c)}catch(o){throw mt(o)}}})},{isTransformFunction:!0});var aZ="std",iZ=["typed","map","sqrt","variance"],Ix=F(aZ,iZ,e=>{var{typed:r,map:t,sqrt:n,variance:a}=e,i=ff({typed:r,map:t,sqrt:n,variance:a});return r("std",{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var vP="sum",oZ=["typed","config","add","numeric"],Rx=F(vP,oZ,e=>{var{typed:r,config:t,add:n,numeric:a}=e,i=nf({typed:r,config:t,add:n,numeric:a});return r(vP,{"...any":function(l){l=Cn(l);try{return i.apply(null,l)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var sZ="quantileSeq",uZ=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger"],kx=F(sZ,uZ,e=>{var{typed:r,bignumber:t,add:n,subtract:a,divide:i,multiply:u,partitionSelect:l,compare:c,isInteger:o,smaller:s,smallerEq:m,larger:d}=e,h=uf({typed:r,bignumber:t,add:n,subtract:a,divide:i,multiply:u,partitionSelect:l,compare:c,isInteger:o,smaller:s,smallerEq:m,larger:d});return r("quantileSeq",{"Array | Matrix, number | BigNumber":h,"Array | Matrix, number | BigNumber, number":(v,y,w)=>h(v,y,x(w)),"Array | Matrix, number | BigNumber, boolean":h,"Array | Matrix, number | BigNumber, boolean, number":(v,y,w,C)=>h(v,y,w,x(C)),"Array | Matrix, Array | Matrix":h,"Array | Matrix, Array | Matrix, number":(v,y,w)=>h(v,y,x(w)),"Array | Matrix, Array | Matrix, boolean":h,"Array | Matrix, Array | Matrix, boolean, number":(v,y,w,C)=>h(v,y,w,x(C))});function x(v){return Cn([[],v])[1]}},{isTransformFunction:!0});var gP="cumsum",fZ=["typed","add","unaryPlus"],qx=F(gP,fZ,e=>{var{typed:r,add:t,unaryPlus:n}=e,a=af({typed:r,add:t,unaryPlus:n});return r(gP,{"...any":function(u){if(u.length===2&&Nt(u[0])){var l=u[1];sr(l)?u[1]=l-1:rr(l)&&(u[1]=l.minus(1))}try{return a.apply(null,u)}catch(c){throw mt(c)}}})},{isTransformFunction:!0});var xP="variance",cZ=["typed","add","subtract","multiply","divide","apply","isNaN"],Lx=F(xP,cZ,e=>{var{typed:r,add:t,subtract:n,multiply:a,divide:i,apply:u,isNaN:l}=e,c=sf({typed:r,add:t,subtract:n,multiply:a,divide:i,apply:u,isNaN:l});return r(xP,{"...any":function(s){s=Cn(s);try{return c.apply(null,s)}catch(m){throw mt(m)}}})},{isTransformFunction:!0});var yP="print",lZ=["typed","matrix","zeros","add"],zx=F(yP,lZ,e=>{var{typed:r,matrix:t,zeros:n,add:a}=e,i=Qu({typed:r,matrix:t,zeros:n,add:a});return r(yP,{"string, Object | Array":function(c,o){return i(u(c),o)},"string, Object | Array, number | Object":function(c,o,s){return i(u(c),o,s)}});function u(l){return l.replace(qd,c=>{var o=c.slice(1).split("."),s=o.map(function(m){return!isNaN(m)&&m.length>0?parseInt(m)-1:m});return"$"+s.join(".")})}},{isTransformFunction:!0});var mZ="and",pZ=["typed","matrix","zeros","add","equalScalar","not","concat"],Ux=F(mZ,pZ,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:u}=e,l=ju({typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:u});function c(o,s,m){var d=o[0].compile().evaluate(m);if(!Nt(d)&&!l(d,!0))return!1;var h=o[1].compile().evaluate(m);return l(d,h)}return c.rawArgs=!0,c},{isTransformFunction:!0});var dZ="or",hZ=["typed","matrix","equalScalar","DenseMatrix","concat"],Wx=F(dZ,hZ,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,u=zu({typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i});function l(c,o,s){var m=c[0].compile().evaluate(s);if(!Nt(m)&&u(m,!1))return!0;var d=c[1].compile().evaluate(s);return u(m,d)}return l.rawArgs=!0,l},{isTransformFunction:!0});var vZ="bitAnd",gZ=["typed","matrix","zeros","add","equalScalar","not","concat"],Yx=F(vZ,gZ,e=>{var{typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:u}=e,l=qu({typed:r,matrix:t,equalScalar:n,zeros:a,not:i,concat:u});function c(o,s,m){var d=o[0].compile().evaluate(m);if(!Nt(d)){if(isNaN(d))return NaN;if(d===0||d===!1)return 0}var h=o[1].compile().evaluate(m);return l(d,h)}return c.rawArgs=!0,c},{isTransformFunction:!0});var xZ="bitOr",yZ=["typed","matrix","equalScalar","DenseMatrix","concat"],Hx=F(xZ,yZ,e=>{var{typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i}=e,u=Lu({typed:r,matrix:t,equalScalar:n,DenseMatrix:a,concat:i});function l(c,o,s){var m=c[0].compile().evaluate(s);if(!Nt(m)){if(isNaN(m))return NaN;if(m===-1)return-1;if(m===!0)return 1}var d=c[1].compile().evaluate(s);return u(m,d)}return l.rawArgs=!0,l},{isTransformFunction:!0});var Ge=Hm({config:Oe}),pt=$m({}),ID=d0({BigNumber:Ge,config:Oe}),bP=u0({}),wP=Y0({BigNumber:Ge,config:Oe}),Uo=Gm({}),RD=D0({Complex:pt}),DP=c0({BigNumber:Ge,config:Oe}),SP=g0({BigNumber:Ge,config:Oe}),NP=y0({BigNumber:Ge,config:Oe}),Lc=Zm({}),AP=l0({BigNumber:Ge,config:Oe}),MP=f0({}),CP=h0({BigNumber:Ge,config:Oe}),EP=Vm({}),kD=Rm({}),TP=b0({BigNumber:Ge,config:Oe}),FP=ux({BigNumber:Ge,config:Oe}),qD=p0({BigNumber:Ge,config:Oe}),_P=s0({}),OP=S0({}),_r=Xm({Matrix:Lc}),BP=K0({BigNumber:Ge,config:Oe}),PP=v0({BigNumber:Ge,config:Oe}),$x=m0({BigNumber:Ge,config:Oe}),IP=o0({}),RP=w0({BigNumber:Ge,config:Oe}),te=Im({BigNumber:Ge,Complex:pt,DenseMatrix:_r,Fraction:Uo}),Gx=Np({BigNumber:Ge,config:Oe,typed:te}),kP=J0({BigNumber:Ge,config:Oe}),En=Ap({typed:te}),qP=Oh({Complex:pt,config:Oe,typed:te}),LP=Ph({BigNumber:Ge,typed:te}),zP=Rh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),Qt=Cp({typed:te}),UP=jp({typed:te}),WP=Lh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),YP=Uh({typed:te}),LD=Wh({typed:te}),HP=Hh({Complex:pt,config:Oe,typed:te}),ea=hp({BigNumber:Ge,typed:te}),$P=Jp({typed:te}),GP=dp({typed:te}),VP=Jm({typed:te}),zc=Bg({typed:te}),Uc=vp({Complex:pt,typed:te}),Wo=ed({typed:te}),Vx=$h({typed:te}),ZP=Vh({BigNumber:Ge,typed:te}),QP=Qh({BigNumber:Ge,typed:te}),XP=_p({typed:te}),Ir=cp({config:Oe,typed:te}),JP=Fd({typed:te}),zD=Op({typed:te}),KP=Bp({Complex:pt,typed:te}),jP=ud({typed:te}),eI=cd({typed:te}),mf=Pd({typed:te}),Zx=ld({typed:te}),rI=kd({format:mf,typed:te}),Qx=rd({typed:te}),Ln=ep({typed:te}),no=tp({typed:te}),Yo=ip({typed:te}),qa=op({typed:te}),tI=x0({BigNumber:Ge,config:Oe}),nI=Rg({Complex:pt,typed:te}),aI=kp({Complex:pt,config:Oe,typed:te}),UD=qp({Complex:pt,config:Oe,typed:te}),Ho=dd({typed:te}),Ot=Lp({typed:te}),Wc=nd({typed:te}),Oi=mp({typed:te}),iI=Rd({format:mf,typed:te}),oI=Wg({config:Oe,typed:te}),sI=Qu({typed:te}),uI=Yg({config:Oe,typed:te}),Xx=td({typed:te}),fI=Jh({BigNumber:Ge,typed:te}),WD=Wp({BigNumber:Ge,Fraction:Uo,complex:Uc,typed:te}),Yc=jh({typed:te}),Bi=lp({Matrix:Lc,equalScalar:Ir,typed:te}),cI=Dp({typed:te}),lI=Hp({typed:te}),mI=pp({typed:te}),ga=Ep({typed:te}),pI=rv({typed:te}),YD=up({typed:te}),dI=Bh({Complex:pt,config:Oe,typed:te}),hI=kh({BigNumber:Ge,typed:te}),Jx=qo({isInteger:Ln,typed:te}),vI=qh({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),gI=Id({format:mf,typed:te}),xI=Pg({typed:te}),yI=Gh({typed:te}),bI=Xh({BigNumber:Ge,typed:te}),pf=sp({typed:te}),wI=zd({typed:te}),DI=Hg({config:Oe,typed:te}),SI=Kh({BigNumber:Ge,typed:te}),NI=ev({typed:te}),AI=Fh({SparseMatrix:Bi,typed:te}),La=Yp({Complex:pt,config:Oe,typed:te}),MI=tv({typed:te}),fi=Sp({typed:te}),CI=Ih({BigNumber:Ge,Complex:pt,config:Oe,typed:te}),EI=Zh({BigNumber:Ge,typed:te}),Bs=gp({Fraction:Uo,typed:te}),$o=np({typed:te}),$e=xp({DenseMatrix:_r,Matrix:Lc,SparseMatrix:Bi,typed:te}),TI=yp({isZero:qa,matrix:$e,typed:te}),FI=Od({isNaN:pf,isNumeric:$o,typed:te}),za=Ud({bignumber:ea,fraction:Bs,number:Oi}),HD=Bd({config:Oe,multiplyScalar:Ot,numeric:za,typed:te}),$D=xd({isInteger:Ln,matrix:$e,typed:te}),cn=Dd({matrix:$e,config:Oe,typed:te}),_I=Sd({matrix:$e,typed:te}),df=Nd({matrix:$e,typed:te}),GD=Gp({BigNumber:Ge,config:Oe,matrix:$e,typed:te}),ln=Md({BigNumber:Ge,config:Oe,matrix:$e,typed:te}),OI=zh({Complex:pt,config:Oe,typed:te}),VD=Tp({BigNumber:Ge,Complex:pt,Fraction:Uo,config:Oe,isNegative:no,matrix:$e,typed:te,unaryMinus:fi}),Gr=Uu({isInteger:Ln,matrix:$e,typed:te}),BI=id({prod:HD,size:cn,typed:te}),Kx=Ad({conj:Wo,transpose:df,typed:te}),ZD=sd({DenseMatrix:_r,SparseMatrix:Bi,matrix:$e,typed:te}),Mt=Wd({numeric:za,typed:te}),hf=Qd({DenseMatrix:_r,concat:Gr,divideScalar:Mt,equalScalar:Ir,matrix:$e,typed:te}),xa=uh({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),vf=fd({matrix:$e,typed:te}),PI=ap({isNumeric:$o,typed:te}),ao=md({BigNumber:Ge,DenseMatrix:_r,SparseMatrix:Bi,config:Oe,matrix:$e,typed:te}),II=pd({matrix:$e,multiplyScalar:Ot,typed:te}),Hc=gh({DenseMatrix:_r,concat:Gr,config:Oe,matrix:$e,typed:te}),RI=eh({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te,zeros:ln}),QD=Xd({DenseMatrix:_r,divideScalar:Mt,equalScalar:Ir,matrix:$e,multiplyScalar:Ot,subtractScalar:ga,typed:te}),jx=wp({flatten:vf,matrix:$e,size:cn,typed:te}),kI=Up({BigNumber:Ge,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),qI=hd({BigNumber:Ge,config:Oe,matrix:$e,typed:te}),ey=sg({addScalar:Qt,complex:Uc,conj:Wo,divideScalar:Mt,equal:xa,identity:ao,isZero:qa,matrix:$e,multiplyScalar:Ot,sign:WD,sqrt:La,subtractScalar:ga,typed:te,unaryMinus:fi,zeros:ln}),LI=yd({config:Oe,matrix:$e}),zI=rh({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te,zeros:ln}),Ps=Hd({BigNumber:Ge,DenseMatrix:_r,config:Oe,equalScalar:Ir,matrix:$e,typed:te,zeros:ln}),Tn=lh({DenseMatrix:_r,concat:Gr,config:Oe,matrix:$e,typed:te}),Bt=$p({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,subtractScalar:ga,typed:te,unaryMinus:fi}),UI=Ld({concat:Gr,matrix:$e,typed:te}),WI=bh({DenseMatrix:_r,concat:Gr,config:Oe,equalScalar:Ir,matrix:$e,typed:te}),ry=Jd({DenseMatrix:_r,divideScalar:Mt,equalScalar:Ir,matrix:$e,multiplyScalar:Ot,subtractScalar:ga,typed:te}),YI=ad({DenseMatrix:_r,concat:Gr,matrix:$e,typed:te}),Lr=pv({DenseMatrix:_r,SparseMatrix:Bi,addScalar:Qt,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),HI=Yh({BigNumber:Ge,DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),$I=qu({concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),GI=Lu({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),VI=Kp({DenseMatrix:_r,concat:Gr,matrix:$e,typed:te}),ZI=Vg({addScalar:Qt,combinations:zc,divideScalar:Mt,isInteger:Ln,isNegative:no,multiplyScalar:Ot,typed:te}),Go=ah({BigNumber:Ge,DenseMatrix:_r,Fraction:Uo,concat:Gr,config:Oe,equalScalar:Ir,matrix:$e,typed:te}),XD=oh({concat:Gr,matrix:$e,typed:te}),QI=af({add:Lr,typed:te,unaryPlus:Gx}),ty=xh({equal:xa,typed:te}),XI=Yu({matrix:$e,number:Oi,subtract:Bt,typed:te}),JI=Cg({abs:En,addScalar:Qt,deepEqual:ty,divideScalar:Mt,multiplyScalar:Ot,sqrt:La,subtractScalar:ga,typed:te}),$c=vv({addScalar:Qt,conj:Wo,multiplyScalar:Ot,size:cn,typed:te}),KI=fh({compareText:XD,isZero:qa,typed:te}),JD=Pu({DenseMatrix:_r,config:Oe,equalScalar:Ir,matrix:$e,round:Ps,typed:te,zeros:ln}),jI=Ip({BigNumber:Ge,DenseMatrix:_r,concat:Gr,config:Oe,equalScalar:Ir,matrix:$e,round:Ps,typed:te,zeros:ln}),e4=dv({abs:En,addScalar:Qt,divideScalar:Mt,isPositive:Yo,multiplyScalar:Ot,smaller:Tn,sqrt:La,typed:te}),KD=Sh({DenseMatrix:_r,smaller:Tn}),yn=Nh({ImmutableDenseMatrix:KD,getMatrixDataType:Zx}),Fn=hh({DenseMatrix:_r,concat:Gr,config:Oe,matrix:$e,typed:te}),ny=$d({Complex:pt,config:Oe,divideScalar:Mt,typed:te}),r4=Kd({DenseMatrix:_r,divideScalar:Mt,equalScalar:Ir,matrix:$e,multiplyScalar:Ot,subtractScalar:ga,typed:te}),t4=bp({flatten:vf,matrix:$e,size:cn,typed:te}),n4=rf({config:Oe,numeric:za,smaller:Tn,typed:te}),jD=Iu({DenseMatrix:_r,concat:Gr,config:Oe,equalScalar:Ir,matrix:$e,round:Ps,typed:te,zeros:ln}),it=zp({addScalar:Qt,dot:$c,equalScalar:Ir,matrix:$e,multiplyScalar:Ot,typed:te}),a4=Vd({Complex:pt,config:Oe,divideScalar:Mt,typed:te}),i4=zu({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),Gc=wh({compare:Go,isNaN:pf,isNumeric:$o,typed:te}),o4=th({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te,zeros:ln}),eS=cg({SparseMatrix:Bi,abs:En,add:Lr,divideScalar:Mt,larger:Fn,largerEq:Hc,multiply:it,subtract:Bt,transpose:df,typed:te}),ra=Vu({add:Lr,matrix:$e,typed:te,zeros:ln}),ay=nf({add:Lr,config:Oe,numeric:za,typed:te}),s4=gv({add:Lr,matrix:$e,typed:te}),rS=jd({DenseMatrix:_r,divideScalar:Mt,equalScalar:Ir,matrix:$e,multiplyScalar:Ot,subtractScalar:ga,typed:te}),u4=n0({Complex:pt,add:Lr,multiply:it,number:Oi,typed:te}),iy=Fp({DenseMatrix:_r,config:Oe,equalScalar:Ir,matrix:$e,round:Ps,typed:te,zeros:ln}),ci=ih({compare:Go,typed:te}),f4=Zg({addScalar:Qt,combinations:zc,isInteger:Ln,isNegative:no,isPositive:Yo,larger:Fn,typed:te}),c4=od({matrix:$e,multiply:it,subtract:Bt,typed:te}),tS=gg({divideScalar:Mt,isZero:qa,matrix:$e,multiply:it,subtractScalar:ga,typed:te,unaryMinus:fi}),l4=Qp({concat:Gr,equalScalar:Ir,matrix:$e,multiplyScalar:Ot,typed:te}),nS=Ah({larger:Fn,smaller:Tn}),aS=Pp({Complex:pt,DenseMatrix:_r,ceil:iy,equalScalar:Ir,floor:JD,matrix:$e,typed:te,zeros:ln}),iS=xv({Index:yn,typed:te}),m4=Eg({abs:En,add:Lr,addScalar:Qt,config:Oe,divideScalar:Mt,equalScalar:Ir,flatten:vf,isNumeric:$o,isZero:qa,matrix:$e,multiply:it,multiplyScalar:Ot,smaller:Tn,subtract:Bt,typed:te}),p4=Vp({BigNumber:Ge,add:Lr,config:Oe,equal:xa,isInteger:Ln,mod:jD,smaller:Tn,typed:te,xgcd:GD}),d4=Rp({concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),h4=Gd({Complex:pt,config:Oe,divideScalar:Mt,log:ny,typed:te}),oy=ef({config:Oe,larger:Fn,numeric:za,typed:te}),v4=nv({DenseMatrix:_r,Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),g4=iv({DenseMatrix:_r,Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),x4=sv({Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),y4=fv({Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),Is=ph({DenseMatrix:_r,concat:Gr,config:Oe,matrix:$e,typed:te}),b4=Dh({compare:Go,compareNatural:ci,matrix:$e,typed:te}),w4=ju({concat:Gr,equalScalar:Ir,matrix:$e,not:Wc,typed:te,zeros:ln}),Rs=$u({bignumber:ea,matrix:$e,add:Lr,config:Oe,isPositive:Yo,larger:Fn,largerEq:Hc,smaller:Tn,smallerEq:Is,typed:te}),D4=Gu({Index:yn,matrix:$e,range:Rs,typed:te}),oS=av({DenseMatrix:_r,Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),S4=uv({Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),sS=lv({Index:yn,concat:Gr,setDifference:oS,size:cn,subset:ra,typed:te}),uS=Mh({FibonacciHeap:nS,addScalar:Qt,equalScalar:Ir}),fS=Wu({Index:yn,matrix:$e,range:Rs,typed:te}),Vo=xg({abs:En,addScalar:Qt,det:tS,divideScalar:Mt,identity:ao,matrix:$e,multiply:it,typed:te,unaryMinus:fi}),cS=og({DenseMatrix:_r,Spa:uS,SparseMatrix:Bi,abs:En,addScalar:Qt,divideScalar:Mt,equalScalar:Ir,larger:Fn,matrix:$e,multiplyScalar:Ot,subtractScalar:ga,typed:te,unaryMinus:fi}),N4=yg({Complex:pt,add:Lr,ctranspose:Kx,deepEqual:ty,divideScalar:Mt,dot:$c,dotDivide:hf,equal:xa,inv:Vo,matrix:$e,multiply:it,typed:te}),ya=Yd({Complex:pt,config:Oe,fraction:Bs,identity:ao,inv:Vo,matrix:$e,multiply:it,number:Oi,typed:te}),lS=ov({DenseMatrix:_r,Index:yn,compareNatural:ci,size:cn,subset:ra,typed:te}),A4=mv({Index:yn,concat:Gr,setIntersect:lS,setSymDifference:sS,size:cn,subset:ra,typed:te}),M4=Dg({abs:En,add:Lr,identity:ao,inv:Vo,map:Ho,max:oy,multiply:it,size:cn,sqrt:La,subtract:Bt,typed:te}),wr=Eh({BigNumber:Ge,Complex:pt,Fraction:Uo,abs:En,addScalar:Qt,config:Oe,divideScalar:Mt,equal:xa,fix:aS,format:mf,isNumeric:$o,multiplyScalar:Ot,number:Oi,pow:ya,round:Ps,subtractScalar:ga}),C4=F0({BigNumber:Ge,Unit:wr,config:Oe}),E4=lx({BigNumber:Ge,Unit:wr,config:Oe}),T4=j0({BigNumber:Ge,Unit:wr,config:Oe}),F4=B0({BigNumber:Ge,Unit:wr,config:Oe}),_4=rx({BigNumber:Ge,Unit:wr,config:Oe}),O4=P0({BigNumber:Ge,Unit:wr,config:Oe}),B4=_0({BigNumber:Ge,Unit:wr,config:Oe}),P4=G0({BigNumber:Ge,Unit:wr,config:Oe}),I4=Zd({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,pow:ya,typed:te}),R4=T0({BigNumber:Ge,Unit:wr,config:Oe}),k4=O0({BigNumber:Ge,Unit:wr,config:Oe}),q4=wg({abs:En,add:Lr,identity:ao,inv:Vo,multiply:it,typed:te}),L4=tx({BigNumber:Ge,Unit:wr,config:Oe}),mS=Cd({addScalar:Qt,ceil:iy,conj:Wo,divideScalar:Mt,dotDivide:hf,exp:zD,i:RD,log2:UD,matrix:$e,multiplyScalar:Ot,pow:ya,tau:qD,typed:te}),sy=Ig({BigNumber:Ge,Complex:pt,config:Oe,multiplyScalar:Ot,pow:ya,typed:te}),z4=A0({BigNumber:Ge,Unit:wr,config:Oe}),U4=H0({BigNumber:Ge,Unit:wr,config:Oe}),W4=Ed({conj:Wo,dotDivide:hf,fft:mS,typed:te}),Y4=q0({BigNumber:Ge,Unit:wr,config:Oe}),H4=ax({BigNumber:Ge,Unit:wr,config:Oe}),$4=E0({BigNumber:Ge,Unit:wr,config:Oe}),G4=mx({BigNumber:Ge,Unit:wr,config:Oe}),V4=ox({BigNumber:Ge,Unit:wr,config:Oe}),Z4=V0({BigNumber:Ge,Unit:wr,config:Oe}),Q4=k0({BigNumber:Ge,Unit:wr,config:Oe}),X4=xx({BigNumber:Ge,Unit:wr,config:Oe}),J4=hx({BigNumber:Ge,Unit:wr,config:Oe}),K4=yx({BigNumber:Ge,Unit:wr,config:Oe}),j4=$0({BigNumber:Ge,Unit:wr,config:Oe}),eR=Z0({BigNumber:Ge,Unit:wr,config:Oe}),rR=C0({BigNumber:Ge,Unit:wr,config:Oe}),tR=Q0({BigNumber:Ge,Unit:wr,config:Oe}),nR=fx({BigNumber:Ge,Unit:wr,config:Oe}),aR=N0({BigNumber:Ge,Unit:wr,config:Oe}),iR=cx({BigNumber:Ge,Unit:wr,config:Oe}),oR=X0({BigNumber:Ge,Unit:wr,config:Oe}),sR=ex({BigNumber:Ge,Unit:wr,config:Oe}),uR=L0({BigNumber:Ge,Unit:wr,config:Oe}),fR=_h({Unit:wr,typed:te}),an=Mg({divideScalar:Mt,equalScalar:Ir,inv:Vo,matrix:$e,multiply:it,typed:te}),cR=U0({BigNumber:Ge,Unit:wr,config:Oe}),gf=kg({gamma:sy,typed:te}),lR=nx({BigNumber:Ge,Unit:wr,config:Oe}),mR=dx({BigNumber:Ge,Unit:wr,config:Oe}),pR=I0({BigNumber:Ge,Unit:wr,config:Oe}),pS=lg({DenseMatrix:_r,lsolve:QD,lup:cS,matrix:$e,slu:eS,typed:te,usolve:ry}),dR=R0({BigNumber:Ge,Unit:wr,config:Oe}),hR=px({BigNumber:Ge,Unit:wr,config:Oe}),vR=Lg({add:Lr,divide:an,factorial:gf,isInteger:Ln,isPositive:Yo,multiply:it,typed:te}),gR=zg({factorial:gf,typed:te}),xR=vx({BigNumber:Ge,Unit:wr,config:Oe}),yR=mg({add:Lr,cbrt:VD,divide:an,equalScalar:Ir,im:Qx,isZero:qa,multiply:it,re:Xx,sqrt:La,subtract:Bt,typeOf:YD,typed:te,unaryMinus:fi}),bR=cv({compareNatural:ci,typed:te}),wR=Td({abs:En,add:Lr,bignumber:ea,divide:an,isNegative:no,isPositive:Yo,larger:Fn,map:Ho,matrix:$e,max:oy,multiply:it,smaller:Tn,subtract:Bt,typed:te,unaryMinus:fi}),dS=$g({bignumber:ea,addScalar:Qt,combinations:zc,divideScalar:Mt,factorial:gf,isInteger:Ln,isNegative:no,larger:Fn,multiplyScalar:Ot,number:Oi,pow:ya,subtractScalar:ga,typed:te}),DR=Th({Unit:wr,typed:te}),SR=Gg({addScalar:Qt,isInteger:Ln,isNegative:no,stirlingS2:dS,typed:te}),hS=bg({abs:En,add:Lr,addScalar:Qt,atan:LD,bignumber:ea,column:fS,complex:Uc,config:Oe,cos:Vx,diag:ZD,divideScalar:Mt,dot:$c,equal:xa,flatten:vf,im:Qx,inv:Vo,larger:Fn,matrix:$e,matrixFromColumns:jx,multiply:it,multiplyScalar:Ot,number:Oi,qr:ey,re:Xx,reshape:$D,sin:Yc,size:cn,smaller:Tn,sqrt:La,subtract:Bt,typed:te,usolve:ry,usolveAll:rS}),NR=W0({BigNumber:Ge,Unit:wr,config:Oe}),AR=ix({BigNumber:Ge,Unit:wr,config:Oe}),MR=qg({divide:an,dotDivide:hf,isNumeric:$o,log:ny,map:Ho,matrix:$e,multiply:it,sum:ay,typed:te}),vS=of({add:Lr,divide:an,typed:te}),CR=sx({BigNumber:Ge,Unit:wr,config:Oe}),ER=M0({BigNumber:Ge,Unit:wr,config:Oe}),TR=uf({bignumber:ea,add:Lr,compare:Go,divide:an,isInteger:Ln,larger:Fn,multiply:it,partitionSelect:Gc,smaller:Tn,smallerEq:Is,subtract:Bt,typed:te}),uy=sf({add:Lr,apply:Jx,divide:an,isNaN:pf,multiply:it,subtract:Bt,typed:te}),FR=z0({BigNumber:Ge,Unit:wr,config:Oe}),gS=Fg({add:Lr,compare:Go,divide:an,partitionSelect:Gc,typed:te}),_R=Og({add:Lr,divide:an,matrix:$e,mean:vS,multiply:it,pow:ya,sqrt:La,subtract:Bt,sum:ay,typed:te}),OR=a0({Complex:pt,add:Lr,divide:an,matrix:$e,multiply:it,typed:te}),BR=_g({abs:En,map:Ho,median:gS,subtract:Bt,typed:te}),PR=ff({map:Ho,sqrt:La,typed:te,variance:uy}),IR=_d({BigNumber:Ge,Complex:pt,add:Lr,config:Oe,divide:an,equal:xa,factorial:gf,gamma:sy,isNegative:no,multiply:it,pi:$x,pow:ya,sin:Yc,smallerEq:Is,subtract:Bt,typed:te}),fy=hv({abs:En,add:Lr,conj:Wo,ctranspose:Kx,eigs:hS,equalScalar:Ir,larger:Fn,matrix:$e,multiply:it,pow:ya,smaller:Tn,sqrt:La,typed:te}),xS=wd({BigNumber:Ge,DenseMatrix:_r,SparseMatrix:Bi,addScalar:Qt,config:Oe,cos:Vx,matrix:$e,multiplyScalar:Ot,norm:fy,sin:Yc,typed:te,unaryMinus:fi}),RR=gx({BigNumber:Ge,Unit:wr,config:Oe}),yS=Ng({identity:ao,matrix:$e,multiply:it,norm:fy,qr:ey,subtract:Bt,typed:te}),kR=bd({multiply:it,rotationMatrix:xS,typed:te}),bS=Sg({abs:En,add:Lr,concat:Gr,identity:ao,index:iS,lusolve:pS,matrix:$e,matrixFromColumns:jx,multiply:it,range:Rs,schur:yS,subset:ra,subtract:Bt,transpose:df,typed:te}),qR=Ag({matrix:$e,multiply:it,sylvester:bS,transpose:df,typed:te});var xf={},yf={},LR={},_n=bv({mathWithTransform:yf}),bf=Yv({Node:_n}),io=$v({Node:_n}),ks=Vv({Node:_n}),zR=Jv({Node:_n}),wf=Av({Node:_n}),UR=_v({Node:_n,ResultSet:kD}),WR=Bv({Node:_n}),Zo=kv({Node:_n}),YR=Qv({Node:_n}),bZ=i0({classes:LR}),wS=dg({math:xf,typed:te}),HR=Lv({Node:_n,typed:te}),wZ=vg({Chain:wS,typed:te}),Df=Uv({Node:_n,size:cn}),Sf=Sv({Node:_n,subset:ra}),$R=Tv({matrix:$e,Node:_n,subset:ra}),Qo=Kv({Unit:wr,Node:_n,math:xf}),Xo=eg({Node:_n,SymbolNode:Qo,math:xf}),Ua=rg({AccessorNode:Sf,ArrayNode:wf,AssignmentNode:$R,BlockNode:UR,ConditionalNode:WR,ConstantNode:Zo,FunctionAssignmentNode:HR,FunctionNode:Xo,IndexNode:Df,ObjectNode:bf,OperatorNode:io,ParenthesisNode:ks,RangeNode:YR,RelationalNode:zR,SymbolNode:Qo,config:Oe,numeric:za,typed:te}),GR=jg({ConstantNode:Zo,FunctionNode:Xo,OperatorNode:io,ParenthesisNode:ks,parse:Ua,typed:te}),DS=Jg({bignumber:ea,fraction:Bs,AccessorNode:Sf,ArrayNode:wf,ConstantNode:Zo,FunctionNode:Xo,IndexNode:Df,ObjectNode:bf,OperatorNode:io,SymbolNode:Qo,config:Oe,mathWithTransform:yf,matrix:$e,typed:te}),DZ=tg({parse:Ua,typed:te}),SS=Kg({AccessorNode:Sf,ArrayNode:wf,ConstantNode:Zo,FunctionNode:Xo,IndexNode:Df,ObjectNode:bf,OperatorNode:io,ParenthesisNode:ks,SymbolNode:Qo,add:Lr,divide:an,equal:xa,isZero:qa,multiply:it,parse:Ua,pow:ya,subtract:Bt,typed:te}),NS=ng({parse:Ua,typed:te}),VR=pg({evaluate:NS}),ZR=ag({evaluate:NS}),cy=Xg({bignumber:ea,fraction:Bs,AccessorNode:Sf,ArrayNode:wf,ConstantNode:Zo,FunctionNode:Xo,IndexNode:Df,ObjectNode:bf,OperatorNode:io,ParenthesisNode:ks,SymbolNode:Qo,add:Lr,config:Oe,divide:an,equal:xa,isZero:qa,mathWithTransform:yf,matrix:$e,multiply:it,parse:Ua,pow:ya,resolve:GR,simplifyConstant:DS,simplifyCore:SS,subtract:Bt,typed:te}),SZ=e0({OperatorNode:io,parse:Ua,simplify:cy,typed:te}),NZ=Qg({parse:Ua,typed:te}),AZ=ig({Parser:ZR,typed:te}),MZ=t0({bignumber:ea,fraction:Bs,AccessorNode:Sf,ArrayNode:wf,ConstantNode:Zo,FunctionNode:Xo,IndexNode:Df,ObjectNode:bf,OperatorNode:io,ParenthesisNode:ks,SymbolNode:Qo,add:Lr,config:Oe,divide:an,equal:xa,isZero:qa,mathWithTransform:yf,matrix:$e,multiply:it,parse:Ua,pow:ya,simplify:cy,simplifyConstant:DS,simplifyCore:SS,subtract:Bt,typed:te}),CZ=r0({ConstantNode:Zo,FunctionNode:Xo,OperatorNode:io,ParenthesisNode:ks,SymbolNode:Qo,config:Oe,equal:xa,isZero:qa,numeric:za,parse:Ua,simplify:cy,typed:te}),EZ=hg({Help:VR,mathWithTransform:yf,typed:te});ht(xf,{e:ID,false:bP,fineStructure:wP,i:RD,Infinity:DP,LN10:SP,LOG10E:NP,NaN:AP,null:MP,phi:CP,SQRT1_2:TP,sackurTetrode:FP,tau:qD,true:_P,E:ID,version:OP,efimovFactor:BP,LN2:PP,pi:$x,replacer:IP,reviver:bZ,SQRT2:RP,typed:te,unaryPlus:Gx,PI:$x,weakMixingAngle:kP,abs:En,acos:qP,acot:LP,acsc:zP,addScalar:Qt,arg:UP,asech:WP,asinh:YP,atan:LD,atanh:HP,bignumber:ea,bitNot:$P,boolean:GP,clone:VP,combinations:zc,complex:Uc,conj:Wo,cos:Vx,cot:ZP,csc:QP,cube:XP,equalScalar:Ir,erf:JP,exp:zD,expm1:KP,filter:jP,forEach:eI,format:mf,getMatrixDataType:Zx,hex:rI,im:Qx,isInteger:Ln,isNegative:no,isPositive:Yo,isZero:qa,LOG2E:tI,lgamma:nI,log10:aI,log2:UD,map:Ho,multiplyScalar:Ot,not:Wc,number:Oi,oct:iI,pickRandom:oI,print:sI,random:uI,re:Xx,sec:fI,sign:WD,sin:Yc,splitUnit:cI,square:lI,string:mI,subtractScalar:ga,tan:pI,typeOf:YD,acosh:dI,acsch:hI,apply:Jx,asec:vI,bin:gI,chain:wZ,combinationsWithRep:xI,cosh:yI,csch:bI,isNaN:pf,isPrime:wI,randomInt:DI,sech:SI,sinh:NI,sparse:AI,sqrt:La,tanh:MI,unaryMinus:fi,acoth:CI,coth:EI,fraction:Bs,isNumeric:$o,matrix:$e,matrixFromFunction:TI,mode:FI,numeric:za,prod:HD,reshape:$D,size:cn,squeeze:_I,transpose:df,xgcd:GD,zeros:ln,asin:OI,cbrt:VD,concat:Gr,count:BI,ctranspose:Kx,diag:ZD,divideScalar:Mt,dotDivide:hf,equal:xa,flatten:vf,hasNumericValue:PI,identity:ao,kron:II,largerEq:Hc,leftShift:RI,lsolve:QD,matrixFromColumns:jx,nthRoot:kI,ones:qI,qr:ey,resize:LI,rightArithShift:zI,round:Ps,smaller:Tn,subtract:Bt,to:UI,unequal:WI,usolve:ry,xor:YI,add:Lr,atan2:HI,bitAnd:$I,bitOr:GI,bitXor:VI,catalan:ZI,compare:Go,compareText:XD,cumsum:QI,deepEqual:ty,diff:XI,distance:JI,dot:$c,equalText:KI,floor:JD,gcd:jI,hypot:e4,larger:Fn,log:ny,lsolveAll:r4,matrixFromRows:t4,min:n4,mod:jD,multiply:it,nthRoots:a4,or:i4,partitionSelect:Gc,rightLogShift:o4,slu:eS,subset:ra,sum:ay,trace:s4,usolveAll:rS,zpk2tf:u4,ceil:iy,compareNatural:ci,composition:f4,cross:c4,det:tS,dotMultiply:l4,fix:aS,index:iS,intersect:m4,invmod:p4,lcm:d4,log1p:h4,max:oy,setCartesian:v4,setDistinct:g4,setIsSubset:x4,setPowerset:y4,smallerEq:Is,sort:b4,and:w4,range:Rs,row:D4,setDifference:oS,setMultiplicity:S4,setSymDifference:sS,column:fS,inv:Vo,lup:cS,pinv:N4,pow:ya,setIntersect:lS,setUnion:A4,sqrtm:M4,vacuumImpedance:C4,wienDisplacement:E4,atomicMass:T4,bohrMagneton:F4,boltzmann:_4,conductanceQuantum:O4,coulomb:B4,deuteronMass:P4,dotPow:I4,electricConstant:R4,elementaryCharge:k4,expm:q4,faraday:L4,fft:mS,gamma:sy,gravitationConstant:z4,hartreeEnergy:U4,ifft:W4,klitzing:Y4,loschmidt:H4,magneticConstant:$4,molarMass:G4,molarPlanckConstant:V4,neutronMass:Z4,nuclearMagneton:Q4,planckCharge:X4,planckLength:J4,planckTemperature:K4,protonMass:j4,quantumOfCirculation:eR,reducedPlanckConstant:rR,rydberg:tR,secondRadiation:nR,speedOfLight:aR,stefanBoltzmann:iR,thomsonCrossSection:oR,avogadro:sR,bohrRadius:uR,createUnit:fR,divide:an,electronMass:cR,factorial:gf,firstRadiation:lR,gravity:mR,inverseConductanceQuantum:pR,lusolve:pS,magneticFluxQuantum:dR,molarMassC12:hR,multinomial:vR,parse:Ua,permutations:gR,planckMass:xR,polynomialRoot:yR,resolve:GR,setSize:bR,simplifyConstant:DS,solveODE:wR,stirlingS2:dS,unit:DR,bellNumbers:SR,compile:DZ,eigs:hS,fermiCoupling:NR,gasConstant:AR,kldivergence:MR,mean:vS,molarVolume:CR,planckConstant:ER,quantileSeq:TR,simplifyCore:SS,variance:uy,classicalElectronRadius:FR,evaluate:NS,median:gS,simplify:cy,symbolicEqual:SZ,corr:_R,freqz:OR,leafCount:NZ,mad:BR,parser:AZ,rationalize:MZ,std:PR,zeta:IR,derivative:CZ,norm:fy,rotationMatrix:xS,help:EZ,planckTime:RR,schur:yS,rotate:kR,sylvester:bS,lyap:qR,config:Oe});ht(yf,xf,{filter:Sx({typed:te}),forEach:Nx({typed:te}),map:Mx({typed:te}),apply:wx({isInteger:Ln,typed:te}),or:Wx({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),and:Ux({add:Lr,concat:Gr,equalScalar:Ir,matrix:$e,not:Wc,typed:te,zeros:ln}),concat:Bx({isInteger:Ln,matrix:$e,typed:te}),max:Cx({config:Oe,larger:Fn,numeric:za,typed:te}),print:zx({add:Lr,matrix:$e,typed:te,zeros:ln}),bitAnd:Yx({add:Lr,concat:Gr,equalScalar:Ir,matrix:$e,not:Wc,typed:te,zeros:ln}),diff:Px({bignumber:ea,matrix:$e,number:Oi,subtract:Bt,typed:te}),min:Tx({config:Oe,numeric:za,smaller:Tn,typed:te}),subset:Ox({add:Lr,matrix:$e,typed:te,zeros:ln}),bitOr:Hx({DenseMatrix:_r,concat:Gr,equalScalar:Ir,matrix:$e,typed:te}),cumsum:qx({add:Lr,typed:te,unaryPlus:Gx}),index:Ax({Index:yn,getMatrixDataType:Zx}),sum:Rx({add:Lr,config:Oe,numeric:za,typed:te}),range:Fx({bignumber:ea,matrix:$e,add:Lr,config:Oe,isPositive:Yo,larger:Fn,largerEq:Hc,smaller:Tn,smallerEq:Is,typed:te}),row:_x({Index:yn,matrix:$e,range:Rs,typed:te}),column:Dx({Index:yn,matrix:$e,range:Rs,typed:te}),mean:Ex({add:Lr,divide:an,typed:te}),quantileSeq:kx({add:Lr,bignumber:ea,compare:Go,divide:an,isInteger:Ln,larger:Fn,multiply:it,partitionSelect:Gc,smaller:Tn,smallerEq:Is,subtract:Bt,typed:te}),variance:Lx({add:Lr,apply:Jx,divide:an,isNaN:pf,multiply:it,subtract:Bt,typed:te}),std:Ix({map:Ho,sqrt:La,typed:te,variance:uy})});ht(LR,{BigNumber:Ge,Complex:pt,Fraction:Uo,Matrix:Lc,Node:_n,ObjectNode:bf,OperatorNode:io,ParenthesisNode:ks,Range:EP,RelationalNode:zR,ResultSet:kD,ArrayNode:wf,BlockNode:UR,ConditionalNode:WR,ConstantNode:Zo,DenseMatrix:_r,RangeNode:YR,Chain:wS,FunctionAssignmentNode:HR,SparseMatrix:Bi,IndexNode:Df,ImmutableDenseMatrix:KD,Index:yn,AccessorNode:Sf,AssignmentNode:$R,FibonacciHeap:nS,Spa:uS,Unit:wr,SymbolNode:Qo,FunctionNode:Xo,Help:VR,Parser:ZR});wS.createProxy(xf);var AS=PD;var jR=ca(Am(),1);var XR=ca(QR(),1);function JR(e){var r=new XR.default;return e.on=r.on.bind(r),e.off=r.off.bind(r),e.once=r.once.bind(r),e.emit=r.emit.bind(r),e}function KR(e,r,t,n){function a(y,w){var C=arguments.length;if(C!==1&&C!==2)throw new ha("import",C,1,2);w||(w={});function b(O,_,E){if(Array.isArray(_))_.forEach(q=>b(O,q));else if(typeof _=="object")for(var T in _)Xe(_,T)&&b(O,_[T],T);else if(As(_)||E!==void 0){var R=As(_)?x(_)?_.fn+".transform":_.fn:E;if(Xe(O,R)&&O[R]!==_&&!w.silent)throw new Error('Cannot import "'+R+'" twice');O[R]=_}else if(!w.silent)throw new TypeError("Factory, Object, or Array expected")}var M={};b(M,y);for(var A in M)if(Xe(M,A)){var S=M[A];if(As(S))o(S,w);else if(s(S))i(A,S,w);else if(!w.silent)throw new TypeError("Factory, Object, or Array expected")}}function i(y,w,C){if(C.wrap&&typeof w=="function"&&(w=c(w)),m(w)&&(w=e(y,{[w.signature]:w})),e.isTypedFunction(t[y])&&e.isTypedFunction(w)){C.override?w=e(y,w.signatures):w=e(t[y],w),t[y]=w,delete n[y],u(y,w),t.emit("import",y,function(){return w});return}if(t[y]===void 0||C.override){t[y]=w,delete n[y],u(y,w),t.emit("import",y,function(){return w});return}if(!C.silent)throw new Error('Cannot import "'+y+'": already exists')}function u(y,w){w&&typeof w.transform=="function"?(t.expression.transform[y]=w.transform,d(y)&&(t.expression.mathWithTransform[y]=w.transform)):(delete t.expression.transform[y],d(y)&&(t.expression.mathWithTransform[y]=w))}function l(y){delete t.expression.transform[y],d(y)?t.expression.mathWithTransform[y]=t[y]:delete t.expression.mathWithTransform[y]}function c(y){var w=function(){for(var b=[],M=0,A=arguments.length;M2&&arguments[2]!==void 0?arguments[2]:y.fn;if(Jb(C,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(C));var b=x(y)?t.expression.transform:t,M=C in t.expression.transform,A=Xe(b,C)?b[C]:void 0,S=function(){var _={};y.dependencies.map(ew).forEach(T=>{if(Jb(T,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(T));T==="math"?_.math=t:T==="mathWithTransform"?_.mathWithTransform=t.expression.mathWithTransform:T==="classes"?_.classes=t:_[T]=t[T]});var E=y(_);if(E&&typeof E.transform=="function")throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(A===void 0||w.override)return E;if(e.isTypedFunction(A)&&e.isTypedFunction(E))return e(A,E);if(w.silent)return A;throw new Error('Cannot import "'+C+'": already exists')};!y.meta||y.meta.lazy!==!1?(Du(b,C,S),A&&M?l(C):(x(y)||h(y))&&Du(t.expression.mathWithTransform,C,()=>b[C])):(b[C]=S(),A&&M?l(C):(x(y)||h(y))&&Du(t.expression.mathWithTransform,C,()=>b[C])),n[C]=y,t.emit("import",C,S)}function s(y){return typeof y=="function"||typeof y=="number"||typeof y=="string"||typeof y=="boolean"||y===null||Ht(y)||Kt(y)||rr(y)||ma(y)||Qe(y)||Array.isArray(y)}function m(y){return typeof y=="function"&&typeof y.signature=="string"}function d(y){return!Xe(v,y)}function h(y){return y.fn.indexOf(".")===-1&&!Xe(v,y.fn)&&(!y.meta||!y.meta.isClass)}function x(y){return y!==void 0&&y.meta!==void 0&&y.meta.isTransformFunction===!0||!1}var v={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return a}function ly(e,r){var t=ht({},Ds,r);if(typeof Object.create!="function")throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var n=JR({isNumber:sr,isComplex:Kt,isBigNumber:rr,isFraction:ma,isUnit:Ht,isString:St,isArray:Mr,isMatrix:Qe,isCollection:Nt,isDenseMatrix:Xi,isSparseMatrix:pa,isRange:To,isIndex:Ai,isBoolean:cm,isResultSet:lm,isHelp:yu,isFunction:mm,isDate:pm,isRegExp:dm,isObject:Mi,isNull:hm,isUndefined:vm,isAccessorNode:qn,isArrayNode:jt,isAssignmentNode:gm,isBlockNode:xm,isConditionalNode:ym,isConstantNode:yr,isFunctionAssignmentNode:_a,isFunctionNode:gn,isIndexNode:Qn,isNode:Nr,isObjectNode:Ci,isOperatorNode:ct,isParenthesisNode:en,isRangeNode:bm,isRelationalNode:wm,isSymbolNode:at,isChain:bu});n.config=HA(t,n.emit),n.expression={transform:{},mathWithTransform:{config:n.config}};var a=[],i=[];function u(s){if(As(s))return s(n);var m=s[Object.keys(s)[0]];if(As(m))return m(n);if(!UA(s))throw console.warn("Factory object with properties \`type\`, \`name\`, and \`factory\` expected",s),new Error("Factory object with properties \`type\`, \`name\`, and \`factory\` expected");var d=a.indexOf(s),h;return d===-1?(s.math===!0?h=s.factory(n.type,t,u,n.typed,n):h=s.factory(n.type,t,u,n.typed),a.push(s),i.push(h)):h=i[d],h}var l={};function c(){for(var s=arguments.length,m=new Array(s),d=0;d{Ub(l).forEach(s=>{s&&s.meta&&s.meta.recreateOnConfigChange&&o(s,{override:!0})})}),n.create=ly.bind(null,e),n.factory=F,n.import(Ub(LA(e))),n.ArgumentsError=ha,n.DimensionError=pr,n.IndexError=tn,n}var vy=ca(fm());var r5=ca(e5()),TS=class{constructor(){this.lang="en";this.all={en:{hintText:{dragDropModifierKeys:"Hold \${1} to Pin and \${2} to Copy",createListItem:"Select/Create List Item Frame",dragDropProperties:"Drag and drop properties to link them into the list",newItem:"+ New",selectNote:"Select Note...",newFrame:"New"},defaults:{spaceNote:"Current Note",spaceContext:"Current Space"},commands:{h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",columns:"Columns",tabs:"Tabs",button:"Button",label:"Label",column:"Column",idea:"New",group:"Group",paragraph:"Text",card:"Card",progress:"Progress",rating:"Rating",circularProgress:"Circular Progress",list:"Bullet List","ordered-list":"Numbered List",todo:"To-do List",quote:"Quote",divider:"Divider",note:"Link to Note",link:"Link",callout:"Callout",bookmark:"Bookmark",table:"Table",codeblock:"Code Block",toggle:"Toggle",emoji:"Emoji",image:"Image",flow:"Linked Note",newNote:"New Note",tag:"Tag",makeMenu:"Flow Menu",selectStyle:"Style",toggleKeyboard:"Toggle Keyboard",rows:"Rows",masonry:"Gallery"},styles:{bold:"Bold",italics:"Italics",strikethrough:"Strikethrough",code:"Code",link:"Web Link",blocklink:"Link to Note",textColor:"Text Color",highlight:"Highlight"},commandsSuggest:{noResult:"No result"},commandPalette:{enable:"Enable",disabled:"Disable",openFlow:"Open Flow Blocks in Selection",closeFlow:"Close Flow Blocks in Selection",toggleBold:"Toggle Bold",toggleItalics:"Toggle Italics",openSpaces:"Open Spaces",migrateData:"Migrate Spaces From 0.7",blink:"Blink",openFileContext:"Open Explorer",convertPathToSpace:"Convert to Space",revealFile:"Reveal File in Spaces",releaseNotes:"Release Notes",toggleBacklinks:"Toggle Backlinks",collapseAllFolders:"Collapse All Folders",addFileSpace:"Add File to Space",removeFileSpace:"Remove File from Space"},frames:{sections:{kit:"Kit",paths:"Paths"},label:{label:"Label",description:"Label"},note:{label:"Note",description:"Link to a note"},table:{label:"Table",description:"Table"},context:{label:"Context",description:"Display a context view from another space"},calendar:{label:"Calendar View"},field:{label:"Field",description:"Dynamic node that displays a value based on property type"},event:{label:"Event"},divider:{label:"Divider",description:"Divider to separate your content"},button:{label:"Button",description:"Buttons can perform actions and open links"},callout:{label:"Callout",description:"Callout to highlight important information"},toggle:{label:"Toggle",description:"Toggle to show/hide content"}},menu:{newView:"New View",closeSpace:"Close Space",customView:"Custom View",detailsView:"Details View",catalogView:"Catalog View",galleryView:"Gallery View",deleteContext:"Delete Context",openSpace:"Open Space",revealInDefault:"Reveal in Finder",setNone:"None",fileMetadataDescription:"This note only",openFilePane:"Open in a new pane",rename:"Rename",changeToFolderNote:"New Space from Note",moveFile:"Move file to...",moveFolder:"Move folder to...",duplicate:"Make a copy",edit:"Edit",delete:"Delete",getHelp:"Make.md Community",vault:"Vault",openVault:"Open Another Vault",openVaultInFolder:"Open Vault Folder",obSettings:"Obsidian Settings",commandPalette:"Command Palette",backToSpace:"Back to Spaces",collapseAllSections:"Collapse All Spaces",expandAllSections:"Expand All Spaces",collapseAllFolders:"Collapse All Folders",expandAllFolders:"Expand All Folders",spaceTitle:"Add/Remove in Space",home:"Home",waypoints:"Waypoints",none:"None",tableView:"Table View",cardView:"Card View",boardView:"Board View",listView:"List View",flowView:"Flow View",groupBy:"Group By",sortBy:"Sort By",newFilter:"New Filter",clearFilters:"Clear Filters",hide:"Hide",unhideFields:"Unhide All Properties",importDataview:"Import All Dataview Properties",saveAllProperties:"Save All Properties to Files",mergeProperties:"Merge Properties",removeFromSpace:"Unpin from Space",removeFromWaypoints:"Unpin from Waypoints",editCode:"Edit Code",deleteProperty:"Delete Property",hideProperty:"Hide Property",unhideProperty:"Unhide Property",saveProperty:"Save Property",sortAscending:"Sort Ascending",sortDescending:"Sort Descending",deleteRow:"Delete Item",collapseAll:"Collapse All",customSort:"Custom Sort",groupSpaces:"Group Spaces",fileNameSortAlphaAsc:"File Name (A to Z)",fileNameSortAlphaDesc:"File Name (Z to A)",fileNameSortNumericalAsc:"File Name (1 to 9)",fileNameSortNumericalDesc:"File Name (9 to 1)",createdTimeSortAsc:"Created Time (new to old)",createdTimeSortDesc:"Created Time (old to new)",modifiedTimeSortAsc:"Modified Time (new to old)",modifiedTimeSortDesc:"Modified Time (old to new)",sizeSortAsc:"Size (smallest to largest)",sizeSortDesc:"Size (largest to smallest)",spaces:"Spaces",tags:"Tags",manageHiddenFiles:"Manage Hidden Files",manageActions:"Manage Actions",deleteSpace:"Delete",changeColor:"Change Color",changePropertyType:"Change Type",deleteFiles:"Delete Files",createFolderSpace:"Create Space from Folder",folder:"Folder",syncToContext:"Add Property to Context",setIcon:"Set Icon",copyEmbedLink:"Copy Embed Link",moveUp:"Move Up",moveDown:"Move Down",moveTo:"Move To",groupNodes:"Group Nodes",moveFrame:"Move Frame",renameFrame:"Rename Frame",deleteFrame:"Delete Frame",insertAbove:"Insert Above",insertBelow:"Insert Below"},editor:{rows:"Rows",columns:"Columns",catalog:"Catalog",gallery:"Gallery",grid:"Grid",scaleToFit:"Change to Fit",scaleToFill:"Change to Fill",fit:"Fit",strokeNone:"None",strokeSolid:"Solid",strokeDotted:"Dotted",strokeDashed:"Dashed",size:"Size",gap:"Gap",marginLeft:"Left",marginTop:"Top",marginRight:"Right",marginBottom:"Bottom",minimize:"Minimize",paddingLeft:"Left",paddingTop:"Top",paddingRight:"Right",paddingBottom:"Bottom",unlinkProperty:"Unlink Property",linkedProperty:"Linked Property",linkProperty:"Link Property",currentSpace:"Current Space",linkName:"\${1} Link",linkThumbnail:"\${1} Thumbnail",linkSticker:"\${1} Sticker",opacity:"Opacity",shadowSpread:"Spread",shadowBlur:"Blur",width:"Width",height:"Height",margin:"Margin",padding:"Padding",bold:"Bold",italic:"Italic",underline:"Underline",alignLeft:"Align Left",alignCenter:"Align Center",alignRight:"Align Right",alignJustify:"Align Justify",numberOfLines:"Lines",createVerticalSection:"Create Vertical Section",createHorizontalSection:"Create Horizontal Section",themeColors:"Theme Colors",uiColors:"UI Colors",hex:"Hex"},buttons:{add:"Add",addFilter:"Add Filter",addCondition:"Add Condition",customize:"Customize",moreOptions:"More Options",saveProperty:"Save Property",newNote:"New Note",changeIcon:"Change Sticker",removeIcon:"Remove Sticker",addIcon:"Add Sticker",addCover:"Add Cover",changeBanner:"Change Cover",changeBannerShort:"Cover",saveChanges:"Save Changes",removeBanner:"Remove Cover",rename:"Change Name",editFrame:"Edit Frame",saveSpace:"Save Space",createSpace:"New Space",createFolder:"New Folder",createNote:"New Note",createCanvas:"New Canvas",addIntoSpace:"New Pin",addSmartSearch:"Add Live Search",addItem:"Add Item",addProperty:"Add Property",editProperty:"Edit Property",addContext:"Add Context",cancel:"Cancel",search:"Search",delete:"Delete",toggleFlow:"Toggle Flow",openFlow:"Open Flow",hideFlow:"Hide Flow",openLink:"Open Link",addToSpace:"Add to Space",addToSpaceShort:"Pin",addTag:"Add Tag",tag:"Tag",syncFields:"Sync Properties",convertTable:"Convert to Markdown",cutTable:"Cut Table",deleteTable:"Delete Table",blink:"Blink",addFile:"Add Item",merge:"Merge",saveView:"Save View",saveTable:"Save Table",renameView:"Rename View",deleteView:"Delete View",renameTable:"Rename Table",renameTag:"Rename Tag",createTag:"Create Tag",currentFolder:"Current Folder",sync:"Sync",pasteCSS:"Paste CSS",save:"Save",run:"Run"},metadataTypes:{fileName:"File Name",contexts:"Contexts",path:"Path",folder:"Folder",sticker:"Sticker",color:"Color",created:"Created",lastModified:"Last Modified",extension:"Extension",size:"Size",tags:"Tags",inlinks:"Linked Mentions",outlinks:"Links",label:"Label",fileMetadata:"File Metadata",frontmatter:"Frontmatter"},filterTypes:{contains:"contains",notContains:"does not contain",is:"is",isNot:"is not",before:"before",after:"on or after",anyOf:"is any of",noneOf:"is none of",checked:"is checked",unchecked:"is unchecked",isEmpty:"is empty",isNotEmpty:"is not empty",isSameDate:"is same date",isSameDateAsToday:"today"},sortTypes:{alphaAsc:"A to Z",alphaDesc:"Z to A",earliest:"Earliest",latest:"Latest",checkAsc:"Checked \\u2192 Unchecked",checkDesc:"Unchecked \\u2192 Checked",itemsAsc:"Least Items",itemsDesc:"Most Items"},properties:{defaultField:"Name",audio:{label:"Audio",description:"Audio"},text:{label:"Text",description:"Text field"},number:{label:"Number",description:"Number field with optional unit"},boolean:{label:"Yes/No",description:"Yes or No toggle to indicate the status"},date:{label:"Date",description:"Select a date from a calendar"},option:{label:"Option",description:"Select one or multiple option from a list"},file:{label:"File"},link:{label:"Link",description:"Link to another note or a website"},tags:{label:"Tags",description:"Use tags to quickly organize your items"},object:{label:"Object",description:"Store any complex objects"},context:{label:"Relation",description:"Connect to another context property and create a relation"},image:{label:"Image",description:"Select any image from your system or from the internet"},color:{label:"Color",description:"Use colors to label your items or status"},space:{label:"Context",description:"Link to a context"},icon:{label:"Sticker",description:"Use stickers to uniquely label your items or status"},super:{label:"Super Property",links:"Open Link",properties:"Update Property",api:"API",obsidianCommands:"Run Command",runCommand:"Run Command",performAction:"Perform Action",whenClicked:"When Clicked"},fileProperty:{name:"Name",label:"Formula",createdTime:"Created",modifiedTime:"Last Edited",sticker:"Sticker",links:"Links",tags:"Tags",spaces:"Spaces",extension:"Extension",size:"Size",preview:"Note Preview",parentFolder:"Folder",description:"Use a formula to dynamically display a property"}},views:{navigator:"Navigator",explorer:"Explorer",space:"Space"},subViews:{spaceItems:"Items",spaceContext:"Context",spaceLists:"Lists",spaceActions:"Actions",spaceTemplates:"Templates",smartSearch:"Live Searches",filesAndFolders:"Files and Folders"},labels:{duplicateTable:"Duplicate Table",moveTable:"Move Table",editFormula:"Edit Formula",editObject:"Edit Object",properties:"Properties",newAction:"New Action",newTable:"New Table",createFolder:"New Folder Name",rename:"Rename",createNew:"New",default:"Default",done:"Done",tables:"Tables",selectDateFormat:"Select/Type Date Format",renameSection:"Edit Space",createSection:"New Folder",createNote:"New Note",contextMaker:"Context Maker",select:"Select",pinnedItems:"Pinned Items",collapse:"Collapse",expand:"Expand",all:"All",none:"None",view:"View",findStickers:"Find Sticker",mergeProperties:"Merge Properties",placeholder:"Type '\${1}' for commands",notePlaceholder:"New Note for \${1}",itemsSelected:"\${1} Selected",selectNote:"Select Note",selectIcon:"Select Icon",selectImage:"Select Image",selectSpace:"Select Space",styleSmall:"Small",styleMedium:"Medium",styleLarge:"Large",hiddenFilePattern:"Name, Suffixes and Extension",hiddenFileSpecific:"Exclude specific files and folders",textPlaceholder:"Enter Text",noFile:"is not created yet. Click to create.",navigatorSearchPlaceholder:"Search by Text or Filters",blinkPlaceholder:"Quickly Search a File, Folder, Tag... Press Tab to Edit",searchPlaceholder:"Type to search...",contextItemSelectPlaceholder:"Find Item",linkItemSelectPlaceholder:"Find or Create Note",pinNotePlaceholder:"Select a Note or Space to Pin",optionItemSelectPlaceholder:"Select Option",viewItemSelectPlaceholder:"Select View",tagItemSelectPlaceholder:"Find Tag",spaceSelectPlaceholder:"Select any Folder or Tag",propertyItemSelectPlaceholder:"Select Property",sortItemSelectPlaceholder:"Select Sort",filterItemSelectPlaceholder:"Select Filter",imageSelectPlaceholder:"Select an image or paste a URL",imageNotFoundPlaceholder:"No Images Found",syncFrontmatterProperty:"Sync Frontmatter Property",newProperty:"New Property",newPropertyShort:"New Property",propertyType:"Type",propertyDynamic:"Dyanmic",propertyValueSpace:"Space",propertyValueProperty:"Property",propertyLookup:"Edit Formula",dateFormat:"Date Format",propertyFileProp:"Property",multiple:"Multiple",filesCount:"{$1} Files",hiddenFiles:"Hidden Files",addExtension:"Add Rule",saveView:"Save View",saveTable:"Save Table",renameView:"Rename View",renameTable:"Rename Table",syncMetadata:"Sync Metadata",syncProperties:"Sync Properties",selectContext:"Select Context",metadata:"Metadata",backlinks:"Backlinks",spaces:"Spaces",context:"Context",content:"Content",deleteSpace:"Delete Space",deleteFiles:"Delete Files",outgoingLinks:"Outgoing Links",moveTo:"Move to",addTo:"Pin to",copyTo:"Copy to",reorderIn:"Reorder in",border:"Border",corners:"Corners",color:"Color",backgroundColor:"Background",cornerRadius:"Radius",onClick:"On Click",layout:"Layout",element:"Element",name:"Name",display:"Display",alignment:"Alignment",margin:"Margin",padding:"Padding",gap:"Gap",width:"Width",height:"Height",opacity:"Opacity",shadow:"Shadow",shadowBlur:"Blur",shadowSpread:"Spread",typography:"Typography",layers:"Layers",fontSize:"Size",props:"Props",styles:"Styles",events:"Events",code:"Code",selectedLayers:"\${1} Layers"},descriptions:{spaceActions:"Create actions that runs when you press a button",spaceLists:"Create lists to track data and organize them in your space",spaceItems:"Add new items to the space or pin items to the space",spaceTemplates:"Create templates to quickly add items to your space",smartSearch:"Automatically pin notes to this space based on a set of searches",hiddenFileOptions:"Exclude any files and folders by name, suffix or extension.",deleteSpace:"Deleting the space will also delete the folder and its contents.",deleteFiles:"Delete \${1} files/folders and their contents?",addContext:"Contexts lets you connect properties from your tags",spaceProperties:"Define Properties for your Space Items",syncMetadata:"Select which fields from your notes to start syncing with the context.",syncProperties:"Contexts defines and syncs the same fields across your notes depending on their folder or tag.",selectContext:"Select which folder or tag context you want to sync the fields."},flowView:{emptyDoc:"Empty Document",itemsCount:" Items",emptyFolder:"This Folder is Empty"},notice:{duplicateFile:"Folder already contains note with same name",addedToSection:"Added to Space",fileExists:"File Already Exists",folderExists:"Folder Already Exists",noPropertyName:"Property Name is Required",duplicatePropertyName:"Duplicate Property Name",newSpaceName:"Enter a name for your space",duplicateSpaceName:"Space name already exists",cantConvertNoteToSpace:"The view is not a note",templateSaved:"Template saved to space: "},settings:{layoutVertical:"Vertical",layoutHorizontal:"Horizontal",sectionSidebar:"Spaces",sectionEditor:"Maker Mode",sectionFlow:"Flow",sectionAdvanced:"Advanced",sectionDataview:"Dataview",sectionContext:"Context",sectionStickers:"Stickers",sectionNavigator:"Navigator",sectionDefault:"Default Spaces",sectionSpaceView:"Space View",sectionBlink:"Blink",sectionInlineContext:"Inline Context",sectionFlowBlock:"Flow Block",sectionFlowMenu:"Flow Menu",sectionFlowStyler:"Flow Styler",experimental:{name:"Experimental",desc:"Experimental features that are subject to change and may not be optimized for performance"},generateThumbnails:{name:"Generate Thumbnails",desc:"Create thumbnails for images to speed up performance"},minimalThemeFix:{name:"Minimal Theme Fix",description:"Apply fixes for the popular theme Minimal"},inlineStickerMenu:{name:"Inline Stickers",desc:"Add inline stickers by typing :"},openSpacesOnLaunch:{name:"Open Spaces as Default Tab",desc:"Open the Spaces tab when Obsidian launches"},defaultSpaceTemplate:{name:"Default Space Template",desc:"Select the default template for new spaces"},defaultDateFormat:{name:"Default Date Format",desc:"Set the default date format, example: yyyy-MM-dd (see https://date-fns.org/v2.30.0/docs/format)"},newNotePlaceholder:{name:"New Note Placeholder",desc:"Default name for new notes"},folderIndentationLines:{name:"Show Folder Indentation Lines",desc:"Turn on to show a line on the left of folders to indicate indentation"},folderNoteLocation:{name:"Folder Note Location Inside Folder",desc:"Turn on to have folder notes inside the folder, turn off to have it outside"},folderViewDefault:{name:"Show Folder Note by Default",desc:"Show the folder note by default when opening a folder"},internalLinkFlowEditor:{name:"Open Flow Blocks on Internal Link Click",desc:"Turn on to toggle Flow Blocks directly by clicking on internal links, otherwise a tooltip will be shown"},syncContextToFrontmatter:{name:"Sync Context Fields to Frontmatter",desc:"Turn on to automatically save all context fields to frontmatter fields, not just existing frontmatter fields."},syncFormulaToFrontmatter:{name:"Sync Formula Fields to Frontmatter",desc:"Turn on to save calculated formula values to frontmatter fields."},inlineBacklinks:{name:"Show Inline Backlinks (Inline Context required)",desc:"Show editable backlinks at the bottom of your notes"},dataviewInlineContext:{name:"Show Dataview in Inline Context",desc:"Show dataview when inline context is enabled"},inlineContextExplorer:{name:"Inline Context",desc:"Display the context and a banner at the top of your notes"},inlineContextExpanded:{name:"Auto Expand Inline Context",desc:"Expand the inline context sections when opening a note"},inlineContextHorizontal:{name:"Inline Title and Sticker Layout",desc:"Layout for inline title and sticker in Inline Context"},hideFrontmatter:{name:"Hide Frontmatter Properties",desc:"Hide the frontmatter properties in inline context"},openFileContext:{name:"Auto Open Explorer",desc:"Automatically open explorer panel in the right panel"},folderNote:{name:"Enable Folder Note",desc:"Access the folder note in the folder page and hide the folder note from spaces"},expandFolder:{name:"Auto Expand Folder",desc:"Auto expand folders on click"},hoverPreview:{name:"Preview on Hover",desc:"Preview on Hover while holding Control/Command key"},activeFile:{name:"Reveal Active File",desc:"Automatically reveal the active file in Spaces"},contexts:{name:"Contexts",desc:"Contexts allows you to have full control over the metadata of your files"},spaces:{name:"Navigator",desc:"The navigator lets you create and organize your spaces"},spacesStickers:{name:"Stickers",desc:"Use Emojis to make it easier to find your notes"},spacesAlias:{name:"Alias",desc:"Use the alias metadata to show in Spaces"},spacesFileExplorerDual:{name:"Compatibility Mode",desc:"This will improve the compatibility of plugins while using Spaces"},spacesDeleteOption:{name:"Delete File Option",desc:"Select how you want files to be deleted"},spacesDeleteOptions:{permanant:"Delete Permanently",trash:"Move to Obsidian Trash","system-trash":"Move to System Trash"},hideRibbon:{name:"App Ribbon",desc:"Show/hide the left menu aka. ribbon"},spaceView:{name:"Space View",desc:"Open the space view when you click on a space"},defaultSpaces:{name:"Default Spaces",desc:"Recommended spaces for quickly organizing your vault"},homeSpace:{name:"Home Space",desc:"An easy-to-access space where you can add/organize your other spaces"},tagSpaces:{name:"Tag Spaces",desc:"Automatically create spaces for each of your tags"},readableLineWidth:{name:"Readable Line Width",desc:"Use Readable Line Width"},sidebarTabs:{name:"Sidebar Tabs",desc:"Show/hide other sidebar tabs"},spacesPerformance:{name:"Performance Mode",desc:"Turn on performance mode for Spaces, may affect scrolling appearance. Requires Restart"},indexSVG:{name:"Use SVGs as Stickers",desc:"Use any svg file in your vault as a sticker"},inlineStyler:{name:"Flow Styler",desc:"Select text to add styling"},inlineStylerColor:{name:"Text and Highlight Colors \\u{1F9EA}",desc:"Select text color and highlight color, (this may change in the future because of the limitations with HTML and Obsidian)"},spaceRowHeight:{name:"Row Height",desc:"The height for each row in spaces (in pixels), default is 28"},coverHeight:{name:"Cover Height",desc:"The height for the cover of the note or space, default is 200"},makeChar:{name:"Flow Menu Trigger",desc:"Character to open the Flow Menu"},mobileMakeBar:{name:"Flow Styler (Mobile)",desc:"Replaces the mobile toolbar"},editorMarkSans:{name:"Mark Sans \\u{1F9EA}",desc:"Use the editor without Markdown."},editorMakerMode:{name:"Flow (Beta)",desc:"An integrated and intuitive editor experience"},editorMakePlacholder:{name:"Flow Menu Hint Text",desc:"Show a hint text on how to open the Flow Menu Shortcut"},blink:{name:"Blink",desc:"A faster way to search and edit your notes"},editorMakeMenu:{name:"Flow Menu",desc:"Open the Flow menu to quickly add content"},editorMakeMenuTrigger:{name:"Flow Menu Shortcut",desc:"Trigger key to use flow menu"},editorFlowReplace:{name:"Flow Block",desc:"Open your internal links or toggle your embeds in the flow block."},editorFlowStyle:{name:"Flow Block Style",desc:"Select a theme for your flow block",seamless:"Seamless",classic:"Classic",minimal:"Minimal"}}}};this.lang="en";let r=r5.default.locale();["en"].includes(r)&&(this.lang=r)}get texts(){return this.all.en}},Tr=new TS().texts;var RZ=ca(fm());var _Z=(e,r)=>{let t=n=>n=="builtin"?"Builtin":n=="api"?"Spaces":"Action";return[...(e.actionsIndex.get(r)??[]).map(n=>({name:n.schema.name,description:"Action",value:\`\${r}/#;\${n.schema.id}\`,section:"Action"}))??[],...[...e.cli.allCommands()].map(n=>({name:n.schema.name,description:t(n.schema.type),value:n.path,section:t(n.schema.type)}))]};var t5=({field:e,value:r})=>r=="ctime"?{value:\`parseDate(prop('\${e}')['metadata']['file']['\${r}'])\`,type:"date"}:{value:\`prop('\${e}')['metadata']['file']['\${r}']\`,type:"string"},my=(e,r,t,n)=>{let a=wc(e);if(a)return r=="fileprop"&&a.field?t5(a):(r=="option"&&a.source?.length>0&&(a.source=="$commands"?a.options=t.cli.allCommands():a.source=="$links"?a.options=t.spaceManager.allPaths().map(i=>({name:i,value:i})):a.source=="$super"?a.options=_Z(t,n):a.source=="$properties"&&(a.options=t.contextsIndex.get(n)?.cols?.map(i=>({name:i.name,value:i.name}))??[])),[...n5(r).configKeys??[],"alias","default"].reduce((i,u)=>({...i,[u]:a[u]}),{}));if(!r)return{};if(!a)if(r=="context")e?.length>0?a={space:e}:a={};else if(r.startsWith("date"))e?.length>0?a={format:e}:a={};else if(r.startsWith("fileprop"))if(e?.length>0){let[i,u]=e.split(".");a=t5({field:i,value:u})}else a={};else r.startsWith("option")&&(e?.length>0?a={options:Sn(e).map(u=>({name:u,value:u}))}:a={});return a??{}};var n5=(e,r)=>r==Fa?Af.find(t=>t.type=="file"):r=="tags"?Af.find(t=>t.type=="tags-multi"):r=="aliases"?Af.find(t=>t.type=="option-multi"):r=="sticker"?Af.find(t=>e=="icon"):Af.find(t=>e==t.type)||Af.find(t=>e==t.multiType),Af=[{type:"unknown",label:"",restricted:!0,icon:"ui//file-question"},{type:"text",label:Tr.properties.text.label,metadata:!0,icon:"ui//text",primative:!0,description:Tr.properties.text.description},{type:"number",label:Tr.properties.number.label,metadata:!0,icon:"ui//binary",configKeys:["unit"],primative:!0,description:Tr.properties.number.description},{type:"boolean",label:Tr.properties.boolean.label,metadata:!0,icon:"ui//check-square",primative:!0,description:Tr.properties.boolean.description},{type:"date",label:Tr.properties.date.label,metadata:!0,icon:"ui//calendar",configKeys:["format"],primative:!0,description:Tr.properties.date.description},{type:"option",label:Tr.properties.option.label,multi:!0,multiType:"option-multi",icon:"ui//list",configKeys:["options","source"],description:Tr.properties.option.description},{type:"tags-multi",label:Tr.properties.tags.label,icon:"ui//tags",description:Tr.properties.tags.description},{type:"file",label:Tr.properties.file.label,restricted:!0,icon:"ui//mk-make-h3"},{type:"fileprop",label:Tr.properties.fileProperty.label,icon:"ui//formula",configKeys:["field","value","type"],description:Tr.properties.fileProperty.description},{type:"link",label:Tr.properties.link.label,multi:!0,multiType:"link-multi",metadata:!0,icon:"ui//file-text",primative:!0,description:Tr.properties.link.description},{type:"context",label:Tr.properties.context.label,icon:"ui//mk-make-note",multi:!0,multiType:"context-multi",configKeys:["space"],description:Tr.properties.context.description},{type:"object",label:Tr.properties.object.label,multi:!0,multiType:"object-multi",metadata:!0,icon:"ui//list-tree",configKeys:["type","typeName"],description:Tr.properties.object.description},{type:"icon",label:Tr.properties.icon.label,multi:!0,multiType:"icon-multi",icon:"ui//gem",restricted:!0,primative:!0,description:Tr.properties.icon.description},{type:"image",label:Tr.properties.image.label,multi:!0,multiType:"image-multi",metadata:!0,icon:"ui//mk-make-image",primative:!0,description:Tr.properties.image.description},{type:"color",label:Tr.properties.color.label,icon:"ui//mk-make-image",restricted:!0,description:Tr.properties.color.description},{type:"space",label:Tr.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:Tr.properties.space.description},{type:"table",label:Tr.properties.space.label,icon:"ui//layout-grid",restricted:!0,description:Tr.properties.space.description},{type:"super",label:Tr.properties.super.label,icon:"ui//zap",restricted:!0,configKeys:["dynamic","field"]},{type:"input",label:Tr.properties.super.label,icon:"ui//input",restricted:!0}];var qs="files",hy={id:qs,name:"Files",type:"db",primary:"true"},OZ="filesView",BZ={id:OZ,name:"All",type:"view",def:JSON.stringify({db:qs,icon:"ui//file-stack"})},PZ="main",IZ=e=>({id:e,name:e,type:"frame",def:"",predicate:"",primary:"true"}),N4e={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[IZ(PZ),BZ]},py={uniques:[],cols:["id","name","type","def","predicate","primary"],rows:[hy]},a5={uniques:["name,schemaId"],cols:["name","schemaId","type","value","attrs","hidden","unique","primary"]},dy={...a5,rows:[{name:Fa,schemaId:qs,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""},{name:Tr.properties.fileProperty.createdTime,schemaId:qs,type:"fileprop",value:Fa+".ctime",hidden:"",unique:"",attrs:"",primary:"true"}]};var A4e=[{name:Tr.properties.defaultField,schemaId:"",type:"text",primary:"true"}],FS={...a5,rows:[{name:Fa,schemaId:qs,type:"file",primary:"true",hidden:"",unique:"",attrs:"",value:""}]};var M4e={schema:hy,cols:dy.rows,rows:[]},C4e={schema:hy,cols:dy.rows,rows:[]},E4e={schema:hy,cols:FS.rows,rows:[]},i5=(e,r)=>e.filter(t=>r.find(n=>n.id==t.schemaId&&n.type=="db")).reduce((t,n)=>({...t,...t[n.schemaId]?{[n.schemaId]:{uniques:n.unique=="true"?[...t[n.schemaId].uniques,n.name]:t[n.schemaId].uniques,cols:[...t[n.schemaId].cols,n.name],rows:[]}}:{[n.schemaId]:{uniques:n.unique=="true"?[n.name]:[],cols:[n.name],rows:[]}}}),{});var T4e={m_schema:py,m_fields:dy,...i5(dy.rows,py.rows)},F4e={m_schema:py,m_fields:FS,...i5(FS.rows,py.rows)};var _S="spaces://$tags";var fRe={name:Tr.menu.waypoints,displayName:Tr.menu.waypoints,path:"spaces://$waypoints",label:{name:Tr.menu.waypoints,thumbnail:"",sticker:"ui//tags",color:""},type:"default"},cRe={name:Tr.menu.tags,displayName:Tr.menu.tags,path:"spaces://$tags",label:{thumbnail:"",name:Tr.menu.tags,sticker:"ui//tags",color:""},type:"default"},lRe={name:Tr.menu.vault,displayName:Tr.menu.vault,path:"/",label:{thumbnail:"",name:Tr.menu.vault,sticker:"ui//vault",color:""},type:"default"};var o5=(e,r,t,n,a,i,u)=>{if(!t)return"";let l=new Map;Object.keys(a).forEach(o=>l.set(o,a[o])),l.set("$properties",n),l.set("$paths",r),i&&l.set("$current",i);let c;try{e.evaluate("current = current()",l),c=e.evaluate(t,l),c=ws("",c)}catch(o){if(u)throw o}return c};var OS=e=>{let r=new Map;e.filter(u=>u.type=="fileprop"||u.name.startsWith("tags")).forEach(u=>{let{value:l}=my(u.value,u.type),c=[];try{let s=Ua(l).filter(m=>m.type=="FunctionNode").filter(m=>m.fn.name=="prop"&&m.args[0].type=="ConstantNode").map(m=>m.args[0]?.value);c.push(...s)}catch{}let o=u.name;r.has(o)||r.set(o,new Set);for(let s of c){let m=s;m!==o&&r.get(o).add(m)}});let t=new Set,n=[],a=new Set,i=u=>{if(a.has(u))throw new Error("Circular dependency detected");if(!t.has(u)){a.add(u);let l=r.get(u)||new Set;for(let c of l)i(c);t.add(u),a.delete(u),n.push(u)}};for(let u of e)t.has(u.name)||i(u.name);return n},s5=(e,r,t,n,a,i)=>{if(!t)return{};let u=i??OS(n),l=r.get(t[Fa])?.metadata?.property??{},c=Object.keys(l).filter(m=>n.some(d=>d.name==m)).reduce((m,d)=>({...m,[d]:ws(d,l[d])}),{}),o=u.map(m=>n.find(d=>d.name==m)).filter(m=>m&&(m.type=="fileprop"||m.name=="tags")),s=n.reduce((m,d)=>({...m,[d.name]:d}),{});return{...t,...c,...o.reduce((m,d)=>{let{value:h}=my(d.value,d.type);return{...m,[d.name]:o5(e,r,h,s,{...t,...m},a)}},{})}};var u5=(e,r)=>{let t=e?Sn(e):[],n=r?Sn(r):[];return n.every(a=>t.some(i=>i==a))&&t.every(a=>n.some(i=>i==a))},Mf=(e,r)=>e==r,BS=(e,r)=>(e??"").length==0,PS=(e,r)=>(e??"").toLowerCase().includes((r??"").toLowerCase()),IS=(e,r)=>parseFloat(e)>parseFloat(r),RS=(e,r)=>parseInt(e){let t=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e),n=isNaN(Date.parse(r))?new Date(parseInt(r)):new Date(r);return t.valueOf()>=n.valueOf()},c5=(e,r)=>{let t=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e),n=isNaN(Date.parse(r))?new Date(parseInt(r)):new Date(r);return t.valueOf(){let t=e?Sn(e):[],n=r?Sn(r):[];return t.length==0?!1:n.some(a=>t.some(i=>i==a))},l5=(e,r)=>{if(!e)return!1;let t=new Date(\`\${e.toString().replace(".",":")}\`),n=new Date(\`\${r}\`);return t.getMonth()===n.getMonth()&&t.getDate()===n.getDate()},m5=e=>{if(!e)return!1;let r=new Date(\`\${e.toString()}T00:00\`),t=new Date;return r.getMonth()===t.getMonth()&&r.getDate()===t.getDate()};var Cf={isNotEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(e,r)=>!BS(e,""),valueType:"none"},isEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(e,r)=>BS(e,""),valueType:"none"},include:{fn:(e,r)=>PS(e,r),type:["text","file","link","image"],valueType:"text"},notInclude:{type:["text","file","link","image"],fn:(e,r)=>!PS(e,r),valueType:"text"},is:{type:["text"],fn:(e,r)=>Mf(e,r),valueType:"text"},isNot:{type:["text"],fn:(e,r)=>!Mf(e,r),valueType:"text"},equal:{type:["number"],fn:(e,r)=>Mf(e,r),valueType:"number"},isLink:{type:["link","context"],fn:(e,r)=>Mf(e,r),valueType:"link"},isNotLink:{type:["link","context"],fn:(e,r)=>!Mf(e,r),valueType:"link"},isGreatThan:{type:["number"],fn:(e,r)=>IS(e,r),valueType:"number"},isLessThan:{type:["number"],fn:(e,r)=>RS(e,r),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(e,r)=>!IS(e,r),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(e,r)=>!RS(e,r),valueType:"number"},dateBefore:{type:["date"],fn:(e,r)=>c5(e,r),valueType:"date"},dateAfter:{type:["date"],fn:(e,r)=>f5(e,r),valueType:"date"},isSameDate:{type:["date"],fn:(e,r)=>l5(e,r),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(e,r)=>m5(e,r),valueType:"none"},isExactList:{type:["option","option-multi","link-multi","context-multi","tags-multi"],fn:(e,r)=>u5(e,r),valueType:"list"},isAnyInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(e,r)=>kS(e,r),valueType:"list"},isNoneInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(e,r)=>!kS(e,r),valueType:"list"},isTrue:{type:["boolean"],fn:(e,r)=>e=="true",valueType:"none"},isFalse:{type:["boolean"],fn:(e,r)=>e!="true",valueType:"none"}};var qZ=(e,r,t)=>r.reduce((a,i)=>{let[u,l]=a,c=i.type=="context"?p5(l,i,t):i.type=="path"?h5(l,i,t):i.type=="frontmatter"?d5(l,i,t):v5(l,i,t),o=l.filter(s=>!c.includes(s));return[[...u,...c],o]},[[],e])[0],LZ=(e,r,t)=>r.reduce((n,a)=>a.type=="context"?p5(n,a,t):a.type=="path"?h5(n,a,t):a.type=="frontmatter"?d5(n,a,t):v5(n,a,t),e),p5=(e,r,t)=>{let n=Cf[r.fn];return!n||n.valueType!="none"&&r.value.length==0?[]:e.filter(a=>{let[i,u]=r.field.split("."),l=a.metadata?.property;if(!a.spaces?.includes(i)||!l||!l[u])return!1;let c=!0;if(n){let o=r.fType=="property"?t[r.value]:r.value;c=n.fn(ws(u,l[u]),o)}return c})},d5=(e,r,t)=>{let n=Cf[r.fn];return!n||n.valueType!="none"&&r.value.length==0?[]:e.filter(a=>{let i=a.metadata?.property;if(!i||i[r.field]===void 0)return!1;let u=!0;if(n){let l=r.fType=="property"?t[r.value]:r.value;u=n.fn(ws(r.field,i[r.field]),l)}return u})},h5=(e,r,t)=>{let n=Cf[r.fn];return!n||n.valueType!="none"&&r.value.length==0?[]:e.filter(a=>{let i="";r.field=="outlinks"?i=bs(a.outlinks??[]):r.field=="inlinks"?i=bs(a.inlinks??[]):r.field=="tags"&&(i=bs(a.tags??[]));let u=!0;if(n){let l=r.fType=="property"?t[r.value]:r.value;u=n.fn(i,l)}return u})},v5=(e,r,t)=>{let n=Cf[r.fn];return!n||n.valueType!="none"&&r.value.length==0?[]:e.filter(a=>{let i=!0;if(n){let u=r.fType=="property"?t[r.value]:r.value;i=n.fn(a.metadata?.[r.type]?.[r.field],u)}return i})},g5=(e,r,t)=>e.reduce((a,i)=>!a||i.filters.length==0?!1:i.type=="any"?qZ([r],i.filters,t).length>0:LZ([r],i.filters,t).length>0,!0);var x5=(e,r)=>e.hiddenExtensions.some(t=>r.endsWith(t))||r.startsWith(e.spacesFolder+"/#")||e.hiddenFiles.some(t=>t==r);var y5=(e,r,t)=>{if(!e)return{changed:!1,cache:null};if(!r)return{changed:!1,cache:{path:e.path,frames:{},schemas:[]}};let n=Object.values(r).map(l=>l.schema),a=n.filter(l=>l.type=="frame").reduce((l,c)=>({...l,[c.id]:r[c.id]}),{}),i={path:e.path,frames:a,schemas:n},u=!0;return t&&vy.default.isEqual(i,t)&&(u=!1),{changed:u,cache:i}},b5=(e,r,t,n,a,i,u)=>{let l={};if(!e)return{changed:!1,cache:null};if(!r)return{changed:!1,cache:{cols:[],path:e.path,schemas:[],outlinks:[],contexts:[],paths:[],tables:{},space:e,spaceMap:l,dbExists:!1}};let c=Object.values(r).map(A=>A.schema),o=c.find(A=>A.primary=="true"),s=OS(r[o.id].cols),m={...r[o.id],rows:r[o.id].rows.map(A=>s5(u,i,A,r[o.id].cols,i.get(e.path),s))},d={...r,[o.id]:m},h=m.cols?.filter(A=>A.type.startsWith("context"))??[],x=m.cols?.filter(A=>A.type.startsWith("link"))??[],v=ti(h.map(A=>A.value));h.forEach(A=>{l[A.name]={},m.rows.forEach(S=>{Sn(S[A.name]).forEach(O=>l[A.name][O]=[...l[A.name][O]??[],S[Fa]])})});let y=d[qs]?.rows?.map(A=>A[Fa])??[],w=NA(t??[],y),C=ti(m.rows.reduce((A,S)=>ti([...A,...[...h,...x].flatMap(O=>Sn(S[O.name]).map(_=>Dc(_)))]),[])),b={cols:m.cols,path:e.path,contexts:v,outlinks:C,paths:w,tables:d,schemas:c,space:e,spaceMap:l,dbExists:a},M=!0;return n&&vy.default.isEqual(b,n)&&(M=!0),{changed:M,cache:b}},w5=(e,r,t,n)=>{let a={};for(let[i,u]of e){let l=t.get(i)?.defPath??i,c=e.get(l)??u,o=u?.parent??"",s=u?.type??"",m=u?.subtype??"",d=c?.label,h=n?.get(i),{changed:x,cache:v}=qS(i,r,t,c,d,s,m,o,h);a[i]={changed:x,cache:v}}return a},qS=(e,r,t,n,a,i,u,l,c)=>{let o=(W,G,H)=>W?.length>0||W?.length>0?W:G=="space"?H=="Spaces/Home"?"ui//home":H=="/"?"ui//vault":H.startsWith("spaces://")?"ui//tags":"ui//folder":"ui//file",s={label:n?.label,path:e,name:yc(e),displayName:yc(e)},m=[],d=n?.tags?.map(W=>W)??[],h=x5(r,e),x=(W,G,H=new Set)=>{let L=[];for(let k of G){let K=W.get(k)?.contexts??[];for(let z of K)H.has(z)||(L.push(z),H.add(z),L.push(...x(W,[bc(z)],H)))}return L};if(t.has(l))for(let W of t.get(l).contexts??[])m.push(W);m.push(...d);let v=a?.name,y=n?.properties?um(n.properties[r.fmKeyAlias]):[],w=o(a?.sticker,i,e),C=a?.color??"",b=n?.inlinks??[],M=n?.links??[],A=r.spacesUseAlias?y[0]??v:v,S={...s,name:v,tags:ti(m),type:i,subtype:u,displayName:A,parent:l,label:{name:v,sticker:w,color:C,thumbnail:a?.thumbnail??"",preview:a?.preview??""},metadata:{...n},inlinks:b,outlinks:M},O=[];u=="tag"&&O.push(_S);for(let W of m)O.push(bc(W));let _=new Set,E=(W,G)=>{if(!_.has(W)){if(_.add(W),G.dependencies?.length>0)for(let H of G.dependencies)t.has(H)&&E(H,t.get(H));if(G.defPath==e&&(h=!0),u!="tag"&&u!="default"&&G.space&&G.space.path==l){O.push(W);return}if(G.metadata?.filters?.length>0&&g5(G.metadata.filters,{...S,spaces:O},G.properties)){O.push(W);return}if(G.metadata?.links?.length>0&&(G.metadata?.links??[]).find(L=>L==S.path)){O.push(W);return}}};for(let[W,G]of t)E(W,G);let T=x(t,O);O.push(...T.map(W=>bc(W))),S.tags.push(...T);let R=h?{...S,spaces:[],hidden:h}:{...S,spaces:ti(O),hidden:h},q=!0;return c&&vy.default.isEqual(R,c)&&(q=!1),{changed:q,cache:R}};function D5(e){let{path:r,settings:t,spacesCache:n,pathMetadata:a,label:i,type:u,subtype:l,parent:c,oldMetadata:o}=e;return qS(r,t,n,a,i,u,l,c,o)}function LS(e,r){let{space:t,mdb:n,paths:a,oldCache:i,dbExists:u,pathsIndex:l}=e;return b5(t,n,a,i,u,l,r)}function S5(e,r){let{map:t,pathsIndex:n}=e,a=new Map;for(let[i,u]of t)a.set(i,LS({...u,pathsIndex:n},r));return a}function N5(e){let{pathCache:r,settings:t,spacesCache:n,oldMetadata:a}=e;return w5(r,t,n,a)}function A5(e){let{space:r,mdb:t,oldCache:n}=e;return y5(r,t,n)}var zZ=self,UZ={...AS,createAdd:F("add",[],()=>function(r,t){return r+t})},zS=ly(UZ);zS.import(Lb,{override:!0});zZ.onmessage=async e=>{let{payload:r,job:t}=e.data,n;t.type=="path"?n=D5(r):t.type=="context"?n=LS(r,zS):t.type=="contexts"?n=S5(r,zS):t.type=="frames"?n=A5(r):t.type=="paths"&&(n=N5(r));try{postMessage({job:t,result:n})}catch(a){console.log(a),postMessage({job:t,result:{$error:\`Failed to index \${t.type} \${t.path}: \${a}\`}})}}; /*! * decimal.js v10.4.3 * An arbitrary-precision Decimal type for JavaScript. @@ -92059,7 +92063,7 @@ var Indexer = class { // src/core/superstate/workers/search/search.worker.ts function Worker3() { - return inlineWorker('"use strict";function he(t){return Array.isArray(t)?t:typeof t=="string"?[t]:[]}var xe=(t,e)=>e.indexOf(t)>0?e.indexOf(t):e.length;function k(t){return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(t)}function x(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function f(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function m(t){f(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||k(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn\'t accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function J(t,e){f(2,arguments);var r=m(t).getTime(),a=x(e);return new Date(r+a)}var Ke={};function T(){return Ke}function z(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function K(t){return f(1,arguments),t instanceof Date||k(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Z(t){if(f(1,arguments),!K(t)&&typeof t!="number")return!1;var e=m(t);return!isNaN(Number(e))}function ee(t,e){f(2,arguments);var r=x(e);return J(t,-r)}var Ze=864e5;function te(t){f(1,arguments);var e=m(t),r=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var a=e.getTime(),n=r-a;return Math.floor(n/Ze)+1}function O(t){f(1,arguments);var e=1,r=m(t),a=r.getUTCDay(),n=(a=n.getTime()?r+1:e.getTime()>=i.getTime()?r:r-1}function re(t){f(1,arguments);var e=_(t),r=new Date(0);r.setUTCFullYear(e,0,4),r.setUTCHours(0,0,0,0);var a=O(r);return a}var et=6048e5;function ae(t){f(1,arguments);var e=m(t),r=O(e).getTime()-re(e).getTime();return Math.round(r/et)+1}function S(t,e){var r,a,n,o,i,s,d,l;f(1,arguments);var p=T(),c=x((r=(a=(n=(o=e?.weekStartsOn)!==null&&o!==void 0?o:e==null||(i=e.locale)===null||i===void 0||(s=i.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&n!==void 0?n:p.weekStartsOn)!==null&&a!==void 0?a:(d=p.locale)===null||d===void 0||(l=d.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=m(t),g=h.getUTCDay(),v=(g=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(c+1,0,g),v.setUTCHours(0,0,0,0);var N=S(v,e),D=new Date(0);D.setUTCFullYear(c,0,g),D.setUTCHours(0,0,0,0);var E=S(D,e);return p.getTime()>=N.getTime()?c+1:p.getTime()>=E.getTime()?c:c-1}function ne(t,e){var r,a,n,o,i,s,d,l;f(1,arguments);var p=T(),c=x((r=(a=(n=(o=e?.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(i=e.locale)===null||i===void 0||(s=i.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&n!==void 0?n:p.firstWeekContainsDate)!==null&&a!==void 0?a:(d=p.locale)===null||d===void 0||(l=d.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),h=L(t,e),g=new Date(0);g.setUTCFullYear(h,0,c),g.setUTCHours(0,0,0,0);var v=S(g,e);return v}var tt=6048e5;function oe(t,e){f(1,arguments);var r=m(t),a=S(r,e).getTime()-ne(r,e).getTime();return Math.round(a/tt)+1}function u(t,e){for(var r=t<0?"-":"",a=Math.abs(t).toString();a.length0?a:1-a;return u(r==="yy"?n%100:n,r.length)},M:function(e,r){var a=e.getUTCMonth();return r==="M"?String(a+1):u(a+1,2)},d:function(e,r){return u(e.getUTCDate(),r.length)},a:function(e,r){var a=e.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function(e,r){return u(e.getUTCHours()%12||12,r.length)},H:function(e,r){return u(e.getUTCHours(),r.length)},m:function(e,r){return u(e.getUTCMinutes(),r.length)},s:function(e,r){return u(e.getUTCSeconds(),r.length)},S:function(e,r){var a=r.length,n=e.getUTCMilliseconds(),o=Math.floor(n*Math.pow(10,a-3));return u(o,r.length)}},b=rt;var F={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},at={G:function(e,r,a){var n=e.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return a.era(n,{width:"abbreviated"});case"GGGGG":return a.era(n,{width:"narrow"});case"GGGG":default:return a.era(n,{width:"wide"})}},y:function(e,r,a){if(r==="yo"){var n=e.getUTCFullYear(),o=n>0?n:1-n;return a.ordinalNumber(o,{unit:"year"})}return b.y(e,r)},Y:function(e,r,a,n){var o=L(e,n),i=o>0?o:1-o;if(r==="YY"){var s=i%100;return u(s,2)}return r==="Yo"?a.ordinalNumber(i,{unit:"year"}):u(i,r.length)},R:function(e,r){var a=_(e);return u(a,r.length)},u:function(e,r){var a=e.getUTCFullYear();return u(a,r.length)},Q:function(e,r,a){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"Q":return String(n);case"QQ":return u(n,2);case"Qo":return a.ordinalNumber(n,{unit:"quarter"});case"QQQ":return a.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,r,a){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"q":return String(n);case"qq":return u(n,2);case"qo":return a.ordinalNumber(n,{unit:"quarter"});case"qqq":return a.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,r,a){var n=e.getUTCMonth();switch(r){case"M":case"MM":return b.M(e,r);case"Mo":return a.ordinalNumber(n+1,{unit:"month"});case"MMM":return a.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(n,{width:"wide",context:"formatting"})}},L:function(e,r,a){var n=e.getUTCMonth();switch(r){case"L":return String(n+1);case"LL":return u(n+1,2);case"Lo":return a.ordinalNumber(n+1,{unit:"month"});case"LLL":return a.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(n,{width:"wide",context:"standalone"})}},w:function(e,r,a,n){var o=oe(e,n);return r==="wo"?a.ordinalNumber(o,{unit:"week"}):u(o,r.length)},I:function(e,r,a){var n=ae(e);return r==="Io"?a.ordinalNumber(n,{unit:"week"}):u(n,r.length)},d:function(e,r,a){return r==="do"?a.ordinalNumber(e.getUTCDate(),{unit:"date"}):b.d(e,r)},D:function(e,r,a){var n=te(e);return r==="Do"?a.ordinalNumber(n,{unit:"dayOfYear"}):u(n,r.length)},E:function(e,r,a){var n=e.getUTCDay();switch(r){case"E":case"EE":case"EEE":return a.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(n,{width:"short",context:"formatting"});case"EEEE":default:return a.day(n,{width:"wide",context:"formatting"})}},e:function(e,r,a,n){var o=e.getUTCDay(),i=(o-n.weekStartsOn+8)%7||7;switch(r){case"e":return String(i);case"ee":return u(i,2);case"eo":return a.ordinalNumber(i,{unit:"day"});case"eee":return a.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(o,{width:"short",context:"formatting"});case"eeee":default:return a.day(o,{width:"wide",context:"formatting"})}},c:function(e,r,a,n){var o=e.getUTCDay(),i=(o-n.weekStartsOn+8)%7||7;switch(r){case"c":return String(i);case"cc":return u(i,r.length);case"co":return a.ordinalNumber(i,{unit:"day"});case"ccc":return a.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(o,{width:"narrow",context:"standalone"});case"cccccc":return a.day(o,{width:"short",context:"standalone"});case"cccc":default:return a.day(o,{width:"wide",context:"standalone"})}},i:function(e,r,a){var n=e.getUTCDay(),o=n===0?7:n;switch(r){case"i":return String(o);case"ii":return u(o,r.length);case"io":return a.ordinalNumber(o,{unit:"day"});case"iii":return a.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(n,{width:"short",context:"formatting"});case"iiii":default:return a.day(n,{width:"wide",context:"formatting"})}},a:function(e,r,a){var n=e.getUTCHours(),o=n/12>=1?"pm":"am";switch(r){case"a":case"aa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,r,a){var n=e.getUTCHours(),o;switch(n===12?o=F.noon:n===0?o=F.midnight:o=n/12>=1?"pm":"am",r){case"b":case"bb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,r,a){var n=e.getUTCHours(),o;switch(n>=17?o=F.evening:n>=12?o=F.afternoon:n>=4?o=F.morning:o=F.night,r){case"B":case"BB":case"BBB":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,r,a){if(r==="ho"){var n=e.getUTCHours()%12;return n===0&&(n=12),a.ordinalNumber(n,{unit:"hour"})}return b.h(e,r)},H:function(e,r,a){return r==="Ho"?a.ordinalNumber(e.getUTCHours(),{unit:"hour"}):b.H(e,r)},K:function(e,r,a){var n=e.getUTCHours()%12;return r==="Ko"?a.ordinalNumber(n,{unit:"hour"}):u(n,r.length)},k:function(e,r,a){var n=e.getUTCHours();return n===0&&(n=24),r==="ko"?a.ordinalNumber(n,{unit:"hour"}):u(n,r.length)},m:function(e,r,a){return r==="mo"?a.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):b.m(e,r)},s:function(e,r,a){return r==="so"?a.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):b.s(e,r)},S:function(e,r){return b.S(e,r)},X:function(e,r,a,n){var o=n._originalDate||e,i=o.getTimezoneOffset();if(i===0)return"Z";switch(r){case"X":return be(i);case"XXXX":case"XX":return M(i);case"XXXXX":case"XXX":default:return M(i,":")}},x:function(e,r,a,n){var o=n._originalDate||e,i=o.getTimezoneOffset();switch(r){case"x":return be(i);case"xxxx":case"xx":return M(i);case"xxxxx":case"xxx":default:return M(i,":")}},O:function(e,r,a,n){var o=n._originalDate||e,i=o.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ve(i,":");case"OOOO":default:return"GMT"+M(i,":")}},z:function(e,r,a,n){var o=n._originalDate||e,i=o.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ve(i,":");case"zzzz":default:return"GMT"+M(i,":")}},t:function(e,r,a,n){var o=n._originalDate||e,i=Math.floor(o.getTime()/1e3);return u(i,r.length)},T:function(e,r,a,n){var o=n._originalDate||e,i=o.getTime();return u(i,r.length)}};function ve(t,e){var r=t>0?"-":"+",a=Math.abs(t),n=Math.floor(a/60),o=a%60;if(o===0)return r+String(n);var i=e||"";return r+String(n)+i+u(o,2)}function be(t,e){if(t%60===0){var r=t>0?"-":"+";return r+u(Math.abs(t)/60,2)}return M(t,e)}function M(t,e){var r=e||"",a=t>0?"-":"+",n=Math.abs(t),o=u(Math.floor(n/60),2),i=u(n%60,2);return a+o+r+i}var we=at;var Te=function(e,r){switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Oe=function(e,r){switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},nt=function(e,r){var a=e.match(/(P+)(p+)?/)||[],n=a[1],o=a[2];if(!o)return Te(e,r);var i;switch(n){case"P":i=r.dateTime({width:"short"});break;case"PP":i=r.dateTime({width:"medium"});break;case"PPP":i=r.dateTime({width:"long"});break;case"PPPP":default:i=r.dateTime({width:"full"});break}return i.replace("{{date}}",Te(n,r)).replace("{{time}}",Oe(o,r))},ot={p:Oe,P:nt},Se=ot;var it=["D","DD"],st=["YY","YYYY"];function De(t){return it.indexOf(t)!==-1}function ke(t){return st.indexOf(t)!==-1}function ie(t,e,r){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ut={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ft=function(e,r,a){var n,o=ut[e];return typeof o=="string"?n=o:r===1?n=o.one:n=o.other.replace("{{count}}",r.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+n:n+" ago":n},Me=ft;function $(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.width?String(e.width):t.defaultWidth,a=t.formats[r]||t.formats[t.defaultWidth];return a}}var lt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},dt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},mt={full:"{{date}} \'at\' {{time}}",long:"{{date}} \'at\' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ct={date:$({formats:lt,defaultWidth:"full"}),time:$({formats:dt,defaultWidth:"full"}),dateTime:$({formats:mt,defaultWidth:"full"})},We=ct;var pt={lastWeek:"\'last\' eeee \'at\' p",yesterday:"\'yesterday at\' p",today:"\'today at\' p",tomorrow:"\'tomorrow at\' p",nextWeek:"eeee \'at\' p",other:"P"},gt=function(e,r,a,n){return pt[e]},Ce=gt;function W(t){return function(e,r){var a=r!=null&&r.context?String(r.context):"standalone",n;if(a==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,i=r!=null&&r.width?String(r.width):o;n=t.formattingValues[i]||t.formattingValues[o]}else{var s=t.defaultWidth,d=r!=null&&r.width?String(r.width):t.defaultWidth;n=t.values[d]||t.values[s]}var l=t.argumentCallback?t.argumentCallback(e):e;return n[l]}}var ht={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},bt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},wt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Tt=function(e,r){var a=Number(e),n=a%100;if(n>20||n<10)switch(n%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},Ot={ordinalNumber:Tt,era:W({values:ht,defaultWidth:"wide"}),quarter:W({values:xt,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:W({values:yt,defaultWidth:"wide"}),day:W({values:vt,defaultWidth:"wide"}),dayPeriod:W({values:bt,defaultWidth:"wide",formattingValues:wt,defaultFormattingWidth:"wide"})},Pe=Ot;function C(t){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.width,n=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],o=e.match(n);if(!o)return null;var i=o[0],s=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(s)?Dt(s,function(c){return c.test(i)}):St(s,function(c){return c.test(i)}),l;l=t.valueCallback?t.valueCallback(d):d,l=r.valueCallback?r.valueCallback(l):l;var p=e.slice(i.length);return{value:l,rest:p}}}function St(t,e){for(var r in t)if(t.hasOwnProperty(r)&&e(t[r]))return r}function Dt(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},a=e.match(t.matchPattern);if(!a)return null;var n=a[0],o=e.match(t.parsePattern);if(!o)return null;var i=t.valueCallback?t.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;var s=e.slice(n.length);return{value:i,rest:s}}}var kt=/^(\\d+)(th|st|nd|rd)?/i,Mt=/\\d+/i,Wt={narrow:/^(b|a)/i,abbreviated:/^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ct={any:[/^b/i,/^(a|c)/i]},Pt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ft={any:[/1/i,/2/i,/3/i,/4/i]},It={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Yt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ut={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Nt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Et={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},At={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},qt={ordinalNumber:se({matchPattern:kt,parsePattern:Mt,valueCallback:function(e){return parseInt(e,10)}}),era:C({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Ct,defaultParseWidth:"any"}),quarter:C({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:Ft,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:C({matchPatterns:It,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),day:C({matchPatterns:Ut,defaultMatchWidth:"wide",parsePatterns:Nt,defaultParseWidth:"any"}),dayPeriod:C({matchPatterns:Et,defaultMatchWidth:"any",parsePatterns:At,defaultParseWidth:"any"})},Fe=qt;var _t={code:"en-US",formatDistance:Me,formatLong:We,formatRelative:Ce,localize:Pe,match:Fe,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ie=_t;var Ye=Ie;var Lt=/[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|\'\'|\'(\'\'|[^\'])+(\'|$)|./g,$t=/P+p+|P+|p+|\'\'|\'(\'\'|[^\'])+(\'|$)|./g,Qt=/^\'([^]*?)\'?$/,jt=/\'\'/g,Ht=/[a-zA-Z]/;function H(t,e,r){var a,n,o,i,s,d,l,p,c,h,g,v,N,D,E,R,B,G;f(2,arguments);var Ge=String(e),A=T(),q=(a=(n=r?.locale)!==null&&n!==void 0?n:A.locale)!==null&&a!==void 0?a:Ye,V=x((o=(i=(s=(d=r?.firstWeekContainsDate)!==null&&d!==void 0?d:r==null||(l=r.locale)===null||l===void 0||(p=l.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&s!==void 0?s:A.firstWeekContainsDate)!==null&&i!==void 0?i:(c=A.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(V>=1&&V<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var X=x((g=(v=(N=(D=r?.weekStartsOn)!==null&&D!==void 0?D:r==null||(E=r.locale)===null||E===void 0||(R=E.options)===null||R===void 0?void 0:R.weekStartsOn)!==null&&N!==void 0?N:A.weekStartsOn)!==null&&v!==void 0?v:(B=A.locale)===null||B===void 0||(G=B.options)===null||G===void 0?void 0:G.weekStartsOn)!==null&&g!==void 0?g:0);if(!(X>=0&&X<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!q.localize)throw new RangeError("locale must contain localize property");if(!q.formatLong)throw new RangeError("locale must contain formatLong property");var Q=m(t);if(!Z(Q))throw new RangeError("Invalid time value");var Ve=z(Q),Xe=ee(Q,Ve),Je={firstWeekContainsDate:V,weekStartsOn:X,locale:q,_originalDate:Q},ze=Ge.match($t).map(function(y){var w=y[0];if(w==="p"||w==="P"){var j=Se[w];return j(y,q.formatLong)}return y}).join("").match(Lt).map(function(y){if(y==="\'\'")return"\'";var w=y[0];if(w==="\'")return Rt(y);var j=we[w];if(j)return!(r!=null&&r.useAdditionalWeekYearTokens)&&ke(y)&&ie(y,e,String(t)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&De(y)&&ie(y,e,String(t)),j(Xe,y,q.localize,Je);if(w.match(Ht))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return y}).join("");return ze}function Rt(t){var e=t.match(Qt);return e?e[1].replace(jt,"\'"):t}var Ue=t=>[...new Set(t)];var ue=(t,e)=>{if(t instanceof Date)return"date";if(typeof t=="string"){if(/\\/\\/(\\S+?(?:jpe?g|png|gif|svg))/gi.test(t)||t.includes("unsplash"))return"image";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(t))return"date";if(e=="tag"||e=="tags")return"tags-multi";if(/\\[\\[.*?\\]\\]/.test(t))return"link"}else{if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(t)if(Array.isArray(t)||typeof t=="string"&&t.indexOf(",")>-1){let r=Array.isArray(t)?t:[];if(typeof t=="string"&&t.indexOf(",")>-1&&(r=P(t)),e=="tag"||e=="tags")return"tags-multi";if(r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string")return"link";let a=Ue(r.map(n=>ue(n,e)));return a.length==1&&a[0]=="link"?"link-multi":a.some(n=>n=="object")?"object-multi":"option-multi"}else{if(t.isLuxonDateTime)return"date";if(t.isLuxonDuration)return"duration";if(t.type=="file")return"link";if(typeof t=="object"&&!Array.isArray(t)&&t!==null)return"object"}else return"unknown"}return"text"};var Ne=t=>t.map(e=>e.replace(",","\\\\,")).join(", "),I=t=>JSON.stringify(t);var P=t=>t?.startsWith("[")?he(ye(t)):Bt(t),Bt=t=>(t?.replace("\\\\,",",")?.match(/(\\\\.|[^,])+/g)??[]).map(e=>e.trim()),le=(t,e)=>{switch(ue(e,t)){case"tags-multi":return e;case"object":case"object-multi":return JSON.stringify(e);case"number":return e.toString();case"boolean":return e?"true":"false";case"date":{if(e instanceof Date){let a=H(e,"yyyy-MM-dd");return typeof a=="string"?a:""}return typeof e!="string"?"":e}break;case"duration":return Ne(Object.keys(e.values).reduce((a,n)=>[...a,...e.values[n]>0?[e.values[n]+" "+n]:[]],[]));case"option-multi":case"link-multi":return typeof e=="string"?fe(e):I(e.map(a=>a?typeof a=="string"?fe(a):a.path?a.path:Array.isArray(e)&&a.length==1&&Array.isArray(a[0])&&a[0].length==1&&typeof a[0][0]=="string"?a[0][0]:JSON.stringify(a):""));case"link":return Array.isArray(e)&&e.length==1&&Array.isArray(e[0])&&e[0].length==1&&typeof e[0][0]=="string"?e[0][0]:typeof e=="string"?fe(e):e.path;case"text":case"tag":case"image":return e}return""};var ye=t=>{let e;try{e=JSON.parse(t)}catch{}return e};var fe=t=>{if(!t)return"";let e=/\\[\\[(.*?)\\]\\]/g.exec(t),r=e?.length>1?e[1].substring(0,xe("|",e[1])):t;return r||t};var Ee=(t,e)=>{let r=t?P(t):[],a=e?P(e):[];return a.every(n=>r.some(o=>o==n))&&r.every(n=>a.some(o=>o==n))},Y=(t,e)=>t==e,de=(t,e)=>(t??"").length==0,me=(t,e)=>(t??"").toLowerCase().includes((e??"").toLowerCase()),ce=(t,e)=>parseFloat(t)>parseFloat(e),pe=(t,e)=>parseInt(t){let r=isNaN(Date.parse(t))?new Date(parseInt(t)):new Date(t),a=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e);return r.valueOf()>=a.valueOf()},qe=(t,e)=>{let r=isNaN(Date.parse(t))?new Date(parseInt(t)):new Date(t),a=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e);return r.valueOf(){let r=t?P(t):[],a=e?P(e):[];return r.length==0?!1:a.some(n=>r.some(o=>o==n))},_e=(t,e)=>{if(!t)return!1;let r=new Date(`${t.toString().replace(".",":")}`),a=new Date(`${e}`);return r.getMonth()===a.getMonth()&&r.getDate()===a.getDate()},Le=t=>{if(!t)return!1;let e=new Date(`${t.toString()}T00:00`),r=new Date;return e.getMonth()===r.getMonth()&&e.getDate()===r.getDate()};var U={isNotEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(t,e)=>!de(t,""),valueType:"none"},isEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(t,e)=>de(t,""),valueType:"none"},include:{fn:(t,e)=>me(t,e),type:["text","file","link","image"],valueType:"text"},notInclude:{type:["text","file","link","image"],fn:(t,e)=>!me(t,e),valueType:"text"},is:{type:["text"],fn:(t,e)=>Y(t,e),valueType:"text"},isNot:{type:["text"],fn:(t,e)=>!Y(t,e),valueType:"text"},equal:{type:["number"],fn:(t,e)=>Y(t,e),valueType:"number"},isLink:{type:["link","context"],fn:(t,e)=>Y(t,e),valueType:"link"},isNotLink:{type:["link","context"],fn:(t,e)=>!Y(t,e),valueType:"link"},isGreatThan:{type:["number"],fn:(t,e)=>ce(t,e),valueType:"number"},isLessThan:{type:["number"],fn:(t,e)=>pe(t,e),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(t,e)=>!ce(t,e),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(t,e)=>!pe(t,e),valueType:"number"},dateBefore:{type:["date"],fn:(t,e)=>qe(t,e),valueType:"date"},dateAfter:{type:["date"],fn:(t,e)=>Ae(t,e),valueType:"date"},isSameDate:{type:["date"],fn:(t,e)=>_e(t,e),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(t,e)=>Le(t,e),valueType:"none"},isExactList:{type:["option","option-multi","link-multi","context-multi","tags-multi"],fn:(t,e)=>Ee(t,e),valueType:"list"},isAnyInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(t,e)=>ge(t,e),valueType:"list"},isNoneInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(t,e)=>!ge(t,e),valueType:"list"},isTrue:{type:["boolean"],fn:(t,e)=>t=="true",valueType:"none"},isFalse:{type:["boolean"],fn:(t,e)=>t!="true",valueType:"none"}};var Gt=(t,e,r)=>e.reduce((n,o)=>{let[i,s]=n,d=o.type=="context"?$e(s,o,r):o.type=="path"?je(s,o,r):o.type=="frontmatter"?Qe(s,o,r):He(s,o,r),l=s.filter(p=>!d.includes(p));return[[...i,...d],l]},[[],t])[0],Vt=(t,e,r)=>e.reduce((a,n)=>n.type=="context"?$e(a,n,r):n.type=="path"?je(a,n,r):n.type=="frontmatter"?Qe(a,n,r):He(a,n,r),t),$e=(t,e,r)=>{let a=U[e.fn];return!a||a.valueType!="none"&&e.value.length==0?[]:t.filter(n=>{let[o,i]=e.field.split("."),s=n.metadata?.property;if(!n.spaces?.includes(o)||!s||!s[i])return!1;let d=!0;if(a){let l=e.fType=="property"?r[e.value]:e.value;d=a.fn(le(i,s[i]),l)}return d})},Qe=(t,e,r)=>{let a=U[e.fn];return!a||a.valueType!="none"&&e.value.length==0?[]:t.filter(n=>{let o=n.metadata?.property;if(!o||!o[e.field])return!1;let i=!0;if(a){let s=e.fType=="property"?r[e.value]:e.value;i=a.fn(le(e.field,o[e.field]),s)}return i})},je=(t,e,r)=>{let a=U[e.fn];return!a||a.valueType!="none"&&e.value.length==0?[]:t.filter(n=>{let o="";e.field=="outlinks"?o=I(n.outlinks??[]):e.field=="inlinks"?o=I(n.inlinks??[]):e.field=="tags"&&(o=I(n.tags??[]));let i=!0;if(a){let s=e.fType=="property"?r[e.value]:e.value;i=a.fn(o,s)}return i})},He=(t,e,r)=>{let a=U[e.fn];return!a||a.valueType!="none"&&e.value.length==0?[]:t.filter(n=>{let o=!0;if(a){let i=e.fType=="property"?r[e.value]:e.value;o=a.fn(n.metadata?.[e.type]?.[e.field],i)}return o})},Re=(t,e,r)=>t.reduce((n,o)=>!n||o.filters.length==0?!1:o.type=="any"?Gt([e],o.filters,r).length>0:Vt([e],o.filters,r).length>0,!0);function Be(t){let{queries:e,pathsIndex:r,count:a}=t,n=[];for(let[o,i]of r)!i.hidden&&Re(e,i,{})&&n.push(i);return n.slice(0,a)}var Xt=self;Xt.onmessage=async t=>{let{payload:e,job:r}=t.data,a;r.type=="search"&&(a=Be(e));try{postMessage({job:r,result:a})}catch(n){console.log(n),postMessage({job:r,result:{$error:`Failed to run ${r.type} ${r.path}: ${n}`}})}};\n', { "name": "Superstate Search" }); + return inlineWorker('"use strict";function he(t){return Array.isArray(t)?t:typeof t=="string"?[t]:[]}var xe=(t,e)=>e.indexOf(t)>0?e.indexOf(t):e.length;function k(t){return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(t)}function x(t){if(t===null||t===!0||t===!1)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function f(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function m(t){f(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||k(t)==="object"&&e==="[object Date]"?new Date(t.getTime()):typeof t=="number"||e==="[object Number]"?new Date(t):((typeof t=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn\'t accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function J(t,e){f(2,arguments);var r=m(t).getTime(),a=x(e);return new Date(r+a)}var Ke={};function T(){return Ke}function z(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function K(t){return f(1,arguments),t instanceof Date||k(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Z(t){if(f(1,arguments),!K(t)&&typeof t!="number")return!1;var e=m(t);return!isNaN(Number(e))}function ee(t,e){f(2,arguments);var r=x(e);return J(t,-r)}var Ze=864e5;function te(t){f(1,arguments);var e=m(t),r=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var a=e.getTime(),n=r-a;return Math.floor(n/Ze)+1}function O(t){f(1,arguments);var e=1,r=m(t),a=r.getUTCDay(),n=(a=n.getTime()?r+1:e.getTime()>=i.getTime()?r:r-1}function re(t){f(1,arguments);var e=_(t),r=new Date(0);r.setUTCFullYear(e,0,4),r.setUTCHours(0,0,0,0);var a=O(r);return a}var et=6048e5;function ae(t){f(1,arguments);var e=m(t),r=O(e).getTime()-re(e).getTime();return Math.round(r/et)+1}function S(t,e){var r,a,n,o,i,s,d,l;f(1,arguments);var p=T(),c=x((r=(a=(n=(o=e?.weekStartsOn)!==null&&o!==void 0?o:e==null||(i=e.locale)===null||i===void 0||(s=i.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&n!==void 0?n:p.weekStartsOn)!==null&&a!==void 0?a:(d=p.locale)===null||d===void 0||(l=d.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=m(t),g=h.getUTCDay(),v=(g=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(c+1,0,g),v.setUTCHours(0,0,0,0);var N=S(v,e),D=new Date(0);D.setUTCFullYear(c,0,g),D.setUTCHours(0,0,0,0);var E=S(D,e);return p.getTime()>=N.getTime()?c+1:p.getTime()>=E.getTime()?c:c-1}function ne(t,e){var r,a,n,o,i,s,d,l;f(1,arguments);var p=T(),c=x((r=(a=(n=(o=e?.firstWeekContainsDate)!==null&&o!==void 0?o:e==null||(i=e.locale)===null||i===void 0||(s=i.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&n!==void 0?n:p.firstWeekContainsDate)!==null&&a!==void 0?a:(d=p.locale)===null||d===void 0||(l=d.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),h=L(t,e),g=new Date(0);g.setUTCFullYear(h,0,c),g.setUTCHours(0,0,0,0);var v=S(g,e);return v}var tt=6048e5;function oe(t,e){f(1,arguments);var r=m(t),a=S(r,e).getTime()-ne(r,e).getTime();return Math.round(a/tt)+1}function u(t,e){for(var r=t<0?"-":"",a=Math.abs(t).toString();a.length0?a:1-a;return u(r==="yy"?n%100:n,r.length)},M:function(e,r){var a=e.getUTCMonth();return r==="M"?String(a+1):u(a+1,2)},d:function(e,r){return u(e.getUTCDate(),r.length)},a:function(e,r){var a=e.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function(e,r){return u(e.getUTCHours()%12||12,r.length)},H:function(e,r){return u(e.getUTCHours(),r.length)},m:function(e,r){return u(e.getUTCMinutes(),r.length)},s:function(e,r){return u(e.getUTCSeconds(),r.length)},S:function(e,r){var a=r.length,n=e.getUTCMilliseconds(),o=Math.floor(n*Math.pow(10,a-3));return u(o,r.length)}},b=rt;var F={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},at={G:function(e,r,a){var n=e.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return a.era(n,{width:"abbreviated"});case"GGGGG":return a.era(n,{width:"narrow"});case"GGGG":default:return a.era(n,{width:"wide"})}},y:function(e,r,a){if(r==="yo"){var n=e.getUTCFullYear(),o=n>0?n:1-n;return a.ordinalNumber(o,{unit:"year"})}return b.y(e,r)},Y:function(e,r,a,n){var o=L(e,n),i=o>0?o:1-o;if(r==="YY"){var s=i%100;return u(s,2)}return r==="Yo"?a.ordinalNumber(i,{unit:"year"}):u(i,r.length)},R:function(e,r){var a=_(e);return u(a,r.length)},u:function(e,r){var a=e.getUTCFullYear();return u(a,r.length)},Q:function(e,r,a){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"Q":return String(n);case"QQ":return u(n,2);case"Qo":return a.ordinalNumber(n,{unit:"quarter"});case"QQQ":return a.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,r,a){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(r){case"q":return String(n);case"qq":return u(n,2);case"qo":return a.ordinalNumber(n,{unit:"quarter"});case"qqq":return a.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,r,a){var n=e.getUTCMonth();switch(r){case"M":case"MM":return b.M(e,r);case"Mo":return a.ordinalNumber(n+1,{unit:"month"});case"MMM":return a.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(n,{width:"wide",context:"formatting"})}},L:function(e,r,a){var n=e.getUTCMonth();switch(r){case"L":return String(n+1);case"LL":return u(n+1,2);case"Lo":return a.ordinalNumber(n+1,{unit:"month"});case"LLL":return a.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(n,{width:"wide",context:"standalone"})}},w:function(e,r,a,n){var o=oe(e,n);return r==="wo"?a.ordinalNumber(o,{unit:"week"}):u(o,r.length)},I:function(e,r,a){var n=ae(e);return r==="Io"?a.ordinalNumber(n,{unit:"week"}):u(n,r.length)},d:function(e,r,a){return r==="do"?a.ordinalNumber(e.getUTCDate(),{unit:"date"}):b.d(e,r)},D:function(e,r,a){var n=te(e);return r==="Do"?a.ordinalNumber(n,{unit:"dayOfYear"}):u(n,r.length)},E:function(e,r,a){var n=e.getUTCDay();switch(r){case"E":case"EE":case"EEE":return a.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(n,{width:"short",context:"formatting"});case"EEEE":default:return a.day(n,{width:"wide",context:"formatting"})}},e:function(e,r,a,n){var o=e.getUTCDay(),i=(o-n.weekStartsOn+8)%7||7;switch(r){case"e":return String(i);case"ee":return u(i,2);case"eo":return a.ordinalNumber(i,{unit:"day"});case"eee":return a.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(o,{width:"short",context:"formatting"});case"eeee":default:return a.day(o,{width:"wide",context:"formatting"})}},c:function(e,r,a,n){var o=e.getUTCDay(),i=(o-n.weekStartsOn+8)%7||7;switch(r){case"c":return String(i);case"cc":return u(i,r.length);case"co":return a.ordinalNumber(i,{unit:"day"});case"ccc":return a.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(o,{width:"narrow",context:"standalone"});case"cccccc":return a.day(o,{width:"short",context:"standalone"});case"cccc":default:return a.day(o,{width:"wide",context:"standalone"})}},i:function(e,r,a){var n=e.getUTCDay(),o=n===0?7:n;switch(r){case"i":return String(o);case"ii":return u(o,r.length);case"io":return a.ordinalNumber(o,{unit:"day"});case"iii":return a.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(n,{width:"short",context:"formatting"});case"iiii":default:return a.day(n,{width:"wide",context:"formatting"})}},a:function(e,r,a){var n=e.getUTCHours(),o=n/12>=1?"pm":"am";switch(r){case"a":case"aa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,r,a){var n=e.getUTCHours(),o;switch(n===12?o=F.noon:n===0?o=F.midnight:o=n/12>=1?"pm":"am",r){case"b":case"bb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,r,a){var n=e.getUTCHours(),o;switch(n>=17?o=F.evening:n>=12?o=F.afternoon:n>=4?o=F.morning:o=F.night,r){case"B":case"BB":case"BBB":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,r,a){if(r==="ho"){var n=e.getUTCHours()%12;return n===0&&(n=12),a.ordinalNumber(n,{unit:"hour"})}return b.h(e,r)},H:function(e,r,a){return r==="Ho"?a.ordinalNumber(e.getUTCHours(),{unit:"hour"}):b.H(e,r)},K:function(e,r,a){var n=e.getUTCHours()%12;return r==="Ko"?a.ordinalNumber(n,{unit:"hour"}):u(n,r.length)},k:function(e,r,a){var n=e.getUTCHours();return n===0&&(n=24),r==="ko"?a.ordinalNumber(n,{unit:"hour"}):u(n,r.length)},m:function(e,r,a){return r==="mo"?a.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):b.m(e,r)},s:function(e,r,a){return r==="so"?a.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):b.s(e,r)},S:function(e,r){return b.S(e,r)},X:function(e,r,a,n){var o=n._originalDate||e,i=o.getTimezoneOffset();if(i===0)return"Z";switch(r){case"X":return be(i);case"XXXX":case"XX":return M(i);case"XXXXX":case"XXX":default:return M(i,":")}},x:function(e,r,a,n){var o=n._originalDate||e,i=o.getTimezoneOffset();switch(r){case"x":return be(i);case"xxxx":case"xx":return M(i);case"xxxxx":case"xxx":default:return M(i,":")}},O:function(e,r,a,n){var o=n._originalDate||e,i=o.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ve(i,":");case"OOOO":default:return"GMT"+M(i,":")}},z:function(e,r,a,n){var o=n._originalDate||e,i=o.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ve(i,":");case"zzzz":default:return"GMT"+M(i,":")}},t:function(e,r,a,n){var o=n._originalDate||e,i=Math.floor(o.getTime()/1e3);return u(i,r.length)},T:function(e,r,a,n){var o=n._originalDate||e,i=o.getTime();return u(i,r.length)}};function ve(t,e){var r=t>0?"-":"+",a=Math.abs(t),n=Math.floor(a/60),o=a%60;if(o===0)return r+String(n);var i=e||"";return r+String(n)+i+u(o,2)}function be(t,e){if(t%60===0){var r=t>0?"-":"+";return r+u(Math.abs(t)/60,2)}return M(t,e)}function M(t,e){var r=e||"",a=t>0?"-":"+",n=Math.abs(t),o=u(Math.floor(n/60),2),i=u(n%60,2);return a+o+r+i}var we=at;var Te=function(e,r){switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Oe=function(e,r){switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},nt=function(e,r){var a=e.match(/(P+)(p+)?/)||[],n=a[1],o=a[2];if(!o)return Te(e,r);var i;switch(n){case"P":i=r.dateTime({width:"short"});break;case"PP":i=r.dateTime({width:"medium"});break;case"PPP":i=r.dateTime({width:"long"});break;case"PPPP":default:i=r.dateTime({width:"full"});break}return i.replace("{{date}}",Te(n,r)).replace("{{time}}",Oe(o,r))},ot={p:Oe,P:nt},Se=ot;var it=["D","DD"],st=["YY","YYYY"];function De(t){return it.indexOf(t)!==-1}function ke(t){return st.indexOf(t)!==-1}function ie(t,e,r){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ut={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ft=function(e,r,a){var n,o=ut[e];return typeof o=="string"?n=o:r===1?n=o.one:n=o.other.replace("{{count}}",r.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+n:n+" ago":n},Me=ft;function $(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.width?String(e.width):t.defaultWidth,a=t.formats[r]||t.formats[t.defaultWidth];return a}}var lt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},dt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},mt={full:"{{date}} \'at\' {{time}}",long:"{{date}} \'at\' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ct={date:$({formats:lt,defaultWidth:"full"}),time:$({formats:dt,defaultWidth:"full"}),dateTime:$({formats:mt,defaultWidth:"full"})},We=ct;var pt={lastWeek:"\'last\' eeee \'at\' p",yesterday:"\'yesterday at\' p",today:"\'today at\' p",tomorrow:"\'tomorrow at\' p",nextWeek:"eeee \'at\' p",other:"P"},gt=function(e,r,a,n){return pt[e]},Ce=gt;function W(t){return function(e,r){var a=r!=null&&r.context?String(r.context):"standalone",n;if(a==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,i=r!=null&&r.width?String(r.width):o;n=t.formattingValues[i]||t.formattingValues[o]}else{var s=t.defaultWidth,d=r!=null&&r.width?String(r.width):t.defaultWidth;n=t.values[d]||t.values[s]}var l=t.argumentCallback?t.argumentCallback(e):e;return n[l]}}var ht={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},bt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},wt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Tt=function(e,r){var a=Number(e),n=a%100;if(n>20||n<10)switch(n%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},Ot={ordinalNumber:Tt,era:W({values:ht,defaultWidth:"wide"}),quarter:W({values:xt,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:W({values:yt,defaultWidth:"wide"}),day:W({values:vt,defaultWidth:"wide"}),dayPeriod:W({values:bt,defaultWidth:"wide",formattingValues:wt,defaultFormattingWidth:"wide"})},Pe=Ot;function C(t){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.width,n=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],o=e.match(n);if(!o)return null;var i=o[0],s=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(s)?Dt(s,function(c){return c.test(i)}):St(s,function(c){return c.test(i)}),l;l=t.valueCallback?t.valueCallback(d):d,l=r.valueCallback?r.valueCallback(l):l;var p=e.slice(i.length);return{value:l,rest:p}}}function St(t,e){for(var r in t)if(t.hasOwnProperty(r)&&e(t[r]))return r}function Dt(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},a=e.match(t.matchPattern);if(!a)return null;var n=a[0],o=e.match(t.parsePattern);if(!o)return null;var i=t.valueCallback?t.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;var s=e.slice(n.length);return{value:i,rest:s}}}var kt=/^(\\d+)(th|st|nd|rd)?/i,Mt=/\\d+/i,Wt={narrow:/^(b|a)/i,abbreviated:/^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ct={any:[/^b/i,/^(a|c)/i]},Pt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ft={any:[/1/i,/2/i,/3/i,/4/i]},It={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Yt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ut={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Nt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Et={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},At={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},qt={ordinalNumber:se({matchPattern:kt,parsePattern:Mt,valueCallback:function(e){return parseInt(e,10)}}),era:C({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Ct,defaultParseWidth:"any"}),quarter:C({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:Ft,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:C({matchPatterns:It,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),day:C({matchPatterns:Ut,defaultMatchWidth:"wide",parsePatterns:Nt,defaultParseWidth:"any"}),dayPeriod:C({matchPatterns:Et,defaultMatchWidth:"any",parsePatterns:At,defaultParseWidth:"any"})},Fe=qt;var _t={code:"en-US",formatDistance:Me,formatLong:We,formatRelative:Ce,localize:Pe,match:Fe,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ie=_t;var Ye=Ie;var Lt=/[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|\'\'|\'(\'\'|[^\'])+(\'|$)|./g,$t=/P+p+|P+|p+|\'\'|\'(\'\'|[^\'])+(\'|$)|./g,Qt=/^\'([^]*?)\'?$/,jt=/\'\'/g,Ht=/[a-zA-Z]/;function H(t,e,r){var a,n,o,i,s,d,l,p,c,h,g,v,N,D,E,R,B,G;f(2,arguments);var Ge=String(e),A=T(),q=(a=(n=r?.locale)!==null&&n!==void 0?n:A.locale)!==null&&a!==void 0?a:Ye,V=x((o=(i=(s=(d=r?.firstWeekContainsDate)!==null&&d!==void 0?d:r==null||(l=r.locale)===null||l===void 0||(p=l.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&s!==void 0?s:A.firstWeekContainsDate)!==null&&i!==void 0?i:(c=A.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(V>=1&&V<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var X=x((g=(v=(N=(D=r?.weekStartsOn)!==null&&D!==void 0?D:r==null||(E=r.locale)===null||E===void 0||(R=E.options)===null||R===void 0?void 0:R.weekStartsOn)!==null&&N!==void 0?N:A.weekStartsOn)!==null&&v!==void 0?v:(B=A.locale)===null||B===void 0||(G=B.options)===null||G===void 0?void 0:G.weekStartsOn)!==null&&g!==void 0?g:0);if(!(X>=0&&X<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!q.localize)throw new RangeError("locale must contain localize property");if(!q.formatLong)throw new RangeError("locale must contain formatLong property");var Q=m(t);if(!Z(Q))throw new RangeError("Invalid time value");var Ve=z(Q),Xe=ee(Q,Ve),Je={firstWeekContainsDate:V,weekStartsOn:X,locale:q,_originalDate:Q},ze=Ge.match($t).map(function(y){var w=y[0];if(w==="p"||w==="P"){var j=Se[w];return j(y,q.formatLong)}return y}).join("").match(Lt).map(function(y){if(y==="\'\'")return"\'";var w=y[0];if(w==="\'")return Rt(y);var j=we[w];if(j)return!(r!=null&&r.useAdditionalWeekYearTokens)&&ke(y)&&ie(y,e,String(t)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&De(y)&&ie(y,e,String(t)),j(Xe,y,q.localize,Je);if(w.match(Ht))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return y}).join("");return ze}function Rt(t){var e=t.match(Qt);return e?e[1].replace(jt,"\'"):t}var Ue=t=>[...new Set(t)];var ue=(t,e)=>{if(t instanceof Date)return"date";if(typeof t=="string"){if(/\\/\\/(\\S+?(?:jpe?g|png|gif|svg))/gi.test(t)||t.includes("unsplash"))return"image";if(/^\\d{4}-\\d{2}-\\d{2}$/.test(t))return"date";if(e=="tag"||e=="tags")return"tags-multi";if(/\\[\\[.*?\\]\\]/.test(t))return"link"}else{if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(t)if(Array.isArray(t)||typeof t=="string"&&t.indexOf(",")>-1){let r=Array.isArray(t)?t:[];if(typeof t=="string"&&t.indexOf(",")>-1&&(r=P(t)),e=="tag"||e=="tags")return"tags-multi";if(r.length==1&&Array.isArray(r[0])&&r[0].length==1&&typeof r[0][0]=="string")return"link";let a=Ue(r.map(n=>ue(n,e)));return a.length==1&&a[0]=="link"?"link-multi":a.some(n=>n=="object")?"object-multi":"option-multi"}else{if(t.isLuxonDateTime)return"date";if(t.isLuxonDuration)return"duration";if(t.type=="file")return"link";if(typeof t=="object"&&!Array.isArray(t)&&t!==null)return"object"}else return"unknown"}return"text"};var Ne=t=>t.map(e=>e.replace(",","\\\\,")).join(", "),I=t=>JSON.stringify(t);var P=t=>t?.startsWith("[")?he(ye(t)):Bt(t),Bt=t=>(t?.replace("\\\\,",",")?.match(/(\\\\.|[^,])+/g)??[]).map(e=>e.trim()),le=(t,e)=>{switch(ue(e,t)){case"tags-multi":return e;case"object":case"object-multi":return JSON.stringify(e);case"number":return e.toString();case"boolean":return e?"true":"false";case"date":{if(e instanceof Date){let a=H(e,"yyyy-MM-dd");return typeof a=="string"?a:""}return typeof e!="string"?"":e}break;case"duration":return Ne(Object.keys(e.values).reduce((a,n)=>[...a,...e.values[n]>0?[e.values[n]+" "+n]:[]],[]));case"option-multi":case"link-multi":return typeof e=="string"?fe(e):I(e.map(a=>a?typeof a=="string"?fe(a):a.path?a.path:Array.isArray(e)&&a.length==1&&Array.isArray(a[0])&&a[0].length==1&&typeof a[0][0]=="string"?a[0][0]:JSON.stringify(a):""));case"link":return Array.isArray(e)&&e.length==1&&Array.isArray(e[0])&&e[0].length==1&&typeof e[0][0]=="string"?e[0][0]:typeof e=="string"?fe(e):e.path;case"text":case"tag":case"image":return e}return""};var ye=t=>{let e;try{e=JSON.parse(t)}catch{}return e};var fe=t=>{if(!t)return"";let e=/\\[\\[(.*?)\\]\\]/g.exec(t),r=e?.length>1?e[1].substring(0,xe("|",e[1])):t;return r||t};var Ee=(t,e)=>{let r=t?P(t):[],a=e?P(e):[];return a.every(n=>r.some(o=>o==n))&&r.every(n=>a.some(o=>o==n))},Y=(t,e)=>t==e,de=(t,e)=>(t??"").length==0,me=(t,e)=>(t??"").toLowerCase().includes((e??"").toLowerCase()),ce=(t,e)=>parseFloat(t)>parseFloat(e),pe=(t,e)=>parseInt(t){let r=isNaN(Date.parse(t))?new Date(parseInt(t)):new Date(t),a=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e);return r.valueOf()>=a.valueOf()},qe=(t,e)=>{let r=isNaN(Date.parse(t))?new Date(parseInt(t)):new Date(t),a=isNaN(Date.parse(e))?new Date(parseInt(e)):new Date(e);return r.valueOf(){let r=t?P(t):[],a=e?P(e):[];return r.length==0?!1:a.some(n=>r.some(o=>o==n))},_e=(t,e)=>{if(!t)return!1;let r=new Date(`${t.toString().replace(".",":")}`),a=new Date(`${e}`);return r.getMonth()===a.getMonth()&&r.getDate()===a.getDate()},Le=t=>{if(!t)return!1;let e=new Date(`${t.toString()}T00:00`),r=new Date;return e.getMonth()===r.getMonth()&&e.getDate()===r.getDate()};var U={isNotEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(t,e)=>!de(t,""),valueType:"none"},isEmpty:{type:["text","file","number","option","option-multi","link","link-multi","image"],fn:(t,e)=>de(t,""),valueType:"none"},include:{fn:(t,e)=>me(t,e),type:["text","file","link","image"],valueType:"text"},notInclude:{type:["text","file","link","image"],fn:(t,e)=>!me(t,e),valueType:"text"},is:{type:["text"],fn:(t,e)=>Y(t,e),valueType:"text"},isNot:{type:["text"],fn:(t,e)=>!Y(t,e),valueType:"text"},equal:{type:["number"],fn:(t,e)=>Y(t,e),valueType:"number"},isLink:{type:["link","context"],fn:(t,e)=>Y(t,e),valueType:"link"},isNotLink:{type:["link","context"],fn:(t,e)=>!Y(t,e),valueType:"link"},isGreatThan:{type:["number"],fn:(t,e)=>ce(t,e),valueType:"number"},isLessThan:{type:["number"],fn:(t,e)=>pe(t,e),valueType:"number"},isLessThanOrEqual:{type:["number"],fn:(t,e)=>!ce(t,e),valueType:"number"},isGreatThanOrEqual:{type:["number"],fn:(t,e)=>!pe(t,e),valueType:"number"},dateBefore:{type:["date"],fn:(t,e)=>qe(t,e),valueType:"date"},dateAfter:{type:["date"],fn:(t,e)=>Ae(t,e),valueType:"date"},isSameDate:{type:["date"],fn:(t,e)=>_e(t,e),valueType:"date"},isSameDateAsToday:{type:["date"],fn:(t,e)=>Le(t,e),valueType:"none"},isExactList:{type:["option","option-multi","link-multi","context-multi","tags-multi"],fn:(t,e)=>Ee(t,e),valueType:"list"},isAnyInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(t,e)=>ge(t,e),valueType:"list"},isNoneInList:{type:["option","context","link","option-multi","link-multi","context-multi","tags-multi"],fn:(t,e)=>!ge(t,e),valueType:"list"},isTrue:{type:["boolean"],fn:(t,e)=>t=="true",valueType:"none"},isFalse:{type:["boolean"],fn:(t,e)=>t!="true",valueType:"none"}};var Gt=(t,e,r)=>e.reduce((n,o)=>{let[i,s]=n,d=o.type=="context"?$e(s,o,r):o.type=="path"?je(s,o,r):o.type=="frontmatter"?Qe(s,o,r):He(s,o,r),l=s.filter(p=>!d.includes(p));return[[...i,...d],l]},[[],t])[0],Vt=(t,e,r)=>e.reduce((a,n)=>n.type=="context"?$e(a,n,r):n.type=="path"?je(a,n,r):n.type=="frontmatter"?Qe(a,n,r):He(a,n,r),t),$e=(t,e,r)=>{let a=U[e.fn];return!a||a.valueType!="none"&&e.value.length==0?[]:t.filter(n=>{let[o,i]=e.field.split("."),s=n.metadata?.property;if(!n.spaces?.includes(o)||!s||!s[i])return!1;let d=!0;if(a){let l=e.fType=="property"?r[e.value]:e.value;d=a.fn(le(i,s[i]),l)}return d})},Qe=(t,e,r)=>{let a=U[e.fn];return!a||a.valueType!="none"&&e.value.length==0?[]:t.filter(n=>{let o=n.metadata?.property;if(!o||o[e.field]===void 0)return!1;let i=!0;if(a){let s=e.fType=="property"?r[e.value]:e.value;i=a.fn(le(e.field,o[e.field]),s)}return i})},je=(t,e,r)=>{let a=U[e.fn];return!a||a.valueType!="none"&&e.value.length==0?[]:t.filter(n=>{let o="";e.field=="outlinks"?o=I(n.outlinks??[]):e.field=="inlinks"?o=I(n.inlinks??[]):e.field=="tags"&&(o=I(n.tags??[]));let i=!0;if(a){let s=e.fType=="property"?r[e.value]:e.value;i=a.fn(o,s)}return i})},He=(t,e,r)=>{let a=U[e.fn];return!a||a.valueType!="none"&&e.value.length==0?[]:t.filter(n=>{let o=!0;if(a){let i=e.fType=="property"?r[e.value]:e.value;o=a.fn(n.metadata?.[e.type]?.[e.field],i)}return o})},Re=(t,e,r)=>t.reduce((n,o)=>!n||o.filters.length==0?!1:o.type=="any"?Gt([e],o.filters,r).length>0:Vt([e],o.filters,r).length>0,!0);function Be(t){let{queries:e,pathsIndex:r,count:a}=t,n=[];for(let[o,i]of r)!i.hidden&&Re(e,i,{})&&n.push(i);return n.slice(0,a)}var Xt=self;Xt.onmessage=async t=>{let{payload:e,job:r}=t.data,a;r.type=="search"&&(a=Be(e));try{postMessage({job:r,result:a})}catch(n){console.log(n),postMessage({job:r,result:{$error:`Failed to run ${r.type} ${r.path}: ${n}`}})}};\n', { "name": "Superstate Search" }); } // src/core/superstate/workers/search/search.ts @@ -93073,6 +93077,7 @@ var defaultSpaceFolder = ".space"; var FilesystemSpaceAdapter = class { constructor(fileSystem) { this.fileSystem = fileSystem; + this.schemes = ["spaces", "vault"]; this.onCreate = async (payload) => { if (payload.file.isFolder) { this.spaceManager.onSpaceCreated(payload.file.path); @@ -122794,7 +122799,7 @@ var FlowNodeView = (props) => { onSelect: (option) => { updateValue2(option.value); } - }))), props.state && expanded && (pathState?.path.length > 0 ? /* @__PURE__ */ import_react119.default.createElement(PathView, { + }))), props.state && expanded && (props.state?.props?.value.length > 0 ? /* @__PURE__ */ import_react119.default.createElement(PathView, { id: id3, superstate: props.superstate, path: pathState?.path ?? props.state?.props?.value, @@ -142621,6 +142626,230 @@ var InstallKit = (props) => { }, "Cancel"))); }; +// src/core/spaceManager/webAdapter/webAdapter.ts +var WebSpaceAdapter = class { + constructor() { + this.schemes = ["http", "https"]; + } + initiateAdapter(manager) { + this.spaceManager = manager; + } + async readTemplates(path2) { + return []; + } + async saveTemplate(path2, space2) { + return null; + } + deleteTemplate(path2, space2) { + return; + } + async readWaypoints() { + return []; + } + async saveWaypoints(waypoints) { + return; + } + async readTemplate(name317) { + return; + } + async readAllKits() { + return []; + } + async readAllTemplates() { + return {}; + } + async readKitFrames(name317) { + return {}; + } + async saveFrameKit(frames, name317) { + return; + } + async saveSpaceTemplate(frames, name317) { + return; + } + async onMetadataChange(payload) { + return; + } + allPaths(type) { + return []; + } + async pathExists(path2) { + return true; + } + async createItemAtPath(parent, type, name317, content3) { + return null; + } + async renamePath(oldPath, path2) { + return; + } + async deletePath(path2) { + return; + } + async getPathInfo(path2) { + return {}; + } + keysForCacheType(path2) { + return null; + } + readPathCache(path2) { + return null; + } + async readPath(path2) { + return ""; + } + async copyPath(path2, newPath, newName) { + return; + } + async writeToPath(path2, content3, binary) { + return; + } + async childrenForPath(path2, type) { + return []; + } + parentPathForPath(path2) { + return null; + } + async readFrame(path2, schema) { + return null; + } + async readAllFrames(path2) { + return {}; + } + async readTable(path2, schema) { + return null; + } + async spaceInitiated(path2) { + return false; + } + async tablesForSpace(path2) { + return []; + } + async createTable(path2, schema) { + return; + } + async saveTableSchema(path2, schemaId, saveSchema) { + return; + } + async saveTable(path2, table, force) { + return; + } + async deleteTable(path2, name317) { + return; + } + async readAllTables(path2) { + return {}; + } + async framesForSpace(path2) { + return []; + } + async createFrame(path2, schema) { + return; + } + async deleteFrame(path2, name317) { + return; + } + async saveFrameSchema(path2, schemaId, saveSchema) { + return; + } + async saveFrame(path2, frame) { + return; + } + async commandsForSpace(path2) { + return []; + } + async runCommand(path2, name317, args) { + return null; + } + async createCommand(path2, schema) { + return; + } + async readSystemCommands() { + return []; + } + async readLibraryCommands(name317) { + return []; + } + async saveSystemCommand(lib, command) { + return; + } + async deleteCommand(path2, name317) { + return; + } + async saveCommand(path2, schemaId, saveCommand) { + return; + } + async contextForSpace(path2) { + return null; + } + async addSpaceProperty(path2, property) { + return; + } + async deleteSpaceProperty(path2, property) { + return; + } + async saveSpaceProperty(path2, property, oldProperty) { + return; + } + async addProperty(path2, property) { + return; + } + async readLabel(path2) { + return null; + } + async saveLabel(path2, label, value) { + } + async renameProperty(path2, property, newProperty) { + } + async readProperties(path2) { + return null; + } + async deleteProperty(path2, property) { + } + async saveProperties(path2, properties3) { + return; + } + allSpaces() { + return []; + } + readTags() { + return []; + } + spaceInfoForPath(path2) { + return fileSystemSpaceInfoByPath(this.spaceManager, path2); + } + allCaches() { + return /* @__PURE__ */ new Map(); + } + async spaceDefForSpace(path2) { + return {}; + } + async createSpace(name317, parentPath, definition) { + return; + } + async saveSpace(path2, definitionFn, properties3) { + return; + } + renameSpace(oldPath, newPath) { + } + deleteSpace(path2) { + } + childrenForSpace(path2) { + return []; + } + addTag(path2, tag2) { + } + renameTag(path2, tag2, newTag) { + } + deleteTag(path2, tag2) { + } + pathsForTag(tag2) { + return []; + } + resolvePath(path2, source) { + return path2; + } +}; + // src/main.ts var makeMDVersion = 0.9; var MakeMDPlugin = class extends import_obsidian29.Plugin { @@ -143073,6 +143302,7 @@ var MakeMDPlugin = class extends import_obsidian29.Plugin { this.files.initiateFiletypeAdapter(new ImageFileTypeAdapter(this)); this.files.initiateFiletypeAdapter(new IconFileTypeAdapter(this)); const filesystemCosmoform = new FilesystemSpaceAdapter(this.files); + const webSpaceAdapter = new WebSpaceAdapter(); this.ui = new ObsidianUI(this); const uiManager = UIManager2.create(this.ui); const commandsManager = CLIManager.create(new ObsidianCommands(this)); diff --git a/manifest.json b/manifest.json index a679206..0ab8d3e 100755 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "make-md", "name": "MAKE.md", - "version": "0.9.27", + "version": "0.9.28", "minAppVersion": "0.16.0", "description": "Make.md brings powerful and modern note-taking features to Obsidian. Capture, organize and connect information with more flexibility without any code.", "author": "MAKE.md",